net/ixgbe: update data->eth_link status on start
PATCH 1/1 net/ixgbe: update data->eth_link status on start
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_link isn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, call ixgbe_dev_link_update() to ensure we have a valid status.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +4 -0
@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error; +ixgbe_dev_link_update (dev,0 ); + skip_link_setup:if (rte_intr_allow_others (intr_handle)) {
@@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) {
Signature · 1 line
2.9.5
Quoted 26 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startFrom: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure we have a valid status.Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error; +ixgbe_dev_link_update (dev,0 );
It is called in rte_eth_dev_start() if lsc is not enabled, and it is not needed here to avoid any duplication. BTW, did you see any issue or just check the code? Thanks!
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
ixgbevf_dev_start(struct rte_eth_dev *dev)drivers/net/ixgbe/ixgbe_ethdev.c +2
-1ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 29 lines · Helin
Quoted 29 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startFrom: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure we have a valid status.Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication. BTW, did you see any issue or just check the code? Thanks!
Yes, I see an issue with bonding. If LSC is enabled, then link_status isn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in link_status being somewhat undefined.
Quoted 19 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start(dev);drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Hi Williams:
Quoted 43 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 10 lines · Helin
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 5 lines
Quoted 5 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;
Quoted 8 lines
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result inlink_statusbeing somewhat undefined.
Is your issue only happened on VF?
For PF, I saw ixgbe_check_link is called at ixgbe_dev_start, so link status is assume be updated. If you think it is just missed in VF, can you implemented this in the similar way as PF?
Regards
Qi
Quoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start(dev);drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 50 lines · Qi Z
Hi Williams:
Quoted 48 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 10 lines · Helin
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 5 lines
Quoted 5 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 19 lines
Quoted 12 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error; +ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!
Quoted 7 lines
Quoted 3 lines
Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result inlink_statusbeing somewhat undefined.Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status is assume be updated. If you think it is just missed in VF, can you implemented this in the similar way as PF?
No, I don't believe it's isolated to VF. ixgbe_check_link() doesn't update (atomically write)
the dev->data->dev_link. After .dev_start() finishes, I need the link_status of the adapter to
be set. I can't wait until I hope the first interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.
Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start(dev);drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 72 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 55 lines · Qi Z
Hi Williams:
Quoted 53 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 10 lines · Helin
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 6 lines
Quoted 6 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 3 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status is
Quoted 7 lines
assume be updated.
Quoted 1 line
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;
Quoted 32 lines
I can't wait until I hope the first
interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8@@
ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start(dev);drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 80 lines · Qi Z
Quoted 72 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 55 lines · Qi Z
Hi Williams:
Quoted 53 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 10 lines · Helin
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 6 lines
Quoted 6 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 3 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 7 lines
assume be updated.
Quoted 1 line
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.
Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;
That doesn't fill in link_duplex, link_speed, or link_autoneg. 802.3ad requires that all the ports of
the same bonding group have the same speed and duplex. I need to be able to check the speed
and the duplex at least (and autoneg as well).
Quoted 33 lines
Quoted 33 lines
I can't wait until I hope the first
interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8@@
ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start(dev);drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 106 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:57 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 14 lines · Qi Z
Quoted 14 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startOn Mon, Apr 2, 2018 at 8:40 AM, Zhang, Qi Z <[email protected]>
Quoted 72 lines · wrote:
Quoted 63 lines
Quoted 58 lines
Hi Williams:
Quoted 56 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 11 lines · Helin
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 7 lines
Quoted 7 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt.dev->data->Ifa
link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 4 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 8 lines
assume be updated.
Quoted 2 lines
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;
Quoted 4 lines
That doesn't fill in
link_duplex,link_speed, orlink_autoneg. 802.3ad requires that all the ports of
the same bonding group have the same speed and duplex. I need to be able to check the speed and the duplex at least (and autoneg as well).
OK, I'm not sure if it is better to call this at rte_eth_dev_start So far we have below code.
if (dev->data->dev_conf.intr_conf.lsc == 0) {
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP);
(*dev->dev_ops->link_update)(dev, 0);
}Can we just remove the lsc check.
I'd like to see other people's comments.
Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
I can't wait until I hope the first
interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-1+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 129 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Qi Z
Sent: Monday, April 2, 2018 10:34 PM
To: Chas Williams <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 12 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:57 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startOn Mon, Apr 2, 2018 at 9:45 AM, Zhang, Qi Z <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu,Wenzhuo
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
<[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startOn Mon, Apr 2, 2018 at 8:40 AM, Zhang, Qi Z <[email protected]>
wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Hi Williams:
Quoted 6 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>;Ananyev,
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 11 lines · Helin
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 7 lines
Quoted 7 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt.dev->data->Ifa
link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev*dev)
Quoted 32 lines
Quoted 26 lines
Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0if (err) goto error; +ixgbe_dev_link_update (dev,0 );Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 4 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 8 lines
assume be updated.
Quoted 2 lines
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;Quoted 4 lines
That doesn't fill in
link_duplex,link_speed, orlink_autoneg. 802.3ad requires that all the ports of the same bonding group have the same speed and duplex. I need to be able to check the speed and the duplex at least (and autoneg as well).OK, I'm not sure if it is better to call this at
rte_eth_dev_startSo far we have below code.
Quoted 8 lines
if (dev->data->dev_conf.intr_conf.lsc == 0) { RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); (*dev->dev_ops->link_update)(dev, 0); }Can we just remove the lsc check.
I'd like to see other people's comments.
I have tested both 82599 PF and VF.
I add a breakpoint at the code line added by this patch.
Before the added line, all members of the dev->data->dev_link are zeros in both PF and VF. After the added line, the dev_link is updated.
Indeed, I agree Zhang Qi's suggestion.
If the lsc check in rte_eth_dev_start is removed, it can benefit all PMDs. Of course, Qi's suggestion also address your issue.
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
I can't wait until I hope the first interrupt has happened that would update
dev->data->dev_link. How long would I wait? I don't really caredev->data->if
the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in
802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-1+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 104 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:57 PM
To: Zhang, Qi Z
Cc: Zhang, Helin; [email protected]; Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 86 lines · Qi Z
Quoted 77 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 58 lines · Qi Z
Hi Williams:
Quoted 56 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 11 lines · Helin
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 7 lines
Quoted 7 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt.dev->data->Ifa
link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 4 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 8 lines
assume be updated.
Quoted 2 lines
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;
Quoted 4 lines
That doesn't fill in
link_duplex,link_speed, orlink_autoneg. 802.3ad requires that all the ports of
the same bonding group have the same speed and duplex. I need to be able to check the speed and the duplex at least (and autoneg as well).
I am thinking it might be a bit late to update the link status in dev_start(), and we need to check if the full link update should be done in eth_ixgbe_dev_init() and eth_ixgbevf_dev_init().
@Qi, Chas, could you help to check if my idea is correct?
Also I think this applies to other PMDs, e.g. igb, i40e. At least we need to double check.
Regards,
Helin
Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
I can't wait until I hope the first
interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-1+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 108 lines · Helin
Quoted 104 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:57 PM
To: Zhang, Qi Z
Cc: Zhang, Helin; [email protected]; Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 86 lines · Qi Z
Quoted 77 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 58 lines · Qi Z
Hi Williams:
Quoted 56 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 11 lines · Helin
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 7 lines
Quoted 7 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt.dev->data->Ifa
link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 4 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 8 lines
assume be updated.
Quoted 2 lines
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;Quoted 4 lines
That doesn't fill in
link_duplex,link_speed, orlink_autoneg. 802.3ad requires that all the ports of
the same bonding group have the same speed and duplex. I need to be able to check the speed and the duplex at least (and autoneg as well).
Quoted 5 lines
I am thinking it might be a bit late to update the link status in
dev_start(), and we need to check if the full link update should be done ineth_ixgbe_dev_init()andeth_ixgbevf_dev_init().
@Qi, Chas, could you help to check if my idea is correct?
Also I think this applies to other PMDs, e.g. igb, i40e. At least we need to double check.
I don't think link_status needs updated sooner unless you think there is some path
in the PMDs that need to check the link status. I am not aware of anything like that in the Intel PMDs (but certainly not an expert in their behavior). Since the DPDK
API is inherently single-threaded there's no external reason to have the link status
updated until just before .dev_start() finishes.
Quoted 38 lines
Regards,
HelinQuoted 34 lines
Quoted 34 lines
Quoted 34 lines
I can't wait until I hope the first
interrupt has happened that would updatedev->data->dev_link. How long would I wait? I don't really care if the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in 802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-1+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Hi Helin:
Quoted 121 lines
-----Original Message-----
From: Zhang, Helin
Sent: Friday, April 6, 2018 10:52 PM
To: Chas Williams <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 25 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:57 PM
To: Zhang, Qi Z
Cc: Zhang, Helin; [email protected]; Lu, Wenzhuo; Ananyev, Konstantin; Charles
(Chas) Williams
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 14 lines · Qi Z
Quoted 14 lines
-----Original Message-----
From: Chas Williams [mailto:[email protected]]
Sent: Monday, April 2, 2018 9:38 PM
To: Zhang, Qi Z <[email protected]>
Cc: Zhang, Helin <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startOn Mon, Apr 2, 2018 at 8:40 AM, Zhang, Qi Z <[email protected]>
Quoted 79 lines · wrote:
Quoted 73 lines
Quoted 64 lines
Quoted 59 lines
Hi Williams:
Quoted 57 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Saturday, March 31, 2018 1:22 AM
To: Zhang, Helin <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 11 lines · Helin
Quoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 7 lines
Quoted 7 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt.dev->data->Ifa
link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure wehave a valid status.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Chas Williams <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error;Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_dev_start(struct rte_eth_dev *dev) · line 2669
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ixgbe_dev_link_update (dev,0 );It is called in
rte_eth_dev_start()if lsc is not enabled, and it is not needed here to avoid any duplication.
BTW, did you see any issue or just check the code? Thanks!Yes, I see an issue with bonding. If LSC is enabled, then
link_statusisn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in
link_statusbeing somewhat undefined.Quoted 4 lines
Is your issue only happened on VF?
For PF, I sawixgbe_check_linkis called atixgbe_dev_start, so link status isQuoted 8 lines
assume be updated.
Quoted 2 lines
If you think it is just missed in VF, can you implemented this in the similar way
as PF?
No, I don't believe it's isolated to VF.
ixgbe_check_link()doesn't update (atomically write) thedev->data->dev_link. After .dev_start() finishes, I need thelink_statusof the adapter to be set.Quoted 5 lines
I saw dev_link.link_status does be updated.
err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; dev->data->dev_link.link_status = link_up;Quoted 4 lines
That doesn't fill in
link_duplex,link_speed, orlink_autoneg. 802.3ad requires that all the ports of the same bonding group have the same speed and duplex. I need to be able to check the speed and the duplex at least (and autoneg as well).
Quoted 6 lines
I am thinking it might be a bit late to update the link status in
dev_start(), and we need to check if the full link update should be done ineth_ixgbe_dev_init()andeth_ixgbevf_dev_init().
@Qi, Chas, could you help to check if my idea is correct?
Also I think this applies to other PMDs, e.g. igb, i40e. At least we need to double check.
link_update should not be called at init, because link speed is not configured yet, it is configured at rte_eth_dev_configure, and usually it is applied at dev_start.
Basically I agree with the idea of the patch, link status should be valid when device is started even lsc =1, but not sure if it is a common issue or we can move to ether layer, anyway this could be on a separate topic
so how about just ack this and make ixgbe work first, what do you think?
Regards
Qi
Quoted 40 lines
Regards,
HelinQuoted 36 lines
Quoted 36 lines
Quoted 36 lines
I can't wait until I hope the first interrupt has happened that would update
dev->data->dev_link. How long would I wait? I don't really caredev->data->if
the link is down,
or up, or whatever, but it can't be partially filled in. Bonding (in
802.3ad) wants the
links to be similarly configured.Quoted 24 lines
Regards
QiQuoted 20 lines
Quoted 20 lines
/Helin
Quoted 15 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-1+ skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on start
Quoted 8 lines
From: "Charles (Chas) Williams" <[email protected]>
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure we have a valid status.Signed-off-by Chas Williams <[email protected]>
Quoted 29 lines
--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +2
-0@@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)if (err) goto error; +ixgbe_dev_link_update (dev,0 ); + skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
ixgbevf_dev_start(struct rte_eth_dev *dev)drivers/net/ixgbe/ixgbe_ethdev.c +2
-1ixgbevf_dev_rxtx_start (dev); +ixgbevf_dev_link_update (dev,0 ); +/* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple (intr_handle) && dev->data->dev_conf.intr_conf.rxq) { --2.9.5
Zhang, Helin
AppliedQuoted 24 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Zhang, Qi Z
Sent: Sunday, April 8, 2018 10:05 AM
To: Chas Williams; [email protected]
Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startQuoted 12 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Chas Williams
Sent: Wednesday, February 14, 2018 6:56 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Charles (Chas) Williams <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: updatedata->eth_linkstatus on startFrom: "Charles (Chas) Williams" <[email protected]>
Quoted 8 lines
Quoted 6 lines
dev->data->eth_linkisn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, callixgbe_dev_link_update()to ensure we have a valid status.Signed-off-by Chas Williams <[email protected]>Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel, thanks!
/Helin