patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Chas Williams <chas3@att.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/bonding: always update bonding link status' has been queued to LTS release 17.11.4
Date: Thu, 26 Jul 2018 19:09:03 -0700	[thread overview]
Message-ID: <20180727021019.37388-7-yskoh@mellanox.com> (raw)
In-Reply-To: <20180727021019.37388-1-yskoh@mellanox.com>

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From d4ee3056efafaca957b9d9e23c9fc8703bd1c76f Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Thu, 17 May 2018 19:22:52 -0400
Subject: [PATCH] net/bonding: always update bonding link status

[ upstream commit 0e677a35349f316d50ba25485354363f3e65c12e ]

When the first ETH_LINK_UP slave is added to a bonding device, it is
immediately activated.  If these are polling slaves, there will be a
later link state event, when last_link_status doesn't match link_status.
But because this slave is already activated, the bonding device's link
status isn't updated.

To fix this, we always attempt to update the bonding device's link status
in the link state change callback.

Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index e19a4a3e8..0cbe08ada 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2535,10 +2535,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 
 	rte_eth_link_get_nowait(port_id, &link);
 	if (link.link_status) {
-		if (active_pos < internals->active_slave_count) {
-			rte_spinlock_unlock(&internals->lsc_lock);
-			return rc;
-		}
+		if (active_pos < internals->active_slave_count)
+			goto link_update;
 
 		/* if no active slave ports then set this port to be primary port */
 		if (internals->active_slave_count < 1) {
@@ -2557,10 +2555,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 				internals->primary_port == port_id)
 			bond_ethdev_primary_set(internals, port_id);
 	} else {
-		if (active_pos == internals->active_slave_count) {
-			rte_spinlock_unlock(&internals->lsc_lock);
-			return rc;
-		}
+		if (active_pos == internals->active_slave_count)
+			goto link_update;
 
 		/* Remove from active slave list */
 		deactivate_slave(bonded_eth_dev, port_id);
@@ -2579,6 +2575,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		}
 	}
 
+link_update:
 	/**
 	 * Update bonded device link properties after any change to active
 	 * slaves
@@ -2616,7 +2613,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 
 	rte_spinlock_unlock(&internals->lsc_lock);
 
-	return 0;
+	return rc;
 }
 
 static int
-- 
2.11.0

  parent reply	other threads:[~2018-07-27  2:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  2:08 [dpdk-stable] patch 'net/qede: fix VF MTU update' " Yongseok Koh
2018-07-27  2:08 ` [dpdk-stable] patch 'net/mvpp2: check pointer before using it' " Yongseok Koh
2018-07-27  2:08 ` [dpdk-stable] patch 'net/qede: fix link change event notification' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/bnxt: add missing ids in xstats' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' " Yongseok Koh
2018-07-27  2:09 ` Yongseok Koh [this message]
2018-07-27  2:09 ` [dpdk-stable] patch 'net/bonding: fix MAC address reset' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/mlx5: fix crash in device probe' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'eventdev: fix port in Rx adapter internal function' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'eventdev: fix missing update to Rx adaper WRR position' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'eventdev: add event buffer flush in Rx adapter' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'eventdev: fix internal port logic " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'eventdev: fix Rx SW adapter stop' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'bus/dpaa: fix build' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'kni: fix build with gcc 8.1' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ixgbe: add support for VLAN in IP mode FDIR' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel type set " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ixgbe: fix mask bits register " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/i40e: workaround performance degradation' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/pcap: fix multiple queues' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/qede: fix legacy interrupt mode' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/qede: remove primary MAC removal' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/mlx5: fix Rx buffer replenishment threshold' " Yongseok Koh
2018-07-27  2:09 ` [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' " Yongseok Koh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180727021019.37388-7-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=chas3@att.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).