mlxsw: pci: Set extra metadata in skb control block
authorIdo Schimmel <idosch@nvidia.com>
Sun, 14 Mar 2021 12:19:36 +0000 (14:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Mar 2021 22:00:43 +0000 (15:00 -0700)
commit5ab6dc9fa2720cbbbdf2686c06a90c9a6c86b6fd
tree4b15017bdc1c4cad2b1e54b53b4fdf755cb41716
parentd4cabaadeaad96ebaa415b6a7ca00390645a89ec
mlxsw: pci: Set extra metadata in skb control block

Packets that are mirrored / sampled to the CPU have extra metadata
encoded in their corresponding Completion Queue Element (CQE). Retrieve
this metadata from the CQE and set it in the skb control block so that
it could be accessed by the switch driver (i.e., 'mlxsw_spectrum').

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/pci.c