Skip to contentSkip to conversation

i40e: print correct hw max rss count in kernel ring buffer

PATCH In review Suresh Kumar 4 participants 10 messages Jan 20, 2024 – Mar 7, 2024 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i40e: print correct hw max rss count in kernel ring buffer

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count: 104/64

whereas ethtool reports the correct value from "vsi->num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------

and is misleading.

Change it to vsi->num_queue_pairs

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
 		i40e_pf_config_rss(pf);
 	}
 	dev_info(&pf->pdev->dev, "User requested queue count/HW max RSS count:  %d/%d\n",
-		 vsi->req_queue_pairs, pf->rss_size_max);
+		 vsi->req_queue_pairs, vsi->num_queue_pairs);
 	return pf->alloc_rss_size;
 }
 
Signature · 1 line
2.43.0
reviewer
#1 lore raw
Quoted 19 lines · Suresh Kumar

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count: 104/64

whereas ethtool reports the correct value from "vsi->num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 5 lines

and is misleading.

Change it to vsi->num_queue_pairs

Hi Suresh,

following-up on our earlier emails.

I do think that if this it is a fix it should have a fixes tag. Which should be for the commit where the bug was first visible to users.

author
#2 lore raw

Hi Simon,

Thanks a lot for getting back to me.

I would say, it's not fixing any issue. This is since the beginning. My
analysis is given below:

[1]
If I check the i40e_reconfig_rss_queues() function history, I see 'pf->rss_size_max' has been used since the beginning.

Later via the below commit, we enabled more than 64 RSS. <<<<<

+++
commit 9a3bd2f1e38e5f668200b5e720b4d87023f394d2

Author: Anjali Singhai Jain <[email protected]>
Date:   Tue Feb 24 06:58:44 2015 +0000

i40e: Enable more than 64 qps for the Main VSI

When running in a single TC mode the HW can be configured to enable
more
than max RSS qps for the Main VSI. This patch makes it possible to enable as many as num_online_cpus().

ethtool -L can still be used to reconfigure number of qps to a smaller value.

Change-ID I3e2df085276982603d86dfd79477c0ada8d30b8f
(quoted diff) +0 -0

b/drivers/net/ethernet/intel/i40e/i40e_main.c

drivers/net/ethernet/intel/i40e/i40e_main.c +6 -2
@@ -7252,23 +7259,27 @@
 int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
 {
+   struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
+   int new_rss_size;
+
    if (!(pf->flags & I40E_FLAG_RSS_ENABLED))
        return 0;
 
-   queue_count = min_t(int, queue_count, pf->rss_size_max);
+   new_rss_size = min_t(int, queue_count, pf->rss_size_max);
 
-   if (queue_count != pf->rss_size) {
+   if (queue_count != vsi->num_queue_pairs) {
+       vsi->req_queue_pairs = queue_count;
        i40e_prep_for_reset(pf);

....
+++

So accordingly we should have changed to using 'vsi->num_queue_pairs' instead of 'pf->rss_size_max' to print maximum rss size. Currently it's printing 64 as maximum RSS whereas the system supports more than that.
It's evident in my commit message kernel log which says:
"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count:
104/64".

It should have been 104/104 <<<<

So I am a bit confused about whether I should add a 'Fixes:' tag and even if I use a tag, which commit I should show here.

thanks....
*Suresh KS*
[email protected]
91-7709100053

Quoted 34 lines · Simon Horman
Quoted 4 lines · Suresh Kumar

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS

count: 104/64

Quoted 15 lines

whereas ethtool reports the correct value from "vsi->num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 5 lines

and is misleading.

Change it to vsi->num_queue_pairs

Hi Suresh,

following-up on our earlier emails.

I do think that if this it is a fix it should have a fixes tag. Which should be for the commit where the bug was first visible to users.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 43 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w supports.

Thank you

Quoted 23 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
  		i40e_pf_config_rss(pf);
  	}
  	dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-		 vsi->req_queue_pairs, pf->rss_size_max);
+		 vsi->req_queue_pairs, vsi->num_queue_pairs);
  	return pf->alloc_rss_size;
  }
  -- 2.43.0
author
#5 lore raw

Hi,

Thanks for checking. Do I need to do anything to reject this patch? If yes, please let me know.
This is first sucht experience for me.

Would like to get some understanding on below kernel logging for which I suggested the patch.

The ethtool reports maximum supported queue as 104 and when I set it, it takes that value also. But kernel logs:

"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count:
104/64".

So does it meas the firmware supports only 64, but we can set 104 or something like that ?

Is it any virtual queue set by driver as per number of CPUs ?. What I observe is, system has 104 CPUs.
I have another such machine where maximum supported queue mentioned by ethtool is as per number of CPUs. But here again, the 'max RSS' is reported less by kernel.

thanks....
*Suresh KS*
[email protected]
91-7709100053

Quoted 78 lines · Aleksandr
Quoted 43 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w supports.

Thank you

Quoted 23 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
              i40e_pf_config_rss(pf);
      }
      dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-              vsi->req_queue_pairs, pf->rss_size_max);
