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)
commit9728366f53d283be943ee99d5989f155e55fc077
treee9e7e078fc5aea288b98787e9cc6ee2db0af2bc1
parent88e96e533cfa11e996c59a44bbb6b0e0b9891970
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