On Fri, 23 Oct 2015 09:00:38 +0000 "Xie, Huawei" <huawei.xie at intel.com> wrote:
> >> Why use merge-able rx header here in the tx region? > > If mergeable rx is negotiated then the header must be used for > > both Tx and Rx. I chose to allocate the largest possible header > > needed, rather than having to deal with variable size data structure. > Our original code is also using merge-able header for TX descriptor if > this negotiated. > I checked the virtio spec, all of the merge-able header is about > receiving buffers, which is expected. That is why i feel weird here. > Maybe not a big deal? Since num_buffers is only in merge-able header, the negotiation is implied to be symmetric. Reading 0.95 spec Under "Packet Transmission" 3. If the driver negotatied the VIRTIO_NET_F_MGR_RXBUF feature the num_buffers field is set to zero.