Cong Wang wrote: > On Wed, Feb 3, 2021 at 9:48 AM Alexei Starovoitov > <alexei.starovoitov@xxxxxxxxx> wrote: > > > > On Tue, Feb 02, 2021 at 08:16:17PM -0800, Cong Wang wrote: > > > From: Cong Wang <cong.wang@xxxxxxxxxxxxx> > > > > > > Currently sockmap only fully supports TCP, UDP is partially supported > > > as it is only allowed to add into sockmap. This patch extends sockmap > > > with: 1) full UDP support; 2) full AF_UNIX dgram support; 3) cross > > > protocol support. Our goal is to allow socket splice between AF_UNIX > > > dgram and UDP. > > > > Please expand on the use case. The 'splice between af_unix and udp' > > doesn't tell me much. The selftest doesn't help to understand the scope either. > > Sure. We have thousands of services connected to a daemon on every host > with UNIX dgram sockets, after they are moved into VM, we have to add a proxy > to forward these communications from VM to host, because rewriting thousands > of them is not practical. This proxy uses a UNIX socket connected to services > and uses a UDP socket to connect to the host. It is inefficient because data is > copied between kernel space and user space twice, and we can not use > splice() which only supports TCP. Therefore, we want to use sockmap to do > the splicing without even going to user-space at all (after the initial setup). Thanks for the details. We also have a use-case similar to TCP sockets to apply policy/redirect to UDP sockets so will want similar semantics to how TCP skmsg programs work on egress. > > My colleague Jiang (already Cc'ed) is working on the sockmap support for > vsock so that we can move from UDP to vsock for host-VM communications. Great. The host-VM channel came up a few times in the initial sockmap work, but I never got around to starting. > > If this is useful, I can add it in this cover letter in the next update. > Please add to the cover letter. I'll review the series today or tomorrow, I have a couple things on the TODO list for today that I need to get done first. > Thanks. Thanks for doing this work.