Skip to content

Commit 17dd5ef

Browse files
Alex Pakhunovkuba-moo
authored andcommitted
tg3: Increment tx_dropped in tg3_tso_bug()
tg3_tso_bug() drops a packet if it cannot be segmented for any reason. The number of discarded frames should be incremented accordingly. Signed-off-by: Alex Pakhunov <alexey.pakhunov@spacex.com> Signed-off-by: Vincent Wong <vincent.wong2@spacex.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://lore.kernel.org/r/20231113182350.37472-2-alexey.pakhunov@spacex.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 907d1bd commit 17dd5ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/ethernet/broadcom

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7918,8 +7918,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
79187918

79197919
segs = skb_gso_segment(skb, tp->dev->features &
79207920
~(NETIF_F_TSO | NETIF_F_TSO6));
7921-
if (IS_ERR(segs) || !segs)
7921+
if (IS_ERR(segs) || !segs) {
7922+
tnapi->tx_dropped++;
79227923
goto tg3_tso_bug_end;
7924+
}
79237925

79247926
skb_list_walk_safe(segs, seg, next) {
79257927
skb_mark_not_on_list(seg);

0 commit comments

Comments
 (0)