From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <newman555p@gmail.com>
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 <dev@dpdk.org>; Thu, 20 Nov 2014 17:00:21 +0100 (CET)
Received: by mail-lb0-f174.google.com with SMTP id w7so2509742lbi.5
 for <dev@dpdk.org>; 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: <E115CCD9D858EF4F90C690B0DCB4D8972684D317@IRSMSX108.ger.corp.intel.com>
References: <CAHW=9PuErCQW=PDFzMoQLyUhzif6xNsU_28UmiJC=895t8+62w@mail.gmail.com>
 <E115CCD9D858EF4F90C690B0DCB4D8972684D317@IRSMSX108.ger.corp.intel.com>
Date: Thu, 20 Nov 2014 17:10:51 +0100
Message-ID: <CAHW=9Pthh1-sHbpbjt9PvQcjZ_Tr_9EK+re7zkdmw=pFv0_Fbw@mail.gmail.com>
From: Newman Poborsky <newman555p@gmail.com>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Cc: "dev@dpdk.org" <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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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.
>