Sorry I should have told you that I was working on this today.
I fully agree with the comments you sent as I was fixing it.

I'm going to send a new version which is better reviewed
and properly tested with DTS.

Results
=======
test_suites: PASS
  rx_split: PASS
    selective_rx_all_discard: PASS
    selective_rx_headers: PASS
    selective_rx_headers_discard_length: PASS
    selective_rx_no_offload: PASS
    selective_rx_payload_only: PASS
    selective_rx_segment_exceeds_mbuf: PASS
    selective_rx_two_segments: PASS

Test Cases Summary
==================
SKIP      = 0
PASS      = 7
BLOCK     = 0
FAIL      = 0
ERROR     = 0
PASS RATE = 100%



05/06/2026 23:28, Stephen Hemminger:
> AI review found:
> Patch 9 (dts: add selective Rx tests)
> 
> selective_rx_out_of_range expects a rejection that never happens, so the
> negative test will fail. It configures a real segment plus an oversized
> discard segment:
> 
>       rx_segments_length=[ETHER_IP_HDR_LEN, 20000],
>       mbuf_size=[256, 0],
> 
> and expects start_all_ports() to fail. But an over-range length on a discard
> segment is not rejected anywhere: rte_eth_rx_queue_check_split() does
> "continue" for mp == NULL segments, so it never length-checks them, and
> mlx5_rxq_new() clamps it:
> 
>       if (seg_len > tail_len)
>               seg_len = qs_seg->mp != NULL ? buf_len - offset : tail_len;
> 
> The discard seg_len becomes the remaining frame length, the queue is built,
> the port starts, and the test hits its fail().
> 
> Clamping an over-long discard to "the rest" is harmless (the bytes are
> discarded anyway), so the cleanest fix is probably to drop or rework this
> test rather than add a rejection path. If rejection is the intended
> contract, it would have to be added for discard segments in patch 2 or
> patch 6 -- a behavior choice, not a correctness requirement.
> 
> Minor: expressing a leading discard as --mbuf-size=0,... puts 0 at index 0,
> and testpmd treats mbuf_data_size[0] as the primary pool size elsewhere (the
> max_rx_pkt_len > mbuf_data_size[0] check, the default mbuf_pool_find(socket,
> 0)). Only bites an unusual config, but it is a latent foot-gun.



Reply via email to