[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH v7] virtio_net: support split header
On Sun, 4 Sep 2022 16:31:59 -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote: > On Fri, Sep 02, 2022 at 04:58:16PM +0800, Heng Qi wrote: > > When VIRTIO_NET_F_SPLIT_TRANSPORT_HEADER is negotiated, > > the driver requires that the buffers submitted to receiveq > > MUST be composed of at least two descriptors, > > which means that each buffer the device gets is a descriptor chain, > > even if the device does not split the header for some packets. > > > > To store packet in the descriptor chain without header splitting > > by the device, the device MUST start with the first descriptor of > > the descriptor chain to store the packet, and MUST NOT set the > > VIRTIO_NET_HDR_F_SPLIT_TRANSPORT_HEADER bit in \field{flags}. > > > > Thanks. > > Descriptor chains will hurt performance badly. I understand the reasons for the performance impact here are: 1. Two buffers are used 2. One buffer occupies two descs This is the same as my understanding in the case of mergeable. We also need to pack the packets into two buffers, and a packet will eventually occupy two descs. > How about simply making this feature depend on mergeable buffers? > Then we have a separate buffer for the header and > this works cleanly. Under mergeable, each buffer is independent, and the split header requires two unequal descs. If we implement it based on mergeable, then consider the scenario of tcp zerocopy, when we fill receive vq, each buffer is an separate page, and if we use an separate buffer to save the header, then this is a waste, we may have to copy at the driver layer. @Qi Do you think there will be other problems with this approach? Thanks. > > -- > MST >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]