patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/af_xdp: fix error handling during Rx queue setup
@ 2021-03-01 10:34 Ciara Loftus
  2021-03-02  9:48 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Ciara Loftus @ 2021-03-01 10:34 UTC (permalink / raw)
  To: dev; +Cc: huangying-c, Ciara Loftus, stable

Prior to this commit, if rte_pktmbuf_alloc_bullk failed during rx queue
setup the error was not returned to the user and they may incorrectly
assume that the rx queue had been successfully set up. This commit ensures
that the error is returned to the user.

Bugzilla ID: 643
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 3 ++-
 1 file changed, 2 insertions(+), 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 b8d5ad0d91..3957227bf0 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1145,7 +1145,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
 	}
 
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
-	if (rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size)) {
+	ret = rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size);
+	if (ret) {
 		AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
 		goto err;
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/af_xdp: fix error handling during Rx queue setup
  2021-03-01 10:34 [dpdk-stable] [PATCH] net/af_xdp: fix error handling during Rx queue setup Ciara Loftus
@ 2021-03-02  9:48 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-03-02  9:48 UTC (permalink / raw)
  To: Ciara Loftus, dev; +Cc: huangying-c, stable

On 3/1/2021 10:34 AM, Ciara Loftus wrote:
> Prior to this commit, if rte_pktmbuf_alloc_bullk failed during rx queue
> setup the error was not returned to the user and they may incorrectly
> assume that the rx queue had been successfully set up. This commit ensures
> that the error is returned to the user.
> 
> Bugzilla ID: 643
> Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-02  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 10:34 [dpdk-stable] [PATCH] net/af_xdp: fix error handling during Rx queue setup Ciara Loftus
2021-03-02  9:48 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit

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).