diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2021-04-07 15:10:38 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-04-08 14:04:19 +0300 |
commit | 19ec29b30b311558da1de4b1a6f28fc7d061ee2f (patch) | |
tree | 06cc428cb3cb028661bf5280bf0bc1b0a1510161 /platform/linux-generic/include/odp_packet_io_internal.h | |
parent | 16079c05ddc71bc15dc0bd3567a6a3a1f6cf117d (diff) |
linux-gen: pktio: update LSO capabilities
Increase max_segments capability to 64 segments. LSO implementation
does not have a limit, but is limited by number free packets
in the pool. Picked a large enough number that LSO capability
does not limit segmentation of a maximum size IP packet.
Increase max_payload_len capability to be closer to MTU. Subtract
min header size (only Ethernet header) from MTU, instead of the
maximum supported header size.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'platform/linux-generic/include/odp_packet_io_internal.h')
-rw-r--r-- | platform/linux-generic/include/odp_packet_io_internal.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index 07b0b4b69..7bbd78ab0 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -39,8 +39,12 @@ extern "C" { #define PKTIO_MAX_QUEUES 64 #define PKTIO_LSO_PROFILES 16 +/* Assume at least Ethernet header per each segment */ +#define PKTIO_LSO_MIN_PAYLOAD_OFFSET 14 #define PKTIO_LSO_MAX_PAYLOAD_OFFSET 128 -#define PKTIO_LSO_MAX_SEGMENTS 8 +/* Allow 64 kB packet to be split into about 1kB segments */ +#define PKTIO_LSO_MAX_SEGMENTS 64 + ODP_STATIC_ASSERT(PKTIO_LSO_PROFILES < UINT8_MAX, "PKTIO_LSO_PROFILES_ERROR"); #define PKTIO_NAME_LEN 256 |