> -----Original Message-----
> From: Matan Azrad <ma...@mellanox.com>
> Sent: Thursday, January 09, 2020 19:34
> To: Xu, Rosen <rosen...@intel.com>; Thomas Monjalon
> <tho...@monjalon.net>
> Cc: Maxime Coquelin <maxime.coque...@redhat.com>; Bie, Tiwei
> <tiwei....@intel.com>; Wang, Zhihong <zhihong.w...@intel.com>; Wang,
> Xiao W <xiao.w.w...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com>;
> dev@dpdk.org; Pei, Andy <andy....@intel.com>; Roni Bar Yanai
> <ron...@mellanox.com>
> Subject: RE: [dpdk-dev] [PATCH v1 0/3] Introduce new class for vDPA device
> drivers
>
>
>
> From: Xu, Rosen <rosen...@intel.com>
> > > -----Original Message-----
> > > From: Thomas Monjalon <tho...@monjalon.net>
> > > Sent: Thursday, January 09, 2020 16:41
> > > To: Xu, Rosen <rosen...@intel.com>
> > > Cc: Matan Azrad <ma...@mellanox.com>; Maxime Coquelin
> > > <maxime.coque...@redhat.com>; Bie, Tiwei <tiwei....@intel.com>;
> > > Wang, Zhihong <zhihong.w...@intel.com>; Wang, Xiao W
> > > <xiao.w.w...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com>;
> > > dev@dpdk.org; Pei, Andy <andy....@intel.com>
> > > Subject: Re: [dpdk-dev] [PATCH v1 0/3] Introduce new class for vDPA
> > > device drivers
> > >
> > > 09/01/2020 03:27, Xu, Rosen:
> > > > Hi,
> > > >
> > > > From: Thomas Monjalon <tho...@monjalon.net>
> > > > > 08/01/2020 13:39, Xu, Rosen:
> > > > > > From: Matan Azrad <ma...@mellanox.com>
> > > > > > > From: Xu, Rosen
> > > > > > > > Did you think about OVS DPDK?
> > > > > > > > vDPA is a basic module for OVS, currently it will take
> > > > > > > > some exception path packet processing for OVS, so it still
> > > > > > > > needs to integrate
> > > > > eth_dev.
> > > > > > >
> > > > > > > I don't understand your question.
> > > > > > >
> > > > > > > What do you mean by "integrate eth_dev"?
> > > > > >
> > > > > > My questions is in OVS DPDK scenario vDPA device implements
> > > > > > eth_dev ops, so create a new class and move ifc code to this
> > > > > > new class
> > > is not ok.
> > > > >
> > > > > 1/ I don't understand the relation with OVS.
> > > > >
> > > > > 2/ no, vDPA device implements vDPA ops.
> > > > > If it implements ethdev ops, it is an ethdev device.
> > > > >
> > > > > Please show an example of what you claim.
> > > >
> > > > Answers of 1 and 2.
> > > >
> > > > In OVS DPDK, each network device(such as NIC, vHost etc) of DPDK
> > > > needs to be implemented as rte_eth_dev and provides eth_dev_ops
> > such
> > > > as
> > > packet TX/RX for OVS.
> > >
> > > No, OVS is also using the vhost API for vhost port.
> >
> > Yes, vhost pmd is not a good example.
> >
> > > > Take vHost(Virtio back end) for example, OVS startups vHost
> > > > interface like
> > > this:
> > > > ovs-vsctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
> > > > type=dpdkvhostuser drivers/net/vhost implements vHost as
> > rte_eth_dev
> > > and integrated in OVS.
> > > > OVS can send/receive packets to/from VM with rte_eth_tx_burst()
> > > > rte_eth_rx_burst() which call eth_dev_ops implementation of
> > > drivers/net/vhost.
> > >
> > > No, it is using rte_vhost_dequeue_burst() and
> > > rte_vhost_enqueue_burst() which are not in ethdev.
> > >
> > > > vDPA is also Virtio back end and works like vHost, same as vHost,
> > > > it will be implemented as rte_eth_dev and also be integrated into OVS.
> > >
> > > No, vDPA is not "implemented as rte_eth_dev".
> >
> > Currently, vDPA isn't integrated with OVS.
> >
> > > > So, it's not ok to move ifc code from drivers/net.
> > >
> > > drivers/net/ifc has no ethdev implementation at all.
> >
> > For OVS hasn't integrated vDPA, it doesn't implement rte_eth_dev, but
> > there are many discussions in OVS community about vDPA, some are from
> > Mellanox, it seems vDPA port will be implemented as rte_eth_dev port
> > in OVS in the near feature.
> > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> > h
> >
> work.ozlabs.org%2Fpatch%2F1178474%2F&data=02%7C01%7Cmatan%
> 4
> >
> 0mellanox.com%7C9e84c2581e2f414e0aca08d794f22e8d%7Ca652971c7d2e4
> d
> >
> 9ba6a4d149256f461b%7C0%7C0%7C637141640216181763&sdata=TA%
> 2F
> > 0zU495kXUqhC6eP09NDzBZfjJz1dbfkRcDpV%2BYAs%3D&reserved=0
> >
> > Matan,
> > Could you clarify how OVS integrates vDPA in Mellanox patch?
> >
> > >
> > > Rosen, I'm sorry, these arguments look irrelevant, so I won't
> > > consider them as blocking the integration of this patch.
> >
> > What I mentioned is not blocking the integration of this patch, I just
> > want to get clarification from Matan how to integrate vDPA port in OVS.
>
>
> Hi
>
> OVS like any other application should use the current API of vDPA to attach a
> probed vdpa device to a vhost device.
> See example application /examples/vdpa.
>
> Here, we just introduce a new class to hold all the vDPA drivers, no change in
> the API.
>
> As I understand, no vDPA device is currently integrated in OVS.
>
> I think it can be integrated only when a full offload will be integrated since
> the vDPA device forward the traffic from the HW directly to the virtio queue,
> once it will be there, I guess the offload will be configured by the
> representor
> of the vdpa device(VF) which is managed by an ethdev device.
>
>
> Matan.
>
Hi,
I'm still confused about your last sentence " the representor of the vdpa
device(VF) which is managed by an ethdev device".
My understanding is that there are some connections and dependency between
rte_eth_dev and vdpa device?
Am I right or any other explanations from you?
Rosen.