[dpdk-dev] [PATCH v1 0/2] Virtio-net PMD Extension to work on host
Tan, Jianfeng
jianfeng.tan at intel.com
Mon Jan 11 06:31:41 CET 2016
Hi Tetsuya,
> With current your implementation, when 'virtual' virtio-net PMD is used,
> 'phys_addr' will be virtual address in EAL layer.
>
> struct rte_memseg {
> phys_addr_t phys_addr; /**< Start physical address. */
> union {
> void *addr; /**< Start virtual address. */
> uint64_t addr_64; /**< Makes sure addr is always 64
> bits */
> };
> .......
> };
It's not true. It does not effect EAL layer at all. Just fill virtual
address in virtio PMD when:
1). set_base_addr;
2). preparing RX's descriptors;
3). transmitting packets, CVA is filled in TX's descriptors;
4). in TX and CQ's header, CVA is used.
>
> How about choosing it in virtio-net PMD?
My current implementation works as you say.
> (In the case of 'virtual', just use 'addr' instead of using 'phys_addr'.)
> For example, port0 may use physical address, but port1 may use virtual
> address.
>
> With this, of course, we don't have an issue with 'physical' virtio-net PMD.
> Also, with 'virtual' virtio-net PMD, we can use virtual address and fd
> that represents the big virtual address space.
> (TODO: Need to change rte_memseg and EAL to keep fd and offset?)
I suppose you mean that when initializing memory, just maintain one fd
in the end, and
mmap all memsegs inside it. This sounds like a good idea to solve the
limitation of
VHOST_MEMORY_MAX_NREGIONS.
Besides, Sergio and I are discussing about using VA instead of PA in
VFIO to avoid the
requirement of physical-config for physical devices.
Thanks,
Jianfeng
> Then, you don't worry about VHOST_MEMORY_MAX_NREGIONS, because we have
> only one fd.
>
>> b. containers without root privilege
>> No need to worry about this problem, because it lacks of privilege to
>> construct physical-contiguous memory.
>>
> Yes, we cannot run 'physical' PMDs in this type of container.
> Anyway, I will check it more, if we really need it.
>
> Thanks,
> Tetsuya
More information about the dev
mailing list