DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Zhirun Yan <zhirun.yan@intel.com>, dev@dpdk.org, qi.z.zhang@intel.com
Subject: Re: [dpdk-dev] [PATCH v1] net/i40e: support request any number of queues
Date: Tue, 15 Jan 2019 17:33:34 +0000	[thread overview]
Message-ID: <1c8bba3d-b205-c629-73de-6dca2dfc998f@redhat.com> (raw)
In-Reply-To: <20190115145717.84697-1-zhirun.yan@intel.com>

On 01/15/2019 02:57 PM, Zhirun Yan wrote:
> Before this patch, VF must request a specific queues(1/2/4/8/16) with
> DPDK PF. This patch align the number of requested queues to next power
> of 2. So VF can request any number queues from 1 to 16.
> 
> Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
> ---
>  drivers/net/i40e/i40e_pf.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
> index 092e0d3e9..d110dffb7 100644
> --- a/drivers/net/i40e/i40e_pf.c
> +++ b/drivers/net/i40e/i40e_pf.c
> @@ -1271,7 +1271,10 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
>  	} else {
>  		i40e_vc_notify_vf_reset(vf);
>  		vf->vsi->nb_qps = req_pairs;
> -		pf->vf_nb_qps = req_pairs;
> +		if (rte_is_power_of_2(req_pairs))
> +			pf->vf_nb_qps = req_pairs;
> +		else
> +			pf->vf_nb_qps = i40e_align_floor(req_pairs) << 1;

Shouldn't you do this before you validate against the number of free
queue pairs? or it is somehow handled

>  		i40e_pf_host_process_cmd_reset_vf(vf);
>  
>  		return 0;
> 

  parent reply	other threads:[~2019-01-15 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 14:57 Zhirun Yan
2019-01-15 11:05 ` Zhang, Qi Z
2019-01-15 17:33 ` Kevin Traynor [this message]
2019-01-17  7:26   ` Yan, Zhirun
2019-03-05 16:19     ` Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c8bba3d-b205-c629-73de-6dca2dfc998f@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=zhirun.yan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).