+              vsi->req_queue_pairs, vsi->num_queue_pairs);
      return pf->alloc_rss_size;
  }
  -- 2.43.0
#6 lore raw

Good day Suresh

The message:
"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count: 104/64".

Means that h/w supports only 64ques, but user requested 104.

If your OS displays maximum possible ques more than h/w supports then there is a bug in display routines.

With the best regards
Alex

From: suresh ks <[email protected]>
Sent: Thursday, February 8, 2024 2:14 PM
To: Loktionov, Aleksandr <[email protected]>
Cc: Kitszel, Przemyslaw <[email protected]>; Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer

Hi,

Thanks for checking. Do I need to do anything to reject this patch? If yes, please let me know. This is first sucht experience for me.

Would like to get some understanding on below kernel logging for which I suggested the patch.

The ethtool reports maximum supported queue as 104 and when I set it, it takes that value also. But kernel logs:

"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count: 104/64".

So does it meas the firmware supports only 64, but we can set 104 or something like that ?

Is it any virtual queue set by driver as per number of CPUs ?. What I observe is, system has 104 CPUs.
I have another such machine where maximum supported queue mentioned by ethtool is as per number of CPUs. But here again, the 'max RSS' is reported less by kernel.

thanks....
Suresh KS
[email protected]<mailto:[email protected]>
91-7709100053

Quoted 43 lines · On Tue, Jan 30, 2024 at 2:03 PM Loktionov, Aleksandr…

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]<mailto:[email protected]>>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]<mailto:[email protected]>>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count
in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in
kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]<mailto:[email protected]>>
To: [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>, [email protected]<mailto:[email protected]>
CC: Suresh Kumar <[email protected]<mailto:[email protected]>>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w supports.

Thank you

Quoted 23 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
              i40e_pf_config_rss(pf);
      }
      dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-              vsi->req_queue_pairs, pf->rss_size_max);
+              vsi->req_queue_pairs, vsi->num_queue_pairs);
      return pf->alloc_rss_size;
  }
  -- 2.43.0
author
#7 lore raw

Hi Alex,

Thanks. Yes, I do feel it's a bug in i40e driver printing this info. See the ethtool output from this system:

+++
Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------

+++

So I understand the maximum supported queue size is 104 But while setting this value via ethtool, we got below message from kernel logs:

"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count:
104/64".

thanks....
*Suresh KS*
[email protected]
91-7709100053

Quoted 178 lines · Aleksandr

Good day Suresh

The message:

"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count:
104/64".

Means that h/w supports only 64ques, but user requested 104.

If your OS displays maximum possible ques more than h/w supports then there is a bug in display routines.

With the best regards

Alex

*From:* suresh ks <[email protected]>
*Sent:* Thursday, February 8, 2024 2:14 PM
*To:* Loktionov, Aleksandr <[email protected]> *Cc:* Kitszel, Przemyslaw <[email protected]>; Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L < [email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected] *Subject:* Re: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer

Hi,

Thanks for checking. Do I need to do anything to reject this patch? If yes, please let me know.

This is first sucht experience for me.

Would like to get some understanding on below kernel logging for which I suggested the patch.

The ethtool reports maximum supported queue as 104 and when I set it, it takes that value also. But kernel logs:

"kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS count:
104/64".

So does it meas the firmware supports only 64, but we can set 104 or something like that ?

Is it any virtual queue set by driver as per number of CPUs ?. What I observe is, system has 104 CPUs.

I have another such machine where maximum supported queue mentioned by ethtool is as per number of CPUs. But here again, the 'max RSS' is reported less by kernel.

thanks....

*Suresh KS*

[email protected]

91-7709100053

Quoted 43 lines · Aleksandr

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w supports.

Thank you

Quoted 23 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
              i40e_pf_config_rss(pf);
      }
      dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-              vsi->req_queue_pairs, pf->rss_size_max);
+              vsi->req_queue_pairs, vsi->num_queue_pairs);
      return pf->alloc_rss_size;
  }
  -- 2.43.0
#8 lore raw
In reply to Loktionov, Aleksandr
Quoted 5 lines · Aleksandr
Quoted 5 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count

Subject should be iwl-net and you should have Fixes: tag. I also would like you to go through
https://docs.kernel.org/process/submitting-patches.html

or any other document that would prepare you for your first submission.

Quoted 38 lines
Quoted 38 lines

in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 6 lines
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w supports.

...which would imply that you would be able to work with anything more than 64 queues. From a quick glance rss_size_max comes from early i40e days and if that would be the limit indeed then driver allowing 104 queues would be a disaster, no?

Quoted 8 lines

Thank you

Quoted 5 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 12 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
  		i40e_pf_config_rss(pf);
  	}
  	dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count) · line 12527

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-		 vsi->req_queue_pairs, pf->rss_size_max);
+		 vsi->req_queue_pairs, vsi->num_queue_pairs);

IMHO this should be vsi->alloc_queue_pairs instead.

