From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: Baruch Siach <baruch@tkos.co.il>, "Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/af_xdp: fix zero copy Tx queue drain
Date: Wed, 25 Aug 2021 10:48:43 +0000 [thread overview]
Message-ID: <PH0PR11MB479167B9FAE79465172201AE8EC69@PH0PR11MB4791.namprd11.prod.outlook.com> (raw)
In-Reply-To: <8a03128cb9edeeaa747f74aca60d6a8b9f5c4f8e.1629885944.git.baruch@tkos.co.il>
>
> Call xsk_ring_prod__submit() before kick_tx() so that the kernel
> consumer sees the updated state of Tx ring. Otherwise, Tx packets are
> stuck in the ring until the next call to af_xdp_tx_zc().
>
> Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
> Cc: stable@dpdk.org
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Thanks for respinning. I tested it out and it looks good to me.
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
> --
> v2:
>
> Don't call xsk_ring_prod__submit() when kick_tx() is only used to
> drain the completion queue (Ciara Loftus)
> ---
> drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c
> b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index 74ffa4511284..9bea0a895a3e 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs,
> uint16_t nb_pkts)
>
> if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
> rte_pktmbuf_free(local_mbuf);
> - kick_tx(txq, cq);
> goto out;
> }
>
> @@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs,
> uint16_t nb_pkts)
> tx_bytes += mbuf->pkt_len;
> }
>
> - kick_tx(txq, cq);
> -
> out:
> xsk_ring_prod__submit(&txq->tx, count);
> + kick_tx(txq, cq);
>
> txq->stats.tx_pkts += count;
> txq->stats.tx_bytes += tx_bytes;
> --
> 2.32.0
next prev parent reply other threads:[~2021-08-25 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 10:05 Baruch Siach
2021-08-25 10:48 ` Loftus, Ciara [this message]
2021-09-07 15:56 ` Ferruh Yigit
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=PH0PR11MB479167B9FAE79465172201AE8EC69@PH0PR11MB4791.namprd11.prod.outlook.com \
--to=ciara.loftus@intel.com \
--cc=baruch@tkos.co.il \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/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).