From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 370AD4F90 for ; Wed, 10 Apr 2019 12:58:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 03:58:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="336587005" Received: from yexl-server.sh.intel.com ([10.67.110.206]) by fmsmga005.fm.intel.com with ESMTP; 10 Apr 2019 03:58:47 -0700 From: Xiaolong Ye To: dev@dpdk.org, Ferruh Yigit , David Marchand Cc: Qi Zhang , Karlsson Magnus , Topel Bjorn , Xiaolong Ye Date: Wed, 10 Apr 2019 18:53:27 +0800 Message-Id: <20190410105327.110410-1-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190409151902.14675-1-xiaolong.ye@intel.com> References: <20190409151902.14675-1-xiaolong.ye@intel.com> Subject: [dpdk-dev] [PATCH] net/af_xdp: submit valid count to Tx queue 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: , X-List-Received-Date: Wed, 10 Apr 2019 10:58:50 -0000 Since tx callback only picks mbufs that can be copied to the xdp desc, it should call xsk_ring_prod__submit with valid count other than nb_pkts. Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Reported-by: David Marchand Signed-off-by: Xiaolong Ye --- 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 5cc643ce2..8c2ba5740 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -300,7 +300,7 @@ eth_af_xdp_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) rte_pktmbuf_free(mbuf); } - xsk_ring_prod__submit(&txq->tx, nb_pkts); + xsk_ring_prod__submit(&txq->tx, valid); kick_tx(txq); -- 2.17.1 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 5459EA0096 for ; Wed, 10 Apr 2019 12:58:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 030CB4F98; Wed, 10 Apr 2019 12:58:52 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 370AD4F90 for ; Wed, 10 Apr 2019 12:58:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 03:58:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="336587005" Received: from yexl-server.sh.intel.com ([10.67.110.206]) by fmsmga005.fm.intel.com with ESMTP; 10 Apr 2019 03:58:47 -0700 From: Xiaolong Ye To: dev@dpdk.org, Ferruh Yigit , David Marchand Cc: Qi Zhang , Karlsson Magnus , Topel Bjorn , Xiaolong Ye Date: Wed, 10 Apr 2019 18:53:27 +0800 Message-Id: <20190410105327.110410-1-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190409151902.14675-1-xiaolong.ye@intel.com> References: <20190409151902.14675-1-xiaolong.ye@intel.com> Subject: [dpdk-dev] [PATCH] net/af_xdp: submit valid count to Tx queue 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190410105327.5yOkTjel0IInd6Ot7Vltc3vlUWcsLKa9b6XO2-g7bQ0@z> Since tx callback only picks mbufs that can be copied to the xdp desc, it should call xsk_ring_prod__submit with valid count other than nb_pkts. Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Reported-by: David Marchand Signed-off-by: Xiaolong Ye --- 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 5cc643ce2..8c2ba5740 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -300,7 +300,7 @@ eth_af_xdp_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) rte_pktmbuf_free(mbuf); } - xsk_ring_prod__submit(&txq->tx, nb_pkts); + xsk_ring_prod__submit(&txq->tx, valid); kick_tx(txq); -- 2.17.1