From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by dpdk.org (Postfix) with ESMTP id C466672FB for ; Tue, 7 Jun 2016 23:31:05 +0200 (CEST) Received: by mail-it0-f67.google.com with SMTP id h190so4704411ith.3 for ; Tue, 07 Jun 2016 14:31:05 -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=i+AtWHTIWZpCBRo4Iou4nk47SJ8uXeWx+LTRFfHI2Wk=; b=Jtq1MdKYfR+LdvyU7fNK/U2ntWVoW0e4mBvO1VGCF27UusBEiecvQvIrAU/Gd6zWx+ jA+I882WHnW4aqUcXCCRqFljJBQ7S8ub96eNxwOFNGz/MbJKiqaW4qROD892xJO3elQC UpR6lSAh4Rhq2SG2TPZ3zPoMBvbYK3v+SzQyueXDwzZbt5sXSgjyB+oRo8Na2u0cBKUK b2LiM7tPctzPFZpGpYwzDXW8F3dUeUwA8QszzcQLxVfZIuddtAjSniWgTBWxBfNYClhZ LeyEaWhTsiYyNjN8nNGHFbBkPC2s8ahAm4RzKsq0w+fFoZXG1b9AwZuOZMknAgIjmJHa s4dw== 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=i+AtWHTIWZpCBRo4Iou4nk47SJ8uXeWx+LTRFfHI2Wk=; b=lVAN5aF4N1GWKV+ACm5U96erVPF2CGH15MDG8DaRcfKSCd5n5T7s+wVs39KqqsJmKi OlnAQNkCMmyxMdWZ/JB8ineHakD2RJi/wt1hlncQ0P1MAZmOyQkusljCBIUIsyjR1/1A h+iPgQXSPfSbKPhJRp5Z17ZZZ/9Yv2o0ZzJN8WtakOdwRKNA0MLr8SQA1Ktm5AJ4lIlH j6Vo7Bneq+4a+UPwziek5Ja93+QBX7PnC0zBsSfsy/4dHASX3JCktIT3YqCEcWRefoaJ 2PX4JHn9ZnvlS8NkUZEkPIxhCEJtlJ0k2aACs1WLpOJghOtSW2sHzf/5Mj6m7nnz0z9n 9DVg== X-Gm-Message-State: ALyK8tJYPvs3X/dchrXNjYpq4DSC6DA5tGW5AfAxVmUI/MERJGb6sFp7T8LsYh+bSFLid6Lf/SKm9rqt0hfATw== X-Received: by 10.36.89.4 with SMTP id p4mr3059801itb.44.1465335065100; Tue, 07 Jun 2016 14:31:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.143.5 with HTTP; Tue, 7 Jun 2016 14:31:04 -0700 (PDT) In-Reply-To: References: From: Alexander Duyck Date: Tue, 7 Jun 2016 14:31:04 -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: Tue, 07 Jun 2016 21:31:06 -0000 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 kno= w > 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 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. 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. There are a few other configurations such as if DCB is enabled I believe it is possible to get 8 queues per VF if less than 16 VFs are allocated but in such a case you would not have access to RSS. In this case if the maximum combined queue count reported is 1 you would need to check to see how many TCs are being supported by the PF in order to determine if the queue count is 4 or 8 per VF. - Alex