Re: [vpp-dev] why vlib_buffer_push_ip4 not support fragmentation and set df flag for tcp?

2021-06-30 Thread Florin Coras
Fragmentation is expensive. Therefore, because tcp originates the packets 
locally, we do not want it to exceed the interface’s mtu. If you want to force 
larger bursts from tcp, try enabling tso if the egress interface supports it. 

Any particular reason why you’d like tcp to use such a large mss? 

Regards,
Florin

> On Jun 30, 2021, at 2:23 AM, jiangxiaom...@outlook.com wrote:
> 
> Hi guys,
> In my project, I set tcp mtu 9000 in vpp startup file: tcp { mtu 9000 }, 
> and set interfaces mtu 1500. When sending tcp packet, vlib_buffer_push_ip4 
> will add 'dont frag' flag for packet, if tcp data more then 1500 bytes, i 
> will "ip4 MTU exceeded and DF set" error.
> 
> always_inline void *
> vlib_buffer_push_ip4 (vlib_main_t * vm, vlib_buffer_t * b,
>ip4_address_t * src, ip4_address_t * dst, int proto,
>u8 csum_offload)
> {
>   return vlib_buffer_push_ip4_custom (vm, b, src, dst, proto, csum_offload,
>1 /* is_df */ ); <- why add df flag ?
> }
> 
> if seting is_df flag to 0 in vlib_buffer_push_ip4, sending tcp data more then 
> 1500 bytes will succeed.
> 
> Is there anyone know why vlib_buffer_push_ip4 not support fragmentation and 
> should set df flag for tcp?
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19657): https://lists.fd.io/g/vpp-dev/message/19657
Mute This Topic: https://lists.fd.io/mt/83888434/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] why vlib_buffer_push_ip4 not support fragmentation and set df flag for tcp?

2021-06-30 Thread jiangxiaoming
Hi guys,
In my project, I set tcp mtu 9000 in vpp startup file: tcp { mtu 9000 }, and 
set interfaces mtu 1500. When sending tcp packet, vlib_buffer_push_ip4 will add 
'dont frag' flag for packet, if tcp data more then 1500 bytes, i will "ip4 MTU 
exceeded and DF set" error.

always_inline void *
vlib_buffer_push_ip4 (vlib_main_t * vm, vlib_buffer_t * b,
ip4_address_t * src, ip4_address_t * dst, int proto,
u8 csum_offload)
{
return vlib_buffer_push_ip4_custom (vm, b, src, dst, proto, csum_offload,
1 /* is_df */ ); <- why add df flag ?
}

if seting is_df flag to 0 in vlib_buffer_push_ip4, sending tcp data more then 
1500 bytes will succeed.

Is there anyone know why vlib_buffer_push_ip4 not support fragmentation and 
should set df flag for tcp?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19652): https://lists.fd.io/g/vpp-dev/message/19652
Mute This Topic: https://lists.fd.io/mt/83888434/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-