Commit b8c89f5c authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

Merge branch 'fix-some-corner-cases-in-xskxceiver'

Larysa Zaremba says:

====================
Fix some corner cases in xskxceiver

While working on XDP and AF_XDP support for ixgbevf driver,
I came across two distinct problems that caused tests to fail
when they shouldn't have.
====================

Link: https://patch.msgid.link/20260203155103.2305816-1-larysa.zaremba@intel.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parents 1ace9bac 88af9fef
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ static u32 pkt_nb_frags(u32 frame_size, struct pkt_stream *pkt_stream, struct pk
	}

	/* Search for the end of the packet in verbatim mode */
	if (!pkt_continues(pkt->options))
	if (!pkt_continues(pkt->options) || !pkt->valid)
		return nb_frags;

	next_frag = pkt_stream->current_pkt_nb;
@@ -1090,6 +1090,8 @@ static int __receive_pkts(struct test_spec *test, struct xsk_socket_info *xsk)
			xsk_ring_prod__cancel(&umem->fq, nb_frags);
		}
		frags_processed -= nb_frags;
		pkt_stream_cancel(pkt_stream);
		pkts_sent--;
	}

	if (ifobj->use_fill_ring)