diff options
author | Michael Chan <mchan@broadcom.com> | 2015-12-28 02:19:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-28 08:57:28 +0300 |
commit | 27e241896f2e21c96200df711659117923dec8a2 (patch) | |
tree | 78a305785eb3bd55bc035cbe603df95ba64fe438 /drivers/net/ethernet/broadcom | |
parent | 45019a180358c3cf290c3f3dc953c44f978d5527 (diff) | |
download | linux-27e241896f2e21c96200df711659117923dec8a2.tar.xz |
bnxt_en: Don't treat single segment rx frames as GRO frames.
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 06ce100f3c54..082c1e95edc7 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -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; |