Hello Stephen,
[snip]
What is the intended behavior in the selective case. Is there any mechanism for
application to see original length?
The original packet length is delivered to application in the first
mbuf.pkt_len field.
If the selective Rx read was activated, Rx burst will assemble mbufs chain that
matches the queue split configuration.
For example, consider application that needs to check out IPv4 header and the
last 512 bytes if packet length was 8000 bytes.
1 Application defines selective read split for Rx queue 5:
- The first segment reads Ethernet and IPv4 headers.
- The second segment skips packet data in range [34 + 1, 8000-512-1].
- The third segment reads the last 512 bytes.
2 Application creates flow rule that matches IPv4 packets with total length 8000
and forward them to Rx queue 5.
3 PMD rx_burst operations for Rx queue 5:
- Read the first 34 bytes into mbuf A
- Discard next 7453 Rx data bytes
- Read the last 512 Bytes into mbuf B
- Return chain A->B
The application knows how to treat mbuf received from Rx queue 5, because it
created data split for that Rx queue.