* [PATCH] net/iavf: initialize large VF setting at startup
@ 2022-02-03 9:03 Ghalem Boudour
2022-02-09 2:42 ` Xu, Ting
2022-02-10 10:49 ` [PATCH v2] " Ghalem Boudour
0 siblings, 2 replies; 8+ messages in thread
From: Ghalem Boudour @ 2022-02-03 9:03 UTC (permalink / raw)
To: jingjing.wu, beilei.xing
Cc: dev, Ghalem Boudour, Thibaut Collet, Olivier Matz
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>
---
drivers/net/iavf/iavf_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 79397f15e54f..09410be4b712 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
PMD_INIT_LOG(ERR, "unable to allocate rss_lut memory");
goto err_rss;
}
+ 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) {
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] net/iavf: initialize large VF setting at startup
2022-02-03 9:03 [PATCH] net/iavf: initialize large VF setting at startup Ghalem Boudour
@ 2022-02-09 2:42 ` Xu, Ting
2022-02-09 19:26 ` Ghalem Boudour
2022-02-10 10:49 ` [PATCH v2] " Ghalem Boudour
1 sibling, 1 reply; 8+ messages in thread
From: Xu, Ting @ 2022-02-09 2:42 UTC (permalink / raw)
To: Ghalem Boudour, Wu, Jingjing, Xing, Beilei
Cc: dev, Thibaut Collet, Olivier Matz
> -----Original Message-----
> From: Ghalem Boudour <ghalem.boudour@6wind.com>
> Sent: Thursday, February 3, 2022 5:04 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Ghalem Boudour <ghalem.boudour@6wind.com>;
> Thibaut Collet <thibaut.collet@6wind.com>; Olivier Matz
> <olivier.matz@6wind.com>
> Subject: [PATCH] net/iavf: initialize large VF setting at startup
>
> 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>
> ---
> drivers/net/iavf/iavf_ethdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index 79397f15e54f..09410be4b712 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
> PMD_INIT_LOG(ERR, "unable to allocate rss_lut
> memory");
> goto err_rss;
> }
> + if (vf->vsi_res->num_queue_pairs >
> IAVF_MAX_NUM_QUEUES_DFLT)
> + vf->lv_enabled = true;
Why you put this operation in the part of " VIRTCHNL_VF_OFFLOAD_RSS_PF"?
> }
>
> if (vf->vf_res->vf_cap_flags &
> VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
> --
> 2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net/iavf: initialize large VF setting at startup
2022-02-09 2:42 ` Xu, Ting
@ 2022-02-09 19:26 ` Ghalem Boudour
2022-02-10 2:43 ` Xu, Ting
0 siblings, 1 reply; 8+ messages in thread
From: Ghalem Boudour @ 2022-02-09 19:26 UTC (permalink / raw)
To: Xu, Ting; +Cc: Wu, Jingjing, Xing, Beilei, dev, Thibaut Collet, Olivier Matz
Hi Ting,
The purpose of the correction is to ensure that the rss configuration
is aligned with the number of queues
allocated on the current boot and not impacted by a previous
configuration done in a previous boot.
The rss configuration is only available if VIRTCHNL_VF_OFFLOAD_RSS_PF
is present and that is the reason
that we have set the operation in part of VIRTCHNL_VF_OFFLOAD_RSS_PF.
Nevertheless this operation can be moved outside to be more generic
and also covers iavf_config_irq_map.
On Wed, Feb 9, 2022 at 3:42 AM Xu, Ting <ting.xu@intel.com> wrote:
>
> > -----Original Message-----
> > From: Ghalem Boudour <ghalem.boudour@6wind.com>
> > Sent: Thursday, February 3, 2022 5:04 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Ghalem Boudour <ghalem.boudour@6wind.com>;
> > Thibaut Collet <thibaut.collet@6wind.com>; Olivier Matz
> > <olivier.matz@6wind.com>
> > Subject: [PATCH] net/iavf: initialize large VF setting at startup
> >
> > 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>
> > ---
> > drivers/net/iavf/iavf_ethdev.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> > index 79397f15e54f..09410be4b712 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
> > PMD_INIT_LOG(ERR, "unable to allocate rss_lut
> > memory");
> > goto err_rss;
> > }
> > + if (vf->vsi_res->num_queue_pairs >
> > IAVF_MAX_NUM_QUEUES_DFLT)
> > + vf->lv_enabled = true;
>
> Why you put this operation in the part of " VIRTCHNL_VF_OFFLOAD_RSS_PF"?
>
> > }
> >
> > if (vf->vf_res->vf_cap_flags &
> > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
> > --
> > 2.30.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] net/iavf: initialize large VF setting at startup
2022-02-09 19:26 ` Ghalem Boudour
@ 2022-02-10 2:43 ` Xu, Ting
2022-02-10 6:43 ` Ghalem Boudour
0 siblings, 1 reply; 8+ messages in thread
From: Xu, Ting @ 2022-02-10 2:43 UTC (permalink / raw)
To: Ghalem Boudour
Cc: Wu, Jingjing, Xing, Beilei, dev, Thibaut Collet, Olivier Matz
> -----Original Message-----
> From: Ghalem Boudour <ghalem.boudour@6wind.com>
> Sent: Thursday, February 10, 2022 3:27 AM
> To: Xu, Ting <ting.xu@intel.com>
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> dev@dpdk.org; Thibaut Collet <thibaut.collet@6wind.com>; Olivier Matz
> <olivier.matz@6wind.com>
> Subject: Re: [PATCH] net/iavf: initialize large VF setting at startup
>
> Hi Ting,
>
> The purpose of the correction is to ensure that the rss configuration is
> aligned with the number of queues allocated on the current boot and not
> impacted by a previous configuration done in a previous boot.
> The rss configuration is only available if VIRTCHNL_VF_OFFLOAD_RSS_PF is
> present and that is the reason that we have set the operation in part of
> VIRTCHNL_VF_OFFLOAD_RSS_PF.
>
> Nevertheless this operation can be moved outside to be more generic and
> also covers iavf_config_irq_map.
>
> On Wed, Feb 9, 2022 at 3:42 AM Xu, Ting <ting.xu@intel.com> wrote:
> >
> > > -----Original Message-----
> > > From: Ghalem Boudour <ghalem.boudour@6wind.com>
> > > Sent: Thursday, February 3, 2022 5:04 PM
> > > To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > > <beilei.xing@intel.com>
> > > Cc: dev@dpdk.org; Ghalem Boudour <ghalem.boudour@6wind.com>;
> Thibaut
> > > Collet <thibaut.collet@6wind.com>; Olivier Matz
> > > <olivier.matz@6wind.com>
> > > Subject: [PATCH] net/iavf: initialize large VF setting at startup
> > >
> > > 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>
> > > ---
> > > drivers/net/iavf/iavf_ethdev.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > > b/drivers/net/iavf/iavf_ethdev.c index 79397f15e54f..09410be4b712
> > > 100644
> > > --- a/drivers/net/iavf/iavf_ethdev.c
> > > +++ b/drivers/net/iavf/iavf_ethdev.c
> > > @@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
> > > PMD_INIT_LOG(ERR, "unable to allocate rss_lut
> > > memory");
> > > goto err_rss;
> > > }
> > > + if (vf->vsi_res->num_queue_pairs >
> > > IAVF_MAX_NUM_QUEUES_DFLT)
> > > + vf->lv_enabled = true;
> >
> > Why you put this operation in the part of "
> VIRTCHNL_VF_OFFLOAD_RSS_PF"?
> >
> > > }
> > >
> > > if (vf->vf_res->vf_cap_flags &
> > > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
> > > --
> > > 2.30.2
> >
I think it is OK to move outside to the generic vf initialization since it is not only bound with RSS, what's your opinion?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net/iavf: initialize large VF setting at startup
2022-02-10 2:43 ` Xu, Ting
@ 2022-02-10 6:43 ` Ghalem Boudour
0 siblings, 0 replies; 8+ messages in thread
From: Ghalem Boudour @ 2022-02-10 6:43 UTC (permalink / raw)
To: Xu, Ting; +Cc: Wu, Jingjing, Xing, Beilei, dev, Thibaut Collet, Olivier Matz
I agree with you.
Will submit a new revision.
Thanks
On Thu, Feb 10, 2022 at 3:43 AM Xu, Ting <ting.xu@intel.com> wrote:
>
> > -----Original Message-----
> > From: Ghalem Boudour <ghalem.boudour@6wind.com>
> > Sent: Thursday, February 10, 2022 3:27 AM
> > To: Xu, Ting <ting.xu@intel.com>
> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> > dev@dpdk.org; Thibaut Collet <thibaut.collet@6wind.com>; Olivier Matz
> > <olivier.matz@6wind.com>
> > Subject: Re: [PATCH] net/iavf: initialize large VF setting at startup
> >
> > Hi Ting,
> >
> > The purpose of the correction is to ensure that the rss configuration is
> > aligned with the number of queues allocated on the current boot and not
> > impacted by a previous configuration done in a previous boot.
> > The rss configuration is only available if VIRTCHNL_VF_OFFLOAD_RSS_PF is
> > present and that is the reason that we have set the operation in part of
> > VIRTCHNL_VF_OFFLOAD_RSS_PF.
> >
> > Nevertheless this operation can be moved outside to be more generic and
> > also covers iavf_config_irq_map.
> >
> > On Wed, Feb 9, 2022 at 3:42 AM Xu, Ting <ting.xu@intel.com> wrote:
> > >
> > > > -----Original Message-----
> > > > From: Ghalem Boudour <ghalem.boudour@6wind.com>
> > > > Sent: Thursday, February 3, 2022 5:04 PM
> > > > To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > > > <beilei.xing@intel.com>
> > > > Cc: dev@dpdk.org; Ghalem Boudour <ghalem.boudour@6wind.com>;
> > Thibaut
> > > > Collet <thibaut.collet@6wind.com>; Olivier Matz
> > > > <olivier.matz@6wind.com>
> > > > Subject: [PATCH] net/iavf: initialize large VF setting at startup
> > > >
> > > > 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>
> > > > ---
> > > > drivers/net/iavf/iavf_ethdev.c | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > > > b/drivers/net/iavf/iavf_ethdev.c index 79397f15e54f..09410be4b712
> > > > 100644
> > > > --- a/drivers/net/iavf/iavf_ethdev.c
> > > > +++ b/drivers/net/iavf/iavf_ethdev.c
> > > > @@ -2276,6 +2276,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
> > > > PMD_INIT_LOG(ERR, "unable to allocate rss_lut
> > > > memory");
> > > > goto err_rss;
> > > > }
> > > > + if (vf->vsi_res->num_queue_pairs >
> > > > IAVF_MAX_NUM_QUEUES_DFLT)
> > > > + vf->lv_enabled = true;
> > >
> > > Why you put this operation in the part of "
> > VIRTCHNL_VF_OFFLOAD_RSS_PF"?
> > >
> > > > }
> > > >
> > > > if (vf->vf_res->vf_cap_flags &
> > > > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
> > > > --
> > > > 2.30.2
> > >
>
> I think it is OK to move outside to the generic vf initialization since it is not only bound with RSS, what's your opinion?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] net/iavf: initialize large VF setting at startup
2022-02-03 9:03 [PATCH] net/iavf: initialize large VF setting at startup Ghalem Boudour
2022-02-09 2:42 ` Xu, Ting
@ 2022-02-10 10:49 ` Ghalem Boudour
2022-02-10 14:17 ` Xu, Ting
1 sibling, 1 reply; 8+ messages in thread
From: Ghalem Boudour @ 2022-02-10 10:49 UTC (permalink / raw)
To: jingjing.wu, beilei.xing
Cc: dev, ting.xu, Ghalem Boudour, Thibaut Collet, Olivier Matz
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2] net/iavf: initialize large VF setting at startup
2022-02-10 10:49 ` [PATCH v2] " Ghalem Boudour
@ 2022-02-10 14:17 ` Xu, Ting
2022-02-11 1:28 ` Zhang, Qi Z
0 siblings, 1 reply; 8+ messages in thread
From: Xu, Ting @ 2022-02-10 14:17 UTC (permalink / raw)
To: Ghalem Boudour, Wu, Jingjing, Xing, Beilei
Cc: dev, Thibaut Collet, Olivier Matz
> -----Original Message-----
> From: Ghalem Boudour <ghalem.boudour@6wind.com>
> Sent: Thursday, February 10, 2022 6:49 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Xu, Ting <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
>
> 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
Acked-by: Ting Xu <ting.xu@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2] net/iavf: initialize large VF setting at startup
2022-02-10 14:17 ` Xu, Ting
@ 2022-02-11 1:28 ` Zhang, Qi Z
0 siblings, 0 replies; 8+ messages in thread
From: Zhang, Qi Z @ 2022-02-11 1:28 UTC (permalink / raw)
To: Xu, Ting, Ghalem Boudour, Wu, Jingjing, Xing, Beilei
Cc: dev, Thibaut Collet, Olivier Matz
> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Thursday, February 10, 2022 10:17 PM
> To: Ghalem Boudour <ghalem.boudour@6wind.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Thibaut Collet <thibaut.collet@6wind.com>; Olivier Matz
> <olivier.matz@6wind.com>
> Subject: RE: [PATCH v2] net/iavf: initialize large VF setting at startup
>
> > -----Original Message-----
> > From: Ghalem Boudour <ghalem.boudour@6wind.com>
> > Sent: Thursday, February 10, 2022 6:49 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Xu, Ting <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
> >
> > 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
>
> Acked-by: Ting Xu <ting.xu@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-02-11 1:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 9:03 [PATCH] net/iavf: initialize large VF setting at startup 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 ` [PATCH v2] " Ghalem Boudour
2022-02-10 14:17 ` Xu, Ting
2022-02-11 1:28 ` Zhang, Qi Z
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).