]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vdpa/mlx5: reuse common function for MAC address updates
authorCindy Lu <lulu@redhat.com>
Mon, 26 Jan 2026 09:45:37 +0000 (17:45 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 4 Feb 2026 19:13:43 +0000 (14:13 -0500)
commit2f61e6eda7a793bca4df6efea95815375e122f3a
tree664ac3db4dbfa9bbae0ddf5882e4fafaec382fcf
parent719d959274da85eb0e1eb448dd807b1c435c19a1
vdpa/mlx5: reuse common function for MAC address updates

Factor out MAC address update logic and reuse it from handle_ctrl_mac().

This ensures that old MAC entries are removed from the MPFS table
before adding a new one and that the forwarding rules are updated
accordingly. If updating the flow table fails, the original MAC and
rules are restored as much as possible to keep the software and
hardware state consistent.

Signed-off-by: Cindy Lu <lulu@redhat.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260126094848.9601-3-lulu@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c