* [dpdk-dev] net/ixgbe: fix X553 wrong speed capability @ 2019-09-25 2:49 Zhang Xiao 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Zhang Xiao @ 2019-09-25 2:49 UTC (permalink / raw) To: dev; +Cc: wenzhuo.lu, Zhang Xiao, marcdevel, stable The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G. Correct it to fix the issue. Fixes: e274f5732225 ("ethdev: add speed capabilities") Cc: marcdevel@gmail.com Cc: stable@dpdk.org Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 7eb3d05..e7c4ce3 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) + dev_info->speed_capa = ETH_LINK_SPEED_10M | + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; + if (hw->mac.type == ixgbe_mac_X540 || hw->mac.type == ixgbe_mac_X540_vf || hw->mac.type == ixgbe_mac_X550 || -- 2.7.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability 2019-09-25 2:49 [dpdk-dev] net/ixgbe: fix X553 wrong speed capability Zhang Xiao @ 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) 2019-09-25 8:16 ` Zhang, Xiao 2019-09-30 10:45 ` Ye Xiaolong 2019-09-30 10:47 ` Ye Xiaolong 2 siblings, 1 reply; 6+ messages in thread From: Gavin Hu (Arm Technology China) @ 2019-09-25 7:04 UTC (permalink / raw) To: Zhang Xiao, dev; +Cc: wenzhuo.lu, marcdevel, stable, nd Hi Xiao, > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Zhang Xiao > Sent: Wednesday, September 25, 2019 10:50 AM > To: dev@dpdk.org > Cc: wenzhuo.lu@intel.com; Zhang Xiao <xiao.zhang@intel.com>; > marcdevel@gmail.com; stable@dpdk.org > Subject: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | > ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than > ETH_LINK_SPEED_1G | > ETH_LINK_SPEED_10G. Correct it to fix the issue. > > Fixes: e274f5732225 ("ethdev: add speed capabilities") > Cc: marcdevel@gmail.com > Cc: stable@dpdk.org > > Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 7eb3d05..e7c4ce3 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info) > dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; > > dev_info->speed_capa = ETH_LINK_SPEED_1G | > ETH_LINK_SPEED_10G; Look through the following code, 100M and 1G is more common to across x530 to x550 devices, while 10M and 10G is specific. Here 10G should be replaced by 100M and you can save some comparisons in the following code. /Gavin > + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || > + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) > + dev_info->speed_capa = ETH_LINK_SPEED_10M | > + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; > + > if (hw->mac.type == ixgbe_mac_X540 || > hw->mac.type == ixgbe_mac_X540_vf || > hw->mac.type == ixgbe_mac_X550 || > -- > 2.7.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) @ 2019-09-25 8:16 ` Zhang, Xiao 2019-09-25 9:06 ` Gavin Hu (Arm Technology China) 0 siblings, 1 reply; 6+ messages in thread From: Zhang, Xiao @ 2019-09-25 8:16 UTC (permalink / raw) To: Gavin Hu (Arm Technology China), dev; +Cc: Lu, Wenzhuo, marcdevel, stable, nd Hi Gavin, > -----Original Message----- > From: Gavin Hu (Arm Technology China) [mailto:Gavin.Hu@arm.com] > Sent: Wednesday, September 25, 2019 3:04 PM > To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; marcdevel@gmail.com; > stable@dpdk.org; nd <nd@arm.com> > Subject: RE: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > Hi Xiao, > > > -----Original Message----- > > From: dev <dev-bounces@dpdk.org> On Behalf Of Zhang Xiao > > Sent: Wednesday, September 25, 2019 10:50 AM > > To: dev@dpdk.org > > Cc: wenzhuo.lu@intel.com; Zhang Xiao <xiao.zhang@intel.com>; > > marcdevel@gmail.com; stable@dpdk.org > > Subject: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > > > The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | > > ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than > ETH_LINK_SPEED_1G > > | ETH_LINK_SPEED_10G. Correct it to fix the issue. > > > > Fixes: e274f5732225 ("ethdev: add speed capabilities") > > Cc: marcdevel@gmail.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index 7eb3d05..e7c4ce3 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, > > struct rte_eth_dev_info *dev_info) > > dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; > > > > dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; > Look through the following code, 100M and 1G is more common to across x530 > to x550 devices, while 10M and 10G is specific. > Here 10G should be replaced by 100M and you can save some comparisons in > the following code. Sorry, I am not quite clear about your comments here. Do you mean I should change the logic of the legacy code to make it shorter or there is some mistake here? This code is not only for x540 and x550, but also for 82598, 82599, x550em, etc. Here if I replace 10G with 100M, still need add lots of other comparisons. Xiao > /Gavin > > > + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || > > + hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) > > + dev_info->speed_capa = ETH_LINK_SPEED_10M | > > + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; > > + > > if (hw->mac.type == ixgbe_mac_X540 || > > hw->mac.type == ixgbe_mac_X540_vf || > > hw->mac.type == ixgbe_mac_X550 || > > -- > > 2.7.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability 2019-09-25 8:16 ` Zhang, Xiao @ 2019-09-25 9:06 ` Gavin Hu (Arm Technology China) 0 siblings, 0 replies; 6+ messages in thread From: Gavin Hu (Arm Technology China) @ 2019-09-25 9:06 UTC (permalink / raw) To: Zhang, Xiao, dev; +Cc: Lu, Wenzhuo, marcdevel, stable, nd, nd Hi Xiao, > -----Original Message----- > From: Zhang, Xiao <xiao.zhang@intel.com> > Sent: Wednesday, September 25, 2019 4:16 PM > To: Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com>; > dev@dpdk.org > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; marcdevel@gmail.com; > stable@dpdk.org; nd <nd@arm.com> > Subject: RE: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > Hi Gavin, > > > -----Original Message----- > > From: Gavin Hu (Arm Technology China) [mailto:Gavin.Hu@arm.com] > > Sent: Wednesday, September 25, 2019 3:04 PM > > To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; marcdevel@gmail.com; > > stable@dpdk.org; nd <nd@arm.com> > > Subject: RE: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > > > Hi Xiao, > > > > > -----Original Message----- > > > From: dev <dev-bounces@dpdk.org> On Behalf Of Zhang Xiao > > > Sent: Wednesday, September 25, 2019 10:50 AM > > > To: dev@dpdk.org > > > Cc: wenzhuo.lu@intel.com; Zhang Xiao <xiao.zhang@intel.com>; > > > marcdevel@gmail.com; stable@dpdk.org > > > Subject: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability > > > > > > The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | > > > ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than > > ETH_LINK_SPEED_1G > > > | ETH_LINK_SPEED_10G. Correct it to fix the issue. > > > > > > Fixes: e274f5732225 ("ethdev: add speed capabilities") > > > Cc: marcdevel@gmail.com > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> > > > --- > > > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > > index 7eb3d05..e7c4ce3 100644 > > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > > @@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, > > > struct rte_eth_dev_info *dev_info) > > > dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; > > > > > > dev_info->speed_capa = ETH_LINK_SPEED_1G | > ETH_LINK_SPEED_10G; > > Look through the following code, 100M and 1G is more common to across > x530 > > to x550 devices, while 10M and 10G is specific. > > Here 10G should be replaced by 100M and you can save some > comparisons in > > the following code. > > Sorry, I am not quite clear about your comments here. > Do you mean I should change the logic of the legacy code to make it shorter > or there is some mistake here? > This code is not only for x540 and x550, but also for 82598, 82599, x550em, > etc. Here if I replace 10G with 100M, still need add lots of other > comparisons. > > Xiao Functionally the old code is ok. I just want to make it look better and save some comparisons. Since not all NICs are listed here and 1G and 10G are more common, that's ok. > > > /Gavin > > > > > + if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || > > > + hw->device_id == > IXGBE_DEV_ID_X550EM_A_1G_T_L) > > > + dev_info->speed_capa = ETH_LINK_SPEED_10M | > > > + ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; > > > + > > > if (hw->mac.type == ixgbe_mac_X540 || > > > hw->mac.type == ixgbe_mac_X540_vf || > > > hw->mac.type == ixgbe_mac_X550 || > > > -- > > > 2.7.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability 2019-09-25 2:49 [dpdk-dev] net/ixgbe: fix X553 wrong speed capability Zhang Xiao 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) @ 2019-09-30 10:45 ` Ye Xiaolong 2019-09-30 10:47 ` Ye Xiaolong 2 siblings, 0 replies; 6+ messages in thread From: Ye Xiaolong @ 2019-09-30 10:45 UTC (permalink / raw) To: Zhang Xiao; +Cc: dev, wenzhuo.lu, marcdevel, stable On 09/25, Zhang Xiao wrote: >The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | >ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than ETH_LINK_SPEED_1G | >ETH_LINK_SPEED_10G. Correct it to fix the issue. > >Fixes: e274f5732225 ("ethdev: add speed capabilities") >Cc: marcdevel@gmail.com >Cc: stable@dpdk.org > >Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> >--- > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >index 7eb3d05..e7c4ce3 100644 >--- a/drivers/net/ixgbe/ixgbe_ethdev.c >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c >@@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; > > dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; >+ if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || >+ hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) >+ dev_info->speed_capa = ETH_LINK_SPEED_10M | >+ ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; >+ > if (hw->mac.type == ixgbe_mac_X540 || > hw->mac.type == ixgbe_mac_X540_vf || > hw->mac.type == ixgbe_mac_X550 || >-- >2.7.4 > Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] net/ixgbe: fix X553 wrong speed capability 2019-09-25 2:49 [dpdk-dev] net/ixgbe: fix X553 wrong speed capability Zhang Xiao 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) 2019-09-30 10:45 ` Ye Xiaolong @ 2019-09-30 10:47 ` Ye Xiaolong 2 siblings, 0 replies; 6+ messages in thread From: Ye Xiaolong @ 2019-09-30 10:47 UTC (permalink / raw) To: Zhang Xiao; +Cc: dev, wenzhuo.lu, marcdevel, stable On 09/25, Zhang Xiao wrote: >The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G | >ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than ETH_LINK_SPEED_1G | >ETH_LINK_SPEED_10G. Correct it to fix the issue. > >Fixes: e274f5732225 ("ethdev: add speed capabilities") >Cc: marcdevel@gmail.com >Cc: stable@dpdk.org > >Signed-off-by: Zhang Xiao <xiao.zhang@intel.com> >--- > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >index 7eb3d05..e7c4ce3 100644 >--- a/drivers/net/ixgbe/ixgbe_ethdev.c >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c >@@ -3843,6 +3843,11 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; > > dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; >+ if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T || >+ hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) >+ dev_info->speed_capa = ETH_LINK_SPEED_10M | >+ ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; >+ > if (hw->mac.type == ixgbe_mac_X540 || > hw->mac.type == ixgbe_mac_X540_vf || > hw->mac.type == ixgbe_mac_X550 || >-- >2.7.4 > Applied to dpdk-next-net-intel. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-30 10:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-09-25 2:49 [dpdk-dev] net/ixgbe: fix X553 wrong speed capability Zhang Xiao 2019-09-25 7:04 ` Gavin Hu (Arm Technology China) 2019-09-25 8:16 ` Zhang, Xiao 2019-09-25 9:06 ` Gavin Hu (Arm Technology China) 2019-09-30 10:45 ` Ye Xiaolong 2019-09-30 10:47 ` Ye Xiaolong
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).