DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ghalem Boudour <ghalem.boudour@6wind.com>
To: jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, ting.xu@intel.com,
	Ghalem Boudour <ghalem.boudour@6wind.com>,
	Thibaut Collet <thibaut.collet@6wind.com>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: [PATCH v2] net/iavf: initialize large VF setting at startup
Date: Thu, 10 Feb 2022 11:49:14 +0100	[thread overview]
Message-ID: <20220210104914.5444-1-ghalem.boudour@6wind.com> (raw)
In-Reply-To: <20220203090359.29270-1-ghalem.boudour@6wind.com>

lv_enabled is used to remember if large VF setting is configured, but
its value is not initialized at startup. This can lead to a different
configuration regarding the initial configuration of the PF.
For example, a first start is done with 8 rx and 8 tx queues. Large VF
is not needed and reta size is 64.
A second start is done with 20 rx and tx queues. Large VF is required
and reta size is 256.
A third start is done with 2 rx and tx queues. Large VF is not needed
but reta size is 256 as the PF has been configured during the second
start.

In order to have a consistent behavior regarding reta size whatever
the configuration of the PF (may be changed by a previous boot) the
lv_enabled must be set properly at the init phase.

Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
v2:
* Enable large VF at initialization independently of rss configuration
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 79397f15e54f..d6190ac24ac6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2278,6 +2278,9 @@ iavf_init_vf(struct rte_eth_dev *dev)
 		}
 	}
 
+	if (vf->vsi_res->num_queue_pairs > IAVF_MAX_NUM_QUEUES_DFLT)
+		vf->lv_enabled = true;
+
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
 		if (iavf_get_supported_rxdid(adapter) != 0) {
 			PMD_INIT_LOG(ERR, "failed to do get supported rxdid");
-- 
2.30.2


  parent reply	other threads:[~2022-02-10 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  9:03 [PATCH] " Ghalem Boudour
2022-02-09  2:42 ` Xu, Ting
2022-02-09 19:26   ` Ghalem Boudour
2022-02-10  2:43     ` Xu, Ting
2022-02-10  6:43       ` Ghalem Boudour
2022-02-10 10:49 ` Ghalem Boudour [this message]
2022-02-10 14:17   ` [PATCH v2] " Xu, Ting
2022-02-11  1:28     ` Zhang, Qi Z

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=20220210104914.5444-1-ghalem.boudour@6wind.com \
    --to=ghalem.boudour@6wind.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=thibaut.collet@6wind.com \
    --cc=ting.xu@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).