net/mlx4_en: Extend usage of napi_gro_frags
We can call napi_gro_frags for all the received traffic regardless of the checksum status. Specifically, received packets whose status is CHECKSUM_NONE (and soon to be added CHECKSUM_COMPLETE) are eligible for napi_gro_frags as well. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Shani Michaeli <shanim@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b00394c007
commit
dd65beac48
1 changed files with 54 additions and 54 deletions
|
@ -747,6 +747,16 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
|
|||
if ((cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPOK)) &&
|
||||
(cqe->checksum == cpu_to_be16(0xffff))) {
|
||||
ring->csum_ok++;
|
||||
ip_summed = CHECKSUM_UNNECESSARY;
|
||||
} else {
|
||||
ip_summed = CHECKSUM_NONE;
|
||||
ring->csum_none++;
|
||||
}
|
||||
} else {
|
||||
ip_summed = CHECKSUM_NONE;
|
||||
ring->csum_none++;
|
||||
}
|
||||
|
||||
/* This packet is eligible for GRO if it is:
|
||||
* - DIX Ethernet (type interpretation)
|
||||
* - TCP/IP (v4)
|
||||
|
@ -769,10 +779,10 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
|
|||
skb_shinfo(gro_skb)->nr_frags = nr;
|
||||
gro_skb->len = length;
|
||||
gro_skb->data_len = length;
|
||||
gro_skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
gro_skb->ip_summed = ip_summed;
|
||||
|
||||
if (l2_tunnel)
|
||||
gro_skb->csum_level = 1;
|
||||
if (l2_tunnel && ip_summed == CHECKSUM_UNNECESSARY)
|
||||
gro_skb->encapsulation = 1;
|
||||
if ((cqe->vlan_my_qpn &
|
||||
cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)) &&
|
||||
(dev->features & NETIF_F_HW_VLAN_CTAG_RX)) {
|
||||
|
@ -801,16 +811,6 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
|
|||
}
|
||||
|
||||
/* GRO not possible, complete processing here */
|
||||
ip_summed = CHECKSUM_UNNECESSARY;
|
||||
} else {
|
||||
ip_summed = CHECKSUM_NONE;
|
||||
ring->csum_none++;
|
||||
}
|
||||
} else {
|
||||
ip_summed = CHECKSUM_NONE;
|
||||
ring->csum_none++;
|
||||
}
|
||||
|
||||
skb = mlx4_en_rx_skb(priv, rx_desc, frags, length);
|
||||
if (!skb) {
|
||||
priv->stats.rx_dropped++;
|
||||
|
|
Loading…
Add table
Reference in a new issue