Open HsuJv opened 1 year ago
Hi @HsuJv,
To support jumbo frames you will need to:
My code is different .. cannot say right now if this is enough. I don't have plans to contribute to the project (I have my own version) but maybe the other members will. Else, it does not seems too complicated.
BRs
Btw, pkt segments are not well supported in the entire stack... you should try to keep it simple with large enough packets and first segment size = pkt size...
Hi @bogdanPricope
Thanks for the quick reply.
For your answer:
ofp_cksum
in ofp_in_cksum.c
did do the segment check. So I assume that at least some of the developer has taken the segmented packets into consideration.So in a short, fixing the issues with segmented packets seems necessary for memory saving and may not be very complicated work. It seems that this project has been active again recently so I submitted issues here to let the contributors know.
BRs.
Hi there
I know that we have set the Interface MTU to 1500 at https://github.com/OpenFastPath/ofp/blob/f6580bb675386b0599390daaabbb0a06c1c1be0c/include/api/ofp_config.h#L61 which is smaller than the packet size(1856) set at https://github.com/OpenFastPath/ofp/blob/f6580bb675386b0599390daaabbb0a06c1c1be0c/include/api/ofp_config.h#L56
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 https://github.com/OpenFastPath/ofp/blob/f6580bb675386b0599390daaabbb0a06c1c1be0c/src/ofp_tcp_output.c#L870-L871 and the memcpy here in ofp_uipc_socket.c https://github.com/OpenFastPath/ofp/blob/f6580bb675386b0599390daaabbb0a06c1c1be0c/src/ofp_uipc_socket.c#L1009 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.