From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <shahafs@mellanox.com>
Received: from EUR02-VE1-obe.outbound.protection.outlook.com
 (mail-eopbgr20055.outbound.protection.outlook.com [40.107.2.55])
 by dpdk.org (Postfix) with ESMTP id E50C62BBE
 for <dev@dpdk.org>; Mon, 18 Sep 2017 16:27:27 +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=xMwd6v3qADnxRU6PZ2u3MCEwLXbuGbSsf0CW50B6Sh4=;
 b=macLhDY8F+tIZQzNVgXInWYRtjP9vlOss7uD7F8QNaDE0zgLhhV732fzmMYnunUrWSRJBxpAxCXhmRkDJ4EDzqCgiJ++Ky+hwfkhv1WVvdJJPFmJXUx31lAewURPKUghwZOJp1Axkygjnorvzx8qv/xvjdIPEwApK3TLotKMLpU=
Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by
 VI1PR05MB1373.eurprd05.prod.outlook.com (10.162.122.23) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.56.11; Mon, 18 Sep 2017 14:27:25 +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; Mon, 18 Sep
 2017 14:27:25 +0000
From: Shahaf Shuler <shahafs@mellanox.com>
To: Bruce Richardson <bruce.richardson@intel.com>, Thomas Monjalon
 <thomas@monjalon.net>
CC: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
 "stephen@networkplumber.org" <stephen@networkplumber.org>, "dev@dpdk.org"
 <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new
 offloads API
Thread-Index: AQHTJYU1V12CwMiH90ScwHe7u4qjjKKkxkyAgAElSgCAAAYVAIAAJeMwgABVZwCAAOkvQIAARTuAgAr+v4CAABd4MIAAHrKAgAAEEwCAAAbOgIAAjCsAgACtPACABnMXgIAABwaAgAACNACAAAHFAIAABe6AgAABaoCAACcSEA==
Date: Mon, 18 Sep 2017 14:27:25 +0000
Message-ID: <VI1PR05MB3149B00E8838C0A7D956914EC3630@VI1PR05MB3149.eurprd05.prod.outlook.com>
References: <cover.1504508374.git.shahafs@mellanox.com>
 <20170918110456.GB15516@bricha3-MOBL3.ger.corp.intel.com>
 <2601191342CEEE43887BDE71AB9772584F24BFE7@irsmsx105.ger.corp.intel.com>
 <32037584.9VqYmpDC01@xps>
 <20170918113733.GA14460@bricha3-MOBL3.ger.corp.intel.com>
In-Reply-To: <20170918113733.GA14460@bricha3-MOBL3.ger.corp.intel.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; VI1PR05MB1373;
 6:etuniYMva2RgxMFzmnzObSzncgDK8hsTzxgg4/QnoHgtnLtzGahPzxNzkqcXo5I7cEkEDMZYpq6WCqssszKS25A0++kKQZKxc/+DZApYOaqQOm/gz7Bg3wtWR+4e3KRTWED54U9sc+DR3LwQpXTxrChLd3ixs2LFMeO0QnhdaPe2/QBTZJ3Y671px3hAB18Rce75mKsrdmHKkX/4ZVR950GcBdy5u9raMlS98c4HJpV4YSd/t2WTcRjOLoSgKOuIZsQKDebRIfvBas6z6t8c8PqUprsWk/rHXKEGrCR8YTR45F7mOhq0tQEyizWCQGeCohjSr8z52Nb2DCsr9gmqpQ==;
 5:4Lfu7jSfXXF67dCewyHtS6QFif8Plc+7uQJt/sjDowTqgvGpp2QVrYMOA/KYJwQ9o7t+zfK0uQnou+r7YBmP94X9oyPod2cPwV9DnhBJQQ+o3H/yGeCJvCDDx1u7YCfpnvJuuSTWOZ5hpGrPWfB8zA==;
 24:mhEzjvurZFa3NeNMujmjHuonGPONhbOvQq6gR/3RSqbzEHbFiB0AH+ZmKQh1N3DPK5zwlD7Yb5wes6OLhm/SopLQ62AmDd634pD6xnqhAwg=;
 7:FTNT+plSC/9Xx2lsqJfDFZMJtxQb8O/FmG0nijw+ufWZxQVSHgsqe9Lf4P6FHKf+gscevDfXOTKNYW6N9FkUbDzjrusxDHyw68t5eP+cJ9+qRdJyeQg0V6Xe0u+m0zxAMWf0SruJyV7O+yYjSvg2Dg/llKRKAlprnAuS1Z/FQQnOlhiCI6m0JFLhHoj8QDTXYS8OQWdRVAm2L1dUVGatl+NOWtkTT0f0wZ6LvcHY9kY=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-ms-office365-filtering-correlation-id: a7f30ae9-83dc-4388-9c8b-08d4fea1623c
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)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);
 SRVR:VI1PR05MB1373; 
