* [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT @ 2019-01-14 8:24 Yanglong Wu 2019-01-14 12:48 ` Zhang, Qi Z 2019-01-15 2:23 ` [dpdk-stable] [PATCH v2] " Yanglong Wu 0 siblings, 2 replies; 5+ messages in thread From: Yanglong Wu @ 2019-01-14 8:24 UTC (permalink / raw) To: dev; +Cc: ryan.e.hall, qi.z.zhang, Yanglong Wu, stable i40e_aq_set_rss_lut should set rigister according to the vsi->type. if not, VF may overwrite the rigister of PF Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Cc: stable@dpdk.org Signed-off-by: Wu Yanglong <yanglong.wu@intel.com> --- drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a6b97e164..d4d99edcd 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4183,8 +4183,13 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) return -EINVAL; if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, - lut, lut_size); + if (vsi->type == I40E_VSI_SRIOV) { + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, FALSE, + lut, lut_size); + } else { + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, + lut, lut_size); + } if (ret) { PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); return ret; -- 2.11.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT 2019-01-14 8:24 [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT Yanglong Wu @ 2019-01-14 12:48 ` Zhang, Qi Z 2019-01-15 2:13 ` Wu, Yanglong 2019-01-15 2:23 ` [dpdk-stable] [PATCH v2] " Yanglong Wu 1 sibling, 1 reply; 5+ messages in thread From: Zhang, Qi Z @ 2019-01-14 12:48 UTC (permalink / raw) To: Wu, Yanglong, dev; +Cc: Hall, Ryan E, stable > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, January 14, 2019 4:24 PM > To: dev@dpdk.org > Cc: Hall, Ryan E <ryan.e.hall@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Wu, Yanglong <yanglong.wu@intel.com>; stable@dpdk.org > Subject: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT I think this is not a just for FPK, but for all i40e family right? > > i40e_aq_set_rss_lut should set rigister according to the vsi->type. if not, VF > may overwrite the rigister of PF > > Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") > Cc: stable@dpdk.org > > Signed-off-by: Wu Yanglong <yanglong.wu@intel.com> It should be "Yanglong Wu" > --- > drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index a6b97e164..d4d99edcd 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -4183,8 +4183,13 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, > uint16_t lut_size) > return -EINVAL; > > if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { > - ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > - lut, lut_size); > + if (vsi->type == I40E_VSI_SRIOV) { > + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, FALSE, > + lut, lut_size); > + } else { > + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > + lut, lut_size); > + } You can simplify above code to below single line ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, vsi->type != I40E_VSI_SRIOV, lut, lut_size); > if (ret) { > PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); > return ret; > -- > 2.11.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT 2019-01-14 12:48 ` Zhang, Qi Z @ 2019-01-15 2:13 ` Wu, Yanglong 0 siblings, 0 replies; 5+ messages in thread From: Wu, Yanglong @ 2019-01-15 2:13 UTC (permalink / raw) To: Zhang, Qi Z, dev; +Cc: Hall, Ryan E, stable Hi qi, -----Original Message----- From: Zhang, Qi Z Sent: Monday, January 14, 2019 8:48 PM To: Wu, Yanglong <yanglong.wu@intel.com>; dev@dpdk.org Cc: Hall, Ryan E <ryan.e.hall@intel.com>; stable@dpdk.org Subject: RE: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, January 14, 2019 4:24 PM > To: dev@dpdk.org > Cc: Hall, Ryan E <ryan.e.hall@intel.com>; Zhang, Qi Z > <qi.z.zhang@intel.com>; Wu, Yanglong <yanglong.wu@intel.com>; > stable@dpdk.org > Subject: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT I think this is not a just for FPK, but for all i40e family right? >From the code, just FPK have this problem. it not well designed when it transfer to admin queue. > > i40e_aq_set_rss_lut should set rigister according to the vsi->type. if > not, VF may overwrite the rigister of PF > > Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") > Cc: stable@dpdk.org > > Signed-off-by: Wu Yanglong <yanglong.wu@intel.com> It should be "Yanglong Wu" Ok, will send the version two. > --- > drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c > b/drivers/net/i40e/i40e_ethdev.c index a6b97e164..d4d99edcd 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -4183,8 +4183,13 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t > *lut, uint16_t lut_size) > return -EINVAL; > > if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { > - ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > - lut, lut_size); > + if (vsi->type == I40E_VSI_SRIOV) { > + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, FALSE, > + lut, lut_size); > + } else { > + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > + lut, lut_size); > + } You can simplify above code to below single line ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, vsi->type != I40E_VSI_SRIOV, lut, lut_size); thanks, it would be better. > if (ret) { > PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); > return ret; > -- > 2.11.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH v2] net/i40e: fix FPK VF overwrite PF RSS LUT 2019-01-14 8:24 [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT Yanglong Wu 2019-01-14 12:48 ` Zhang, Qi Z @ 2019-01-15 2:23 ` Yanglong Wu 2019-01-15 10:51 ` Zhang, Qi Z 1 sibling, 1 reply; 5+ messages in thread From: Yanglong Wu @ 2019-01-15 2:23 UTC (permalink / raw) To: dev; +Cc: ryan.e.hall, qi.z.zhang, Yanglong Wu, stable i40e_aq_set_rss_lut should set rigister according to the vsi->type. if not, VF may overwrite the rigister of PF Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Cc: stable@dpdk.org Signed-off-by: Yanglong Wu <yanglong.wu@intel.com> --- drivers/net/i40e/i40e_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a6b97e164..f97cd5348 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4183,7 +4183,8 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) return -EINVAL; if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, + vsi->type != I40E_VSI_SRIOV, lut, lut_size); if (ret) { PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); @@ -4222,7 +4223,8 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) hw = I40E_VSI_TO_HW(vsi); if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, TRUE, + ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, + vsi->type != I40E_VSI_SRIOV, lut, lut_size); if (ret) { PMD_DRV_LOG(ERR, "Failed to set RSS lookup table"); -- 2.11.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/i40e: fix FPK VF overwrite PF RSS LUT 2019-01-15 2:23 ` [dpdk-stable] [PATCH v2] " Yanglong Wu @ 2019-01-15 10:51 ` Zhang, Qi Z 0 siblings, 0 replies; 5+ messages in thread From: Zhang, Qi Z @ 2019-01-15 10:51 UTC (permalink / raw) To: Wu, Yanglong, dev; +Cc: Hall, Ryan E, stable > -----Original Message----- > From: Wu, Yanglong > Sent: Tuesday, January 15, 2019 10:24 AM > To: dev@dpdk.org > Cc: Hall, Ryan E <ryan.e.hall@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Wu, Yanglong <yanglong.wu@intel.com>; stable@dpdk.org > Subject: [PATCH v2] net/i40e: fix FPK VF overwrite PF RSS LUT > Change title to "fix VF overwrite PF RSS LUT for X722" > i40e_aq_set_rss_lut should set register according to the vsi->type. if not, VF > may overwrite the register of PF s/rigister/register > > Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") > Cc: stable@dpdk.org > > Signed-off-by: Yanglong Wu <yanglong.wu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Applied to dpdk-next-net-intel with above minor fix. Thanks Qi ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-15 10:51 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-01-14 8:24 [dpdk-stable] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT Yanglong Wu 2019-01-14 12:48 ` Zhang, Qi Z 2019-01-15 2:13 ` Wu, Yanglong 2019-01-15 2:23 ` [dpdk-stable] [PATCH v2] " Yanglong Wu 2019-01-15 10:51 ` 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).