Skip to content

Commit

Permalink
net/bonding: fix destroy dedicated queues flow
Browse files Browse the repository at this point in the history
[ upstream commit f7755321f3294e94c1f1b9e645cc997a3e39f999 ]

Bonding port in mode 4 enables dedicated queues, we
will create a flow for this feature. So we need to
destroy this flow when we remove the member port.

Furthermore if we don't destroy the flow that created
for dedicated queues when we remove the member port,
maybe we couldn't add the member port to a new bonding
port that needed dedicated queues.

We add the destroy action in removing member port
function.

Fixes: 49dad90 ("net/bonding: support flow API")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
wulong2022 authored and kevintraynor committed Jul 12, 2023
1 parent b11127d commit d98f67c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/bonding/rte_eth_bond_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,16 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
}
}

/* Remove the dedicated queues flow */
if (internals->mode == BONDING_MODE_8023AD &&
internals->mode4.dedicated_queues.enabled == 1 &&
internals->mode4.dedicated_queues.flow[slave_port_id] != NULL) {
rte_flow_destroy(slave_port_id,
internals->mode4.dedicated_queues.flow[slave_port_id],
&flow_error);
internals->mode4.dedicated_queues.flow[slave_port_id] = NULL;
}

slave_eth_dev = &rte_eth_devices[slave_port_id];
slave_remove(internals, slave_eth_dev);
slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE);
Expand Down

0 comments on commit d98f67c

Please sign in to comment.