x-ms-traffictypediagnostic: VI1PR05MB1373:
x-exchange-antispam-report-test: UriScan:;
x-microsoft-antispam-prvs: <VI1PR05MB1373E5370055D13B75E8BC17C3630@VI1PR05MB1373.eurprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);
 SRVR:VI1PR05MB1373; BCL:0; PCL:0;
 RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);
 SRVR:VI1PR05MB1373; 
x-forefront-prvs: 04347F8039
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(6009001)(346002)(39860400002)(376002)(189002)(377454003)(24454002)(199003)(3660700001)(99286003)(229853002)(54906002)(55016002)(2906002)(105586002)(4326008)(106356001)(76176999)(101416001)(6116002)(8936002)(81166006)(8676002)(50986999)(54356999)(3280700002)(9686003)(81156014)(102836003)(86362001)(53936002)(3846002)(6246003)(68736007)(93886005)(2900100001)(478600001)(305945005)(7736002)(6436002)(6506006)(74316002)(14454004)(189998001)(33656002)(5660300001)(316002)(2950100002)(5250100002)(7696004)(97736004)(25786009)(66066001);
 DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1373;
 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: 18 Sep 2017 14:27:25.5849 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1373
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 <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: Mon, 18 Sep 2017 14:27:28 -0000

Monday, September 18, 2017 2:38 PM, Bruce Richardson
> On Mon, Sep 18, 2017 at 01:32:29PM +0200, Thomas Monjalon wrote:
> > 18/09/2017 13:11, Ananyev, Konstantin:
> > > From: Richardson, Bruce
> > > > >
> > > > > I think we all in favor to have a separate API here.
> > > > > Though from the discussion we had at latest TB, I am not sure it
> > > > > is doable in 17.11 timeframe.
> > > >
> > > > Ok, so does that imply no change in this release, and that the
> > > > existing set is to be ignored?
> > >
> > > No, my understanding the current plan is to go forward with Shahaf
> > > patches, and then apply another one (new set/get API) on top of them.
> >
> > Yes, it is what we agreed (hope to see it in minutes).
> > If someone can do these new patches in 17.11 timeframe, it's great!
> > Bruce, do you want to make it a try?
>=20
> If I have the chance, I can try, but given how short time is and that use=
rspace
> is on next week, I very much doubt I'll even get it started.

I wasn't aware to the techboard decision on the extra patchset needed.
I think it will be wrong to introduce an API on 17.11 and change it again o=
n 18.02. =20
I will do my best to make everything ready for 17.11 so we can have one sol=
id API on top of which all PMDs and application will be converted. Consider=
ing some Holidays and the DPDK summit I won't have much time to work on it.

The plan is as follows:
1.  complete the last comment on the current series and integrate it.
2. send a new patchset to convert to the API suggested above.

Aggregating the different suggestions I come up with the below. if this is =
agreed, then I will move with the implementation.
(I thought it is good to return error values for the get function).

**                                                                         =
  =20
* Get Tx offloads set on a specific port.                                  =
  =20
*                                                                          =
  =20
* @param port_id                                                           =
  =20
*   The port identifier of the Ethernet device.                            =
  =20
* @param offloads                                                          =
  =20
*   A pointer to uint64_t where the offloads flags                         =
  =20
*   will be filled using DEV_TX_OFFLOAD_* flags.                           =
  =20
* @return                                                                  =
  =20
*   - (0) if successful.                                                   =
  =20
*   - (-ENOTSUP or -ENODEV) on failure.                                    =
  =20
*/                                                                         =
  =20
int rte_eth_get_port_tx_offloads(uint8_t port_id, uint64_t *offloads);     =
   =20
                                                                           =
  =20
**                                                                         =
  =20
* Get Tx offloads set on a specific queue.                                 =
  =20
*                                                                          =
  =20
* @param port_id                                                           =
  =20
*   The port identifier of the Ethernet device.                            =
  =20
* @param queue_id                                                          =
  =20
*   The queue identifier.                                                  =
  =20
* @param offloads                                                          =
  =20
*   A pointer to uint64_t where the offloads flags                         =
  =20
*   will be filled using DEV_TX_OFFLOAD_* flags.                           =
  =20
* @return                                                                  =
  =20
*   - (0) if successful.                                                   =
  =20
*   - (-ENOTSUP or -ENODEV) on failure.                                    =
  =20
*/                                                                         =
  =20
