Skip to content

Commit b8c89f5

Browse files
author
Alexei Starovoitov
committed
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: Alexei Starovoitov <ast@kernel.org>
2 parents 1ace9ba + 88af9fe commit b8c89f5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/testing/selftests/bpf/prog_tests/test_xsk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ static u32 pkt_nb_frags(u32 frame_size, struct pkt_stream *pkt_stream, struct pk
433433
}
434434

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

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

10951097
if (ifobj->use_fill_ring)

0 commit comments

Comments
 (0)