[ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

Noa Ezra noae at mellanox.com
Tue Oct 22 07:17:30 UTC 2019


Hi,
Please see the answer below.

Thanks,
Noa.

> -----Original Message-----
> From: William Tu [mailto:u9012063 at gmail.com]
> Sent: Friday, October 18, 2019 12:34 AM
> To: Noa Ezra <noae at mellanox.com>
> Cc: ovs-dev at openvswitch.org; Oz Shlomo <ozsh at mellanox.com>; Majd
> Dibbiny <majd at mellanox.com>; Ameer Mahagneh
> <ameerm at mellanox.com>; Eli Britstein <elibr at mellanox.com>
> Subject: Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port
> 
> On Thu, Oct 17, 2019 at 02:16:56PM +0300, Noa Ezra wrote:
> 
> Hi Noa,
> 
> Thanks for the patch. I'm new to this and have a question below.
> 
> > dpdkvdpa netdev works with 3 components:
> > vhost-user socket, vdpa device: real vdpa device or a VF and
> > representor of "vdpa device".
> >
> > In order to add a new vDPA port, add a new port to existing bridge
> > with type dpdkvdpa and vDPA options:
> > ovs-vsctl add-port br0 vdpa0 -- set Interface vdpa0 type=dpdkvdpa
> >    options:vdpa-socket-path=<sock path>
> >    options:vdpa-accelerator-devargs=<VF pci id>
> >    options:dpdk-devargs=<vdpa pci id>,representor=[id]
> >
> > On this command OVS will create a new netdev:
> > 1. Register vhost-user-client device.
> > 2. Open and configure VF dpdk port.
> > 3. Open and configure representor dpdk port.
> >
> > The new netdev will use netdev_rxq_recv() function in order to receive
> > packets from VF and push to vhost-user and receive packets from
> > vhost-user and push to VF.
> 
> So does OVS in this case is able to apply OpenFlow rules on packets?
> 
> When netdev_dpdk_vdpa_rxq_recv() is invoked, does the batch of packets
> go into OVS's parse, lookup, action pipeline? Or all packets go directly into
> VM if (VF -> VM) and vice versa?
> 
> Is
> fwd_rx = netdev_dpdk_vdpa_rxq_recv_impl(dev->relay, rxq->queue_id);
> forward packets from vhost-user to VF and ret =
> netdev_dpdk_rxq_recv(rxq, batch, qfill); forward packets from vhost-user to
> VM?

I hope that I understand your question correctly, the netdev_dpdk_vdpa_rxq_recv forwards packets from VM to VF and vice versa.
There is no change in the processing of the packet between VF and up-link and no change in the packet's header.
The new netdev only translate between SR-IOV (phy) VF to virtIO VM.

> Thanks
> William



More information about the dev mailing list