From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0065.outbound.protection.outlook.com [104.47.0.65]) by dpdk.org (Postfix) with ESMTP id F08FD7CB6 for ; Wed, 13 Sep 2017 13:16:19 +0200 (CEST) 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; bh=ymZ9sFK8JPYgQT44rLnxSKx/yfggVHpi1K/CW3yPZcE=; b=vECZ2LNHFm7MJf+xX/R63MTOC+Ypx0U4bcsffcXic5GZfGQOiUZzR3837a6LPOaoSMFag81Yl0phiVcRbi2rfcMXJMAFRHt3c6ofFwbSz0Ap7r6SiDr2Fy3JHuAaiapQ6LKq3Bo+48PGOz5SOMAVEMuoo2qH5rE31/jUKpBUF+0= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB1135.eurprd05.prod.outlook.com (10.162.15.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Wed, 13 Sep 2017 11:16:16 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3c3c:8f27:30a1:cd59]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3c3c:8f27:30a1:cd59%13]) with mapi id 15.20.0056.010; Wed, 13 Sep 2017 11:16:16 +0000 From: Shahaf Shuler To: Thomas Monjalon , "Ananyev, Konstantin" CC: "dev@dpdk.org" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API Thread-Index: AQHTJYU1V12CwMiH90ScwHe7u4qjjKKkxkyAgAElSgCAAAYVAIAAJeMwgABVZwCAAOkvQIAARTuAgAr+v4CAABd4MA== Date: Wed, 13 Sep 2017 11:16:16 +0000 Message-ID: References: <2601191342CEEE43887BDE71AB9772584F2480E8@irsmsx105.ger.corp.intel.com> <2632317.9dDdYF2F86@xps> In-Reply-To: <2632317.9dDdYF2F86@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1135; 6:kttPInAH9aSxcKLNZcpvn6Jrqzx0ja+aQyAGjWtlsCLLKQh5uo7dYdrU3qGQCQvlJkTQtnJWs1DESXRmmIWqszGKowoRB2XcQbLFkcF9KNE0NZPj79se0L8MQ4T6nak8ftady8j3locGta1VcOIxSd+1V6Uy1cNtMfSqfgBYmeBapo+c/a+zYIIM7g3SnCRpGZ1ZEncAbevisREQJi2ABwSXAQBq6RWY6uJcdEoO1vzvGSDSV4gwbVvgJ4wYInpL38igBCHYgxmGXqxVc7wgl+0sVXACedYOSUcteMCmuWetPPSUmI4CRx+s4e7RhORWAGVxgQAINaKuT31H7i/azg==; 5:oLO3481Nn0WnMOZBsXmP5KvqvN7tjwkuv/zBO7Ap7Uc6adBi630w9rXCqayR64UyRzsFvGdAh+UMrU/MmuCaQKZoDGu0RPt4no9Iq7VVeHQPdU0khzDQS1Uyld7IRAVrzGi4e2BpweEplQ7jph9mQQ==; 24:mdl8txkgGFPOPZf0Jy86aXwUkyI4An71TzoLUr99Fx2BBbSjCo/gtkxSqxcOb2X5kNxbtOiK5m2DjyMt+geD7QrEzNSeGi91MkYOD5vEvtM=; 7:rwDem9CgcnRxjoWZSkDWOBwL0AsX6bBfsj2CM/NWKii8t6P5N+FOVA5YuakkLpfn+badvt057ciVjp6eb9z5i2nX626YvK2/nsZAs9tMQfIbR2yFr0Xizp2xSJKi4X6VCygMjts9tfFBdVUh9kTqxPTnwIE+0WL2xbOVlyHT5sRvu8f2Eb51+v3L9rsctuv4Iy4sD3jbmfZ5o0MyDrRC+FagYHAvX4ObeCANGjvib4s= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-office365-filtering-correlation-id: dd360156-da9b-49c2-9872-08d4fa98d9df x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB1135; x-ms-traffictypediagnostic: VI1PR05MB1135: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB1135; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB1135; x-forefront-prvs: 042957ACD7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(366002)(376002)(199003)(377454003)(189002)(76176999)(99286003)(54356999)(101416001)(50986999)(189998001)(86362001)(305945005)(2900100001)(2950100002)(7736002)(2906002)(68736007)(3660700001)(74316002)(3280700002)(14454004)(33656002)(229853002)(6506006)(6436002)(5660300001)(81156014)(4326008)(66066001)(105586002)(97736004)(478600001)(25786009)(53936002)(8936002)(8676002)(81166006)(6246003)(54906002)(93886005)(9686003)(102836003)(3846002)(7696004)(6116002)(55016002)(316002)(5250100002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1135; H:VI1PR05MB3149.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2017 11:16:16.1802 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1135 Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 11:16:20 -0000 Wednesday, September 13, 2017 12:28 PM, Thomas Monjalon: > I still think we must streamline ethdev API instead of complexifying. > We should drop the big "configure everything" and configure offloads one = by > one, and per queue (the finer grain). The issue is, that there is some functionality which cannot be achieved whe= n configuring offload per queue. For example - vlan filter on intel NICs. The PF can set it even without cre= ating a single queue, in order to enable it for the VFs. To make it right, such functionality resides on per-device offloads. Howeve= r we cannot have such concept on ethdev layer. Also not sure we want to modify the eal for that. >=20 > More comments below >=20 > 06/09/2017 11:33, Ananyev, Konstantin: > > From: Shahaf Shuler [mailto:shahafs@mellanox.com] > > > Tuesday, September 5, 2017 6:31 PM, Ananyev, Konstantin: >=20 > > > > > > > > > > In fact, right now it is possible to query/change > > > > > > > > > > these 3 vlan offload flags on the fly (after > > > > > > > > > > dev_start) on port basis by > > > > > > rte_eth_dev_(get|set)_vlan_offload API. > > > > > > > > > > Regarding this API from ethdev. > > > > > > > > > > So this seems like a hack on ethdev. Currently there are 2 ways > > > > > for user to > > > > set Rx vlan offloads. > > > > > One is through dev_configure which require the ports to be > > > > > stopped. The > > > > other is this API which can set even if the port is started. > > > > > > > > Yes there is an ability to enable/disable VLAN offloads without > > > > stop/reconfigure the device. > > > > Though I wouldn't call it 'a hack'. > > > > From my perspective - it is a useful feature. > > > > Same as it is possible in some cases to change MTU without > > > > stopping device, etc. >=20 > I think the function rte_eth_dev_configure(), which set up several things= at a > time, is a very bad idea from API perspective. >=20 > In the VLAN example, we should have only one function to set this offload= . > And the PMD should advertise the capability of configuring VLAN on the fl= y. > This function should return an error if called on the fly (started state)= and > PMD does not support it. >=20 >=20 > > > > Consider scenario when PF has a corresponding VFs (PF is > > > > controlled by > > > > DPDK) Right now (at least with Intel HW) it is possible to: > > > > > > > > struct rte_eth_conf dev_conf; > > > > dev_conf. rxmode.hw_vlan_filter =3D 1; ... > > > > rte_eth_dev_configure(pf_port_id, 0, 0, &dev_conf); > > > > rte_eth_dev_start(pf_port_id); > > > > > > > > In that scenario I don't have any RX/TX queues configured. > > > > Though I still able to enable vlan filter, and it would work correc= tly for > VFs. > > > > Same for other per-port offloads. > > > > > > For the PF - enabling vlan filtering without any queues means > > > nothing. The PF can receive no traffic, what different does it makes = the > vlan filtering is set? > > > For the VF - I assume it will have queues, therefore for it vlan > > > filtering has a meaning. However as I said above, the VF has the vlan= filter > because in intel this is per-device offload, so this is not a good exampl= e. > > > > Yes it is a per-device offload, and right now it is possible to > > enable/disable it via dev_confgiure(); dev_start(); without > > configuring/starting any RX/TX queues. > > That's an ability I'd like to preserve. > > So from my perspective it is a perfectly valid example. >=20 > It is configuring VFs by setting the PF. > Where is it documented? > It looks to me as a device-specific side effect.