Another IP fragmentation question

Alexander Petrovsky <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CAH57y_TE5qa5iVnvYQ9GJ3NNYkkzUAt7fLUeZ=iucrwmOYgVmw@mail.gmail.com>
Hello!

As well known the XDP doesn't have any mechanism to handle IP
fragmented packets and do IP defrag. It's a big problem for L4 routers
implemented using XDP. There are some hacks and workarounds such a
using AF_XDP to handle such packets in userspace, or the hack like the
cilium did (https://github.com/cilium/cilium/commit/e65adc058d851c8aac864e7ac5c7e50f7f46104f)
which is absolutely bad, but we don't have anything better.

There is a first try to do about three years ago -
https://lists.linuxfoundation.org/pipermail/iovisor-dev/2017-September/001023.html
but without success.

Now, we have a hash of maps and ignore some specific we could store
the IP fragments there till the first IP fragment comes in... We still
need the way how to evict old accumulated fragments. We still need the
mechanism which lets us emit such fragments to the network interface
when we ready to do it.

So, my question is:
1. If we will have such hash of lru maps?
2. Is the way how to safely store IP fragments in the maps?
3. could we try to solve the next problem, emit the fragments/data
from the maps to the network interface on demand?

Is it could sound like a plan? Or there are some better ways to solve
this problem?

Thanks!

--
Alexander Petrovsky
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.