* [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value
@ 2018-01-05 17:38 Thomas Monjalon
2018-01-05 20:47 ` Stephen Hemminger
2018-01-08 12:31 ` Ferruh Yigit
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-01-05 17:38 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, stephen
There are 3 kind of link data in ethdev:
- capabilities (rte_eth_dev_info)
- configuration (rte_eth_conf)
- status (rte_eth_link)
A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
configuration (rte_eth_conf.link_speeds).
Bits are defined in ETH_LINK_SPEED_*.
Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
are used for the link status (rte_eth_link.*).
There was a mistake in the comment of rte_eth_link.link_autoneg,
suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.
The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].
Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
drivers/net/e1000/em_ethdev.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/failsafe/failsafe.c | 2 +-
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/null/rte_eth_null.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 ++--
drivers/net/pcap/rte_eth_pcap.c | 2 +-
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/softnic/rte_eth_softnic.c | 2 +-
drivers/net/szedata2/rte_eth_szedata2.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
lib/librte_ether/rte_ethdev.h | 14 +++++++-------
15 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index fa84eb9c2..d51540898 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG
+ .link_autoneg = ETH_LINK_AUTONEG
};
static uint16_t
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 17d1adde8..50148062f 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1180,7 +1180,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
link.link_speed = 0;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
link.link_status = ETH_LINK_DOWN;
- link.link_autoneg = ETH_LINK_SPEED_FIXED;
+ link.link_autoneg = ETH_LINK_FIXED;
}
rte_em_dev_atomic_write_link_status(dev, &link);
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index bc5a7abed..643bdc19f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2406,7 +2406,7 @@ eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete)
link.link_speed = 0;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
link.link_status = ETH_LINK_DOWN;
- link.link_autoneg = ETH_LINK_SPEED_FIXED;
+ link.link_autoneg = ETH_LINK_FIXED;
}
rte_igb_dev_atomic_write_link_status(dev, &link);
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 6bc5abac8..8336510f0 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -46,7 +46,7 @@ static const struct rte_eth_link eth_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_UP,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG,
+ .link_autoneg = ETH_LINK_AUTONEG,
};
static int
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 43c63c77a..a1df4c6a9 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -61,7 +61,7 @@ static const struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG,
+ .link_autoneg = ETH_LINK_AUTONEG,
};
static int is_kni_initialized;
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 032c30e9d..726a5c5e4 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -91,7 +91,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG,
+ .link_autoneg = ETH_LINK_AUTONEG,
};
static uint16_t
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index bd24ec330..b52700e4c 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -572,8 +572,8 @@ octeontx_dev_link_update(struct rte_eth_dev *dev,
break;
}
- link.link_duplex = ETH_LINK_AUTONEG;
- link.link_autoneg = ETH_LINK_SPEED_AUTONEG;
+ link.link_duplex = ETH_LINK_FULL_DUPLEX;
+ link.link_autoneg = ETH_LINK_AUTONEG;
return octeontx_atomic_write_link_status(dev, &link);
}
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 5a86752f9..3efb451a2 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_FIXED,
+ .link_autoneg = ETH_LINK_AUTONEG,
};
static int
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index e72e499b9..48091f459 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -60,7 +60,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG
+ .link_autoneg = ETH_LINK_AUTONEG
};
static uint16_t
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index c21c29e79..5c5464c8d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -522,7 +522,7 @@ pmd_ethdev_register(struct rte_vdev_device *vdev,
soft_dev->data->dev_private = dev_private;
soft_dev->data->dev_link.link_speed = hard_speed;
soft_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
- soft_dev->data->dev_link.link_autoneg = ETH_LINK_SPEED_FIXED;
+ soft_dev->data->dev_link.link_autoneg = ETH_LINK_AUTONEG;
soft_dev->data->dev_link.link_status = ETH_LINK_DOWN;
soft_dev->data->mac_addrs = ð_addr;
soft_dev->data->promiscuous = 1;
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 74f151c4a..22d43f945 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1214,7 +1214,7 @@ eth_link_update(struct rte_eth_dev *dev,
link.link_status = (link_is_up) ? ETH_LINK_UP : ETH_LINK_DOWN;
- link.link_autoneg = ETH_LINK_SPEED_FIXED;
+ link.link_autoneg = ETH_LINK_FIXED;
rte_atomic64_cmpset((uint64_t *)dev_link, *(uint64_t *)dev_link,
*(uint64_t *)link_ptr);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index b308ceaf1..37a97b5da 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -70,7 +70,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG
+ .link_autoneg = ETH_LINK_AUTONEG
};
static void
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 5cead831b..dea3e00a3 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -100,7 +100,7 @@ nicvf_set_eth_link_status(struct nicvf *nic, struct rte_eth_link *link)
else if (nic->duplex == NICVF_FULL_DUPLEX)
link->link_duplex = ETH_LINK_FULL_DUPLEX;
link->link_speed = nic->speed;
- link->link_autoneg = ETH_LINK_SPEED_AUTONEG;
+ link->link_autoneg = ETH_LINK_AUTONEG;
}
static void
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index b988d1b41..fa1206c26 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1143,7 +1143,7 @@ __vmxnet3_dev_link_update(struct rte_eth_dev *dev,
link.link_status = ETH_LINK_UP;
link.link_duplex = ETH_LINK_FULL_DUPLEX;
link.link_speed = ETH_SPEED_NUM_10G;
- link.link_autoneg = ETH_LINK_SPEED_FIXED;
+ link.link_autoneg = ETH_LINK_AUTONEG;
}
vmxnet3_dev_atomic_write_link_status(dev, &link);
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 20709c492..271a1c313 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -233,17 +233,17 @@ __extension__
struct rte_eth_link {
uint32_t link_speed; /**< ETH_SPEED_NUM_ */
uint16_t link_duplex : 1; /**< ETH_LINK_[HALF/FULL]_DUPLEX */
- uint16_t link_autoneg : 1; /**< ETH_LINK_SPEED_[AUTONEG/FIXED] */
+ uint16_t link_autoneg : 1; /**< ETH_LINK_[AUTONEG/FIXED] */
uint16_t link_status : 1; /**< ETH_LINK_[DOWN/UP] */
} __attribute__((aligned(8))); /**< aligned for atomic64 read/write */
/* Utility constants */
-#define ETH_LINK_HALF_DUPLEX 0 /**< Half-duplex connection. */
-#define ETH_LINK_FULL_DUPLEX 1 /**< Full-duplex connection. */
-#define ETH_LINK_DOWN 0 /**< Link is down. */
-#define ETH_LINK_UP 1 /**< Link is up. */
-#define ETH_LINK_FIXED 0 /**< No autonegotiation. */
-#define ETH_LINK_AUTONEG 1 /**< Autonegotiated. */
+#define ETH_LINK_HALF_DUPLEX 0 /**< Half-duplex connection (see link_duplex). */
+#define ETH_LINK_FULL_DUPLEX 1 /**< Full-duplex connection (see link_duplex). */
+#define ETH_LINK_DOWN 0 /**< Link is down (see link_status). */
+#define ETH_LINK_UP 1 /**< Link is up (see link_status). */
+#define ETH_LINK_FIXED 0 /**< No autonegotiation (see link_autoneg). */
+#define ETH_LINK_AUTONEG 1 /**< Autonegotiated (see link_autoneg). */
/**
* A structure used to configure the ring threshold registers of an RX/TX
--
2.15.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value
2018-01-05 17:38 [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value Thomas Monjalon
@ 2018-01-05 20:47 ` Stephen Hemminger
2018-01-10 20:54 ` Ferruh Yigit
2018-01-08 12:31 ` Ferruh Yigit
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2018-01-05 20:47 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, ferruh.yigit
On Fri, 5 Jan 2018 18:38:55 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:
> There are 3 kind of link data in ethdev:
> - capabilities (rte_eth_dev_info)
> - configuration (rte_eth_conf)
> - status (rte_eth_link)
>
> A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
> configuration (rte_eth_conf.link_speeds).
> Bits are defined in ETH_LINK_SPEED_*.
>
> Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
> are used for the link status (rte_eth_link.*).
>
> There was a mistake in the comment of rte_eth_link.link_autoneg,
> suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
> instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.
>
> The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].
>
> Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
>
> Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thanks for clearing this up.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value
2018-01-05 20:47 ` Stephen Hemminger
@ 2018-01-10 20:54 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-10 20:54 UTC (permalink / raw)
To: Stephen Hemminger, Thomas Monjalon; +Cc: dev
On 1/5/2018 8:47 PM, Stephen Hemminger wrote:
> On Fri, 5 Jan 2018 18:38:55 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
>> There are 3 kind of link data in ethdev:
>> - capabilities (rte_eth_dev_info)
>> - configuration (rte_eth_conf)
>> - status (rte_eth_link)
>>
>> A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
>> configuration (rte_eth_conf.link_speeds).
>> Bits are defined in ETH_LINK_SPEED_*.
>>
>> Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
>> are used for the link status (rte_eth_link.*).
>>
>> There was a mistake in the comment of rte_eth_link.link_autoneg,
>> suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
>> instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.
>>
>> The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].
>>
>> Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
>>
>> Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>
> Thanks for clearing this up.
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value
2018-01-05 17:38 [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value Thomas Monjalon
2018-01-05 20:47 ` Stephen Hemminger
@ 2018-01-08 12:31 ` Ferruh Yigit
2018-01-08 15:25 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-08 12:31 UTC (permalink / raw)
To: Thomas Monjalon, dev; +Cc: stephen
On 1/5/2018 5:38 PM, Thomas Monjalon wrote:
> There are 3 kind of link data in ethdev:
> - capabilities (rte_eth_dev_info)
> - configuration (rte_eth_conf)
> - status (rte_eth_link)
>
> A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
> configuration (rte_eth_conf.link_speeds).
> Bits are defined in ETH_LINK_SPEED_*.
>
> Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
> are used for the link status (rte_eth_link.*).
>
> There was a mistake in the comment of rte_eth_link.link_autoneg,
> suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
> instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.
>
> The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].
>
> Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
>
> Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
<...>
> diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
> index 5a86752f9..3efb451a2 100644
> --- a/drivers/net/pcap/rte_eth_pcap.c
> +++ b/drivers/net/pcap/rte_eth_pcap.c
> @@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
> .link_speed = ETH_SPEED_NUM_10G,
> .link_duplex = ETH_LINK_FULL_DUPLEX,
> .link_status = ETH_LINK_DOWN,
> - .link_autoneg = ETH_LINK_SPEED_FIXED,
> + .link_autoneg = ETH_LINK_AUTONEG,
> };
>
> static int
<...>
> diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
> index c21c29e79..5c5464c8d 100644
> --- a/drivers/net/softnic/rte_eth_softnic.c
> +++ b/drivers/net/softnic/rte_eth_softnic.c
> @@ -522,7 +522,7 @@ pmd_ethdev_register(struct rte_vdev_device *vdev,
> soft_dev->data->dev_private = dev_private;
> soft_dev->data->dev_link.link_speed = hard_speed;
> soft_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
> - soft_dev->data->dev_link.link_autoneg = ETH_LINK_SPEED_FIXED;
> + soft_dev->data->dev_link.link_autoneg = ETH_LINK_AUTONEG;
> soft_dev->data->dev_link.link_status = ETH_LINK_DOWN;
> soft_dev->data->mac_addrs = ð_addr;
> soft_dev->data->promiscuous = 1;
> static void
<...>
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index b988d1b41..fa1206c26 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -1143,7 +1143,7 @@ __vmxnet3_dev_link_update(struct rte_eth_dev *dev,
> link.link_status = ETH_LINK_UP;
> link.link_duplex = ETH_LINK_FULL_DUPLEX;
> link.link_speed = ETH_SPEED_NUM_10G;
> - link.link_autoneg = ETH_LINK_SPEED_FIXED;
> + link.link_autoneg = ETH_LINK_AUTONEG;
> }
>
> vmxnet3_dev_atomic_write_link_status(dev, &link);
These three drivers changes from "fixed" to "autoneg", intentional?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value
2018-01-08 12:31 ` Ferruh Yigit
@ 2018-01-08 15:25 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-01-08 15:25 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, stephen
08/01/2018 13:31, Ferruh Yigit:
> On 1/5/2018 5:38 PM, Thomas Monjalon wrote:
> > There are 3 kind of link data in ethdev:
> > - capabilities (rte_eth_dev_info)
> > - configuration (rte_eth_conf)
> > - status (rte_eth_link)
> >
> > A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
> > configuration (rte_eth_conf.link_speeds).
> > Bits are defined in ETH_LINK_SPEED_*.
> >
> > Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
> > are used for the link status (rte_eth_link.*).
> >
> > There was a mistake in the comment of rte_eth_link.link_autoneg,
> > suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
> > instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.
> >
> > The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].
> >
> > Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
> >
> > Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>
> <...>
>
> > diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
> > index 5a86752f9..3efb451a2 100644
> > --- a/drivers/net/pcap/rte_eth_pcap.c
> > +++ b/drivers/net/pcap/rte_eth_pcap.c
> > @@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
> > .link_speed = ETH_SPEED_NUM_10G,
> > .link_duplex = ETH_LINK_FULL_DUPLEX,
> > .link_status = ETH_LINK_DOWN,
> > - .link_autoneg = ETH_LINK_SPEED_FIXED,
> > + .link_autoneg = ETH_LINK_AUTONEG,
> > };
> >
> > static int
> <...>
> > diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
> > index c21c29e79..5c5464c8d 100644
> > --- a/drivers/net/softnic/rte_eth_softnic.c
> > +++ b/drivers/net/softnic/rte_eth_softnic.c
> > @@ -522,7 +522,7 @@ pmd_ethdev_register(struct rte_vdev_device *vdev,
> > soft_dev->data->dev_private = dev_private;
> > soft_dev->data->dev_link.link_speed = hard_speed;
> > soft_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
> > - soft_dev->data->dev_link.link_autoneg = ETH_LINK_SPEED_FIXED;
> > + soft_dev->data->dev_link.link_autoneg = ETH_LINK_AUTONEG;
> > soft_dev->data->dev_link.link_status = ETH_LINK_DOWN;
> > soft_dev->data->mac_addrs = ð_addr;
> > soft_dev->data->promiscuous = 1;
> > static void
> <...>
> > diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> > index b988d1b41..fa1206c26 100644
> > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> > @@ -1143,7 +1143,7 @@ __vmxnet3_dev_link_update(struct rte_eth_dev *dev,
> > link.link_status = ETH_LINK_UP;
> > link.link_duplex = ETH_LINK_FULL_DUPLEX;
> > link.link_speed = ETH_SPEED_NUM_10G;
> > - link.link_autoneg = ETH_LINK_SPEED_FIXED;
> > + link.link_autoneg = ETH_LINK_AUTONEG;
> > }
> >
> > vmxnet3_dev_atomic_write_link_status(dev, &link);
>
> These three drivers changes from "fixed" to "autoneg", intentional?
Yes.
These are virtual ports, so fixed/autoneg does not really makes sense.
I think autoneg is more fuzzy so more appropriate :)
Anyway, the value is not changed, because
ETH_LINK_SPEED_FIXED = ETH_LINK_AUTONEG = 1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-10 20:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 17:38 [dpdk-dev] [PATCH] ethdev: fix link autonegotiation value Thomas Monjalon
2018-01-05 20:47 ` Stephen Hemminger
2018-01-10 20:54 ` Ferruh Yigit
2018-01-08 12:31 ` Ferruh Yigit
2018-01-08 15:25 ` Thomas Monjalon
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).