[v2] net/bonding: fix flow flush order on bonded device close
Checks
Commit Message
The current code first removes all back-end devices of
the bonded device and then invokes flush operation to
remove flows in such back-end devices, which makes no
sense. Fix that by re-ordering the steps accordingly.
Fixes: 49dad9028e2a ("net/bonding: support flow API")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 10/19/22 14:18, Ivan Malov wrote:
> The current code first removes all back-end devices of
> the bonded device and then invokes flush operation to
> remove flows in such back-end devices, which makes no
> sense. Fix that by re-ordering the steps accordingly.
>
> Fixes: 49dad9028e2a ("net/bonding: support flow API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Applied to dpdk-next-net/main, thanks.
@@ -2156,6 +2156,9 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev)
int skipped = 0;
struct rte_flow_error ferror;
+ /* Flush flows in all back-end devices before removing them */
+ bond_flow_ops.flush(dev, &ferror);
+
while (internals->slave_count != skipped) {
uint16_t port_id = internals->slaves[skipped].port_id;
@@ -2173,7 +2176,6 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev)
skipped++;
}
}
- bond_flow_ops.flush(dev, &ferror);
}
int