Re: [PATCH net-next] vxlan: remove redundant conversion of vni in vxlan_nl2conf
From: Nikolay Aleksandrov
Date: Tue Jul 22 2025 - 05:20:10 EST
On 7/22/25 12:30, Wang Liang wrote:
> The IFLA_VXLAN_ID data has been converted to local variable vni in
> vxlan_nl2conf(), there is no need to do it again when set conf->vni.
>
> Signed-off-by: Wang Liang <wangliang74@xxxxxxxxxx>
> ---
> drivers/net/vxlan/vxlan_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index 97792de896b7..77dbfe9a6b13 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -4036,7 +4036,7 @@ static int vxlan_nl2conf(struct nlattr *tb[], struct nlattr *data[],
> NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_ID], "Cannot change VNI");
> return -EOPNOTSUPP;
> }
> - conf->vni = cpu_to_be32(nla_get_u32(data[IFLA_VXLAN_ID]));
> + conf->vni = vni;
> }
>
> if (data[IFLA_VXLAN_GROUP]) {
Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>