int rte_eth_get_queue_tx_offloads(uint8_t port_id, uint16_t queue_id,      =
   =20
                                 uint64_t *offloads);                      =
  =20
**                                                                         =
  =20
* Set Tx offloads on a specific port.                                      =
  =20
*                                                                          =
  =20
* @param port_id                                                           =
  =20
*   The port identifier of the Ethernet device.                            =
  =20
* @param offloads_mask                                                     =
  =20
*   Indicates which offloads to be set using DEV_TX_OFFLOAD_* flags.       =
  =20
* @return                                                                  =
  =20
*   (0) if all offloads set successfully, otherwise offloads               =
  =20
*   flags which were not set.                                              =
  =20
*                                                                          =
  =20
*/                                                                         =
  =20
uint64_t rte_eth_set_port_tx_offloads(uint8_t port_id, uint64_t offloads_ma=
sk);

/**                                                                      =20
 * Set Tx offloads on a specific queue.                                  =20
 *                                                                       =20
 * @param port_id                                                        =20
 *   The port identifier of the Ethernet device.                         =20
 * @param queue_id                                                       =20
 *   The queue identifier.                                               =20
 * @param offloads_mask                                                  =20
 *   Indicates which offloads to be set using DEV_TX_OFFLOAD_* flags.    =20
 * @return                                                               =20
 *   (0) if all offloads set successfully, otherwise offloads            =20
 *   flags which were not set.                                           =20
 *                                                                       =20
 */                                                                      =20
uint64_t rte_eth_set_queue_tx_offloads(uint8_t port_id, uint16_t queue_id,
                                       uint64_t offloads_mask);          =20
/**                                                                      =20
 * Get Rx offloads set on a specific port.                               =20
 *                                                                       =20
 * @param port_id                                                        =20
 *   The port identifier of the Ethernet device.                         =20
 * @param offloads                                                       =20
 *   A pointer to uint64_t where the offloads flags                      =20
 *   will be filled using DEV_RX_OFFLOAD_* flags.                        =20
 * @return                                                               =20
 *   - (0) if successful.                                                =20
 *   - (-ENOTSUP or -ENODEV) on failure.                                 =20
 */                                                                      =20
int rte_eth_get_port_rx_offloads(uint8_t port_id, uint64_t *offloads);   =20
                                                                         =20
/**                                                                      =20
 * Get Rx offloads set on a specific queue.                              =20
 *                                                                       =20
 * @param port_id                                                        =20
 *   The port identifier of the Ethernet device.                         =20
 * @param queue_id                                                       =20
 *   The queue identifier.                                               =20
 * @param offloads                                                       =20
 *   A pointer to uint64_t where the offloads flags                      =20
 *   will be filled using DEV_RX_OFFLOAD_* flags.                        =20
 * @return                                                               =20
 *   - (0) if successful.                                                =20
 *   - (-ENOTSUP or -ENODEV) on failure.                                 =20
 */                                                                      =20
int rte_eth_get_queue_rx_offlaods(uint8_t port_id, uint16_t queue_id,    =20
                                  uint64_t *offloads);  =20

/**                                                                        =
   =20
 * Set Rx offloads on a specific port.                                     =
   =20
 *                                                                         =
   =20
 * @param port_id                                                          =
   =20
 *   The port identifier of the Ethernet device.                           =
   =20
 * @param offloads_mask                                                    =
   =20
 *   Indicates which offloads to be set using DEV_RX_OFFLOAD_* flags.      =
   =20
 * @return                                                                 =
   =20
 *   (0) if all offloads set successfully, otherwise offloads              =
   =20
 *   flags which were not set.                                             =
   =20
 *                                                                         =
   =20
 */                                                                        =
   =20
uint64_t rte_eth_set_port_rx_offloads(uint8_t port_id, uint64_t offloads_ma=
sk);
                                                                           =
   =20
/**                                                                        =
   =20
 * Set Rx offloads on a specific port.                                     =
   =20
 *                                                                         =
   =20
 * @param port_id                                                          =
   =20
 *   The port identifier of the Ethernet device.                           =
   =20
 * @param queue_id                                                         =
   =20
 *   The queue identifier.                                                 =
   =20
 * @param offloads_mask                                                    =
   =20
 *   Indicates which offloads to be set using DEV_RX_OFFLOAD_* flags.      =
   =20
 * @return                                                                 =
   =20
 *   (0) if all offloads set successfully, otherwise offloads              =
   =20
 *   flags which were not set.                                             =
   =20
 *                                                                         =
   =20
 */                                                                        =
   =20
uint64_t rte_eth_set_queue_rx_offloads(uint8_t port_id, uint16_t queue_id, =
   =20
                                       uint64_t offloads_mask);            =
                    =20

>=20
> /Bruce