Skip to content

No support for segmented odp packet in tcp_output & ofp_sosend_dgram #284

@HsuJv

Description

@HsuJv

Hi there

I know that we have set the Interface MTU to 1500 at

#define OFP_MTU_SIZE 1500

which is smaller than the packet size(1856) set at
#define SHM_PKT_POOL_BUFFER_SIZE 1856

But in my use case, I'd like to make the MTU configurable to meet the requirements of jumbo frames (both TCP & UDP).

If I increase my MTU to some value that is greater than the packet size, it will result in a segmented odp_packet_t.
But the memcpy here in ofp_tcp_output.c

ofp/src/ofp_tcp_output.c

Lines 870 to 871 in f6580bb

ofp_sockbuf_copy_out(&so->so_snd, off, len,
(char *)odp_packet_data(m) + hdrlen);

and the memcpy here in ofp_uipc_socket.c
memcpy(p, data, resid);

do not check the segmented packets at all, which will cause a buffer overflow.

A simple approach to duplicate this issue is to reduce the SHM_PKT_POOL_BUFFER_SIZE to 1024 or smaller. Or calling ofp_sendto on the UDP sockets with len set to 2000 or greater.

Are there any plans to support this feature?

BRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions