From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f67.google.com (mail-qg0-f67.google.com [209.85.192.67]) by dpdk.org (Postfix) with ESMTP id 7E6A85947 for ; Mon, 13 Jun 2016 18:02:35 +0200 (CEST) Received: by mail-qg0-f67.google.com with SMTP id t106so10470076qgt.2 for ; Mon, 13 Jun 2016 09:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=D9BtHO0EXArmPtO9RDyzR4zpdBSSuHR2Xcbm3PSgjek=; b=x86HNdbE1Vw4HBUpGfj3audKrkttyuNqXziWKXflHF1u9j4UWlztPfkYqoE2x2JGFt fR5FaVKVmMaf1FgCLY+Wqtx4/YvfzSwqxXYMHJ1yvjO4jxHU92aVrjhwQC2LldlFYNG/ nHPd5kPHPTTEDxKgftjim59i1xuvSUTVCNc0NjXmHZui2DS4lRc9/0vfDhsRUMNIWwVE cZ/Sgs9ITJIHFtwTgujhexb2s67vedpHYyZWjrGI7FV7mUGSD3Gq0lcSz8WCmlwiT57q qxINYDe9w5XaFaW7+qaCPt2o6j3VoN/zA3tX8dFhc2ltwAUD+f5pC+pFodrXXbAFKnPJ 86Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D9BtHO0EXArmPtO9RDyzR4zpdBSSuHR2Xcbm3PSgjek=; b=ki8Zz/Z3vWx8gGvfXv3pJdQpZHm3kbzGY5bX93m8r5em+0xQoICYw8DtIZlW3lUxry bzkaS/mBJfpE99rmOVb2zjcmX77GsF4ClgO6j+imaM+seaSrCFeo9ZqdXcop/2ygwpRp QNQRo4odmWnwrW7MnIZb6xItw+qOfW8McePbEmG0gSlMYow9pR383htTeiTUZ7BcHHz1 ot29nNHTRI6V6uWX99RP+sPjO4xGNEGiRmPV974lLVVe4j3vgKeRUour+2SFuXDQ5Nz1 c14Iha+W+o3fxXwGYgSYK5lrBrMr/SkOcFn7q/01ZltrOzg6qVPz0XqHXb0fUHzfaFlt lo/g== X-Gm-Message-State: ALyK8tKytvRv4xJHe983EmnykY0jFCwXt4q7xNchmTCwcFXpVbbj7J+/zn7GYf/5BpNh4OJ24VrwxylFijK0Tw== X-Received: by 10.140.194.73 with SMTP id p70mr15303204qha.78.1465833754920; Mon, 13 Jun 2016 09:02:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.37.185 with HTTP; Mon, 13 Jun 2016 09:02:32 -0700 (PDT) In-Reply-To: References: From: Alexander Duyck Date: Mon, 13 Jun 2016 09:02:32 -0700 Message-ID: To: =?UTF-8?Q?Mauricio_V=C3=A1squez?= Cc: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 13 Jun 2016 16:02:35 -0000 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 > 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 to = a >> > specific virtual function, however I faced the problem that I did not >> > know >> > which queue belongs to a VF. I found in [1] that in the case of Intel >> > 82599, queues 0-7 belongs to VF0, 8-15 to VF1 and so on, I tested it b= ut >> > 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/= 82599-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 describe= d: > 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. - Alex