Commit 17dd5efe authored by Alex Pakhunov's avatar Alex Pakhunov Committed by Jakub Kicinski
Browse files

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: default avatarAlex Pakhunov <alexey.pakhunov@spacex.com>
Signed-off-by: default avatarVincent Wong <vincent.wong2@spacex.com>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20231113182350.37472-2-alexey.pakhunov@spacex.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 907d1bdb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7918,8 +7918,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,

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

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