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_sockbuf_copy_out(&so->so_snd, off, len, |
|
(char *)odp_packet_data(m) + hdrlen); |
and the memcpy here in ofp_uipc_socket.c
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.
Hi there
I know that we have set the Interface MTU to 1500 at
ofp/include/api/ofp_config.h
Line 61 in f6580bb
which is smaller than the packet size(1856) set at
ofp/include/api/ofp_config.h
Line 56 in f6580bb
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
and the memcpy here in ofp_uipc_socket.c
ofp/src/ofp_uipc_socket.c
Line 1009 in f6580bb
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
lenset to 2000 or greater.Are there any plans to support this feature?
BRs.