summaryrefslogtreecommitdiff
path: root/drivers/net/failsafe/failsafe_eal.c
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2017-07-18 14:48:20 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-07-19 16:25:43 +0300
commit598fb8aec6f6c8618a2425789e12fc352f120858 (patch)
treeed92a02c1b037b93799415e7cc9933f0be0953b6 /drivers/net/failsafe/failsafe_eal.c
parent72a57bfd9a0e7f43223f4edef2103155615680f6 (diff)
downloaddpdk-next-eventdev-598fb8aec6f6c8618a2425789e12fc352f120858.zip
dpdk-next-eventdev-598fb8aec6f6c8618a2425789e12fc352f120858.tar.gz
dpdk-next-eventdev-598fb8aec6f6c8618a2425789e12fc352f120858.tar.xz
net/failsafe: support device removal
Listen to INTR_RMV events issued by slaves. Add atomic flags on slave queues to detect use of slave bursts function. If a removal is detected, set the recollection flag on this slave. During a slave upkeep round, if its recollection flag is set and its burst functions are not in use by any thread, remove that slave. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Olga Shern <olgas@mellanox.com>
Diffstat (limited to 'drivers/net/failsafe/failsafe_eal.c')
-rw-r--r--drivers/net/failsafe/failsafe_eal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index d11ea67..c8f4318 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -63,6 +63,7 @@ fs_bus_init(struct rte_eth_dev *dev)
return -ENODEV;
}
SUB_ID(sdev) = i;
+ sdev->fs_dev = dev;
sdev->dev = ETH(sdev)->device;
ETH(sdev)->state = RTE_ETH_DEV_DEFERRED;
sdev->state = DEV_PROBED;
@@ -80,7 +81,7 @@ failsafe_eal_init(struct rte_eth_dev *dev)
return ret;
if (PRIV(dev)->state < DEV_PROBED)
PRIV(dev)->state = DEV_PROBED;
- fs_switch_dev(dev);
+ fs_switch_dev(dev, NULL);
return 0;
}