-
Notifications
You must be signed in to change notification settings - Fork 23
Max mtu #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max mtu #246
Conversation
5b0c6a6 to
e83d3e9
Compare
7c1c790 to
081c683
Compare
This partially reverts commit 62071f3. This is too risky, the stack does not support multi segment in a safe way. Keep the high MTU test. Also, enabling scatter/gather lowers performance with some drivers: DRIVER TEST RX/TX PKT/S mlx5 ipv4_fwd scatter/gather 15.5M (-0.6%) mlx5 ipv4_fwd simple 15.6M ice ipv4_fwd scatter/gather 13.8M (-12.7%) ice ipv4_fwd simple 15.8M Signed-off-by: Maxime Leroy <[email protected]> Signed-off-by: Robin Jarry <[email protected]>
Add a new parameter to enforce the maximum MTU on ports. Use the provided value to determine the size of mbuf segments. By default, the maximum MTU is set to 1800 which should cover most standard use cases. Increase the amount of allocated memory in test mode to allow creating ports with bigger mbufs. NB: larger mbufs lowers performance with some drivers: DRIVER TEST MBUF_SIZE PERF mlx5 ipv4_fwd 2K 15.6M mlx5 ipv4_fwd 16K 15.5M (-0.6%) ice ipv4_fwd 2K 15.8M ice ipv4_fwd 16K 14.7M (-7.0%) Signed-off-by: Robin Jarry <[email protected]>
Only ports have a MTU value which is initialized from whatever hardware has. Ensure VLAN interfaces always have the same MTU as their parent port. Initialize IPIP interfaces at 1480 bytes (1500 minus an extra IP header). Signed-off-by: Robin Jarry <[email protected]>
Currently, we don't check if the packets transmitted will fit in the configured MTU of the output port. Before proceeding further, drop the packets if they are larger than the configured MTU. Some day, we will need to support fragmentation for IPv4 and sending an ICMP6 "packet too big" error for IPv6. Signed-off-by: Robin Jarry <[email protected]>
| const struct gr_iface conf = { | ||
| .flags = iface->flags, | ||
| .mtu = iface->mtu, | ||
| .mtu = iface->mtu ?: 1480, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which case, iface->mtu is zero ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless users have specified a value for mtu in the initial interface creation message, it will be 0. It was OK until now since we'll drop packets that are bigger than output interface MTU.
I chose to initialize it to 1480 which seems like a good default.
maxime-leroy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICMP too big must also sent for IPV4 with DF bit set.
We don't have any function to send packets ?
We do but at the moment, we don't support neither fragmentation nor sending ICMP too big packets. This will be implemented later. |
No description provided.