From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by dpdk.org (Postfix) with ESMTP id 53B937F44 for ; Fri, 21 Nov 2014 14:52:55 +0100 (CET) Received: by mail-la0-f42.google.com with SMTP id s18so4315664lam.29 for ; Fri, 21 Nov 2014 06:03:26 -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=6rQe+UEY35QasC4zQqdzA5GPimfjcAd4pQYafiFjyHo=; b=H5q+LZKAVqUH5ruLFoSfmDbBcIdAFuBPudDDeZNA5q6j7kPKEfz6XEMOL08UKqs78P rIN+Ul1seNrLNwa2V+0+i2Zstub03n7JAP5gE3v3Gm6d4wSOvJFrnlPdvhrlp6h4wPbt N80Zke6hLy6CmSBYPtRpK9rWMiv4hKqLVIENGDh4gt8Dax/Q8U99LYY10W7MMiFj6KdB N5XsSFBbYEwsW91T7e1FaMVbcqIxQZMDB1EenCj0RL4q3ZFSIYU3oZSz0sw//lyPAcgC QcSR0FJvrWpAZWw4FHMwJxlgODcNp7EfNNGkWrwa+xNG67BIazbl9ae6qmqeDRszb4vC xrlw== MIME-Version: 1.0 X-Received: by 10.152.203.199 with SMTP id ks7mr4770340lac.31.1416578605898; Fri, 21 Nov 2014 06:03:25 -0800 (PST) Received: by 10.25.216.158 with HTTP; Fri, 21 Nov 2014 06:03:25 -0800 (PST) In-Reply-To: <20141120215233.GA15551@mhcomputing.net> References: <20141120215233.GA15551@mhcomputing.net> Date: Fri, 21 Nov 2014 15:03:25 +0100 Message-ID: From: Newman Poborsky To: Matthew Hall 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: Fri, 21 Nov 2014 13:52:55 -0000 So, since mempool is multi-consumer (by default), if one is used to configure queues on multiple NICs that have different socket owners, then mbuf allocation will fail? But if 2 NICs have the socket owner, everything should work fine? Since I'm talking about 2 ports on the same NIC, they must have the same owner, RX receive should work with RX queues configured with the same mempool, right? But it my case it doesn't so I guess I'm missing something. Any idea how can I troubleshoot why allocation fails with one mempool and works fine with each queue having its own mempool? Thank you, Newman On Thu, Nov 20, 2014 at 10:52 PM, Matthew Hall wrote: > On Thu, Nov 20, 2014 at 05:10:51PM +0100, Newman Poborsky wrote: > > 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 > > Newman, > > Mempools are created per NUMA node (ordinarily this means per processor > socket > if sockets > 1). > > When doing Tx / Rx Queue Setup, one should determine the socket which owns > the > given PCI NIC, and try to use memory on that same socket to handle traffic > for > that NIC and Queues. > > So, for N cards with Q * N Tx / Rx queues, you only need S mempools. > > Then each of the Q * N queues will use the mempool from the socket closest > to > the card. > > Matthew. >