From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <shahafs@mellanox.com>
Received: from EUR01-DB5-obe.outbound.protection.outlook.com
 (mail-db5eur01on0042.outbound.protection.outlook.com [104.47.2.42])
 by dpdk.org (Postfix) with ESMTP id 508E37D4F
 for <dev@dpdk.org>; Wed, 23 Aug 2017 08:39:06 +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=YQuy26skg31qoTSGwl3v4mm2abe317kzr9x0uSz3Myk=;
 b=tbv9z1Ritl9QtTnxXgxs1nqo0TgTECFPRBu6ybmacITycDbckVoqugRDEJjrJoGKXSnFRg/KRPaz/ZqdsXzScmTHd7a2r6PVwiprx8k3TL4c+OQUxBBq6VNyKQWfCWPFNcYtAPzE9dx12qy9e4I/bSUdYbN6K/pqmapM7Y++G38=
Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by
 VI1PR05MB1407.eurprd05.prod.outlook.com (10.162.125.156) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.1.1362.18; Wed, 23 Aug 2017 06:39:02 +0000
Received: from VI1PR05MB3149.eurprd05.prod.outlook.com
 ([fe80::8450:1a86:2dd0:82c2]) by VI1PR05MB3149.eurprd05.prod.outlook.com
 ([fe80::8450:1a86:2dd0:82c2%13]) with mapi id 15.01.1362.019; Wed, 23 Aug
 2017 06:39:02 +0000
From: Shahaf Shuler <shahafs@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
 Thomas Monjalon <thomas@monjalon.net>
Thread-Topic: [dpdk-dev] [RFC PATCH 0/4] ethdev new offloads API
Thread-Index: AQHTD2uaGNU7ibdyEkuA1RENoHWbR6KRlZQw
Date: Wed, 23 Aug 2017 06:39:02 +0000
Message-ID: <VI1PR05MB3149686E969483730AA38EBCC3850@VI1PR05MB3149.eurprd05.prod.outlook.com>
References: <cover.1502096064.git.shahafs@mellanox.com>
In-Reply-To: <cover.1502096064.git.shahafs@mellanox.com>
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; VI1PR05MB1407;
 6:J8N9aNz//iYg4m0l3K4NmdA0zLuJ17x2ZQyoax2tV+Knq3D9aBRT+Eo0x07L8rQuxU5sl8e2KVXiAMXknvNIuRThe35WC64+P9no3Td+y2eSZmlAWfRE/ZsdT9YS/O3oxAYJChgE0MKDFeFX4MlaPk451XIE9wf5/z2mx93JyPrY6b2uapIsvvp5sJxZQvxXH3uyABXzUuoZut0mUwmhufPpOqTpy7AyoBIdZKaQ3Wud7ryAhidFrs517jI+v8WlAQaYu+9+QVdm1hYj1BhTK41Um8JY3s2R44UgOuVtltv7nq/7ybib9Sc7TjRDJg+JMZie9hQfmU6oALnzt9SpHw==;
 5:xZgSJdv4z+BzZfLeYK+nVQXzHcRlw/NwM3C2mkcE5Xnh94FWaiCwHorXBf4dzJBMjdtPvLI+8f4YEKXG+gDNHHijXCH4mzuxlz1hQdEMBQc9P5eYr61+Vr7jWGtmTxY8h8FyhaSIjhIGLbARajw42w==;
 24:irO54onF6K3I6TrDU6gkvn7jNaAnHqOGbK8tvASRwtaR5LoTlIFFBzWecPGBYn+HzxvKQ6DYCzmwHZOwTPsbzxKqJX4EbxKCwFahBDzu+b8=;
 7:FDDS1LulB4YwCcZahi5DqpN8qy6uGxfuJfap+HI8dz9dn9ZX7oc28HCWlZUfX5AWZ4qowPZPRuJyEhCs3flawI36RtUEhH837pOwjungl1X7NHobFfLns8NEOJGii9UuQPFbIKWOyIGkpqKzDjV833DcHWg6HzdYZDbigsk3y7NtVxS5Wj12niDDEPc4h3Uh2ruPA4nzCguEiFlDFylMSoI4lCuHKD+qOBKrh4AQRBk=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-ms-office365-filtering-correlation-id: b5da7ded-454b-4e6a-84dd-08d4e9f1a4cc
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603180)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);
 SRVR:VI1PR05MB1407; 
