From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5C85EA0350; Mon, 11 May 2020 07:58:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A17E12C38; Mon, 11 May 2020 07:58:22 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id ABD532BF9 for ; Mon, 11 May 2020 07:58:21 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id e16so9277078wra.7 for ; Sun, 10 May 2020 22:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sOOhGv8aN8lYYO0Bkg1lKzn8ZLxSpouj9BPmC6OS+1I=; b=Nfdp3j88k2/faL5pusPLRbt8T6uITrGv1sQmGh9UmVH9/GF01Ihp0yb3niWe3lchAG yqJC3xptJVMSNci0L8b9yuVB/Hc/CdE9QxQ9yVWw0fq9D6Qoa8I7nk9nV0GSdYZJh2bI vpinoBr+xq7D7IrEyARIJepoF6cpKkSAz/6Kh8dh9TOCki2HgOb3gpoOHb2EID6c9a9v ciUyc2278RpCOzGqLrKPKfOkZtSE8BZlCBacgkiF9WXAajtSj/VKGsjnZYLFyI2eqkcq JfkIYQfAScJbur329MazXbUFlS4cQY51op59dnvab1l2a0O0YIWiHsUtfhHYc8WM9VZq 5NpQ== 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=sOOhGv8aN8lYYO0Bkg1lKzn8ZLxSpouj9BPmC6OS+1I=; b=Vug+S47+t4Mw6sQIlyDofdq0OXjnNyGZPrCpqWIYsasqrcGgRBlIOJnSRwqcV4DRKe mF/Xe+DK2nYsHRywFmJq7BHPqjMhjB1JhZxrdt+BcRi8mx/ZnhqdDAfwrhywpY+EfBWO tjjGf9nCXGf+XMwP5SYD4tPqNYiZEFE3ipoBwJHtkbXIwSewXpSW1U/jBFvlBahyM7ck +SwcYoSS1OYz5XLlHLPk826iZdsjYMBvGQBRjaERLYCzXO3zm71AOCplxzzu0VTQ4YVL sUZ2MEdCEsXDEbO/TTKpuJoSXztYZ7Ugy6/vro7iStj00dc+6pb/bpmTjA3hwAFTOy8r 9fOQ== X-Gm-Message-State: AGi0PubTpWtHT6yO96PqZsWNQfBPYfprEcUXQnuHp35/Pz3u5Y51qaGk OD0iJiu7JuusWzObQXV07tttTFbnD/Sy4xOYB/o= X-Google-Smtp-Source: APiQypIipPF5VGZJbLcH5lcQmvXRYxC+WorbuiJUjhn/C9Ab2QDa9v8W3OFAMviR6YOmw0HMEicsKRpdZS8Radvbc9o= X-Received: by 2002:adf:8302:: with SMTP id 2mr17383348wrd.114.1589176701252; Sun, 10 May 2020 22:58:21 -0700 (PDT) MIME-Version: 1.0 References: <2b48bda28dc245e0a9841d385c3a717f@intel.com> In-Reply-To: <2b48bda28dc245e0a9841d385c3a717f@intel.com> From: Prashant Upadhyaya Date: Mon, 11 May 2020 11:28:10 +0530 Message-ID: To: "Wang, Haiyue" Cc: "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] Regarding rte_eth_rx_burst 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" Thanks Wang ! ...which begs the proverbial question -- is this a bug or a feature ? I would say it is a bug as the polling for 1 mbuf works for the other PMD's, worse still the setting to zero is done in a quiet manner leading to entire rx blockage if the caller keeps calling with polling for 1 mbuf and keeps wondering why the rx is not working. Regards -Prashant On Sun, May 10, 2020 at 10:46 PM Wang, Haiyue wrote: > > > -----Original Message----- > > From: dev On Behalf Of Prashant Upadhyaya > > Sent: Sunday, May 10, 2020 22:06 > > To: dev@dpdk.org > > Subject: [dpdk-dev] Regarding rte_eth_rx_burst > > > > Hi, > > > > I recently started using X722 NIC which uses i40 PMD of DPDK. > > I am on DPDK 20.02. > > I am seeing that when I call the rte_eth_rx_burst with last argument > > as 1 (polling for 1 mbuf), then I am not receiving data via repeated > > calls. > > I saw this kind of issue many times. ;-) > > This is *burst* for vector mode: > > drivers/net/i40e/i40e_rxtx_vec_sse.c > > static inline uint16_t > _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, > uint16_t nb_pkts, uint8_t *split_packet) > { > .... > > /* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */ > nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST); > > /* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */ > nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP); <--- nb_pkts = 0, if you passed 1. > > > > When I go for calls to rte_eth_rx_burst with last argument as 32, the > > function does return the mbuf's as received data. > > > > Is this expected ? Or this is a bug in the i40 driver handling this NIC ? > > > > The polls to rte_eth_rx_burst with last argument as 1 works well for > > the ixgbe PMD for sure since I have been using X520 successfully with > > last argument as 1. > > > > Regards > > -Prashant