Hello,

  I've noticed a problem in the VPP session layer and posted a patch to fix
it [1].
Namely, UDP datagrams with length > 1908 that require buffer chaining get
corrupted, because there's a bug in session_tx_fifo_chain_tail() that's
responsible for the buffer chaining (it doesn't account for
SESSION_CONN_HDR_LEN). The bug only affects datagram transports and doesn't
break TCP.

  There's another problem with the UDP code: "udp mtu". As far as I
understand, the plan there [2] is to use the MTU of the output interface
for each datagram being sent, and "udp { mtu ... }" setting is only used as
a temporary measure. Yet, it seems to me that what is happening when a
datagram exceeds that MTU value is not exactly correct: instead of
undergoing IP fragmentation as one would expect, the datagrams get split
into multiple UDP datagrams. This is not handled correctly by apps that use
UDP, most of the time, and did cause me some hours spent debugging strange
app behavior. Wouldn't failing to send such datagrams be more correct?

  Another thing I've noticed is that if UDP MTU is high enough sometimes
the datagrams being sent still somehow are split into smaller IP fragments
than necessary. E.g. I have MTU 9000 on my interfaces and UDP MTU also is
9000, and 8000-byte UDP datagram is sent in one piece, while the IP packets
carrying 11000-byte UDP datagram are split into ~2kb IP fragments. Any
ideas why this could happen?

  I've also published some of the scripts I used for testing as a github
gist [3]. Not runnable out of the box but maybe they can be of some help.

[1] https://gerrit.fd.io/r/c/vpp/+/31647
[2] https://github.com/FDio/vpp/blob/0ac5782/src/vnet/udp/udp.c#L316-L317
[3] https://gist.github.com/ivan4th/af7ca91857ea05aa35c7ab4773b089f8

-- 
Ivan Shvedunov <ivan...@gmail.com>
;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9  F7D0 613E C0F8 0BC5 2807
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18921): https://lists.fd.io/g/vpp-dev/message/18921
Mute This Topic: https://lists.fd.io/mt/81353121/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to