From 19ec29b30b311558da1de4b1a6f28fc7d061ee2f Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Wed, 7 Apr 2021 15:10:38 +0300 Subject: 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 Reviewed-by: Janne Peltonen --- platform/linux-generic/include/odp_packet_io_internal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'platform/linux-generic/include/odp_packet_io_internal.h') 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 -- cgit v1.2.3