* [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550
@ 2018-01-26 9:30 Martin Weiser
2018-01-30 2:20 ` Zhang, Helin
2018-04-09 0:49 ` Lu, Wenzhuo
0 siblings, 2 replies; 4+ messages in thread
From: Martin Weiser @ 2018-01-26 9:30 UTC (permalink / raw)
To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Martin Weiser
This patch adds support for explicitly selecting 2.5G and 5G speeds on
X550.
Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index c77176d33..2d91cc55f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2480,6 +2480,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
uint32_t intr_vector = 0;
int err, link_up = 0, negotiate = 0;
uint32_t speed = 0;
+ uint32_t allowed_speeds = 0;
int mask = 0;
int status;
uint16_t vf, idx;
@@ -2628,9 +2629,21 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
if (err)
goto error;
+ switch (hw->mac.type) {
+ case ixgbe_mac_X550:
+ case ixgbe_mac_X550EM_x:
+ case ixgbe_mac_X550EM_a:
+ allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
+ ETH_LINK_SPEED_2_5G | ETH_LINK_SPEED_5G |
+ ETH_LINK_SPEED_10G;
+ break;
+ default:
+ allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
+ ETH_LINK_SPEED_10G;
+ }
+
link_speeds = &dev->data->dev_conf.link_speeds;
- if (*link_speeds & ~(ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
- ETH_LINK_SPEED_10G)) {
+ if (*link_speeds & ~allowed_speeds) {
PMD_INIT_LOG(ERR, "Invalid link setting");
goto error;
}
@@ -2656,6 +2669,10 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
} else {
if (*link_speeds & ETH_LINK_SPEED_10G)
speed |= IXGBE_LINK_SPEED_10GB_FULL;
+ if (*link_speeds & ETH_LINK_SPEED_5G)
+ speed |= IXGBE_LINK_SPEED_5GB_FULL;
+ if (*link_speeds & ETH_LINK_SPEED_2_5G)
+ speed |= IXGBE_LINK_SPEED_2_5GB_FULL;
if (*link_speeds & ETH_LINK_SPEED_1G)
speed |= IXGBE_LINK_SPEED_1GB_FULL;
if (*link_speeds & ETH_LINK_SPEED_100M)
--
2.16.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550
2018-01-26 9:30 [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550 Martin Weiser
@ 2018-01-30 2:20 ` Zhang, Helin
2018-04-09 0:49 ` Lu, Wenzhuo
1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Helin @ 2018-01-30 2:20 UTC (permalink / raw)
To: Martin Weiser, Lu, Wenzhuo, Ananyev, Konstantin; +Cc: dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Weiser
> Sent: Friday, January 26, 2018 5:30 PM
> To: Lu, Wenzhuo; Ananyev, Konstantin
> Cc: dev@dpdk.org; Martin Weiser
> Subject: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on
> X550
>
> This patch adds support for explicitly selecting 2.5G and 5G speeds on X550.
>
> Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
It is a bit late for 18.02, I'd prefer to defer it to 18.05, after being well reviewed. Thanks!
/Helin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550
2018-01-26 9:30 [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550 Martin Weiser
2018-01-30 2:20 ` Zhang, Helin
@ 2018-04-09 0:49 ` Lu, Wenzhuo
2018-04-10 17:22 ` Zhang, Helin
1 sibling, 1 reply; 4+ messages in thread
From: Lu, Wenzhuo @ 2018-04-09 0:49 UTC (permalink / raw)
To: Martin Weiser, Ananyev, Konstantin; +Cc: dev
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Weiser
> Sent: Friday, January 26, 2018 5:30 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Martin Weiser <martin.weiser@allegro-packets.com>
> Subject: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds
> on X550
>
> This patch adds support for explicitly selecting 2.5G and 5G speeds on X550.
>
> Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550
2018-04-09 0:49 ` Lu, Wenzhuo
@ 2018-04-10 17:22 ` Zhang, Helin
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Helin @ 2018-04-10 17:22 UTC (permalink / raw)
To: Lu, Wenzhuo, Martin Weiser, Ananyev, Konstantin; +Cc: dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo
> Sent: Monday, April 9, 2018 8:49 AM
> To: Martin Weiser; Ananyev, Konstantin
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G
> speeds on X550
>
> Hi,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Weiser
> > Sent: Friday, January 26, 2018 5:30 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; Martin Weiser <martin.weiser@allegro-packets.com>
> > Subject: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G
> > speeds on X550
> >
> > This patch adds support for explicitly selecting 2.5G and 5G speeds on X550.
> >
> > Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied to dpdk-next-net-intel, thanks!
/Helin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-10 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 9:30 [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550 Martin Weiser
2018-01-30 2:20 ` Zhang, Helin
2018-04-09 0:49 ` Lu, Wenzhuo
2018-04-10 17:22 ` Zhang, Helin
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).