Quoted 5 lines
Quoted 4 lines
  	return pf->alloc_rss_size;
  }
  -- 2.43.0
author
#9 lore raw

Hi Maciej,

Thanks for the links and taking time to review.

I was following the ethtool codes and suggested vsi->num_queue_pairs. Maybe vsi->alloc_queue_pairs is the right option as you suggested. I have not read much of i40e codes. Just that one of our customers reported this issue and I was reviewing the codes.

I also felt rss_size_max comes from the early i40e days. So I was not sure what I would add in the 'Fixes:' tag.

Sorry for getting late here. Was on a vacation.

thanks....
*Suresh KS*
[email protected]
91-7709100053

Quoted 95 lines · Maciej Fijalkowski
Quoted 5 lines · Aleksandr
Quoted 5 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count

Subject should be iwl-net and you should have Fixes: tag. I also would like you to go through
https://docs.kernel.org/process/submitting-patches.html

or any other document that would prepare you for your first submission.

Quoted 38 lines
Quoted 38 lines

in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 6 lines
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w

supports.

...which would imply that you would be able to work with anything more than 64 queues. From a quick glance rss_size_max comes from early i40e days and if that would be the limit indeed then driver allowing 104 queues would be a disaster, no?

Quoted 8 lines

Thank you

Quoted 5 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 12 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
            i40e_pf_config_rss(pf);
    }
    dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count) · line 12527

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-            vsi->req_queue_pairs, pf->rss_size_max);
+            vsi->req_queue_pairs, vsi->num_queue_pairs);

IMHO this should be vsi->alloc_queue_pairs instead.

Quoted 5 lines
Quoted 4 lines
    return pf->alloc_rss_size;

}
-- 2.43.0

#10 lore raw
Quoted 3 lines · suresh ks

Hi Maciej,

Thanks for the links and taking time to review.

No problem, but please don't top post on linux mailing lists nor don't respond in HTML. These are 101 rules to participate in upstream discussions.

Quoted 8 lines

I was following the ethtool codes and suggested vsi->num_queue_pairs. Maybe vsi->alloc_queue_pairs is the right option as you suggested. I have not read much of i40e codes. Just that one of our customers reported this issue and I was reviewing the codes.

I also felt rss_size_max comes from the early i40e days. So I was not sure what I would add in the 'Fixes:' tag.

submitting-patches.html has it explained ;)

Quoted 109 lines

Sorry for getting late here. Was on a vacation.

thanks....
*Suresh KS*
[email protected]
91-7709100053

Quoted 95 lines · Maciej Fijalkowski
Quoted 5 lines · Aleksandr
Quoted 5 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Tuesday, January 30, 2024 9:26 AM
To: Loktionov, Aleksandr <[email protected]>
Subject: Fwd: [PATCH iwl v2] i40e: print correct hw max rss count

Subject should be iwl-net and you should have Fixes: tag. I also would like you to go through
https://docs.kernel.org/process/submitting-patches.html

or any other document that would prepare you for your first submission.

Quoted 38 lines
Quoted 38 lines

in kernel ring buffer

FWD to Alex

-------- Forwarded Message --------
Subject: [PATCH iwl v2] i40e: print correct hw max rss count in kernel ring buffer
Date: Sat, 20 Jan 2024 12:58:06 +0530
From: Suresh Kumar <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
CC: Suresh Kumar <[email protected]>

pf->rss_size_max is hardcoded and always prints max rss count as 64.

Eg:
kernel: i40e 0000:af:00.1: User requested queue count/HW max RSS
count: 104/64

whereas ethtool reports the correct value from "vsi-

Quoted 1 line

num_queue_pairs"

Channel parameters for eno33:
Pre-set maximums:

RX:     n/a
TX:     n/a
Other:      1
Combined:   104
Current hardware settings:
RX:     n/a
TX:     n/a
Other:      1
Combined:   104  <-------
Quoted 6 lines
Quoted 3 lines

and is misleading.

Change it to vsi->num_queue_pairs

Please reject this patch, it breaks driver logging.
The massage clearly states that it dumps max rss queues number that f/w

supports.

...which would imply that you would be able to work with anything more than 64 queues. From a quick glance rss_size_max comes from early i40e days and if that would be the limit indeed then driver allowing 104 queues would be a disaster, no?

Quoted 8 lines

Thank you

Quoted 5 lines
---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 12 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d5519af34657..f5c1ec190f7e 100644
@@ -12524,7 +12524,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf
 *pf, int queue_count)
            i40e_pf_config_rss(pf);
    }
    dev_info(&pf->pdev->dev, "User requested queue count/HW max

RSS
count: %d/%d\n",

drivers/net/ethernet/intel/i40e/i40e_main.c int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count) · line 12527

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
-            vsi->req_queue_pairs, pf->rss_size_max);
+            vsi->req_queue_pairs, vsi->num_queue_pairs);

IMHO this should be vsi->alloc_queue_pairs instead.

Quoted 5 lines
Quoted 4 lines
    return pf->alloc_rss_size;

}
-- 2.43.0