[dpdk-stable] [dpdk-dev] net/ixgbe: fix X553 wrong speed capability

Gavin Hu (Arm Technology China) Gavin.Hu at arm.com
Wed Sep 25 09:04:09 CEST 2019


Hi Xiao,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Zhang Xiao
> Sent: Wednesday, September 25, 2019 10:50 AM
> To: dev at dpdk.org
> Cc: wenzhuo.lu at intel.com; Zhang Xiao <xiao.zhang at intel.com>;
> marcdevel at gmail.com; stable at 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 at gmail.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Zhang Xiao <xiao.zhang at 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



More information about the stable mailing list