DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dpdk-dev <dev@dpdk.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix to free all the vnics during port stop
Date: Thu, 21 Nov 2019 15:44:17 -0800	[thread overview]
Message-ID: <CACZ4nhvwGmMKk-eBxqP8dQ-o7YBfbd6m_0uxO44_jPiMAiv40g@mail.gmail.com> (raw)
In-Reply-To: <20191121233435.4263-3-ajit.khaparde@broadcom.com>

On Thu, Nov 21, 2019 at 3:35 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> From: Somnath Kotur <somnath.kotur@broadcom.com>
>
> Now that vnics are created only as part of the flow creation cmds
> and not during init, we cannot rely on iterating only through
> 'nr_vnics'. We need to sweep all the vnics by using 'max_vnics'
> otherwise a vnic with a stale 'rx_queue_cnt' might be left lingering
> post a port stop/start operation. This could lead to a segfault.
> This change is required because of the recent fix made by commit to
> "fix flow creation with non-consecutive group ids".
>
> Fixes: bab0a1f2ed4b ("net/bnxt: fix flow creation with non-consecutive
> group ids")
>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
Applied to dpdk-next-net-brcm.


> ---
>  drivers/net/bnxt/bnxt_vnic.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
> index 52a4badfc..104342e13 100644
> --- a/drivers/net/bnxt/bnxt_vnic.c
> +++ b/drivers/net/bnxt/bnxt_vnic.c
> @@ -75,12 +75,13 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp)
>
>  void bnxt_free_all_vnics(struct bnxt *bp)
>  {
> -       struct bnxt_vnic_info *temp;
> +       struct bnxt_vnic_info *vnic;
>         unsigned int i;
>
> -       for (i = 0; i < bp->nr_vnics; i++) {
> -               temp = &bp->vnic_info[i];
> -               STAILQ_INSERT_TAIL(&bp->free_vnic_list, temp, next);
> +       for (i = 0; i < bp->max_vnics; i++) {
> +               vnic = &bp->vnic_info[i];
> +               STAILQ_INSERT_TAIL(&bp->free_vnic_list, vnic, next);
> +               vnic->rx_queue_cnt = 0;
>         }
>  }
>
> --
> 2.21.0 (Apple Git-122.2)
>
>

  reply	other threads:[~2019-11-21 23:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 18:56 [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde
2019-11-19 18:56 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW Ajit Khaparde
2019-11-19 18:56 ` [dpdk-dev] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware Ajit Khaparde
2019-11-19 18:56 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-20  9:34   ` Ferruh Yigit
2019-11-20  9:45     ` Ferruh Yigit
2019-11-20 16:55       ` Ajit Khaparde
2019-11-21 23:34       ` [dpdk-dev] [PATCH v2 1/3] doc: update bnxt feature list Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 2/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix to free all the vnics during port stop Ajit Khaparde
2019-11-21 23:44           ` Ajit Khaparde [this message]
2019-11-19 19:01 ` [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACZ4nhvwGmMKk-eBxqP8dQ-o7YBfbd6m_0uxO44_jPiMAiv40g@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=somnath.kotur@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).