DPDK patches and discussions
 help / color / mirror / Atom feed
From: Li RongQing <lirongqing@baidu.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] af_xdp: not return a negative value in af_xdp_rx_zc
Date: Thu, 17 Sep 2020 13:09:45 +0800
Message-ID: <1600319386-24559-1-git-send-email-lirongqing@baidu.com> (raw)

af_xdp_rx_zc should always return the number of received packets,
and negative value will be as number of received packets, and
confuse the caller

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Li RongQing <lirongqing@baidu.com>
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 936d4a7d5..7ce4ad04a 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -236,7 +236,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) {
 			"Failed to get enough buffers for fq.\n");
-		return -1;
+		return 0;
 	rcvd = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);

             reply	other threads:[~2020-09-17  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  5:09 Li RongQing [this message]
2020-09-17  7:33 ` Loftus, Ciara
2020-09-17  8:17   ` Li,Rongqing
2020-09-17  5:11 Li RongQing

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:

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

  git send-email \
    --in-reply-to=1600319386-24559-1-git-send-email-lirongqing@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=dev@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git