x-ms-traffictypediagnostic: VI1PR05MB1407:
x-exchange-antispam-report-test: UriScan:(17755550239193);
x-microsoft-antispam-prvs: <VI1PR05MB140777CE0563614F33365B1EC3850@VI1PR05MB1407.eurprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);
 SRVR:VI1PR05MB1407; BCL:0; PCL:0;
 RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);
 SRVR:VI1PR05MB1407; 
x-forefront-prvs: 040866B734
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(6009001)(39860400002)(189002)(377454003)(199003)(14454004)(2501003)(9686003)(6436002)(229853002)(99286003)(55016002)(76176999)(3660700001)(33656002)(25786009)(7696004)(54356999)(2906002)(5660300001)(478600001)(6246003)(50986999)(5250100002)(3280700002)(2950100002)(86362001)(189998001)(8676002)(8936002)(81156014)(81166006)(305945005)(74316002)(3846002)(102836003)(53936002)(68736007)(6506006)(7736002)(2900100001)(66066001)(101416001)(106356001)(6116002)(97736004)(105586002)(217873001);
 DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1407;
 H:VI1PR05MB3149.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords;
 MX:1; A: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: 23 Aug 2017 06:39:02.5780 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1407
Subject: Re: [dpdk-dev] [RFC PATCH 0/4] ethdev new offloads API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Aug 2017 06:39:06 -0000

Hi,

I would like to get some inputs on the below.=20
This is a big (and important) work which I want to include on 17.11. I need=
 to understand the current approach is acceptable before I continue.


Monday, August 7, 2017 1:54 PM, Shahaf Shuler:
> Tx offloads configuration is per queue. Tx offloads are enabled by defaul=
t,
> and can be disabled using ETH_TXQ_FLAGS_NO* flags.
> This behaviour is not consistent with the Rx side where the Rx offloads
> configuration is per port. Rx offloads are disabled by default and enable=
d
> according to bit field in rte_eth_rxmode structure.
>=20
> Moreover, considering more Tx and Rx offloads will be added over time, th=
e
> cost of managing them all inside the PMD will be tremendous, as the PMD
> will need to check the matching for the entire offload set for each mbuf =
it
> handles.
> In addition, on the current approach each Rx offload added breaks the ABI
> compatibility as it requires to add entries to existing bit-fields.
>=20
> The RFC address above issues by defining a new offloads API.
> With the new API, Tx and Rx offloads configuration is per queue.
> The offloads are disabled by default. Each offload can be enabled or disa=
bled
> using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags.
> Such API will enable to easily add or remove offloads, without breaking t=
he
> ABI compatibility.
>=20
> The new API does not have an equivalent for the below Tx flags:
>=20
> * ETH_TXQ_FLAGS_NOREFCOUNT
> * ETH_TXQ_FLAGS_NOMULTMEMP
>=20
> The reason is that those flags are not to manage offloads, rather some
> guarantee from application on the way it uses mbufs, therefore could not =
be
> present as part of DEV_TX_OFFLOADS_*.
> Such flags are useful only for benchmarks, and therefore provide a non-
> realistic
> performance for DPDK customers using simple benchmarks for evaluation.
> Leveraging the work being done in this series to clean up those flags.
>=20
> In order to provide a smooth transition between the APIs the following
> actions were taken:
> *  The old offloads API is kept for the meanwhile.
> *  New capabilities were added for PMD to advertize it has moved to the
> new
>    offloads API.
> *  Helper function which copy from old to new API and vice versa were
> added to ethdev,
>    enabling the PMD to support only one of the APIs, and the application =
to
> move to
>    the new API regardless the underlying device and without extra branchi=
ng.
>=20



> Shahaf Shuler (4):
>   ethdev: rename Rx and Tx configuration structs
>   ethdev: introduce Rx queue offloads API
>   ethdev: introduce Tx queue offloads API
>   ethdev: add helpers to move to the new offloads API
>=20
>  lib/librte_ether/rte_ethdev.c | 144
> ++++++++++++++++++++++++++++++++++++-
>  lib/librte_ether/rte_ethdev.h |  72 +++++++++++++++----
>  2 files changed, 202 insertions(+), 14 deletions(-)
>=20
> --
> 2.12.0