[dpdk-dev] net/ixgbe: fix busy wait in ixgbevf_check_link()

Message ID 20180201223907.31240-1-3chas3@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Helin Zhang
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Chas Williams Feb. 1, 2018, 10:39 p.m. UTC
  From: "Charles (Chas) Williams" <chas3@att.com>

If we haven't set wait_to_complete, there is no need to busy wait until we
have a link status.  Applications, like bonding, use the wait_to_complete
flag to indicate that they will be doing their own busy wait and will
likely be polling again shortly.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Zhang, Helin April 6, 2018, 3:09 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams
> Sent: Friday, February 2, 2018 6:39 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix busy wait in ixgbevf_check_link()
> 
> From: "Charles (Chas) Williams" <chas3@att.com>
> 
> If we haven't set wait_to_complete, there is no need to busy wait until we
> have a link status.  Applications, like bonding, use the wait_to_complete flag to
> indicate that they will be doing their own busy wait and will likely be polling
> again shortly.
> 
> Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
> 
> Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>

BTW, the title should be corrected by following the format rule of patches on
DPDK community. Basically it shouldn't mention the function name in the title.
  
Zhang, Helin April 6, 2018, 3:16 p.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Helin
> Sent: Friday, April 6, 2018 11:09 PM
> To: Chas Williams; dev@dpdk.org
> Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix busy wait in ixgbevf_check_link()
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams
> > Sent: Friday, February 2, 2018 6:39 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
> > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix busy wait in
> > ixgbevf_check_link()
> >
> > From: "Charles (Chas) Williams" <chas3@att.com>
> >
> > If we haven't set wait_to_complete, there is no need to busy wait
> > until we have a link status.  Applications, like bonding, use the
> > wait_to_complete flag to indicate that they will be doing their own
> > busy wait and will likely be polling again shortly.
> >
> > Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
> >
> > Signed-off-by: Chas Williams <chas3@att.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>
Applied to dpdk-next-net-intel, with title modifcations. Thanks!

/Helin
> 
> BTW, the title should be corrected by following the format rule of patches on
> DPDK community. Basically it shouldn't mention the function name in the title.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 37eb668..f6fd1c9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3861,7 +3861,7 @@  ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	/* for SFP+ modules and DA cables on 82599 it can take up to 500usecs
 	 * before the link status is correct
 	 */
-	if (mac->type == ixgbe_mac_82599_vf) {
+	if (mac->type == ixgbe_mac_82599_vf && wait_to_complete) {
 		int i;
 
 		for (i = 0; i < 5; i++) {