* [dpdk-dev] [PATCH] net/ixgbe: add support of 2.5G and 5G
@ 2017-07-25 2:00 Wei Dai
2017-07-26 9:29 ` [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Wei Dai
2017-07-31 18:12 ` [dpdk-dev] [PATCH v6] " Wenzhuo Lu
0 siblings, 2 replies; 18+ messages in thread
From: Wei Dai @ 2017-07-25 2:00 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai
This patch adds support of 2.5G and 5G link on some
new ixgbe devices. It is based on 17.08-rc2 .
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/base/ixgbe_type.h | 2 ++
drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index bda8558..0b06fe9 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -3407,6 +3407,8 @@ typedef u32 ixgbe_link_speed;
IXGBE_LINK_SPEED_10GB_FULL)
#define IXGBE_LINK_SPEED_82599_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 */
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 194058f..2fff1a3 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3972,6 +3972,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-25 2:00 [dpdk-dev] [PATCH] net/ixgbe: add support of 2.5G and 5G Wei Dai
@ 2017-07-26 9:29 ` Wei Dai
2017-07-26 13:26 ` Lu, Wenzhuo
2017-07-26 14:43 ` [dpdk-dev] [PATCH v3] " Wei Dai
2017-07-31 18:12 ` [dpdk-dev] [PATCH v6] " Wenzhuo Lu
1 sibling, 2 replies; 18+ messages in thread
From: Wei Dai @ 2017-07-26 9:29 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai
This patch adds support of 2.5G and 5G ethernet interface on X550.
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 194058f..60e1d5a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2647,9 +2647,28 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
speed = 0x0;
if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
- speed = (hw->mac.type != ixgbe_mac_82598EB) ?
- IXGBE_LINK_SPEED_82599_AUTONEG :
- IXGBE_LINK_SPEED_82598_AUTONEG;
+ 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_100_FULL |
+ IXGBE_LINK_SPEED_1GB_FULL |
+ IXGBE_LINK_SPEED_10GB_FULL |
+ IXGBE_LINK_SPEED_2_5GB_FULL |
+ IXGBE_LINK_SPEED_5GB_FULL;
+ break;
+ default:
+ speed = IXGBE_LINK_SPEED_82599_AUTONEG;
+ }
} else {
if (*link_speeds & ETH_LINK_SPEED_10G)
speed |= IXGBE_LINK_SPEED_10GB_FULL;
@@ -3972,6 +3991,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 9:29 ` [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Wei Dai
@ 2017-07-26 13:26 ` Lu, Wenzhuo
2017-07-26 14:10 ` Dai, Wei
2017-07-26 14:43 ` [dpdk-dev] [PATCH v3] " Wei Dai
1 sibling, 1 reply; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-26 13:26 UTC (permalink / raw)
To: Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi Wei,
> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, July 26, 2017 5:30 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: [PATCH v2] 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.dai@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 33 ++++++++++++++++++++++++++++++--
> -
> 1 file changed, 30 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 194058f..60e1d5a 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2647,9 +2647,28 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
>
> speed = 0x0;
> if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
> - speed = (hw->mac.type != ixgbe_mac_82598EB) ?
> - IXGBE_LINK_SPEED_82599_AUTONEG :
> - IXGBE_LINK_SPEED_82598_AUTONEG;
> + 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_100_FULL |
> + IXGBE_LINK_SPEED_1GB_FULL |
> + IXGBE_LINK_SPEED_10GB_FULL |
> + IXGBE_LINK_SPEED_2_5GB_FULL |
> + IXGBE_LINK_SPEED_5GB_FULL;
Thanks for the patch. It looks good to me. A suggestion, why not define a macro like IXGBE_LINK_SPEED_82599_AUTONEG for x550?
> + break;
> + default:
> + speed = IXGBE_LINK_SPEED_82599_AUTONEG;
> + }
> } else {
> if (*link_speeds & ETH_LINK_SPEED_10G)
> speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ -
> 3972,6 +3991,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 13:26 ` Lu, Wenzhuo
@ 2017-07-26 14:10 ` Dai, Wei
2017-07-26 14:13 ` Lu, Wenzhuo
0 siblings, 1 reply; 18+ messages in thread
From: Dai, Wei @ 2017-07-26 14:10 UTC (permalink / raw)
To: Lu, Wenzhuo, Ananyev, Konstantin; +Cc: dev
Hi, Wenzhuo
> > speed = 0x0;
> > if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
> > - speed = (hw->mac.type != ixgbe_mac_82598EB) ?
> > - IXGBE_LINK_SPEED_82599_AUTONEG :
> > - IXGBE_LINK_SPEED_82598_AUTONEG;
> > + 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_100_FULL |
> > + IXGBE_LINK_SPEED_1GB_FULL |
> > + IXGBE_LINK_SPEED_10GB_FULL |
> > + IXGBE_LINK_SPEED_2_5GB_FULL |
> > + IXGBE_LINK_SPEED_5GB_FULL;
> Thanks for the patch. It looks good to me. A suggestion, why not define a
> macro like IXGBE_LINK_SPEED_82599_AUTONEG for x550?
IXGBE_LINK_SPEED_82599_AUTONEG is defined in drivers/net/ixgbe/base/ixgbe_type.h .
Normally, the base driver code in this file is provided and maintained by another team.
I will ask them to add similar macro in it.
Currently, I'd like do this way. And I will replace it till a similar macro is introduced.
>
> > + break;
> > + default:
> > + speed = IXGBE_LINK_SPEED_82599_AUTONEG;
> > + }
> > } else {
> > if (*link_speeds & ETH_LINK_SPEED_10G)
> > speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ -
> > 3972,6 +3991,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 14:10 ` Dai, Wei
@ 2017-07-26 14:13 ` Lu, Wenzhuo
2017-07-26 14:31 ` Dai, Wei
0 siblings, 1 reply; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-26 14:13 UTC (permalink / raw)
To: Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi Wei,
> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, July 26, 2017 10:10 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
>
> Hi, Wenzhuo
> > > speed = 0x0;
> > > if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
> > > - speed = (hw->mac.type != ixgbe_mac_82598EB) ?
> > > - IXGBE_LINK_SPEED_82599_AUTONEG :
> > > - IXGBE_LINK_SPEED_82598_AUTONEG;
> > > + 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_100_FULL |
> > > + IXGBE_LINK_SPEED_1GB_FULL |
> > > + IXGBE_LINK_SPEED_10GB_FULL |
> > > + IXGBE_LINK_SPEED_2_5GB_FULL |
> > > + IXGBE_LINK_SPEED_5GB_FULL;
> > Thanks for the patch. It looks good to me. A suggestion, why not
> > define a macro like IXGBE_LINK_SPEED_82599_AUTONEG for x550?
>
> IXGBE_LINK_SPEED_82599_AUTONEG is defined in
> drivers/net/ixgbe/base/ixgbe_type.h .
> Normally, the base driver code in this file is provided and maintained by
> another team.
> I will ask them to add similar macro in it.
> Currently, I'd like do this way. And I will replace it till a similar macro is
> introduced.
No. I'm talking about changing the base code. You can add a macro in any .h or even .c file you like.
Then when there's a macro in base code, it's easier to replace a macro by another macro.
>
> >
> > > + break;
> > > + default:
> > > + speed = IXGBE_LINK_SPEED_82599_AUTONEG;
> > > + }
> > > } else {
> > > if (*link_speeds & ETH_LINK_SPEED_10G)
> > > speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ -
> > > 3972,6 +3991,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 14:13 ` Lu, Wenzhuo
@ 2017-07-26 14:31 ` Dai, Wei
0 siblings, 0 replies; 18+ messages in thread
From: Dai, Wei @ 2017-07-26 14:31 UTC (permalink / raw)
To: Lu, Wenzhuo, Ananyev, Konstantin; +Cc: dev
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Wednesday, July 26, 2017 10:14 PM
> To: Dai, Wei <wei.dai@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
>
> Hi Wei,
>
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Wednesday, July 26, 2017 10:10 AM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550
> >
> > Hi, Wenzhuo
> > > > speed = 0x0;
> > > > if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
> > > > - speed = (hw->mac.type != ixgbe_mac_82598EB) ?
> > > > - IXGBE_LINK_SPEED_82599_AUTONEG :
> > > > - IXGBE_LINK_SPEED_82598_AUTONEG;
> > > > + 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_100_FULL |
> > > > + IXGBE_LINK_SPEED_1GB_FULL |
> > > > + IXGBE_LINK_SPEED_10GB_FULL |
> > > > + IXGBE_LINK_SPEED_2_5GB_FULL |
> > > > + IXGBE_LINK_SPEED_5GB_FULL;
> > > Thanks for the patch. It looks good to me. A suggestion, why not
> > > define a macro like IXGBE_LINK_SPEED_82599_AUTONEG for x550?
> >
> > IXGBE_LINK_SPEED_82599_AUTONEG is defined in
> > drivers/net/ixgbe/base/ixgbe_type.h .
> > Normally, the base driver code in this file is provided and maintained
> > by another team.
> > I will ask them to add similar macro in it.
> > Currently, I'd like do this way. And I will replace it till a similar
> > macro is introduced.
> No. I'm talking about changing the base code. You can add a macro in any .h
> or even .c file you like.
> Then when there's a macro in base code, it's easier to replace a macro by
> another macro.
I'll follow your guidance in my v3 patch.
>
> >
> > >
> > > > + break;
> > > > + default:
> > > > + speed = IXGBE_LINK_SPEED_82599_AUTONEG;
> > > > + }
> > > > } else {
> > > > if (*link_speeds & ETH_LINK_SPEED_10G)
> > > > speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ -
> > > > 3972,6 +3991,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v3] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 9:29 ` [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Wei Dai
2017-07-26 13:26 ` Lu, Wenzhuo
@ 2017-07-26 14:43 ` Wei Dai
2017-07-26 15:01 ` Lu, Wenzhuo
2017-07-26 15:29 ` [dpdk-dev] [PATCH v4] " Wei Dai
1 sibling, 2 replies; 18+ messages in thread
From: Wei Dai @ 2017-07-26 14:43 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai
This patch adds support of 2.5G and 5G ethernet interface on X550.
Signed-off-by: Wei Dai <wei.dai@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;
+ 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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 14:43 ` [dpdk-dev] [PATCH v3] " Wei Dai
@ 2017-07-26 15:01 ` Lu, Wenzhuo
2017-07-26 15:27 ` Dai, Wei
2017-07-26 15:29 ` [dpdk-dev] [PATCH v4] " Wei Dai
1 sibling, 1 reply; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-26 15:01 UTC (permalink / raw)
To: Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi Wei,
> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, July 26, 2017 10:43 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@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.dai@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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 15:01 ` Lu, Wenzhuo
@ 2017-07-26 15:27 ` Dai, Wei
0 siblings, 0 replies; 18+ messages in thread
From: Dai, Wei @ 2017-07-26 15:27 UTC (permalink / raw)
To: Lu, Wenzhuo, Ananyev, Konstantin; +Cc: dev
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Wednesday, July 26, 2017 11:02 PM
> To: Dai, Wei <wei.dai@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v3] net/ixgbe: add support of 2.5G and 5G on X550
>
> Hi Wei,
>
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Wednesday, July 26, 2017 10:43 AM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@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.dai@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?
Sorry, I forgot to remove them.
I will rework on v4 patch.
Thanks
>
> > + 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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v4] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 14:43 ` [dpdk-dev] [PATCH v3] " Wei Dai
2017-07-26 15:01 ` Lu, Wenzhuo
@ 2017-07-26 15:29 ` Wei Dai
2017-07-26 16:59 ` Lu, Wenzhuo
2017-07-27 1:02 ` [dpdk-dev] [PATCH v5] " Wei Dai
1 sibling, 2 replies; 18+ messages in thread
From: Wei Dai @ 2017-07-26 15:29 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai
This patch adds support of 2.5G and 5G ethernet interface on X550.
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/base/ixgbe_type.h | 5 +++++
drivers/net/ixgbe/ixgbe_ethdev.c | 27 ++++++++++++++++++++++++---
2 files changed, 29 insertions(+), 3 deletions(-)
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..a63ae8d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2647,9 +2647,22 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
speed = 0x0;
if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
- speed = (hw->mac.type != ixgbe_mac_82598EB) ?
- IXGBE_LINK_SPEED_82599_AUTONEG :
- IXGBE_LINK_SPEED_82598_AUTONEG;
+ 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 +3985,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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v4] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 15:29 ` [dpdk-dev] [PATCH v4] " Wei Dai
@ 2017-07-26 16:59 ` Lu, Wenzhuo
2017-07-26 23:57 ` Dai, Wei
2017-07-27 1:02 ` [dpdk-dev] [PATCH v5] " Wei Dai
1 sibling, 1 reply; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-26 16:59 UTC (permalink / raw)
To: Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi Wei,
> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, July 26, 2017 11:30 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: [PATCH v4] 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.dai@intel.com>
> ---
> drivers/net/ixgbe/base/ixgbe_type.h | 5 +++++
> drivers/net/ixgbe/ixgbe_ethdev.c | 27 ++++++++++++++++++++++++---
> 2 files changed, 29 insertions(+), 3 deletions(-)
>
> 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)
Just noticed you changed base code. As we discussed before, I don't mean that. Actually, I suggest to put it in, for example, ixgbe_ethdev.h
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v4] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 16:59 ` Lu, Wenzhuo
@ 2017-07-26 23:57 ` Dai, Wei
0 siblings, 0 replies; 18+ messages in thread
From: Dai, Wei @ 2017-07-26 23:57 UTC (permalink / raw)
To: Lu, Wenzhuo, Ananyev, Konstantin; +Cc: dev
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Thursday, July 27, 2017 12:59 AM
> To: Dai, Wei <wei.dai@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v4] net/ixgbe: add support of 2.5G and 5G on X550
>
> Hi Wei,
>
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Wednesday, July 26, 2017 11:30 AM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> > Subject: [PATCH v4] 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.dai@intel.com>
> > ---
> > drivers/net/ixgbe/base/ixgbe_type.h | 5 +++++
> > drivers/net/ixgbe/ixgbe_ethdev.c | 27
> ++++++++++++++++++++++++---
> > 2 files changed, 29 insertions(+), 3 deletions(-)
> >
> > 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)
> Just noticed you changed base code. As we discussed before, I don't mean
> that. Actually, I suggest to put it in, for example, ixgbe_ethdev.h
Yes, you are right. Your method is better.
I will follow it in my v5 patch.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v5] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-26 15:29 ` [dpdk-dev] [PATCH v4] " Wei Dai
2017-07-26 16:59 ` Lu, Wenzhuo
@ 2017-07-27 1:02 ` Wei Dai
2017-07-27 1:07 ` Lu, Wenzhuo
2017-07-31 13:14 ` Ferruh Yigit
1 sibling, 2 replies; 18+ messages in thread
From: Wei Dai @ 2017-07-27 1:02 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai
This patch adds support of 2.5G and 5G ethernet interface on X550.
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 27 ++++++++++++++++++++++++---
drivers/net/ixgbe/ixgbe_ethdev.h | 8 ++++++++
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 194058f..a63ae8d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2647,9 +2647,22 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
speed = 0x0;
if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
- speed = (hw->mac.type != ixgbe_mac_82598EB) ?
- IXGBE_LINK_SPEED_82599_AUTONEG :
- IXGBE_LINK_SPEED_82598_AUTONEG;
+ 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 +3985,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;
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 9e6ffc0..caa50c8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -33,6 +33,7 @@
#ifndef _IXGBE_ETHDEV_H_
#define _IXGBE_ETHDEV_H_
+#include "base/ixgbe_type.h"
#include "base/ixgbe_dcb.h"
#include "base/ixgbe_dcb_82599.h"
#include "base/ixgbe_dcb_82598.h"
@@ -154,6 +155,13 @@
return -ENOTSUP;\
} while (0)
+/* Link speed for X550 auto negotiation */
+#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)
+
/*
* Information about the fdir mode.
*/
--
2.7.5
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v5] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-27 1:02 ` [dpdk-dev] [PATCH v5] " Wei Dai
@ 2017-07-27 1:07 ` Lu, Wenzhuo
2017-07-31 13:14 ` Ferruh Yigit
1 sibling, 0 replies; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-27 1:07 UTC (permalink / raw)
To: Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi,
> -----Original Message-----
> From: Dai, Wei
> Sent: Wednesday, July 26, 2017 9:02 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: [PATCH v5] 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.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v5] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-27 1:02 ` [dpdk-dev] [PATCH v5] " Wei Dai
2017-07-27 1:07 ` Lu, Wenzhuo
@ 2017-07-31 13:14 ` Ferruh Yigit
2017-07-31 17:48 ` Lu, Wenzhuo
1 sibling, 1 reply; 18+ messages in thread
From: Ferruh Yigit @ 2017-07-31 13:14 UTC (permalink / raw)
To: Wei Dai, wenzhuo.lu, konstantin.ananyev; +Cc: dev
On 7/27/2017 2:02 AM, Wei Dai wrote:
> This patch adds support of 2.5G and 5G ethernet interface on X550.
Should speed capabilities (dev_info->speed_capa) also updated?
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
<...>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v5] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-31 13:14 ` Ferruh Yigit
@ 2017-07-31 17:48 ` Lu, Wenzhuo
0 siblings, 0 replies; 18+ messages in thread
From: Lu, Wenzhuo @ 2017-07-31 17:48 UTC (permalink / raw)
To: Yigit, Ferruh, Dai, Wei, Ananyev, Konstantin; +Cc: dev
Hi Ferruh,
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, July 31, 2017 9:15 AM
> To: Dai, Wei <wei.dai@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v5] net/ixgbe: add support of 2.5G and 5G on
> X550
>
> On 7/27/2017 2:02 AM, Wei Dai wrote:
> > This patch adds support of 2.5G and 5G ethernet interface on X550.
>
> Should speed capabilities (dev_info->speed_capa) also updated?
Yes, we should update it. Let me send a new version.
>
> >
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> <...>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v6] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-25 2:00 [dpdk-dev] [PATCH] net/ixgbe: add support of 2.5G and 5G Wei Dai
2017-07-26 9:29 ` [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Wei Dai
@ 2017-07-31 18:12 ` Wenzhuo Lu
2017-07-31 18:19 ` Ferruh Yigit
1 sibling, 1 reply; 18+ messages in thread
From: Wenzhuo Lu @ 2017-07-31 18:12 UTC (permalink / raw)
To: dev; +Cc: Wei Dai, Wenzhuo Lu
From: Wei Dai <wei.dai@intel.com>
This patch adds support of 2.5G and 5G ethernet interface on X550.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
v6:
- update the link capability.
drivers/net/ixgbe/ixgbe_ethdev.c | 31 ++++++++++++++++++++++++++++---
drivers/net/ixgbe/ixgbe_ethdev.h | 8 ++++++++
2 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index e436dca..b1b5de1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2647,9 +2647,22 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
speed = 0x0;
if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
- speed = (hw->mac.type != ixgbe_mac_82598EB) ?
- IXGBE_LINK_SPEED_82599_AUTONEG :
- IXGBE_LINK_SPEED_82598_AUTONEG;
+ 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;
@@ -3693,6 +3706,10 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
hw->mac.type == ixgbe_mac_X550_vf) {
dev_info->speed_capa |= ETH_LINK_SPEED_100M;
}
+ if (hw->mac.type == ixgbe_mac_X550) {
+ dev_info->speed_capa |= ETH_LINK_SPEED_2_5G;
+ dev_info->speed_capa |= ETH_LINK_SPEED_5G;
+ }
}
static const uint32_t *
@@ -3972,6 +3989,14 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused 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;
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 9e6ffc0..caa50c8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -33,6 +33,7 @@
#ifndef _IXGBE_ETHDEV_H_
#define _IXGBE_ETHDEV_H_
+#include "base/ixgbe_type.h"
#include "base/ixgbe_dcb.h"
#include "base/ixgbe_dcb_82599.h"
#include "base/ixgbe_dcb_82598.h"
@@ -154,6 +155,13 @@
return -ENOTSUP;\
} while (0)
+/* Link speed for X550 auto negotiation */
+#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)
+
/*
* Information about the fdir mode.
*/
--
1.9.3
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v6] net/ixgbe: add support of 2.5G and 5G on X550
2017-07-31 18:12 ` [dpdk-dev] [PATCH v6] " Wenzhuo Lu
@ 2017-07-31 18:19 ` Ferruh Yigit
0 siblings, 0 replies; 18+ messages in thread
From: Ferruh Yigit @ 2017-07-31 18:19 UTC (permalink / raw)
To: Wenzhuo Lu, dev; +Cc: Wei Dai
On 7/31/2017 7:12 PM, Wenzhuo Lu wrote:
> From: Wei Dai <wei.dai@intel.com>
>
> This patch adds support of 2.5G and 5G ethernet interface on X550.
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2017-07-31 18:19 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 2:00 [dpdk-dev] [PATCH] net/ixgbe: add support of 2.5G and 5G Wei Dai
2017-07-26 9:29 ` [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Wei Dai
2017-07-26 13:26 ` Lu, Wenzhuo
2017-07-26 14:10 ` Dai, Wei
2017-07-26 14:13 ` Lu, Wenzhuo
2017-07-26 14:31 ` Dai, Wei
2017-07-26 14:43 ` [dpdk-dev] [PATCH v3] " Wei Dai
2017-07-26 15:01 ` Lu, Wenzhuo
2017-07-26 15:27 ` Dai, Wei
2017-07-26 15:29 ` [dpdk-dev] [PATCH v4] " Wei Dai
2017-07-26 16:59 ` Lu, Wenzhuo
2017-07-26 23:57 ` Dai, Wei
2017-07-27 1:02 ` [dpdk-dev] [PATCH v5] " Wei Dai
2017-07-27 1:07 ` Lu, Wenzhuo
2017-07-31 13:14 ` Ferruh Yigit
2017-07-31 17:48 ` Lu, Wenzhuo
2017-07-31 18:12 ` [dpdk-dev] [PATCH v6] " Wenzhuo Lu
2017-07-31 18:19 ` Ferruh Yigit
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).