From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by dpdk.org (Postfix) with ESMTP id C30BF1B5E8 for ; Wed, 17 Apr 2019 11:26:07 +0200 (CEST) Received: by mail-vk1-f193.google.com with SMTP id o187so5060706vkg.4 for ; Wed, 17 Apr 2019 02:26:07 -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=HzPLYP3tCFNYDhuXgSdsBgfKLKbP70CpYLRXTfKBSG4=; b=WejbLveqZvstfzidL4a/jFUWIP5xu/nvAEP7tBkKR4eQALceEOS/vaQmfMGSivWOeA GzmmTnCT0WF0I3E80aNHBtLNw2i5rGew8rxp4cP1681S3ni0Q1BdNhsh1SbdXlmAbJ/C K/U/s91lq7akiYHu+zCplCCa+JjA2jo7aSvZUgrVlhmst4Wh5YcLTNOfUyUQ+80YK/18 9bThtD+j82Uwnk7XLMp+yGqQzkHd6zPKklMw1TdRqPZ7vrFV5Bkb2A3AVqJW4qex6Re8 P8lkmfeTdPVJBRIA14ah2LYry/Zjy+2LxBa3U0RjKudv68peyCbOEr5rb+io7jRMAQ2J b1Nw== X-Gm-Message-State: APjAAAUcjKJK9C4RTkvxzzKzajhknGfNj0pwDpGhgxo6HCLcxqrt5L+r NyO08iWvs7Fn1TXfNoJFMgj/xx2cq6o9ef0pHtxU3g== X-Google-Smtp-Source: APXvYqwOj8gmMv0QezaEZ94SfLOYn6Wi+nwM6BEcfFwUfrwunuKtwhgnus38urDqH0T+49exNJCzg9ILoVqXMiu7QVo= X-Received: by 2002:a1f:bf4b:: with SMTP id p72mr47065981vkf.77.1555493167191; Wed, 17 Apr 2019 02:26:07 -0700 (PDT) MIME-Version: 1.0 References: <20190417085653.110559-1-xiaolong.ye@intel.com> <20190417085653.110559-5-xiaolong.ye@intel.com> In-Reply-To: <20190417085653.110559-5-xiaolong.ye@intel.com> From: David Marchand Date: Wed, 17 Apr 2019 11:25: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 v3 4/4] net/af_xdp: fix typos in Rx function 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, 17 Apr 2019 09:26:08 -0000 On Wed, Apr 17, 2019 at 11:02 AM Xiaolong Ye wrote: > We should use ETH_AF_XDP_RX_BATCH_SIZE in Rx function rather than > ETH_AF_XDP_TX_BATCH_SIZE. > > 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 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 817092584..ee10df0dc 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -175,12 +175,12 @@ eth_af_xdp_rx(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > struct xsk_ring_prod *fq = &umem->fq; > uint32_t idx_rx = 0; > uint32_t free_thresh = fq->size >> 1; > - struct rte_mbuf *mbufs[ETH_AF_XDP_TX_BATCH_SIZE]; > + struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE]; > unsigned long dropped = 0; > unsigned long rx_bytes = 0; > int rcvd, i; > > - nb_pkts = RTE_MIN(nb_pkts, ETH_AF_XDP_TX_BATCH_SIZE); > + nb_pkts = RTE_MIN(nb_pkts, ETH_AF_XDP_RX_BATCH_SIZE); > > if (unlikely(rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, nb_pkts) > != 0)) > return 0; > -- > 2.17.1 > Reviewed-by: David Marchand -- David Marchand 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 68D6EA00E6 for ; Wed, 17 Apr 2019 11:26:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B5EF1B5EA; Wed, 17 Apr 2019 11:26:08 +0200 (CEST) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by dpdk.org (Postfix) with ESMTP id C30BF1B5E8 for ; Wed, 17 Apr 2019 11:26:07 +0200 (CEST) Received: by mail-vk1-f193.google.com with SMTP id o187so5060706vkg.4 for ; Wed, 17 Apr 2019 02:26:07 -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=HzPLYP3tCFNYDhuXgSdsBgfKLKbP70CpYLRXTfKBSG4=; b=WejbLveqZvstfzidL4a/jFUWIP5xu/nvAEP7tBkKR4eQALceEOS/vaQmfMGSivWOeA GzmmTnCT0WF0I3E80aNHBtLNw2i5rGew8rxp4cP1681S3ni0Q1BdNhsh1SbdXlmAbJ/C K/U/s91lq7akiYHu+zCplCCa+JjA2jo7aSvZUgrVlhmst4Wh5YcLTNOfUyUQ+80YK/18 9bThtD+j82Uwnk7XLMp+yGqQzkHd6zPKklMw1TdRqPZ7vrFV5Bkb2A3AVqJW4qex6Re8 P8lkmfeTdPVJBRIA14ah2LYry/Zjy+2LxBa3U0RjKudv68peyCbOEr5rb+io7jRMAQ2J b1Nw== X-Gm-Message-State: APjAAAUcjKJK9C4RTkvxzzKzajhknGfNj0pwDpGhgxo6HCLcxqrt5L+r NyO08iWvs7Fn1TXfNoJFMgj/xx2cq6o9ef0pHtxU3g== X-Google-Smtp-Source: APXvYqwOj8gmMv0QezaEZ94SfLOYn6Wi+nwM6BEcfFwUfrwunuKtwhgnus38urDqH0T+49exNJCzg9ILoVqXMiu7QVo= X-Received: by 2002:a1f:bf4b:: with SMTP id p72mr47065981vkf.77.1555493167191; Wed, 17 Apr 2019 02:26:07 -0700 (PDT) MIME-Version: 1.0 References: <20190417085653.110559-1-xiaolong.ye@intel.com> <20190417085653.110559-5-xiaolong.ye@intel.com> In-Reply-To: <20190417085653.110559-5-xiaolong.ye@intel.com> From: David Marchand Date: Wed, 17 Apr 2019 11:25: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 v3 4/4] net/af_xdp: fix typos in Rx function 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: <20190417092556.OdwdywINLXe63lFx-wW8_VT7HKRI7GCHC9fIjcPch34@z> On Wed, Apr 17, 2019 at 11:02 AM Xiaolong Ye wrote: > We should use ETH_AF_XDP_RX_BATCH_SIZE in Rx function rather than > ETH_AF_XDP_TX_BATCH_SIZE. > > 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 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 817092584..ee10df0dc 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -175,12 +175,12 @@ eth_af_xdp_rx(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > struct xsk_ring_prod *fq = &umem->fq; > uint32_t idx_rx = 0; > uint32_t free_thresh = fq->size >> 1; > - struct rte_mbuf *mbufs[ETH_AF_XDP_TX_BATCH_SIZE]; > + struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE]; > unsigned long dropped = 0; > unsigned long rx_bytes = 0; > int rcvd, i; > > - nb_pkts = RTE_MIN(nb_pkts, ETH_AF_XDP_TX_BATCH_SIZE); > + nb_pkts = RTE_MIN(nb_pkts, ETH_AF_XDP_RX_BATCH_SIZE); > > if (unlikely(rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, nb_pkts) > != 0)) > return 0; > -- > 2.17.1 > Reviewed-by: David Marchand -- David Marchand