From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B636BA00C4; Thu, 31 Oct 2019 16:50:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44BAE1C2EA; Thu, 31 Oct 2019 16:50:13 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150049.outbound.protection.outlook.com [40.107.15.49]) by dpdk.org (Postfix) with ESMTP id A28F81C2E7 for ; Thu, 31 Oct 2019 16:50:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XSg4wSbXbb8LpWRqhDH78k+MgCHoWUxcR2KOBu7LlSmVUtUPsu1VS1SSnYoncBuCW553GYAqPxTA4HP/Ub/g2SCQwcZ02jRpZNFf+VfUu9T9EW1sWl+X31AbdsJdpTNpS5h3jyScjotDk+dGL0KblOjUcJqZHuCZ9s7kn+ZImx0+wmGq3PNFmuhQ1EeyvGoukl8dpy1xoE85r80AE1OShkRx+NQUH9keIlP1t7jcewxhWVPeC2+YDvQLRCpM+xrzV11kRMHuejQh/2vo2h5suwsmP/2MrsIPtqZyBgEewkwwTnU2U+JUyEk7P1y/R9uGyI0L47Pgfz9H3Lac4ZhniA== 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=pKx+okR1JwZO+bGyQJGiwelX5td5/Mbxn+z8Ngz1mPw=; b=YWommirhMx5R9b4l//0aY7vwf51a/Qnk/UNNIc8IHsIsDULHYQPtLLyhPzgTmHkLlc7+eDog5e6RhI8XOHlkNZqPdh1JnnXs9ih6F2tI077XnlUepl5Q0+cirBNI9XO1ObYO+e2L+Bb/+J665yw3OZuUQMOhYD5qK4I7VElY+RIfVg7lyw+hOipBz/WFvG4MoENWOS20Snh87+uebcpGZcJTrYxdkEVz3JqwMx1B9u+E2g9l8CAXU6d8escktxAZkNLd12eNAYszFjDJczfT4sgtcNKtfyHHAbW44NfW8EU6AB/GNOjJJJY0ri5f0ipdMl+cI6ybT2gTEY3daugkNw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pKx+okR1JwZO+bGyQJGiwelX5td5/Mbxn+z8Ngz1mPw=; b=UStH2ED6rQLJPhcx+rnhwgSJ7CZqshWa3oy+XRHocGQwQkct4zPXLZYlqSGU8d2z4r/k0mXt/DOr2lrUyjqXuJJ4KjfR9tmOxOiCGR7GMpOuBMBGP8zZ3A8XCG8Lch1hIi/Hpj6KyJ3mj8hJWwjULyxoyiNasBU0x19ttLZ7kWU= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3603.eurprd05.prod.outlook.com (52.133.49.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Thu, 31 Oct 2019 15:50:08 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::fd7a:e5a8:deec:c1b0]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::fd7a:e5a8:deec:c1b0%7]) with mapi id 15.20.2387.028; Thu, 31 Oct 2019 15:50:08 +0000 From: Matan Azrad To: Pavan Nikhilesh Bhagavatula , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Jerin Jacob Kollanukkaran , Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v15 3/7] ethdev: add validation to offloads set by PMD Thread-Index: AQHVjm7bOLjUGRTIuUGVwwwER6sV0qd02rDggAAFegCAAADlwA== Date: Thu, 31 Oct 2019 15:50:07 +0000 Message-ID: References: <20191029050312.2715-1-pbhagavatula@marvell.com> <20191029153722.4547-1-pbhagavatula@marvell.com> <20191029153722.4547-4-pbhagavatula@marvell.com> In-Reply-To: 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: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3398aaf3-643f-4a13-2964-08d75e1a0150 x-ms-traffictypediagnostic: AM0PR0502MB3603: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(39860400002)(396003)(376002)(136003)(189003)(199004)(8936002)(66446008)(66476007)(25786009)(5660300002)(2501003)(6246003)(71200400001)(71190400001)(66556008)(64756008)(99286004)(66946007)(7696005)(110136005)(81156014)(66066001)(76116006)(52536014)(102836004)(6506007)(478600001)(76176011)(186003)(26005)(81166006)(316002)(476003)(3846002)(86362001)(55016002)(6116002)(33656002)(2906002)(11346002)(229853002)(2201001)(7736002)(14454004)(9686003)(74316002)(305945005)(4326008)(14444005)(256004)(486006)(446003)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3603; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 1/se1+mB/EMc3uMdCeF6bRtQ8X1iP8XWpKRxeMCOBcqi25bcCQCLt8R548a+RSeGSva7RrU8LKWHqZMcPYqYyDfcWRRFDE/+055lYjnZwqKmVNJFv4k+I8PcgNXMCPQfs2HM6KtOqTxXwTTKpoNc7FcmPGkUzC7KsifttducvvuYS1fhZXlaZ8ZWVJ3S2gqPMTmhRJkkXQuAnAiihrYAriTRZuADSMXSf38Z0Ls8zCqDYh5n6RbmY62Yv91x27oCRXJRJswnsHJ16bHjwrWBU+S8qlhmOxhfzkO8pNYF5fj5Ksm0GhWEqFA0ftKlHh4tkHfcYIOKh/6NCuieKwPAcCCs2BfivbPJ5Vw7sEkoZangNxmbW/MlQ/VvSQ1Q/wbprt3jgdW6eM4h/UEPG8qzFgToCiLThMpr8b4SUx4Oj1FvsGh5yUPITPKpckFafMzA x-ms-exchange-transport-forked: True 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: 3398aaf3-643f-4a13-2964-08d75e1a0150 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 15:50:07.9296 (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: vH2D1pTpZDcyrIet843hYpC+VBTQj9kDtgVsyiYrYNhy7UP9GmIBOCw2jPxgJOCP30nV64XuUUXWU4JVhvaXuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3603 Subject: Re: [dpdk-dev] [PATCH v15 3/7] ethdev: add validation to offloads set by PMD 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Bhagavatula > Hi Matan, >=20 > >Hi Pavan > > > >From: Pavan Nikhilesh > >> Some PMDs cannot work when certain offloads are enable/disabled, > >as a > >> workaround PMDs auto enable/disable offloads internally and expose > >it > >> through dev->data->dev_conf.rxmode.offloads. > >> > >> After device specific dev_configure is called compare the requested > >offloads > >> to the offloads exposed by the PMD and, if the PMD failed to enable a > >given > >> offload then log it and return -EINVAL from rte_eth_dev_configure, > >else if > >> the PMD failed to disable a given offload log and continue with > >> rte_eth_dev_configure. > >> > > > >rte_eth_dev_configure can be called more than 1 time in the device life > >time, How can you know what is the minimum offload configurations > >required by the port after the first call? > >Maybe putting it in dev info is better, what do you think? > > >=20 > We only return -EINVAL in the case where we enable an offload advertised > by dev_info and the port still fails to enable it. Are you sure it is ok that devices may disable\enable offloads under the ho= od without user notification? Can't it break applications? Why does the device expose unsupported offloads in dev info? Does it update the running offload usynchronically? Race? Can you explain also your specific use case? =20 > >Matan