From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from compass.polito.it (compass.polito.it [130.192.55.110]) by dpdk.org (Postfix) with ESMTP id 83F1DC330 for ; Tue, 21 Jun 2016 14:42:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id 41C6A100125 for ; Tue, 21 Jun 2016 14:42:41 +0200 (CEST) Authentication-Results: compass.polito.it (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=studenti.polito.it DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= studenti.polito.it; h=content-type:content-type:cc:to:subject :subject:message-id:date:date:from:from:references:in-reply-to :received:mime-version:received:received:received; s=y2k10; t= 1466512958; bh=s6TxGUXgs5hLWZ2VZTFWaSCvEUb2R2tnpXFnp1YF7jM=; b=i +PFPcsOdCEpLtjm7umNeKjVP3YY5whix1NHgfvuUvJsrCp3TMQEnYcL0WvhhKxvh 8PYYjf9gkp8EaQhUjvuLjZRVZcbuFz+lWLk+2M0/KYgdMaVU+QthObPSUHmlUd0C oKKMgteyi2GINFJBfGM7rVUBnCSuhG57MXElGTeB28= X-Virus-Scanned: amavisd-new at studenti.polito.it X-Spam-Flag: NO X-Spam-Score: -5.925 X-Spam-Level: X-Spam-Status: No, score=-5.925 tagged_above=-100 required=3.5 tests=[ALL_TRUSTED=-5, AWL=0.574, BAYES_00=-1.5, HTML_MESSAGE=0.001] autolearn=ham Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id w5BV8-NArkDP for ; Tue, 21 Jun 2016 14:42:38 +0200 (CEST) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id 1874D1000E5 for ; Tue, 21 Jun 2016 14:42:38 +0200 (CEST) Received: by mail-lf0-f47.google.com with SMTP id h129so22127208lfh.1 for ; Tue, 21 Jun 2016 05:42:38 -0700 (PDT) X-Gm-Message-State: ALyK8tJF4HCnNByvq4iCUNuuY5b1DwDU4swcd0XluK5i8Qjnjl0cHXG+AbRibxmq5c6XgVTLzy1P0cxqy6sO2g== X-Received: by 10.25.83.15 with SMTP id h15mr5152823lfb.81.1466512957585; Tue, 21 Jun 2016 05:42:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.89.75 with HTTP; Tue, 21 Jun 2016 05:42:36 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= Date: Tue, 21 Jun 2016 14:42:36 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Alexander Duyck Cc: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] queue to VF assigment in SR-IOV 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: Tue, 21 Jun 2016 12:42:41 -0000 Hello Alexander, On Mon, Jun 13, 2016 at 6:02 PM, Alexander Duyck wrote: > On Mon, Jun 13, 2016 at 4:56 AM, Mauricio V=C3=A1squez > wrote: > > Hello Alexander, > > > > On Tue, Jun 7, 2016 at 11:31 PM, Alexander Duyck < > alexander.duyck@gmail.com> > > wrote: > >> > >> On Tue, Jun 7, 2016 at 1:49 PM, Mauricio V=C3=A1squez > >> wrote: > >> > Dear All, > >> > > >> > I implemented a program that uses flow director to forward packets t= o > a > >> > specific virtual function, however I faced the problem that I did no= t > >> > know > >> > which queue belongs to a VF. I found in [1] that in the case of Inte= l > >> > 82599, queues 0-7 belongs to VF0, 8-15 to VF1 and so on, I tested it > but > >> > it > >> > did not work, using the trial and error method I found that queue 0 = is > >> > in > >> > VF0, queue 4 in VF1 and so on. > >> > > >> > My question is: is there a standard way to know which queues belong > to a > >> > specific VF? > >> > > >> > Thanks in advance > >> > > >> > Mauricio V, > >> > > >> > [1] > >> > > >> > > http://www.intel.it/content/dam/www/public/us/en/documents/datasheets/825= 99-10-gbe-controller-datasheet.pdf > , > >> > Table 7-72 > >> > >> If you are using the kernel driver the way the queues are laid out > >> depends on the number of VFs allocated and what features are enabled > >> in the kernel. > > > > > > I forgot to mention that I am using the DPDK ixgbe PMD. > > > >> > >> Assuming you are not using DCB you should be able to > >> figure out how many queues are being allocated via VF by looking at > >> the output of "ethtool -l ". The upper limit on RSS is t he > >> number of queues each pool is allocated. > >> > >> So for example if you only enable up to 31 VFs then the PF driver > >> allocates 4 queues per VF so you would have queues 0 - 3 allocated to > >> VF0, queues 4-7 allocated to VF1, etc all the way through to the PF > >> occupying (num_vfs * 4) to 127. If you enable 32 or more VFs then the > >> number of queues drops to 2 per VF and RSS on the PF will be limited > >> to the 2 queues following the block reserved for the VFs. > >> > > > > I found that the behavior of the DPDK PMD is almost the same you > described: > > 1 - 15 VFs -> 8 queues per VF > > 16 - 31 VFs -> 4 queues per VF > >>=3D 32 VFs -> 2 queues per VF > > > > But, according to the datasheet it should be > > 16 VFs -> 8 queues per VF > > 32 VFs -> 4 queues per VF > > 64 VFs -> 2 queues per VF > > > > Am I missing something? > > The datasheet should be referring to "VM pools". The PF consumes one > pool for any queues it is using. As such VFs + 1 is the total number > of pools in use if the PF is active. > > > One extra thing that I am not understanding, in the case I assign the > > maximum number of possible VFs, the PF remains without queues? > > The device can support at most 64 pools. So if you are allocating 64 > VFs then there are no resources left for the PF to allocate queues > from. > > I hope this helps to make it a bit clearer. > This made everything clear for me, thanks. > > - Alex > Mauricio V,