summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/core.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2021-03-14 15:19:36 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-15 01:00:43 +0300
commit5ab6dc9fa2720cbbbdf2686c06a90c9a6c86b6fd (patch)
tree4b15017bdc1c4cad2b1e54b53b4fdf755cb41716 /drivers/net/ethernet/mellanox/mlxsw/core.h
parentd4cabaadeaad96ebaa415b6a7ca00390645a89ec (diff)
downloadlinux-5ab6dc9fa2720cbbbdf2686c06a90c9a6c86b6fd.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h
index 86adc17c8901..80712dc803d0 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.h
@@ -60,6 +60,21 @@ struct mlxsw_tx_info {
struct mlxsw_rx_md_info {
u32 cookie_index;
+ u32 latency;
+ u32 tx_congestion;
+ union {
+ /* Valid when 'tx_port_valid' is set. */
+ u16 tx_sys_port;
+ u16 tx_lag_id;
+ };
+ u8 tx_lag_port_index; /* Valid when 'tx_port_is_lag' is set. */
+ u8 tx_tc;
+ u8 latency_valid:1,
+ tx_congestion_valid:1,
+ tx_tc_valid:1,
+ tx_port_valid:1,
+ tx_port_is_lag:1,
+ unused:3;
};
bool mlxsw_core_skb_transmit_busy(struct mlxsw_core *mlxsw_core,