[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

Xie, Huawei huawei.xie at intel.com
Fri Oct 23 11:00:38 CEST 2015


On 10/23/2015 12:05 AM, Stephen Hemminger wrote:
> On Thu, 22 Oct 2015 10:38:33 +0000
> "Xie, Huawei" <huawei.xie at intel.com> wrote:
>
>> On 10/21/2015 9:20 PM, Thomas Monjalon wrote:
>>> 2015-10-18 22:16, Stephen Hemminger:
>>>> This is a tested version of the virtio Tx performance improvements
>>>> that I posted earlier on the list, and described at the DPDK Userspace
>>>> meeting in Dublin. Together they get a 25% performance improvement for
>>>> both small packet and large multi-segment packet case when testing
>>>> from DPDK guest application to Linux KVM host.
>>>>
>>>> Stephen Hemminger (5):
>>>>   virtio: clean up space checks on xmit
>>>>   virtio: don't use unlikely for normal tx stuff
>>>>   virtio: use indirect ring elements
>>>>   virtio: use any layout on transmit
>>>>   virtio: optimize transmit enqueue
>>> Huawei, do you ack this series?
>>>
>> Okay with this patchset with two remained questions,
>>
>> +/* Region reserved to allow for transmit header and indirect ring */
>> +#define VIRTIO_MAX_TX_INDIRECT 8
>> +struct virtio_tx_region {
>> +	struct virtio_net_hdr_mrg_rxbuf tx_hdr;
>>
>> 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?
>>> +	struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]
>>> +			   __attribute__((__aligned__(16)));
>> WARNING: __aligned(size) is preferred over __attribute__((aligned(size)))
> That is true in kernel, but there is no __aligned macro in DPDK code.
ok, then we ignore this warning as __rte_cache_aligned is also using
this style.
> It could be changed to __rte_aligned_16?
>
>



More information about the dev mailing list