[dpdk-dev] [PATCH 40/41] net/virtio: use contiguous allocation for DMA memory

Venkatesh Srinivas venkateshs at google.com
Sat Mar 3 17:52:09 CET 2018


On Sat, Mar 3, 2018 at 7:46 AM, Anatoly Burakov
<anatoly.burakov at intel.com> wrote:
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
>     Not sure if virtio needs to allocate DMA-capable memory,
>     being a software driver and all. Corrections welcome.

Reviewed-by: Venkatesh Srinivas <venkateshs at google.com>

1. The first change is correct - virtio rings need to be contiguous in
guest physical address
    space.

2. The second change - virtio_tx_region contains both a virtio_net_hdr
and indirect table.
    virtio devices require virtio_net_hdr to be contiguous (in pre-1.0
devices w/o F_ANY_LAYOUT)
    but do not require the indirect table to be contiguous w/
virtio_net_hdr. You may want this to
    avoid splitting up the structure though.

HTH,
-- vs;


More information about the dev mailing list