Skip to content

Commit cd58c71

Browse files
Saeed Mahameeddavem330
authored andcommitted
net/mlx5e: Disable client vlan TX acceleration
We need to resolve a HW configuration issue for enabling HW CVLAN insertion. Meanwhile, no need to implement the VLAN insertion in the driver, rather use the generic kernel VLAN insertion method. Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fc11fbf commit cd58c71

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,6 @@ static void mlx5e_build_netdev(struct net_device *netdev)
17561756
netdev->vlan_features |= NETIF_F_LRO;
17571757

17581758
netdev->hw_features = netdev->vlan_features;
1759-
netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_TX;
17601759
netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
17611760
netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
17621761

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,6 @@ static inline u16 mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq,
8989
return MLX5E_MIN_INLINE;
9090
}
9191

92-
static inline void mlx5e_insert_vlan(void *start, struct sk_buff *skb, u16 ihs)
93-
{
94-
struct vlan_ethhdr *vhdr = (struct vlan_ethhdr *)start;
95-
int cpy1_sz = 2 * ETH_ALEN;
96-
int cpy2_sz = ihs - cpy1_sz - VLAN_HLEN;
97-
98-
skb_copy_from_linear_data(skb, vhdr, cpy1_sz);
99-
skb_pull_inline(skb, cpy1_sz);
100-
vhdr->h_vlan_proto = skb->vlan_proto;
101-
vhdr->h_vlan_TCI = cpu_to_be16(skb_vlan_tag_get(skb));
102-
skb_copy_from_linear_data(skb, &vhdr->h_vlan_encapsulated_proto,
103-
cpy2_sz);
104-
skb_pull_inline(skb, cpy2_sz);
105-
}
106-
10792
static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)
10893
{
10994
struct mlx5_wq_cyc *wq = &sq->wq;
@@ -149,12 +134,8 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)
149134
ETH_ZLEN);
150135
}
151136

152-
if (skb_vlan_tag_present(skb)) {
153-
mlx5e_insert_vlan(eseg->inline_hdr_start, skb, ihs);
154-
} else {
155-
skb_copy_from_linear_data(skb, eseg->inline_hdr_start, ihs);
156-
skb_pull_inline(skb, ihs);
157-
}
137+
skb_copy_from_linear_data(skb, eseg->inline_hdr_start, ihs);
138+
skb_pull_inline(skb, ihs);
158139

159140
eseg->inline_hdr_sz = cpu_to_be16(ihs);
160141

0 commit comments

Comments
 (0)