DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: zhirun.yan@intel.com
Cc: dev@dpdk.org, qi.z.zhang@intel.com, haiyue.wang@intel.com
Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: support VF request more queues
Date: Thu, 13 Dec 2018 09:26:28 +0100	[thread overview]
Message-ID: <CAJFAV8wD_vbFmJnYangXJ6Hys3KMNZ+eKVxpKpvwRNiHqGHUTQ@mail.gmail.com> (raw)
In-Reply-To: <20181213140505.14578-2-zhirun.yan@intel.com>

Hello, Zhirun,

On Thu, Dec 13, 2018 at 7:28 AM Zhirun Yan <zhirun.yan@intel.com> wrote:

> @@ -1515,8 +1545,12 @@ RTE_PMD_REGISTER_KMOD_DEP(net_i40e_vf, "* igb_uio |
> vfio-pci");
>  static int
>  i40evf_dev_configure(struct rte_eth_dev *dev)
>  {
> +       struct i40e_vf *vf =
> I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
>         struct i40e_adapter *ad =
>                 I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> +       uint16_t num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
> +                               dev->data->nb_tx_queues);
> +       int ret = 0;
>
>         /* Initialize to TRUE. If any of Rx queues doesn't meet the bulk
>          * allocation or vector Rx preconditions we will reset it.
> @@ -1526,7 +1560,21 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
>         ad->tx_simple_allowed = true;
>         ad->tx_vec_allowed = true;
>
> -       return i40evf_init_vlan(dev);
> +       if (num_queue_pairs != vf->vsi_res->num_queue_pairs) {
> +               PMD_DRV_LOG(INFO, "change queue pairs from %u to %u",
> +                               vf->vsi_res->num_queue_pairs,
> num_queue_pairs);
> +               ret = i40evf_request_queues(dev, num_queue_pairs);
> +               if (ret != 0)
> +                       return ret;
> +
> +               ret = i40evf_dev_reset(dev);
> +               if (ret != 0)
> +                       return ret;
> +       }
> +
> +       i40evf_init_vlan(dev);
> +
> +       return ret;
>  }
>
>  static int
>

Did not look too much into this code, but I noticed that with this change,
you always return 0, whatever happened with i40evf_init_vlan().
I would have put the "int ret" declaration in the new block and left the
return i40evf_init_vlan(dev); as is.

Do you have a rationale not to do so ?


-- 
David Marchand

  reply	other threads:[~2018-12-13  8:26 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 16:58 [dpdk-dev] [PATCH v2 0/2] Support " Zhirun Yan
2018-11-28 16:58 ` [dpdk-dev] [PATCH v2 1/2] net/i40e: support VF " Zhirun Yan
2018-11-28 16:58 ` [dpdk-dev] [PATCH v2 2/2] net/i40e: support PF respond " Zhirun Yan
2018-12-13 14:05 ` [dpdk-dev] [PATCH v3 0/2] Support " Zhirun Yan
2018-12-13 14:05   ` [dpdk-dev] [PATCH v3 1/2] net/i40e: support VF " Zhirun Yan
2018-12-13  8:26     ` David Marchand [this message]
2018-12-14  3:17       ` Yan, Zhirun
2018-12-13 10:49     ` Zhang, Qi Z
2018-12-14  3:22       ` Yan, Zhirun
2018-12-13 14:05   ` [dpdk-dev] [PATCH v3 2/2] net/i40e: support PF respond " Zhirun Yan
2018-12-14 14:37   ` [dpdk-dev] [PATCH v4 0/2] Support " Zhirun Yan
2018-12-14 14:37     ` [dpdk-dev] [PATCH v4 1/2] net/i40e: support VF " Zhirun Yan
2018-12-14 11:59       ` Zhang, Qi Z
2018-12-17  3:12         ` Yan, Zhirun
2018-12-14 14:37     ` [dpdk-dev] [PATCH v4 2/2] net/i40e: support PF respond " Zhirun Yan
2018-12-17 11:10     ` [dpdk-dev] [PATCH v5 0/2] Support " Zhirun Yan
2018-12-17  5:31       ` Zhang, Qi Z
2018-12-17 11:10       ` [dpdk-dev] [PATCH v5 1/2] net/i40e: support VF " Zhirun Yan
2018-12-17 14:28         ` Ferruh Yigit
2018-12-18  1:44           ` Zhang, Qi Z
2018-12-17 14:31         ` Ferruh Yigit
2018-12-17 11:10       ` [dpdk-dev] [PATCH v5 2/2] net/i40e: support PF respond " Zhirun Yan
2018-12-17 14:26         ` Ferruh Yigit
2018-12-18 16:09       ` [dpdk-dev] [PATCH v6 0/3] Support " Zhirun Yan
2018-12-18 16:09         ` [dpdk-dev] [PATCH v6 1/3] net/i40e: support VF " Zhirun Yan
2018-12-18 12:44           ` Zhang, Qi Z
2018-12-19  1:34             ` Yan, Zhirun
2018-12-18 16:09         ` [dpdk-dev] [PATCH v6 2/3] net/i40e: support PF respond " Zhirun Yan
2018-12-18 16:09         ` [dpdk-dev] [PATCH v6 3/3] doc: update queue number per vf for i40e Zhirun Yan
2018-12-18 12:59           ` Zhang, Qi Z
2018-12-19  1:33             ` Yan, Zhirun
2018-12-19 13:08         ` [dpdk-dev] [PATCH v7 0/3] Support request more queues Zhirun Yan
2018-12-19 13:08           ` [dpdk-dev] [PATCH v7 1/3] net/i40e: support VF " Zhirun Yan
2018-12-19 13:08           ` [dpdk-dev] [PATCH v7 2/3] net/i40e: support PF respond " Zhirun Yan
2018-12-19 13:08           ` [dpdk-dev] [PATCH v7 3/3] doc: update queue number per vf for i40e Zhirun Yan
2018-12-19 13:37             ` [dpdk-dev] [PATCH v8 0/3] Support request more queues Zhirun Yan
2018-12-19 13:37               ` [dpdk-dev] [PATCH v8 1/3] net/i40e: support VF " Zhirun Yan
2018-12-19 13:37               ` [dpdk-dev] [PATCH v8 2/3] net/i40e: support PF respond " Zhirun Yan
2018-12-19 13:37               ` [dpdk-dev] [PATCH v8 3/3] doc: update queue number per vf for i40e Zhirun Yan

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=CAJFAV8wD_vbFmJnYangXJ6Hys3KMNZ+eKVxpKpvwRNiHqGHUTQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --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).