From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20074.outbound.protection.outlook.com [40.107.2.74]) by dpdk.org (Postfix) with ESMTP id 3E378231E for ; Wed, 2 May 2018 07:28:32 +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=wfqC19anHOG1V2oG3RkB0QDN6s7JHCpsVfQA3JbRuFc=; b=pd3MiDXFqTl4y50K1LbZg5hIpPBxUoWq8mrxr0GHjOXsLS4kL/49+9ooq7cXU5Uol6SLO46MIpPrCk9hAI16pjY1y/HHx50iKvhtd1Tu1xqdoVdXLwvRv3NxJz45n9n//zxNlQrb9xpzv4zDhqkN2JkFR4s3UDBLmsZHSXnQRA8= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4330.eurprd05.prod.outlook.com (52.134.108.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.23; Wed, 2 May 2018 05:28:31 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8%13]) with mapi id 15.20.0715.024; Wed, 2 May 2018 05:28:31 +0000 From: Shahaf Shuler To: Thomas Monjalon , "dev@dpdk.org" CC: "declan.doherty@intel.com" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "bruce.richardson@intel.com" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] ethdev flags and capabilities Thread-Index: AQHT4YzFeU9f9yVeHE6Pi65E9Gt8hKQb5wlQ Date: Wed, 2 May 2018 05:28:30 +0000 Message-ID: References: <3264503.09g30QS5gu@xps> In-Reply-To: <3264503.09g30QS5gu@xps> 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; DB7PR05MB4330; 7:Hf6U4yLuX+TxA+B4xQ6HwTBqXXsj/9GVND2PCt5joeqKuBU58msApmFoS7aKGgdm4UMojIUHYA/E/ctyXW2KQarUjCPaRCLF15ds+5lKKZs8PJ6leD1PQNJ4toKC2vVkw9m7o1/O2HoOrpU5+qZ9+f1WE4bDgrEo3WzgJU+hlq5dxnyLVThxUJwvWX6sAB8W5kvUFDMK4aHR+SIIWqZj1uFVgdtmZ57TlHFAYc/apW+R3GEvpds30IENspHams5L 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:DB7PR05MB4330; x-ms-traffictypediagnostic: DB7PR05MB4330: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(45079756050767); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB7PR05MB4330; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4330; x-forefront-prvs: 06607E485E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(396003)(376002)(39380400002)(346002)(189003)(199004)(74316002)(4326008)(14454004)(110136005)(106356001)(105586002)(3660700001)(68736007)(99286004)(229853002)(316002)(33656002)(2501003)(5250100002)(2900100001)(2906002)(97736004)(54906003)(3280700002)(6116002)(6306002)(3846002)(575784001)(6246003)(59450400001)(6506007)(53936002)(53376002)(9686003)(55016002)(81166006)(102836004)(7736002)(7696005)(186003)(8936002)(81156014)(8676002)(6436002)(966005)(86362001)(5660300001)(446003)(476003)(76176011)(26005)(45080400002)(11346002)(25786009)(486006)(478600001)(305945005)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4330; H:DB7PR05MB4426.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-microsoft-antispam-message-info: w5zCiabhoD7IKl8xoOfFo89Z4vHAihFY6o0NWK7q6kEDSg0ribVghEHsADtvXILSK8Ns93E/I3HaME/Avcf6u9vYc8F7+4BaJsmpe+JslbBEWvy/4qtZ1s91kRW4Dq2J7LV2KIfptfpI54dWmweQT2Jhsn8kN6tv0RdKJtGUh4ruPPgXwGbgDEgpNgcMXZoL 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: 90553905-195e-4770-802f-08d5afed8aa6 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90553905-195e-4770-802f-08d5afed8aa6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 May 2018 05:28:30.9977 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4330 Subject: Re: [dpdk-dev] ethdev flags and capabilities 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: Wed, 02 May 2018 05:28:32 -0000 Tuesday, May 1, 2018 11:41 PM, Thomas Monjalon: > Subject: [dpdk-dev] ethdev flags and capabilities >=20 > Since DPDK 18.05-rc1, we have 2 new fields in rte_eth_dev_info: > const uint32_t *dev_flags; > uint64_t dev_capa; >=20 > The field dev_flags > (https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fdp > dk.org%2Fcommit%2F736b30ebf2&data=3D02%7C01%7Cshahafs%40mellanox.c > om%7C16eef57203764ae7fc2208d5afa3e448%7Ca652971c7d2e4d9ba6a4d149 > 256f461b%7C0%7C0%7C636608040838595097&sdata=3Du6Vxc6hK6cdWprool%2 > FtZZN6GuVi72gg0Uvxenf6d5r0%3D&reserved=3D0) > is a pointer to rte_eth_dev_data.dev_flags for these bits: > RTE_ETH_DEV_INTR_LSC > RTE_ETH_DEV_BONDED_SLAVE > RTE_ETH_DEV_INTR_RMV > RTE_ETH_DEV_REPRESENTOR >=20 > The field dev_capa > (https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fdp > dk.org%2Fcommit%2Fcac923cfea&data=3D02%7C01%7Cshahafs%40mellanox.c > om%7C16eef57203764ae7fc2208d5afa3e448%7Ca652971c7d2e4d9ba6a4d149 > 256f461b%7C0%7C0%7C636608040838595097&sdata=3DYyB0S2vzSQgXpU4XP5H > YEBb%2B35jUnGGOEbyWR4tsfxs%3D&reserved=3D0) > is an integer for these bits: > RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP > RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP >=20 > How can we merge them? > Should we move the capabilities in rte_eth_dev_data.dev_flags? > Or do we want to keep the capabilities in rte_eth_dev_info? > Is it OK to use pointers in rte_eth_dev_info or should we make a copy of > rte_eth_dev_data fields? >=20 > We need to take a decision before RC3. Thanks As I wrote on the comments on one of the series[1] I think the first stage is to distinguish between an attribute of a port an= d capability of a port.=20 e.g. REPRESENTOR is port attribute, while supporting interrupts is capabili= ty.=20 So I think we still need the two fields, but need to make some order. 1. Capabilities should have RTE_ETH_DEV_CAPA prefix and attributes should h= ave RTE_ETH_DEV_ATTR prefix.=20 2. dev_flags is not a good name. flags is too generic word. 3. RTE_ETH_DEV_BONDED_SLAVE should not be exposed to application.=20 [1] http://dpdk.org/ml/archives/dev/2018-March/094146.html >=20