From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Somnath Kotur <somnath.kotur@broadcom.com>
Cc: dpdk-dev <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix a segfault during Tx
Date: Tue, 14 Jul 2020 15:02:42 -0700 [thread overview]
Message-ID: <CACZ4nhu_BgpgyaM_=jfx3qP8bgWxuoNXbsRKcfecMcyX=RY7ag@mail.gmail.com> (raw)
In-Reply-To: <20200713051759.18901-1-somnath.kotur@broadcom.com>
On Sun, Jul 12, 2020 at 10:23 PM Somnath Kotur <somnath.kotur@broadcom.com>
wrote:
> From: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
> When TRUFLOW is not enabled ulp_ctx is not allocated.
> In non-vector Tx datapath we are accessing this invalid pointer
> resulting in a segfault. Check if TRUFLOW is enabled before
> accessing ulp_ctx to avoid this.
>
> Fixes: f86dc320a894 ("net/bnxt: fill cfa action in Tx descriptor")
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
>
Patch applied to dpdk-next-net-brcm. Thanks
> ---
> drivers/net/bnxt/bnxt_txr.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
> index f588426..c741c71 100644
> --- a/drivers/net/bnxt/bnxt_txr.c
> +++ b/drivers/net/bnxt/bnxt_txr.c
> @@ -132,8 +132,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf
> *tx_pkt,
> PKT_TX_TUNNEL_GRE | PKT_TX_TUNNEL_VXLAN |
> PKT_TX_TUNNEL_GENEVE |
> PKT_TX_IEEE1588_TMST |
> PKT_TX_QINQ_PKT) ||
> - txq->bp->ulp_ctx->cfg_data->tx_cfa_action ||
> - txq->vfr_tx_cfa_action)
> + (BNXT_TRUFLOW_EN(txq->bp) &&
> + (txq->bp->ulp_ctx->cfg_data->tx_cfa_action ||
> + txq->vfr_tx_cfa_action)))
> long_bd = true;
>
> nr_bds = long_bd + tx_pkt->nb_segs;
> --
> 2.7.4
>
>
prev parent reply other threads:[~2020-07-14 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 5:17 Somnath Kotur
2020-07-14 22:02 ` Ajit Khaparde [this message]
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='CACZ4nhu_BgpgyaM_=jfx3qP8bgWxuoNXbsRKcfecMcyX=RY7ag@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).