[PATCH] net/bonding: fix destroy dedicated queues flow

humin (Q) humin29 at huawei.com
Tue Jun 20 05:02:05 CEST 2023


Acked-by: Min Hu (Connor) <humin29 at huawei.com>

在 2023/6/8 10:59, Chaoyong He 写道:
> From: Long Wu <long.wu at corigine.com>
>
> 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: 49dad9028e2a ("net/bonding: support flow API")
> Cc: matan at mellanox.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Long Wu <long.wu at corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
> ---
>   drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
> index c0178369b4..85d0528b7c 100644
> --- a/drivers/net/bonding/rte_eth_bond_api.c
> +++ b/drivers/net/bonding/rte_eth_bond_api.c
> @@ -712,6 +712,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);


More information about the dev mailing list