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 0749AA00C4; Thu, 31 Oct 2019 17:44:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A7871C2F8; Thu, 31 Oct 2019 17:44:42 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id F32D31C2F4 for ; Thu, 31 Oct 2019 17:44:40 +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 x9VGZbB9019850; Thu, 31 Oct 2019 09:44: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=4bIjHohPcLsTEkBu4Ean6ssBJA3GWZpDEjCzMu8kQro=; b=RYZQ3ui5yr3h2bZEb9/la4jpVutr1OADlWmRhhin0ih6Pufgu6p8u87yr51P5IUVViWA SON8WJQm8pQFck4Q+B7unch6tqCc5pUv+4uUEydY8mFIOgCNuFr6ux28xIv6B/DicT3m K5dog29P3ZiO5MjhKXVuqO9O+TOcObKpulOn7jPb2aYRm+Puobc3sO3aRtFjcz6NtKJh c1AUj+Pxhi+RfZC9p6yv7QOjYYuNjt6cjjfBv3jaNeST9qYK1kh/sQxYK5hDfDgUej0c yYowPLWYbgYkpbCDts91oMM9SaRSgKKzPVuViqFVzphOxAVlD6sxJKhKpGfKMyCoIqqR GQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2vyxhy17p4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 09:44:40 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 31 Oct 2019 09:44:38 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.50) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 31 Oct 2019 09:44:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FNADjDpar0/eE0UWuMo/znGFBgI0L63pxXGbFocKzmJLmo1vKUtJNjYNDns72W/a4q739BRCBAHcf/8kc72pUVh57xWlFFm/Ot8U9beHOGtgs1ud2EYTsFBUq0hswsp5wxohY4T6UCMBVWkzMu68xWgB8zMnXgj0R2REfoC44xC/P9kN8kpPPG4UpNLpHElhOR9SrozfLmDMx8vbgTmi2ESIdGgww5/66sFWFBwD4Ut5EkMbT8TjujoFsGRRP+0Me22IB3PoR5NAGIy603cxkDMBdDTVeiKvRmg4ky92JphikEKDGhCZkRpEPw5qiwesABQf0NL1vNSFwNQxB/pt0A== 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=4bIjHohPcLsTEkBu4Ean6ssBJA3GWZpDEjCzMu8kQro=; b=E+EqMWbZi870GrInv2NKRxsSjxRLuKMjSLIsqccKHvnpoZkympgIugv3aI2O29GlOLjE6SpwbgPelO5sXZgES5iEWqO9c03pk9WN+rPIZlgv403eTaFEou8XNeRc7GbxJEMVzLCa8TN1Ytq5rPmrYVvEk5UekZKD97D8Isb7h/cy/49jDGhmU0zZ66Ee0ME/eqenigaPsJDit10xzjtAThyHrXIX1EnzG4LCSE/0pBeaDUzgVaiEm5iqeB2fenqSnGBqWIPbl4MZUeuY2qr98lE9J+sWpK7jl9+i8e8B2aTjZxCpm6qLyZR5z4EYxiKCo7T7EPfOTrRRgRBH7mxQfg== 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=4bIjHohPcLsTEkBu4Ean6ssBJA3GWZpDEjCzMu8kQro=; b=EyF4xLhzQlkiG1ZKlZszabAMrxBtA0hGIdQhFlHI/dYp9r1oDQhM6jjYi/1rFdgLov4nxCSg+QGwR5JbgxCC3U3qd1inSzr3AcN7D0iKhYFlsTsGlgs4Rhj4I/Kkw1ybCvA/wP3nRbVowU3hcw2wjXWM1jIjvPw3sKN6OOqX0xs= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.160) by CY4PR1801MB2071.namprd18.prod.outlook.com (10.171.254.163) 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 16:44: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:44:36 +0000 From: Pavan Nikhilesh Bhagavatula To: Thomas Monjalon CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Jerin Jacob Kollanukkaran Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v15 3/7] ethdev: add validation to offloads set by PMD Thread-Index: AQHVjm7LgH609hVz2U+0Bosue0DmUad0ybeAgAAspBA= Date: Thu, 31 Oct 2019 16:44:36 +0000 Message-ID: References: <20191029050312.2715-1-pbhagavatula@marvell.com> <20191029153722.4547-1-pbhagavatula@marvell.com> <20191029153722.4547-4-pbhagavatula@marvell.com> <56162614.NpA4zj6keT@xps> In-Reply-To: <56162614.NpA4zj6keT@xps> 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: 1802ff12-9b9b-4650-8a21-08d75e219d63 x-ms-traffictypediagnostic: CY4PR1801MB2071: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(136003)(346002)(366004)(39860400002)(189003)(199004)(8936002)(14454004)(6506007)(81156014)(71200400001)(6436002)(102836004)(76176011)(71190400001)(33656002)(86362001)(81166006)(52536014)(8676002)(66066001)(186003)(229853002)(26005)(54906003)(5660300002)(446003)(305945005)(478600001)(74316002)(2906002)(476003)(11346002)(486006)(7736002)(4744005)(99286004)(7696005)(6916009)(66556008)(66946007)(316002)(25786009)(3846002)(64756008)(76116006)(6116002)(66446008)(66476007)(9686003)(256004)(14444005)(107886003)(55016002)(4326008)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2071; 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: hEExW4THKdEoNdOHYWBlLSNraUlXMf6WYWiQR9NfQgV4pSSLowSI8lLniDq8UQ9jEsEqpGceuKKK3CaN3bh1IvUr9cnTcUqDo8JhMBI6JCp5/17DW71nYc5fUNIXNVM3IOx+h15n1UTj2klypCZe5/xKlIQ3/xlhbHE034JAOkInRI9IHNU4h1/LNhuR7pg7kqNuYbFWk05JLwzosk16yPycTdIsKccjk+5FZCLA25f33qmFEYuV+VxhMIbitmJcPonO17uZVHUUTuj+xxt0PGjeVxdkyRwD9WGdluRLIthfMqqKh5cAuDHgWDvAgoCe25HfmcYzForVdVY4wiwjrxgFF74eF7kpKgVsU0JhY1vtz0b/dHAhr/ir4Dq0XSflMFg+An3ApYPBhBzqLwqL0QteLt2jaBypsnO9dwIGGRXh22N5TA+5Y5QFqIQJBc8R Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1802ff12-9b9b-4650-8a21-08d75e219d63 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 16:44:36.1653 (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: RhuDVOi1i3PNp4JPgRVBdNckpcKVCSgxbfxzAuftuFL8YQAffLU6KpZEsgs7dvWCxDvJK9mAJdV+PI9lDzjcUV0Lm4dQ+OalRz5YE1gXxUg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2071 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] [EXT] Re: [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" >29/10/2019 16:37, pbhagavatula@marvell.com: >> From: Pavan Nikhilesh >> --- a/lib/librte_ethdev/rte_ethdev.c >> +++ b/lib/librte_ethdev/rte_ethdev.c >> +static int >> +_rte_eth_dev_validate_offloads(uint16_t port_id, uint64_t >req_offloads, >> + uint64_t set_offloads, >> + const char *(*f)(uint64_t)) > >Please do not call "f" a function parameter. >This function has a purpose, please name it. > >Overall, I feel it would be easier to understand this function >with a comment on top, explaining each parameter. Thanks Will fix in v16. > >> +{ >> + uint64_t offloads_diff =3D req_offloads ^ set_offloads; >> + uint64_t offloads_req_diff, offloads_set_diff; >> + uint64_t offload; >> + uint8_t err =3D 0; >> + >> + /* Check if any offload is advertised but not enabled. */ > >Not sure "advertised" is the right word here. Don't PMDs advertise their capabilities/offloads through dev_info?. > >