[PATCH] ethdev: keep promiscuous/allmulti value before enabling
Thomas Monjalon
thomas at monjalon.net
Mon Jul 21 14:07:17 CEST 2025
21/07/2025 13:51, Sunyang Wu:
> The values of the promiscuous and allmulticast variables
> are set after calling the driver, according to the return value.
>
> Fixes: 400d75818266 ("ethdev: check device promiscuous state")
> de5ccf0775ae ("ethdev:do nothing if all-multicast mode is applied
> again")
> Cc: stable at dpdk.org
>
> Signed-off-by: Sunyang Wu <sunyang.wu at jaguarmicro.com>
[...]
> diag = dev->dev_ops->promiscuous_enable(dev);
> - dev->data->promiscuous = (diag == 0) ? 1 : 0;
> + if (diag == 0)
> + dev->data->promiscuous = 1;
I remember seeing this strange behavior of resetting the value if failed.
And it is done differently in the "disable" functions.
But it is not so wrong, because if it was enabled, the function returns early.
So the value changes only if it is successful.
What is the issue you observe?
Is it a rework to make the code easier to understand?
More information about the dev
mailing list