From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0086.outbound.protection.outlook.com [104.47.0.86]) by dpdk.org (Postfix) with ESMTP id 429931DE1C for ; Sat, 9 Jun 2018 20:43:23 +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:X-MS-Exchange-SenderADCheck; bh=uK9TU6gHWZxT3yPl+OG4RfEzbpJ5iE5WWVzGgUtSmyw=; b=ifR7Zkd+sGq0ryyaQTgNGKHEl7B7N+oyPRvf7hQ09pETnnMrPbKSwQ0R+4EnS2Hnnv2p7CFgZesUctxr52dpThObHWFu2Z70XuuxxyJWJF3fUKk3z0C2MXZeB8VVOff4HmlHI8FmkSpef5a6mTLxroMZ5QDZG2y7fhde3z9DpDY= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4345.eurprd05.prod.outlook.com (52.134.108.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.14; Sat, 9 Jun 2018 18:43:20 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::6c2f:4969:3e70:3f2a]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::6c2f:4969:3e70:3f2a%2]) with mapi id 15.20.0841.018; Sat, 9 Jun 2018 18:43:20 +0000 From: Shahaf Shuler To: Stephen Hemminger , Ferruh Yigit CC: Thomas Monjalon , "dev@dpdk.org" , "Wei Dai" , Qi Zhang , Andrew Rybchenko Thread-Topic: [dpdk-dev] [PATCH] ethdev: force offloading API rules Thread-Index: AQHT+N0uuVLnJjKzVkeQWYqHRXkUEaRW1XUAgAB5KIA= Date: Sat, 9 Jun 2018 18:43:20 +0000 Message-ID: References: <20180531124431.13746-1-ferruh.yigit@intel.com> <20180608130214.686c79e8@xeon-e3> In-Reply-To: <20180608130214.686c79e8@xeon-e3> 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: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4345; 7:B/7V63Qmo/hqpp0Lc6kuZayZUCEwnKw4NpOIs+o4bvAttW0jD9uBGS/wcKJk8nh96C0lLreRUN0RDkLZAqGRWcngruQos+K+vzANdtluloHn9lg93gO+ek/9/y7BOUGyN8NqJNZJN0EA2bJZIjV6p+0/nAXt3ClU8K1AMLaOFOhKg6YplhipKDUzu0Cpks1+yeKl9kxRZBpmqCN9NASlkibbxe/1PT2Sp7Rf9bufolwtyaV4m2EHiz/2tLg7a8K4 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4345; x-ms-traffictypediagnostic: DB7PR05MB4345: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(20558992708506)(278428928389397)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4345; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4345; x-forefront-prvs: 06989017E3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(39860400002)(376002)(39380400002)(199004)(189003)(6436002)(5250100002)(68736007)(55016002)(6506007)(3280700002)(97736004)(7736002)(66066001)(26005)(186003)(59450400001)(4326008)(486006)(53936002)(54906003)(446003)(7696005)(476003)(76176011)(8676002)(11346002)(33656002)(25786009)(6116002)(102836004)(9686003)(478600001)(3846002)(110136005)(6246003)(8936002)(2906002)(229853002)(2900100001)(5660300001)(3660700001)(81156014)(74316002)(86362001)(81166006)(99286004)(305945005)(316002)(105586002)(14454004)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4345; H:DB7PR05MB4426.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-microsoft-antispam-message-info: tFZDwNIhQ4x2lYwg/bfl0RyBL4n42szy7zUvWGThS+5cd1th/07/ZyKiQAc9H/563rvsxE1sAXY0xS76CvQrRvaabjltHq+Nc5gtMUG94kZ+ZDG8opfGpTvm7vODColiAIe4qj80A4qjxU4SclGNjhuAKyNZefiM8CACQqDFM4ww2ngsW4tCXXZKnZzJC2U1 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: cc9fd8e9-ba10-47ec-f019-08d5ce38df8d X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc9fd8e9-ba10-47ec-f019-08d5ce38df8d X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2018 18:43:20.4933 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4345 Subject: Re: [dpdk-dev] [PATCH] ethdev: force offloading API rules 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: Sat, 09 Jun 2018 18:43:23 -0000 Friday, June 8, 2018 11:02 PM, Stephen Hemminger: > Subject: Re: [dpdk-dev] [PATCH] ethdev: force offloading API rules >=20 > On Thu, 31 May 2018 13:44:30 +0100 > Ferruh Yigit wrote: >=20 > > The error path was disabled in previous release to let apps to be more > > flexible. > > > > But this release they are enabled, applications have to obey offload > > API rules otherwise they will get errors from following APIs: > > rte_eth_dev_configure > > rte_eth_rx_queue_setup > > rte_eth_tx_queue_setup > > > > Signed-off-by: Ferruh Yigit I am OK with returning EINVAL in case of configuration error. >=20 > Rather than always returning -EINVAL, why not propagate error code that > the driver returns. This would allow driver to give a more detailed error > return. >=20 > The problem with that is you probably need to do a review of each drivers > configure and setup routines to see what they return on error (if any). Per my understanding the error is in-depended on driver specific implementa= tion, it is rather to enforce the offloading API rules of ethdev layer, whi= ch are: 1. PMD reports offloads capabilities 2. application sets it's offloads based on the supported capabilities. =20 When the configuration fail, no need to dig into driver, just to look on th= e error log and see which unsupported offloads were set.=20