From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by dpdk.org (Postfix) with ESMTP id 90BE87F40 for ; Thu, 20 Nov 2014 17:00:21 +0100 (CET) Received: by mail-lb0-f174.google.com with SMTP id w7so2509742lbi.5 for ; Thu, 20 Nov 2014 08:10:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=migpUR8kgU0tq9wNQfSwFlkDvpBTcXAHH1mPd98gMrs=; b=RaY2bGMoVcDrkqZsD0LATcLgRHv6B4BNju7zJPHNp1h+7OU6pb/vXpC1MlN5nGWwNy 8BBlIUfqsbo0V7KejGuqd+S/lsN6YI3sLBvvLnnjLPuOVTOgblng4hvHKkAEfXLSFyvq 0+RP9UQKexJxJ6F5Xv2wggYdAjDEMLajVqZbpLDty29PmitUken6F1L6s2HFr1sfUNL9 Giw7JvxXV2/4NF0tGWauMYw6FHsZe/pfTBLaXInDIzNxOcJwRwIx6Wbk5GgQlg8pnj5Q kxzj9yYPXtr6M4I4e5X+9PeI//kGZe832t7YQiifHme8ocoGfLFd/AGv8WYSbANnh+db ArGg== MIME-Version: 1.0 X-Received: by 10.112.147.225 with SMTP id tn1mr12053925lbb.37.1416499851981; Thu, 20 Nov 2014 08:10:51 -0800 (PST) Received: by 10.25.216.158 with HTTP; Thu, 20 Nov 2014 08:10:51 -0800 (PST) In-Reply-To: References: Date: Thu, 20 Nov 2014 17:10:51 +0100 Message-ID: From: Newman Poborsky To: "De Lara Guarch, Pablo" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] one worker reading multiple ports X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2014 16:00:21 -0000 Thank you for your answer. I just realized that the reason the rte_eth_rx_burst() returns 0 is because inside ixgbe_recv_pkts() this fails: nmb = rte_rxmbuf_alloc(rxq->mb_pool); => nmb is NULL Does this mean that every RX queue should have its own rte_mempool? If so, are there any optimal values for: number of RX descriptors, per-queue rte_mempool size, number of hugepages (from what I understand, these 3 are correlated)? If I'm wrong, please explain why. Thanks! BR, Newman On Thu, Nov 20, 2014 at 9:56 AM, De Lara Guarch, Pablo < pablo.de.lara.guarch@intel.com> wrote: > Hi Newman, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Newman Poborsky > > Sent: Thursday, November 20, 2014 8:34 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] one worker reading multiple ports > > > > Hi, > > > > is it possible to use one worker thread (one lcore) to read packets from > > multiple ports? > > > > When I start 2 workers and assign each one to read from different ports > > (with rte_eth_rx_burst()) everything works fine, but if I assign one > > worker to read packets from 2 ports, rte_eth_rx_burst() returns 0 as if > no > > packets are read. > > Yes, it is totally possible. The only problem would be if you try to use > multiple threads > to read/write on one port, in which case you should use multiple queues. > Look at l3fwd app for instance. You can use just a single core to handle > packets on multiple ports. > > Pablo > > > > Is there any reason for this kind of behaviour? > > > > Thanks! > > > > Br, > > Newman P. >