|
@@ -1301,10 +1301,11 @@ static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp,
|
|
|
cp_cons = NEXT_CMP(cp_cons);
|
|
|
}
|
|
|
|
|
|
- if (unlikely(agg_bufs > MAX_SKB_FRAGS)) {
|
|
|
+ if (unlikely(agg_bufs > MAX_SKB_FRAGS || TPA_END_ERRORS(tpa_end1))) {
|
|
|
bnxt_abort_tpa(bp, bnapi, cp_cons, agg_bufs);
|
|
|
- netdev_warn(bp->dev, "TPA frags %d exceeded MAX_SKB_FRAGS %d\n",
|
|
|
- agg_bufs, (int)MAX_SKB_FRAGS);
|
|
|
+ if (agg_bufs > MAX_SKB_FRAGS)
|
|
|
+ netdev_warn(bp->dev, "TPA frags %d exceeded MAX_SKB_FRAGS %d\n",
|
|
|
+ agg_bufs, (int)MAX_SKB_FRAGS);
|
|
|
return NULL;
|
|
|
}
|
|
|
|