]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Use change upper event to setup representors' bond_metadata
authorVu Pham <vuhuong@mellanox.com>
Thu, 12 Mar 2020 17:26:25 +0000 (10:26 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 May 2020 01:13:50 +0000 (18:13 -0700)
commit6764b1fccccb7b3f14a2714279cdcf410313fa83
treee9e7e078fc5aea288b98787e9cc6ee2db0af2bc1
parentb8a2a76ff73f5d7a11b62a859563f2dd15411677
net/mlx5e: Use change upper event to setup representors' bond_metadata

Use change upper event to detect slave representor from
enslaving/unslaving to/from lag device.

On enslaving event, call mlx5_enslave_rep() API to create, add
this slave representor shadow entry to the slaves list of
bond_metadata structure representing master lag device and use
its metadata to setup ingress acl metadata header.

On unslaving event, resetting the vport of unslaved representor
to use its default ingress/egress acls and rx rules with its
default_metadata.

The last slave will free the shared bond_metadata and its
unique metadata.

Signed-off-by: Vu Pham <vuhuong@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c