DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Hanumanth Pothula <hpothula@marvell.com>
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	 Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	dev@dpdk.org, jerinj@marvell.com
Subject: Re: [PATCH v1 1/1] net/cnxk: program DF bit appropriately in vector mode
Date: Mon, 19 Sep 2022 22:27:01 +0530	[thread overview]
Message-ID: <CALBAE1NUuq1DWhAW3HiNWC=3_4gNTxqn-TAZdJJ1MQKXRgpTgw@mail.gmail.com> (raw)
In-Reply-To: <20220901062802.2508287-1-hpothula@marvell.com>

On Thu, Sep 1, 2022 at 11:58 AM Hanumanth Pothula <hpothula@marvell.com> wrote:
>
> In vector mode, DF bit is not programmed correctly, as the
> return value of vsetq_lane_u64() is ignored, which actually
> contains the updated value, leading HW to free mbufs though
> NIX_TX_OFFLOAD_MBUF_NOFF_F flag is set.
>
> Hence, save return value of vsetq_lane_u64() appropriately so
> that DF bit is programmed correctly.
>
> Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/net/cnxk/cn10k_tx.h | 8 ++++----
>  drivers/net/cnxk/cn9k_tx.h  | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
> index ea13866b20..fb33e7150b 100644
> --- a/drivers/net/cnxk/cn10k_tx.h
> +++ b/drivers/net/cnxk/cn10k_tx.h
> @@ -2477,28 +2477,28 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
>                         mbuf3 = (uint64_t *)tx_pkts[3];
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf0))
> -                               vsetq_lane_u64(0x80000, xmask01, 0);
> +                               xmask01 = vsetq_lane_u64(0x80000, xmask01, 0);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf0)->pool,
>                                         (void **)&mbuf0, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf1))
> -                               vsetq_lane_u64(0x80000, xmask01, 1);
> +                               xmask01 = vsetq_lane_u64(0x80000, xmask01, 1);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf1)->pool,
>                                         (void **)&mbuf1, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf2))
> -                               vsetq_lane_u64(0x80000, xmask23, 0);
> +                               xmask23 = vsetq_lane_u64(0x80000, xmask23, 0);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf2)->pool,
>                                         (void **)&mbuf2, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf3))
> -                               vsetq_lane_u64(0x80000, xmask23, 1);
> +                               xmask23 = vsetq_lane_u64(0x80000, xmask23, 1);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf3)->pool,
> diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
> index 6ce81f5c96..a609814dfb 100644
> --- a/drivers/net/cnxk/cn9k_tx.h
> +++ b/drivers/net/cnxk/cn9k_tx.h
> @@ -1705,28 +1705,28 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts,
>                         mbuf3 = (uint64_t *)tx_pkts[3];
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf0))
> -                               vsetq_lane_u64(0x80000, xmask01, 0);
> +                               xmask01 = vsetq_lane_u64(0x80000, xmask01, 0);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf0)->pool,
>                                         (void **)&mbuf0, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf1))
> -                               vsetq_lane_u64(0x80000, xmask01, 1);
> +                               xmask01 = vsetq_lane_u64(0x80000, xmask01, 1);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf1)->pool,
>                                         (void **)&mbuf1, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf2))
> -                               vsetq_lane_u64(0x80000, xmask23, 0);
> +                               xmask23 = vsetq_lane_u64(0x80000, xmask23, 0);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf2)->pool,
>                                         (void **)&mbuf2, 1, 0);
>
>                         if (cnxk_nix_prefree_seg((struct rte_mbuf *)mbuf3))
> -                               vsetq_lane_u64(0x80000, xmask23, 1);
> +                               xmask23 = vsetq_lane_u64(0x80000, xmask23, 1);
>                         else
>                                 RTE_MEMPOOL_CHECK_COOKIES(
>                                         ((struct rte_mbuf *)mbuf3)->pool,
> --
> 2.25.1
>

      reply	other threads:[~2022-09-19 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  6:28 Hanumanth Pothula
2022-09-19 16:57 ` Jerin Jacob [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='CALBAE1NUuq1DWhAW3HiNWC=3_4gNTxqn-TAZdJJ1MQKXRgpTgw@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=hpothula@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.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).