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 07902A00C4; Thu, 31 Oct 2019 17:33:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 535581C439; Thu, 31 Oct 2019 17:33:44 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 68EAD1C438 for ; Thu, 31 Oct 2019 17:33:43 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9VGXASg017319; Thu, 31 Oct 2019 09:33:40 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=ET/8/7dZep61SwoUeSl4xde4as+TytWbiVQuXvh9X8s=; b=Ej3SiGFlq35Ib/grjQZe37UihJ/PN5rRwiWF7nhfZ240stD5yETRpt6aZGkByGDoQe+1 OZvQ5hxjJAWov7bFdf0FVPO6aUvLk+rKG9LPRjhQeC6Cti9mMR7S+iiLcg+1TtdB4h0E I737d1WhCRTN7r1OGsw8HWU2WGuedY/YB2YlqqZs0ijFa4jScJwEKGL2TP/4CnhwPUPd /Pyzo/dRgLfovoUQSG7RLUP6EX+KxN/I7GylHgnmCrZgd/14cjCpwCHpItRLogtW/VlN pqYuMqoDVu/eJuCF+RRE9WDAlClP28hnURPVKBolidj5FCV923GxOuHMBAlWuYMRtPq4 VA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2vyxhy16b2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 09:33:39 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 31 Oct 2019 09:33:38 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.53) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 31 Oct 2019 09:33:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gEJWznRtKsUC33/gltRZ+ZlmnFChxMOBguGfeGzgpV59ZjoJUqQNiVfXWfaqAF+dQGlzBjbDFTU8HUNTK06amqGDYwiRmYa+w0BC4B6cJBkfp2eMX2jjiPOUvj3tkj3YKwm5T81+OjS5ChbNVX1c7L3qQ6NophtmRQIZ0v+V2E4f7qBHYozkbLsXuaFnt7SzsZRUDsniN2ujdKWtFh6OfE/3S6Bo/E4QyHaNbIjFpADLZGkdv3V4gZ/fDIn+LElfYkmlUhbQruV59exb3r42grO10eauR1yrA/t1dZU0pf+4GJjSsQxGi2EUSX5qardTXKV3m7/HvdnVwaLkHXNLoQ== 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=ET/8/7dZep61SwoUeSl4xde4as+TytWbiVQuXvh9X8s=; b=HI/4T/p5w+6QtCUH38xHMnLgaQFc8oEIyBW8mM1OTEz495Ko4gP2X52hxQ1qrjHw1fc1HD/s4vquqzj3HJMjBKC+HMf3KCh6h0wGKX90epln73HOmOR+wI9LebXU2kiXrDzRg0zkw2OVg1js3M2pkUuV/rJYBDiTa/V2r++0cRmXETyv4G6du96fUeFdOfq3kgiZ3lH4DblOczuaPrcM+TKQbYlwN1K0a51O106rPey+jdB35XnVvIGnJJ4hpHsjBYJ1x5jA6SJExmENQTLUL1xgiMip03SoNib578zh7arHJUwRLzcwSrpOzp/k4ZYueAWWmtVkOCxazC3WbNAo+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ET/8/7dZep61SwoUeSl4xde4as+TytWbiVQuXvh9X8s=; b=f9lRDoD4egOxBvfpjcOal2yy/YoH8gyyDnpghJfq/cqEqDtQH72HXIdX8v7D5vZChZGOY7/QKAg1/BWtKrMMK0ZFqMoqbbS3Gqpx+zIXtIReXDIapKD+/2Q29PeK144a0pT+31zipAmOeRyiNcKQS7D+IDedxHUEw4THB6RdmPQ= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.160) by CY4PR1801MB1832.namprd18.prod.outlook.com (10.171.254.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Thu, 31 Oct 2019 16:33:36 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::d918:c54e:c3b1:3167]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::d918:c54e:c3b1:3167%7]) with mapi id 15.20.2387.028; Thu, 31 Oct 2019 16:33:36 +0000 From: Pavan Nikhilesh Bhagavatula To: Matan Azrad , "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: AQHVj/3DqpizzDhlJkau/TIA8ai6Gad03KhwgAAJGICAAAvdgA== Date: Thu, 31 Oct 2019 16:33:35 +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-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.171.125.115] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 92ca4121-205f-4cef-9ade-08d75e2013ec x-ms-traffictypediagnostic: CY4PR1801MB1832: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(189003)(199004)(25786009)(476003)(2906002)(33656002)(5660300002)(3846002)(86362001)(2201001)(71190400001)(11346002)(66446008)(478600001)(446003)(66476007)(66556008)(4326008)(64756008)(256004)(110136005)(71200400001)(14444005)(8936002)(81156014)(486006)(76116006)(66946007)(81166006)(6116002)(74316002)(6506007)(6246003)(6436002)(2501003)(66066001)(102836004)(7736002)(305945005)(76176011)(9686003)(14454004)(99286004)(55016002)(7696005)(52536014)(26005)(229853002)(316002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1832; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VonuKXnhI62D5mH0ZKTgMjWkTVQ9+bIJagbFBNnVt5ujJqDGRmclB2xVkH29jEEyNcsLw8i7Myb91BOsBPR3nTIkbppE2BMNv2dutdOSybSfmjAPKpszHBLawc/5ngthYXqb7ChDBfSVzNnRwgCwVf3yzOB7Doxij+Oy7MEOAEvTMDJe2zFr/FZogBjj4ITCsiyfwA27M7yNEbw/tLLqPE7w0s/nNG37TbdzYcljz4Zf/Ko7LkV/XkBVsPeFCD9qolbS9IU+MCYPQOI7KWZZzu8vscMoLMtoPIDT2RRq6DMvv2a/lcjVtOXX9/VJU8FDW2mNjxRtusACs/sbef6dIEX+oWfBHytF04T6p7iiIqZNZRX3b36tnXLm7VgFuVQDM7ejKeG25rm1dCFCHObdNXu15O/H0s3/nweHDikmwIrEbRiwKrRtU518lpmPOxpj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92ca4121-205f-4cef-9ade-08d75e2013ec X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 16:33:36.0393 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: c8zeRVmMeUu/QFaYPiwrZB/jbiNCzeflNSG8O6jMLObHcBy5FUjdLKXnVz7feVHQ0gaHXSIobw7mkrmTzNjiTW7JnitZb6u4Sd4BOUs4LV8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1832 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_06:2019-10-30,2019-10-31 signatures=0 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, >> >> >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? >> > >> >> 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 >hood without user notification? Some devices already do it. The above check adds validation for the same. >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? > > >> >Matan