bnxt_en: Refactor TPA code path.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 29 Dec 2016 17:13:35 +0000 (12:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Dec 2016 19:37:23 +0000 (14:37 -0500)
Call tcp_gro_complete() in the common code path instead of the chip-
specific method.  The newer 5731x method is missing the call.

Signed-off-by: Michael Chan <michael.chan@broadcmo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 4a8059fcc8588e1fb0f5a60fc9554e2a623ced82..0654c3f32cea374d8951f397f434e86fff6de857 100644 (file)
@@ -1127,7 +1127,6 @@ static struct sk_buff *bnxt_gro_func_5730x(struct bnxt_tpa_info *tpa_info,
                dev_kfree_skb_any(skb);
                return NULL;
        }
-       tcp_gro_complete(skb);
 
        if (nw_off) { /* tunnel */
                struct udphdr *uh = NULL;
@@ -1177,6 +1176,8 @@ static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp,
                       RX_TPA_END_CMP_PAYLOAD_OFFSET) >>
                      RX_TPA_END_CMP_PAYLOAD_OFFSET_SHIFT;
        skb = bp->gro_func(tpa_info, payload_off, TPA_END_GRO_TS(tpa_end), skb);
+       if (likely(skb))
+               tcp_gro_complete(skb);
 #endif
        return skb;
 }