Skip to content

Commit

Permalink
bnxt_en: Don't treat single segment rx frames as GRO frames.
Browse files Browse the repository at this point in the history
If hardware completes single segment rx frames, don't bother setting
up all the GRO related fields.  Pass the SKB up as a normal frame.

Reviewed-by: vasundhara volam <vvolam@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 28, 2015
1 parent 45019a1 commit 27e2418
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,13 @@ static inline struct sk_buff *bnxt_gro_skb(struct bnxt_tpa_info *tpa_info,
struct tcphdr *th;
int payload_off, tcp_opt_len = 0;
int len, nw_off;
u16 segs;

NAPI_GRO_CB(skb)->count = TPA_END_TPA_SEGS(tpa_end);
segs = TPA_END_TPA_SEGS(tpa_end);
if (segs == 1)
return skb;

NAPI_GRO_CB(skb)->count = segs;
skb_shinfo(skb)->gso_size =
le32_to_cpu(tpa_end1->rx_tpa_end_cmp_seg_len);
skb_shinfo(skb)->gso_type = tpa_info->gso_type;
Expand Down

0 comments on commit 27e2418

Please sign in to comment.