From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id F0597A00E6 for ; Wed, 17 Apr 2019 09:46:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC08E1B59E; Wed, 17 Apr 2019 09:46:09 +0200 (CEST) Received: from mail-vk1-f196.google.com (mail-vk1-f196.google.com [209.85.221.196]) by dpdk.org (Postfix) with ESMTP id 56C081B599 for ; Wed, 17 Apr 2019 09:46:08 +0200 (CEST) Received: by mail-vk1-f196.google.com with SMTP id x2so4996574vkx.13 for ; Wed, 17 Apr 2019 00:46:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y51QhNbeNM/NKBXfHXNCz9gZe6IQabZiIV6iGmScvSE=; b=eTY6HEHPBQSJ1KMdqymR6S+6vhEq/dccFISxc0a6NC4a0ny940VmbhNzaf3A0Nzq0b 1ZmQ8Qm467FTDdveGHeqZlZC68EZOvukp6ogWwU/nd2YAEjROkemVcxpNc82J37o7m5b GY95dLQmyy8zNptVISvhgN2vDK5DJaM95yotzMx0xkszJ7IIA447lZnvYaj4sDHhhqyQ OMLeUiUwvSaiLwtQDsrn3xZfO7PL8Hd3zhdn0iwFy6JTKkm5FJOxF57j21zxqGKilX5t sayu1wI0E+gqIIjXxKG+zo36fDsddYolrI4eNi4T1ErMYrERH3lX1YilpwVmwBJmpJgS ZTQA== X-Gm-Message-State: APjAAAUmCU4tZPrYIExpxt75tq2XUpNxihsKxzqyMj+iLlTJbhsIBPo9 hKfJ+W3ZUeuWwIIt3/9LcTHVg1cukTYln1LrDKuwHQ2P X-Google-Smtp-Source: APXvYqziGA+ol2V5a5IrFm5dzEOqoZjjjCDiwMSFjPpVMhFPiW3l4U2W+fsuPFx43P2nNI0cfqjjBUsXDWvYvKMa4ks= X-Received: by 2002:a1f:bf4b:: with SMTP id p72mr46858791vkf.77.1555487167760; Wed, 17 Apr 2019 00:46:07 -0700 (PDT) MIME-Version: 1.0 References: <20190416150352.91806-1-xiaolong.ye@intel.com> <20190416150352.91806-2-xiaolong.ye@intel.com> In-Reply-To: <20190416150352.91806-2-xiaolong.ye@intel.com> From: David Marchand Date: Wed, 17 Apr 2019 09:45:56 +0200 Message-ID: To: Xiaolong Ye Cc: dev , Ferruh Yigit , Qi Zhang , Karlsson Magnus , Topel Bjorn Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/af_xdp: enqueue buf ring when allocate Tx queue fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190417074556.MKixzHzwIB937hButBNFAiEY9tTdpjnT1MLnANFsyMI@z> On Tue, Apr 16, 2019 at 5:09 PM Xiaolong Ye wrote: > When it fails to allocate enough slots in Tx queue for transmitting > packets, we need to return the dequeued addrs to buf ring. > > Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") > > Signed-off-by: Xiaolong Ye > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 007a1c6b4..5cc643ce2 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -276,6 +276,7 @@ eth_af_xdp_tx(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > > if (xsk_ring_prod__reserve(&txq->tx, nb_pkts, &idx_tx) != nb_pkts) > { > kick_tx(txq); > + rte_ring_enqueue_bulk(umem->buf_ring, addrs, nb_pkts, > NULL); > return 0; > } > > -- > 2.17.1 > > Reviewed-by: David Marchand -- David Marchand