Skip to content

Commit

Permalink
mlx4_en: Consider napi_get_frags() failure.
Browse files Browse the repository at this point in the history
If failed to get skb frags using napi_get_frags(),
the packet is dropped.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Sep 7, 2010
1 parent f6c9322 commit ebc872c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
* - not an IP fragment */
if (dev->features & NETIF_F_GRO) {
struct sk_buff *gro_skb = napi_get_frags(&cq->napi);
if (!gro_skb)
goto next;

nr = mlx4_en_complete_rx_desc(
priv, rx_desc,
Expand Down

0 comments on commit ebc872c

Please sign in to comment.