lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOBf=muVJf+MLxUNN7jKRkKpU83SCgaYqvBiNdZDY=A0u-7f4g@mail.gmail.com>
Date: Wed, 26 Feb 2025 12:16:10 +0530
From: Somnath Kotur <somnath.kotur@...adcom.com>
To: Taehee Yoo <ap420073@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	edumazet@...gle.com, michael.chan@...adcom.com, pavan.chebbi@...adcom.com, 
	andrew+netdev@...n.ch, netdev@...r.kernel.org, gospo@...adcom.com, 
	dw@...idwei.uk, horms@...nel.org
Subject: Re: [PATCH net 3/3] eth: bnxt: do not use BNXT_VNIC_NTUPLE
 unconditionally in queue restart logic

On Wed, Feb 26, 2025 at 11:49 AM Taehee Yoo <ap420073@...il.com> wrote:
>
> When a queue is restarted, it sets MRU to 0 for stopping packet flow.
> MRU variable is a member of vnic_info[], the first vnic_info is default
> and the second is ntuple.
> Only when ntuple is enabled(ethtool -K eth0 ntuple on), vnic_info for
> ntuple is allocated in init logic.
> The bp->nr_vnics indicates how many vnic_info are allocated.
> However bnxt_queue_{start | stop}() accesses vnic_info[BNXT_VNIC_NTUPLE]
> regardless of ntuple state.
>
> Fixes: b9d2956e869c ("bnxt_en: stop packet flow during bnxt_queue_stop/start")
> Signed-off-by: Taehee Yoo <ap420073@...il.com>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 1f7042248ccc..29849bfeed14 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -15635,7 +15635,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
>         cpr = &rxr->bnapi->cp_ring;
>         cpr->sw_stats->rx.rx_resets++;
>
> -       for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
> +       for (i = 0; i <= bp->nr_vnics; i++) {
>                 vnic = &bp->vnic_info[i];
>
>                 rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
> @@ -15663,7 +15663,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
>         struct bnxt_vnic_info *vnic;
>         int i;
>
> -       for (i = 0; i <= BNXT_VNIC_NTUPLE; i++) {
> +       for (i = 0; i <= bp->nr_vnics; i++) {
>                 vnic = &bp->vnic_info[i];
>                 vnic->mru = 0;
>                 bnxt_hwrm_vnic_update(bp, vnic,
> --
> 2.34.1
Reviewed-by: Somnath Kotur <somnath.kotur@...adcom.com>
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4212 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