Hi Wei, > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, July 26, 2017 10:43 AM > To: Lu, Wenzhuo <wenzhuo...@intel.com>; Ananyev, Konstantin > <konstantin.anan...@intel.com> > Cc: dev@dpdk.org; Dai, Wei <wei....@intel.com> > Subject: [PATCH v3] net/ixgbe: add support of 2.5G and 5G on X550 > > This patch adds support of 2.5G and 5G ethernet interface on X550. > > Signed-off-by: Wei Dai <wei....@intel.com> > --- > drivers/net/ixgbe/base/ixgbe_type.h | 5 +++++ > drivers/net/ixgbe/ixgbe_ethdev.c | 24 ++++++++++++++++++++++++ > 2 files changed, 29 insertions(+) > > diff --git a/drivers/net/ixgbe/base/ixgbe_type.h > b/drivers/net/ixgbe/base/ixgbe_type.h > index bda8558..3fd5425 100644 > --- a/drivers/net/ixgbe/base/ixgbe_type.h > +++ b/drivers/net/ixgbe/base/ixgbe_type.h > @@ -3408,6 +3408,11 @@ typedef u32 ixgbe_link_speed; > #define IXGBE_LINK_SPEED_82599_AUTONEG > (IXGBE_LINK_SPEED_100_FULL | \ > IXGBE_LINK_SPEED_1GB_FULL | \ > IXGBE_LINK_SPEED_10GB_FULL) > +#define IXGBE_LINK_SPEED_X550_AUTONEG > (IXGBE_LINK_SPEED_100_FULL | \ > + IXGBE_LINK_SPEED_1GB_FULL | \ > + IXGBE_LINK_SPEED_2_5GB_FULL | \ > + IXGBE_LINK_SPEED_5GB_FULL | \ > + IXGBE_LINK_SPEED_10GB_FULL) > > /* Physical layer type */ > typedef u64 ixgbe_physical_layer; > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 194058f..bafe7f4 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -2650,6 +2650,22 @@ ixgbe_dev_start(struct rte_eth_dev *dev) > speed = (hw->mac.type != ixgbe_mac_82598EB) ? > IXGBE_LINK_SPEED_82599_AUTONEG : > IXGBE_LINK_SPEED_82598_AUTONEG; A little confused here. I saw you erased these 3 lines of code in the previous version. Suppose it's better to remove them, right?
> + switch (hw->mac.type) { > + case ixgbe_mac_82598EB: > + speed = IXGBE_LINK_SPEED_82598_AUTONEG; > + break; > + case ixgbe_mac_82599EB: > + case ixgbe_mac_X540: > + speed = IXGBE_LINK_SPEED_82599_AUTONEG; > + break; > + case ixgbe_mac_X550: > + case ixgbe_mac_X550EM_x: > + case ixgbe_mac_X550EM_a: > + speed = IXGBE_LINK_SPEED_X550_AUTONEG; > + break; > + default: > + speed = IXGBE_LINK_SPEED_82599_AUTONEG; > + } > } else { > if (*link_speeds & ETH_LINK_SPEED_10G) > speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ - > 3972,6 +3988,14 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, > link.link_speed = ETH_SPEED_NUM_1G; > break; > > + case IXGBE_LINK_SPEED_2_5GB_FULL: > + link.link_speed = ETH_SPEED_NUM_2_5G; > + break; > + > + case IXGBE_LINK_SPEED_5GB_FULL: > + link.link_speed = ETH_SPEED_NUM_5G; > + break; > + > case IXGBE_LINK_SPEED_10GB_FULL: > link.link_speed = ETH_SPEED_NUM_10G; > break; > -- > 2.7.5