> > > > Looking at the virtio_net.c code, the function call receive_big() > > might actually be okay for XDP, unless the incoming packet is larger > > than PAGE_SIZE and thus uses several pages (via a linked list in page- > >private). > > > > The receive_mergeable() does not look compatible with XDP. > > > > Looks to me the correct conditions can be met by getting the correct > feature negotiation to happen, specifically no VIRTIO_NET_F_MRG_RXBUF > and one of the TSO/ECN/GSO feature bits set the big_packets flag as Jesper > notes. > > Srijeet, are you going to give this a try? I'm trying to get the device side > working by the way on the vhost interface. >
Yup, I did try it .. but it looked like the device gets to make that call (Unless someone tells me I did something wrong) If I turned that feature off in the driver it crashed (did not chase too far down that hole) but let me try that again. Wanted to consider a path, which looks like has been considered and discarded, but for the mergable buffers case, if we disallow edit's (no writes) would that be an acceptable answer ? sorry in advance for the repeat question, but the benefit of mergeable seems like it can be real for all packets that are not being XDP'ed .. so maybe apps can make a choice of doing a copy into a local buffer and XDP_TX from there ?