Commit dd65beac authored by Shani Michaeli's avatar Shani Michaeli Committed by David S. Miller

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: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarShani Michaeli <shanim@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b00394c0
...@@ -747,6 +747,16 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud ...@@ -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)) && if ((cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPOK)) &&
(cqe->checksum == cpu_to_be16(0xffff))) { (cqe->checksum == cpu_to_be16(0xffff))) {
ring->csum_ok++; 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: /* This packet is eligible for GRO if it is:
* - DIX Ethernet (type interpretation) * - DIX Ethernet (type interpretation)
* - TCP/IP (v4) * - TCP/IP (v4)
...@@ -769,10 +779,10 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud ...@@ -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; skb_shinfo(gro_skb)->nr_frags = nr;
gro_skb->len = length; gro_skb->len = length;
gro_skb->data_len = length; gro_skb->data_len = length;
gro_skb->ip_summed = CHECKSUM_UNNECESSARY; gro_skb->ip_summed = ip_summed;
if (l2_tunnel) if (l2_tunnel && ip_summed == CHECKSUM_UNNECESSARY)
gro_skb->csum_level = 1; gro_skb->encapsulation = 1;
if ((cqe->vlan_my_qpn & if ((cqe->vlan_my_qpn &
cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)) && cpu_to_be32(MLX4_CQE_VLAN_PRESENT_MASK)) &&
(dev->features & NETIF_F_HW_VLAN_CTAG_RX)) { (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 ...@@ -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 */ /* 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); skb = mlx4_en_rx_skb(priv, rx_desc, frags, length);
if (!skb) { if (!skb) {
priv->stats.rx_dropped++; priv->stats.rx_dropped++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment