From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 22FB4A046B;
	Thu,  9 Jan 2020 12:34:30 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id E80041DA93;
	Thu,  9 Jan 2020 12:34:29 +0100 (CET)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
 (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43])
 by dpdk.org (Postfix) with ESMTP id 693961DA7F
 for <dev@dpdk.org>; Thu,  9 Jan 2020 12:34:28 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=I6zpqmOkIKlrssYkHEnoZ7rpBJpQEf0n4DGpeWO+OBApyZF0LpZyH/U+eA1rivkiZz621xGO0uZgoDfBr/7LscdpbpRyFbNoGC0Y/0nobLrS/l3La34HjEq2SxgGA8KGxzairK+nHrV9siJ9bJMk/AjFYFT2JIHPmpbwpn9OJ0NFj+f8uwLs7IOnMehBHPKQdO5Qh2XgmlFsrgD9ur2KbpkXgByN8RLyySo83dtfaxhS6HSR+yJ59/r32BwESkdBiG6Vps2SQDe1bDIPQiCM4hn5vSKAe31CHFSajgfeZ0jircBekqsQz1DVN8zzuZGCc4XfqdJwGiUYawC3L3rEvQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=5xetsmwZvjCANQV5cTNK+5l7wil9KbSQhT28U6JUW5M=;
 b=laqa1YoFB2KTfQJyisTfmmYLShoRje/I5Uo6BB5dy6efSqyg5regz1/btHathdQ6iCzWyCjhGUmK6nDaXIRHUsj3kiSobaHC8x65DhHl570mrkSWtwJca4Ecunb6RAOxGZezghOIv6+FX+mcXaWyXnlUpC3EvpIVzXGdqIi2+WwjFV5gCxlSBJaKd0xltyUmuOFhZC3AxeFl5SuJ/d1H6XE5ZCScGgatJW0dGLVGMmz/+sS3MTEbTrHP+Wj1jTBjhgwKSxDyjY/Rrj9RwotIEmgh3ra02QXJy4kD+2lSniKKoTO2gUC27bn/kBZDGst3KqWXOkM7RJUlIexHikzTrg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;
 dkim=pass header.d=mellanox.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=5xetsmwZvjCANQV5cTNK+5l7wil9KbSQhT28U6JUW5M=;
 b=Gey6m+rd2dZFaFpiw+cQjK7DcYZFSwZ5sCYJx4dezSDtTem0lmef9LEmTUYsj3pn0dV2z9dg943TqQeBGxiHdTYzRjzlmtit8y02qijJqqbYXKoU3qGA4JsAJKS9QR4Ao5Fdt3I2nUIw116luXTA762G6JVyifcfHZ1D+n+K9QM=
Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by
 AM0PR0502MB3876.eurprd05.prod.outlook.com (52.133.48.18) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.2602.12; Thu, 9 Jan 2020 11:34:27 +0000
Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com
 ([fe80::e495:9258:db09:1de8]) by AM0PR0502MB4019.eurprd05.prod.outlook.com
 ([fe80::e495:9258:db09:1de8%7]) with mapi id 15.20.2602.016; Thu, 9 Jan 2020
 11:34:27 +0000
From: Matan Azrad <matan@mellanox.com>
To: "Xu, Rosen" <rosen.xu@intel.com>, Thomas Monjalon <thomas@monjalon.net>
CC: Maxime Coquelin <maxime.coquelin@redhat.com>, "Bie, Tiwei"
 <tiwei.bie@intel.com>, "Wang, Zhihong" <zhihong.wang@intel.com>, "Wang, Xiao
 W" <xiao.w.wang@intel.com>, "Yigit, Ferruh" <ferruh.yigit@intel.com>,
 "dev@dpdk.org" <dev@dpdk.org>, "Pei, Andy" <andy.pei@intel.com>, Roni Bar
 Yanai <roniba@mellanox.com>
Thread-Topic: [dpdk-dev] [PATCH v1 0/3] Introduce new class for vDPA	device
 drivers
Thread-Index: AQHVxiNn8AeGJ2qjoUijGe6ZEygykqfhnHyAgABoZICAACTqAIAACSnA
Date: Thu, 9 Jan 2020 11:34:27 +0000
Message-ID: <AM0PR0502MB401944B54928DE2472034126D2390@AM0PR0502MB4019.eurprd05.prod.outlook.com>
References: <1577287161-10321-1-git-send-email-matan@mellanox.com>
 <2962572.5fSG56mABF@xps>
 <0E78D399C70DA940A335608C6ED296D73AC7E548@SHSMSX104.ccr.corp.intel.com>
 <1669723.3VsfAaAtOV@xps>
 <0E78D399C70DA940A335608C6ED296D73AC8000B@SHSMSX104.ccr.corp.intel.com>
