diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2022-04-06 11:25:37 +0300 |
---|---|---|
committer | Leon Romanovsky <leonro@nvidia.com> | 2022-04-09 08:23:47 +0300 |
commit | df439fcb1cd4fe8e8b1c4065db4ef1b544aa5d9e (patch) | |
tree | 78593445801c86b619498e27b3bd5609362fb9e5 /drivers/net/ethernet/mellanox/mlx5/core/accel | |
parent | 2fa33b3518a8da0a5345b7ae0064223b5e4e156f (diff) | |
download | linux-stable-df439fcb1cd4fe8e8b1c4065db4ef1b544aa5d9e.tar.gz linux-stable-df439fcb1cd4fe8e8b1c4065db4ef1b544aa5d9e.tar.bz2 linux-stable-df439fcb1cd4fe8e8b1c4065db4ef1b544aa5d9e.zip |
net/mlx5: Delete metadata handling logic
Remove specific to FPGS IPsec metadata handling logic which is not
required for mlx5 NICs devices.
Link: https://lore.kernel.org/r/fe67a1de4fc6032a940e18c8a6461a1ccf902fc4.1649232994.git.leonro@nvidia.com
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/accel')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/accel/accel.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/accel.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/accel.h deleted file mode 100644 index 82b185121edb..000000000000 --- a/drivers/net/ethernet/mellanox/mlx5/core/accel/accel.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef __MLX5E_ACCEL_H__ -#define __MLX5E_ACCEL_H__ - -#ifdef CONFIG_MLX5_ACCEL - -#include <linux/skbuff.h> -#include <linux/netdevice.h> - -static inline bool is_metadata_hdr_valid(struct sk_buff *skb) -{ - __be16 *ethtype; - - if (unlikely(skb->len < ETH_HLEN + MLX5E_METADATA_ETHER_LEN)) - return false; - ethtype = (__be16 *)(skb->data + ETH_ALEN * 2); - if (*ethtype != cpu_to_be16(MLX5E_METADATA_ETHER_TYPE)) - return false; - return true; -} - -static inline void remove_metadata_hdr(struct sk_buff *skb) -{ - struct ethhdr *old_eth; - struct ethhdr *new_eth; - - /* Remove the metadata from the buffer */ - old_eth = (struct ethhdr *)skb->data; - new_eth = (struct ethhdr *)(skb->data + MLX5E_METADATA_ETHER_LEN); - memmove(new_eth, old_eth, 2 * ETH_ALEN); - /* Ethertype is already in its new place */ - skb_pull_inline(skb, MLX5E_METADATA_ETHER_LEN); -} - -#endif /* CONFIG_MLX5_ACCEL */ - -#endif /* __MLX5E_EN_ACCEL_H__ */ |