summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/core.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-02-25 13:45:24 +0300
committerDavid S. Miller <davem@davemloft.net>2020-02-25 22:05:55 +0300
commit78a7dcb7c952477df18484f83592e11547d4f65a (patch)
tree10a348f34699937ee5b17d70183e2e50d351641b /drivers/net/ethernet/mellanox/mlxsw/core.h
parent6d19d2bdc8a15b8212c530edd806cfee283ac734 (diff)
downloadlinux-78a7dcb7c952477df18484f83592e11547d4f65a.tar.xz
mlxsw: pci: Extract cookie index for ACL discard trap packets
In case the received packet comes in due to one of ACL discard traps, take the user_def_val_orig_pkt_len field from CQE and store it in skb->cb as ACL cookie index. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h
index 00e44e778aca..46226823c7a6 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.h
@@ -473,7 +473,10 @@ enum mlxsw_devlink_param_id {
};
struct mlxsw_skb_cb {
- struct mlxsw_tx_info tx_info;
+ union {
+ struct mlxsw_tx_info tx_info;
+ u32 cookie_index; /* Only used during receive */
+ };
};
static inline struct mlxsw_skb_cb *mlxsw_skb_cb(struct sk_buff *skb)