In-Reply-To: <0E78D399C70DA940A335608C6ED296D73AC8000B@SHSMSX104.ccr.corp.intel.com>
Accept-Language: en-US, he-IL
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=matan@mellanox.com; 
x-originating-ip: [77.127.34.201]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 8aa742e6-bd62-4b8f-bcc1-08d794f7e28d
x-ms-traffictypediagnostic: AM0PR0502MB3876:|AM0PR0502MB3876:
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <AM0PR0502MB3876A7A85A139CC4A94C83A7D2390@AM0PR0502MB3876.eurprd05.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02778BF158
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10001)(10009020)(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(13464003)(199004)(189003)(7696005)(52536014)(66946007)(186003)(26005)(6506007)(53546011)(2906002)(5660300002)(71200400001)(45080400002)(81166006)(478600001)(55016002)(76116006)(316002)(4326008)(81156014)(86362001)(107886003)(66446008)(66556008)(64756008)(66476007)(110136005)(8936002)(966005)(33656002)(54906003)(9686003);
 DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3876;
 H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; A:1; MX:1; 
received-spf: None (protection.outlook.com: mellanox.com does not designate
 permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 6TPLKaPRRFGRC4Hy/6hRDKodcYM6c4y3Cuk4RBrqDHvtqhNl4dscJAbvYL4dchYGom7DaljIJ13soUUVU9cGvfM/gGbdTkWtBpvnFCg+CQIO1VLixn60buPeote/Wkwndr3xgMjdPzwSV9wst+cAKtiP4R+LFAnv/PetDjw+aTBJ3HQTIFaPrcXPyfPxQcuUQ+HpLqKumTNMAM/wlOaZI/oS0ilkzlN/tbyhBgGUOvrxZUn2/uieAtccr21gCEwg4QG8ejVT7eNln5twrDgmFg4KjwcaIZBxb5JPqjj7WJ3lF7XES8LPtXbWHTId/mzc0POEYj1CWhojf0fWaLjebmVPckE0yqokYnS711k7FHEvxd248binM07WTkkegnY3jhsLH7g5BUj6NtMVYH4x4ZcjgFB5vwl128VfdS5YJm7Cri0tg/icYfLjKF0+7JIsxr+vxfiLxEJlirSCI8I0ip+LtTj+U6OUaynJmbVOyw4H8Y+etBwpkOR0Limk5CqoK6IWwKlw6NfkVR3wzoGvH/EoW6m8s3KPt/Z/gxHiHzfyGMU0Nkir24EV8ky8B9R7KTmAtHUMP1hGuMD0i21iZCF9nQ4jCUCz826mUVeHm7zgG2MdFM/7ZcXPfBWvgkjFSnSnrzGYFiXmpQ6VzAq5Vw==
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: Mellanox.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8aa742e6-bd62-4b8f-bcc1-08d794f7e28d
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2020 11:34:27.3957 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: xMER5wzNoGm7zQN/Dmepg5xH6/dUb8RrjrScOMxAA79dbNVwF8oJKuL8btRXFABXRMT8Q/ukJaPmhi9W1osueA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3876
Subject: Re: [dpdk-dev] [PATCH v1 0/3] Introduce new class for vDPA	device
 drivers
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



From: Xu, Rosen <rosen.xu@intel.com>
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Thursday, January 09, 2020 16:41
> > To: Xu, Rosen <rosen.xu@intel.com>
> > Cc: Matan Azrad <matan@mellanox.com>; Maxime Coquelin
> > <maxime.coquelin@redhat.com>; Bie, Tiwei <tiwei.bie@intel.com>; Wang,
> > Zhihong <zhihong.wang@intel.com>; Wang, Xiao W
> > <xiao.w.wang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>;
> > dev@dpdk.org; Pei, Andy <andy.pei@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 <thomas@monjalon.net>
> > > > 08/01/2020 13:39, Xu, Rosen:
> > > > > From: Matan Azrad <matan@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.
>=20
> Yes, vhost pmd is not a good example.
>=20
> > > 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=3Ddpdkvhostuser 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".
>=20
> Currently, vDPA isn't integrated with OVS.
>=20
> > > So, it's not ok to move ifc code from drivers/net.
> >
> > drivers/net/ifc has no ethdev implementation at all.
>=20
> 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=3Dhttps%3A%2F%2Fpatch
> work.ozlabs.org%2Fpatch%2F1178474%2F&amp;data=3D02%7C01%7Cmatan%4
> 0mellanox.com%7C9e84c2581e2f414e0aca08d794f22e8d%7Ca652971c7d2e4d
> 9ba6a4d149256f461b%7C0%7C0%7C637141640216181763&amp;sdata=3DTA%2F
> 0zU495kXUqhC6eP09NDzBZfjJz1dbfkRcDpV%2BYAs%3D&amp;reserved=3D0
>=20
> Matan,
> Could you clarify how OVS integrates vDPA in Mellanox patch?
>=20
> >
> > Rosen, I'm sorry, these arguments look irrelevant, so I won't consider
> > them as blocking the integration of this patch.
>=20
> What I mentioned is not blocking the integration of this patch, I just wa=
nt 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 si=
nce 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.

=20