summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-03-29 16:14:35 -0400
committerJohn Lo <loj@cisco.com>2016-03-29 16:14:35 -0400
commit23650e6cada50246ba211cec168ddd6738a26f67 (patch)
tree0d3e05b84f1ded554d1bf70a60534092aaf63725 /dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch
parent13f3c450ccd03ed00a6a114061faedd1fc553ddd (diff)
Update ENIC driver patches for DPDK 2.2.0
This includes all patches in ENIC driver which are up-streamed to DPDK to improve RX performance, fix buffer/error handling and interoperation with link bonding PMD library. Change-Id: Id4c71a350d5234834951f9261c69db5476ba396b Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch')
-rw-r--r--dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch b/dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch
new file mode 100644
index 00000000000..9cb56d2d499
--- /dev/null
+++ b/dpdk/dpdk-2.2.0_patches/0022-bonding-fix-bond-link-detect-in-non-interrupt-mode.patch
@@ -0,0 +1,71 @@
+commit 65bcf215aae2e0b9935557e237af054ad0860bad
+Author: Nelson Escobar <neescoba@cisco.com>
+Date: Tue Mar 22 13:42:08 2016 -0700
+
+ bonding: fix bond link detect in non-interrupt mode
+
+ Stopping then re-starting a bond interface containing slaves that
+ used polling for link detection caused the bond to think all slave
+ links were down and inactive.
+
+ Move the start of the polling for link from slave_add() to
+ bond_ethdev_start() and in bond_ethdev_stop() make sure we clear
+ the last_link_status of the slaves.
+
+ Signed-off-by: Nelson Escobar <neescoba@cisco.com>
+ Signed-off-by: John Daley <johndale@cisco.com>
+
+diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
+index fb26d35..f0960c6 100644
+--- a/drivers/net/bonding/rte_eth_bond_pmd.c
++++ b/drivers/net/bonding/rte_eth_bond_pmd.c
+@@ -1454,18 +1454,11 @@ slave_add(struct bond_dev_private *internals,
+ slave_details->port_id = slave_eth_dev->data->port_id;
+ slave_details->last_link_status = 0;
+
+- /* If slave device doesn't support interrupts then we need to enabled
+- * polling to monitor link status */
++ /* Mark slave devices that don't support interrupts so we can
++ * compensate when we start the bond
++ */
+ if (!(slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)) {
+ slave_details->link_status_poll_enabled = 1;
+-
+- if (!internals->link_status_polling_enabled) {
+- internals->link_status_polling_enabled = 1;
+-
+- rte_eal_alarm_set(internals->link_status_polling_interval_ms * 1000,
+- bond_ethdev_slave_link_status_change_monitor,
+- (void *)&rte_eth_devices[internals->port_id]);
+- }
+ }
+
+ slave_details->link_status_wait_to_complete = 0;
+@@ -1550,6 +1543,18 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
+ eth_dev->data->port_id, internals->slaves[i].port_id);
+ return -1;
+ }
++ /* We will need to poll for link status if any slave doesn't
++ * support interrupts
++ */
++ if (internals->slaves[i].link_status_poll_enabled)
++ internals->link_status_polling_enabled = 1;
++ }
++ /* start polling if needed */
++ if (internals->link_status_polling_enabled) {
++ rte_eal_alarm_set(
++ internals->link_status_polling_interval_ms * 1000,
++ bond_ethdev_slave_link_status_change_monitor,
++ (void *)&rte_eth_devices[internals->port_id]);
+ }
+
+ if (internals->user_defined_primary_port)
+@@ -1622,6 +1627,8 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
+
+ internals->active_slave_count = 0;
+ internals->link_status_polling_enabled = 0;
++ for (i = 0; i < internals->slave_count; i++)
++ internals->slaves[i].last_link_status = 0;
+
+ eth_dev->data->dev_link.link_status = 0;
+ eth_dev->data->dev_started = 0;