Skip to content

Commit

Permalink
api: pktio: lso: promise maximum-sized segments for the custom proto
Browse files Browse the repository at this point in the history
Specify that all segments, except the last one, have the maximum
payload length with the custom protocol. Rounding down the payload
length by ODP implementations would be problematic for certain custom
protocols that need to know the exact length of the segments in advance.

Signed-off-by: Janne Peltonen <[email protected]>
Reviewed-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
Reviewed-by: Nithin Dabilpuram <[email protected]>
  • Loading branch information
JannePeltonen committed Dec 17, 2024
1 parent d2a127e commit de76ba1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion include/odp/api/spec/packet_io_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,11 @@ typedef enum odp_lso_protocol_t {
/** Protocol not selected. */
ODP_LSO_PROTO_NONE = 0,

/** Custom protocol. LSO performs only custom field updates to the packet headers. */
/** Custom protocol. LSO performs only custom field updates to the packet headers.
*
* All segments except the last one have exactly the maximum number of payload
* bytes as given by the max_payload_len parameter in odp_packet_lso_opt_t.
*/
ODP_LSO_PROTO_CUSTOM,

/** LSO performs IPv4 fragmentation.
Expand Down
7 changes: 4 additions & 3 deletions include/odp/api/spec/packet_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,10 @@ typedef struct odp_packet_lso_opt_t {
/** Maximum payload length in an LSO segment
*
* Max_payload_len parameter defines the maximum number of payload bytes in each
* created segment. Depending on the implementation, segments with less payload may be
* created. However, this value is used typically to divide packet payload evenly over
* all segments except the last one, which contains the remaining payload bytes.
* created segment. Depending on the implementation and the LSO profile, segments
* with less payload may be created. However, this value is used typically to divide
* packet payload evenly over all segments except the last one, which contains the
* remaining payload bytes.
*/
uint32_t max_payload_len;

Expand Down

0 comments on commit de76ba1

Please sign in to comment.