diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-03-12 13:18:39 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-03-12 23:08:33 +0100 |
| commit | 26df8a3608e7b006c00f44a9029bcadb6d5e4153 (patch) | |
| tree | 9de805b50e0e481a10c83ad47529182862f172d3 /contrib | |
| parent | 9d1a6b3eba9e6e5c4db4bfa0e395edc45ca6c39d (diff) | |
| download | passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar.gz passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar.bz2 passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar.lz passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar.xz passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.tar.zst passt-26df8a3608e7b006c00f44a9029bcadb6d5e4153.zip | |
conf: Limit maximum MTU based on backend frame size
The -m option controls the MTU, that is the maximum transmissible L3
datagram, not including L2 headers. We currently limit it to ETH_MAX_MTU
which sounds like it makes sense. But ETH_MAX_MTU is confusing: it's not
consistently used as to whether it means the maximum L3 datagram size or
the maximum L2 frame size. Even within conf() we explicitly account for
the L2 header size when computing the default --mtu value, but not when
we compute the maximum --mtu value.
Clean this up by reworking the maximum MTU computation to be the minimum of
IP_MAX_MTU (65535) and the maximum sized IP datagram which can fit into
our L2 frames when we account for the L2 header. The latter can vary
depending on our tap backend, although it doesn't right now.
Link: https://bugs.passt.top/show_bug.cgi?id=66
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions
