diff mbox series

[iwl,v2] i40e: print correct hw max rss count in kernel ring buffer

Message ID 20240120072806.8554-1-suresh2514@gmail.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [iwl,v2] i40e: print correct hw max rss count in kernel ring buffer | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1077 this patch: 1077
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1095 this patch: 1095
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1095 this patch: 1095
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-20--09-00 (tests: 403)

Commit Message

suresh ks Jan. 20, 2024, 7:28 a.m. UTC
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

Signed-off-by: Suresh Kumar <suresh2514@gmail.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Jan. 22, 2024, 8:51 p.m. UTC | #1
On Sat, Jan 20, 2024 at 12:58:06PM +0530, Suresh Kumar wrote:
> 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
> 
> Signed-off-by: Suresh Kumar <suresh2514@gmail.com>

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.
Aleksandr Loktionov Jan. 30, 2024, 8:33 a.m. UTC | #2
> -----Original Message-----
> From: Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Sent: Tuesday, January 30, 2024 9:26 AM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> 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 <suresh2514@gmail.com>
> To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
> davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
> pabeni@redhat.com, intel-wired-lan@lists.osuosl.org,
> netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> CC: Suresh Kumar <suresh2514@gmail.com>
> 
> 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

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
 
> Signed-off-by: Suresh Kumar <suresh2514@gmail.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index d5519af34657..f5c1ec190f7e 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -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;
>   }
>   -- 2.43.0
>
Maciej Fijalkowski Feb. 15, 2024, 4:22 p.m. UTC | #3
On Tue, Jan 30, 2024 at 08:33:43AM +0000, Loktionov, Aleksandr wrote:
> > -----Original Message-----
> > From: Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> > Sent: Tuesday, January 30, 2024 9:26 AM
> > To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> > 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.

> > 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 <suresh2514@gmail.com>
> > To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
> > davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
> > pabeni@redhat.com, intel-wired-lan@lists.osuosl.org,
> > netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> > CC: Suresh Kumar <suresh2514@gmail.com>
> > 
> > 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
> 
> 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?

> 
> Thank you
>  
> > Signed-off-by: Suresh Kumar <suresh2514@gmail.com>
> > ---
> >   drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > index d5519af34657..f5c1ec190f7e 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > @@ -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);

IMHO this should be vsi->alloc_queue_pairs instead.

> >   	return pf->alloc_rss_size;
> >   }
> >   -- 2.43.0
> > 
>
Maciej Fijalkowski March 7, 2024, 3:24 p.m. UTC | #4
On Thu, Mar 07, 2024 at 08:09:47PM +0530, suresh ks wrote:
> 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.

> 
> 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 ;)

> 
> Sorry for getting late here. Was on a vacation.
> 
> 
> thanks....
> *Suresh KS*
> suresh2514@gmail.com
> 91-7709100053
> 
> 
> 
> On Thu, Feb 15, 2024 at 9:52 PM Maciej Fijalkowski <
> maciej.fijalkowski@intel.com> wrote:
> 
> > On Tue, Jan 30, 2024 at 08:33:43AM +0000, Loktionov, Aleksandr wrote:
> > > > -----Original Message-----
> > > > From: Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> > > > Sent: Tuesday, January 30, 2024 9:26 AM
> > > > To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> > > > 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.
> >
> > > > 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 <suresh2514@gmail.com>
> > > > To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
> > > > davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
> > > > pabeni@redhat.com, intel-wired-lan@lists.osuosl.org,
> > > > netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> > > > CC: Suresh Kumar <suresh2514@gmail.com>
> > > >
> > > > 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
> > >
> > > 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?
> >
> > >
> > > Thank you
> > >
> > > > Signed-off-by: Suresh Kumar <suresh2514@gmail.com>
> > > > ---
> > > >   drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > > b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > > index d5519af34657..f5c1ec190f7e 100644
> > > > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > > @@ -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);
> >
> > IMHO this should be vsi->alloc_queue_pairs instead.
> >
> > > >     return pf->alloc_rss_size;
> > > >   }
> > > >   -- 2.43.0
> > > >
> > >
> >
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index d5519af34657..f5c1ec190f7e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -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;
 }