net/iavf: initialize large VF setting at startup
PATCH 1/1 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.
--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/iavf/iavf_ethdev.c +2 -0
@@ -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 ) {
Signature · 1 line
2.30.2
Quoted 35 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 3, 2022 5:04 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ghalem Boudour <[email protected]>; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: [PATCH] net/iavf: initialize large VF setting at startup
lv_enabledis 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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/iavf/iavf_ethdev.c +0
-0
drivers/net/iavf/iavf_ethdev.c iavf_init_vf(struct rte_eth_dev *dev) · line 2282
Quoted 7 lines
drivers/net/iavf/iavf_ethdev.c +2
-0@@ -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"?
Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +0
-0}if (
vf->vf_res->vf_cap_flags&VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
--
2.30.2
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.
Quoted 53 lines · Ting
Quoted 36 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 3, 2022 5:04 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ghalem Boudour <[email protected]>; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: [PATCH] net/iavf: initialize large VF setting at startup
lv_enabledis 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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/iavf/iavf_ethdev.c +0
-0drivers/net/iavf/iavf_ethdev.c iavf_init_vf(struct rte_eth_dev *dev) · line 2282
Quoted 7 lines
drivers/net/iavf/iavf_ethdev.c +2
-0@@ -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"?Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +0
-0}if (vf->vf_res->vf_cap_flags &
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
--
2.30.2
Quoted 71 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 10, 2022 3:27 AM
To: Xu, Ting <[email protected]>
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; [email protected]; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: Re: [PATCH] net/iavf: initialize large VF setting at startupHi 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_PFis present and that is the reason that we have set the operation in part ofVIRTCHNL_VF_OFFLOAD_RSS_PF.Nevertheless this operation can be moved outside to be more generic and also covers
iavf_config_irq_map.Quoted 7 lines · Ting
Quoted 7 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 3, 2022 5:04 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ghalem Boudour <[email protected]>;Thibaut
Quoted 4 lines
Quoted 4 lines
Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: [PATCH] net/iavf: initialize large VF setting at startupQuoted 9 lines
Quoted 9 lines
lv_enabledis 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 thesecond start.
Quoted 12 lines
Quoted 12 lines
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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)Quoted 15 lines
drivers/net/iavf/iavf_ethdev.c iavf_init_vf(struct rte_eth_dev *dev) · line 2282
Quoted 13 lines
(quoted diff) +0
-0
b/drivers/net/iavf/iavf_ethdev.cindex79397f15e54f..09410be4b712100644drivers/net/iavf/iavf_ethdev.c +2
-0@@ -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 "
Quoted 9 lines
VIRTCHNL_VF_OFFLOAD_RSS_PF"?Quoted 8 lines
Quoted 7 lines
drivers/net/iavf/iavf_ethdev.c +0
-0}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?
I agree with you.
Will submit a new revision.
Thanks
Quoted 83 lines · Ting
Quoted 72 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 10, 2022 3:27 AM
To: Xu, Ting <[email protected]>
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; [email protected]; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: Re: [PATCH] net/iavf: initialize large VF setting at startupHi 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_PFis present and that is the reason that we have set the operation in part ofVIRTCHNL_VF_OFFLOAD_RSS_PF.Nevertheless this operation can be moved outside to be more generic and also covers
iavf_config_irq_map.Quoted 7 lines · Ting
Quoted 7 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 3, 2022 5:04 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ghalem Boudour <[email protected]>;Thibaut
Quoted 4 lines
Quoted 4 lines
Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: [PATCH] net/iavf: initialize large VF setting at startupQuoted 9 lines
Quoted 9 lines
lv_enabledis 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 thesecond start.
Quoted 12 lines
Quoted 12 lines
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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)Quoted 15 lines
drivers/net/iavf/iavf_ethdev.c iavf_init_vf(struct rte_eth_dev *dev) · line 2282
Quoted 13 lines
(quoted diff) +0
-0
b/drivers/net/iavf/iavf_ethdev.cindex79397f15e54f..09410be4b712100644drivers/net/iavf/iavf_ethdev.c +2
-0@@ -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 "
Quoted 9 lines
VIRTCHNL_VF_OFFLOAD_RSS_PF"?Quoted 8 lines
Quoted 7 lines
drivers/net/iavf/iavf_ethdev.c +0
-0}if (vf->vf_res->vf_cap_flags &
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) {
--
2.30.2I think it is OK to move outside to the generic vf initialization since it is not only bound with RSS, what's your opinion?
PATCH v2 1/1 net/iavf: initialize large VF setting at startup
In reply to Ghalem Boudourlv_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.
---
v2:
* Enable large VF at initialization independently of rss configuration
--- drivers/net/iavf/iavf_ethdev.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/iavf/iavf_ethdev.c +3 -0
@@ -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" );
Signature · 1 line
2.30.2
Quoted 47 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 10, 2022 6:49 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Xu, Ting <[email protected]>; Ghalem Boudour <[email protected]>; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: [PATCH v2] net/iavf: initialize large VF setting at startup
lv_enabledis 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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>---
v2:
* Enable large VF at initialization independently of rss configuration--- drivers/net/iavf/iavf_ethdev.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/iavf/iavf_ethdev.c +3
-0@@ -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 ) {
Quoted 4 lines
PMD_INIT_LOG(ERR, "failed to do get supported
rxdid");
--
2.30.2
Zhang, Qi Z
AppliedQuoted 64 lines
-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Thursday, February 10, 2022 10:17 PM
To: Ghalem Boudour <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Thibaut Collet <[email protected]>; Olivier Matz <[email protected]>
Subject: RE: [PATCH v2] net/iavf: initialize large VF setting at startupQuoted 7 lines
-----Original Message-----
From: Ghalem Boudour <[email protected]>
Sent: Thursday, February 10, 2022 6:49 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Xu, Ting <[email protected]>; Ghalem Boudour <[email protected]>; Thibaut ColletQuoted 33 lines
Olivier Matz <[email protected]>
Subject: [PATCH v2] net/iavf: initialize large VF setting at startup
lv_enabledis 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_enabledmust be set properly at the init phase.Signed-off-by Ghalem Boudour <[email protected]>Signed-off-by Thibaut Collet <[email protected]>Reviewed-by Olivier Matz <[email protected]>---
v2:
* Enable large VF at initialization independently of rss configuration--- drivers/net/iavf/iavf_ethdev.c | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_ethdev.cindex79397f15e54f..d6190ac24ac6100644drivers/net/iavf/iavf_ethdev.c iavf_init_vf(struct rte_eth_dev *dev) · line 2281
Quoted 4 lines
drivers/net/iavf/iavf_ethdev.c +1
-0@@ -2278,6 +2278,9 @@ iavf_init_vf(struct rte_eth_dev *dev) } } + if (vf->vsi_res->num_queue_pairs >
IAVF_MAX_NUM_QUEUES_DFLT)Quoted 6 lines
drivers/net/iavf/iavf_ethdev.c +2
-0+ 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");
Quoted 4 lines
Quoted 2 lines
--
2.30.2Acked-by Ting Xu <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi