From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0066.outbound.protection.outlook.com [104.47.37.66]) by dpdk.org (Postfix) with ESMTP id C6FB05B30; Thu, 20 Sep 2018 08:38:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=34/Cl2DPmUPuTQo9DzQTSuUHLm0UtDOb8VnFS4Pcl/U=; b=CjhjW581rtTG5DCThFbJzXKWyo9gqRnZA8Aw8l361yhNN9PLmyvOnoCD85S1Ew4dxcLEQGZsgM3fdf2zCaHWRfUywp3L/VHFFvYYt1Og/06oD2tIOo/fyeEbcEbyBoni7CCPPqwzA9sjjqkxZ5KAEEQ8AyYsDTJG5E+rNPeWVps= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BYAPR07MB4997.namprd07.prod.outlook.com (2603:10b6:a03:5b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Thu, 20 Sep 2018 06:38:12 +0000 Date: Thu, 20 Sep 2018 12:07:59 +0530 From: Jerin Jacob To: Nikhil Rao Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180920063758.GA2283@jerin> References: <1536225103-181590-1-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1536225103-181590-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0010.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::20) To BYAPR07MB4997.namprd07.prod.outlook.com (2603:10b6:a03:5b::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d4278d4-9fc0-4aa6-8bd2-08d61ec3a441 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4997; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4997; 3:J3WAAgPYVNbjn2nqQVqZeRpBzVfNjyY6LfIsr8/WszhJOyaxmm4CcI5z8khiSo+0cjq6NfREqDMXtnXMa3dkmBw8oRxYZBggpiULtsnsmdMxg3WffiSboZEcZdmlEgMweEpYXIorvzy0ITzgWti0ozWwduQUCNhhpU59ZsYOhBWFOPUqwt2pQMYX3kfEish3pFBNGmUInJ8taoyeBYHLRHrweRKlMUwUElHFM//5ENkRie80Vy+3HA7xONg5yfiU; 25:PEMA9PrZOHK5E67gHZzejljPjpVvEGLWVeHFGOxwLavVEOmOfaFBww2gpI7TfGF0ig/bJcKhrVnr+q8dTwqYpQxwr7wmPfbF9IzGweRAnLnx/PJh+D8A6rq46r+HU8RL3pjdWMHiz14osmM44ZJPXanIHYFU7F9pZ4vPDhbsGgXTqQk7nZ5Yb8vUXD4f0VG5aBvPjKnrWhDNkLfWZhGKcZ1EyHtU+YPT8xppSloZVqA1mqm21QNCCu5yK3AhRb21+veZAwUV99JjNyGrkkXzMaH97XLoItC2tL8C5apnm9c8glPIeyURRddFDrLhL+++uUCAcTYj2eG8xE+7CrPEtA==; 31:4UtWYvEuopINgbXQH18X4m0JRo684JYLjD29mXRxFbPFFmKAhKBYqMO4z53b7pIUqrjmFTi68ZA7gM/9UwdnBBk7DNv+QmFZYvxCUCX+HRyjjpgUe2RYgMIRpiA+WRZqPHYivat2TEoPGwwpzBgm6CHihKUZ+HRjL4LDh2KthMsO9E+NmOiUonC1peqAR/Nb7v5PTyBxgBrJIm5i2XlL7bNqcq45ppU67JaO3/3dAJI= X-MS-TrafficTypeDiagnostic: BYAPR07MB4997: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4997; 20:k7sJXAv8EPWVLNLOxj9pyb1ji1f2acj1TlxSoEpk0WBaV3BEJ/iDieI+0zRR7CFE52HaVGRKJQ5staytepBe9x6CN9ljpgMFe2fJSLlLut1c4up7P0legbLN6598Dx3r5JoZwvc3SNK4Q9wsiXf/ZJ9NCC0xFqwDFXE4efjD2hCZPeQ1rbjs/7MF0aTHRPHAlQw6rDlCmnC7MAqP/0YrqGfFU+FxrfwchCAKDoxvHBmSaG6ZLgMGw1UKkYQIcttyLLaxmNI3QoeANb35A3BGCvPw4fregTKIFLrG4Y0ZIpJhUqwOfFV9Eth5kwGm+EtVX2WGsfJzbknp8itlkxlbSUcCkdfMqmPPeJlMJwtbptgGvKVXXSWw40etZFXNlu24Liw6n+gEZ7Ca1prUn0KVJCDrqt3Bk1n0WVK3Ue5i0eBTk1hDIfdUF6gy6u82i249oZFld2XxqdYslKoJ2KHR0XQB3g/nUsU5cS+qLiq3Pf8gN62O0Q6eOfWewFTsZ8lAGq5L+WZEQu8ntmprzSk5Ulp+1OJFlNglqtlTsDr+hlE62nZn4ZR8hX4g8zTbz96J2kJM8Njixkh+xnu/D8cqtJ061YDB6B5FK/I8LU8pWuk=; 4:qLePAbOzm3zg2701gEt5FSTltMDVxbZxN0EuihnrIw2biP7CEOGX40a680KK1drLd5CQyv7Vz9++Q0FsoiaUxUHHXIkzHxRttzb1EFjTGHUORwEqaCP/5C63DZGiXGOBwSoC7ihAb70s+172Fi8rr0Ezgp4brflVMcwZyICiZ+RrUKemri1d9kD6KAz13nFR+fMlkCbhlqkotISNjHEjlLmR9n3afbuw8VRquhzSeXSzeNWEj51xlEx6kG3ewFW9KZeaAQS4WtfDW6T6VXIO0lbOWxbzID2xJMGvEyMulKH/dGH4faWoJwEUZbjPSD2v X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(93006095)(10201501046)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051); SRVR:BYAPR07MB4997; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4997; X-Forefront-PRVS: 0801F2E62B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(136003)(366004)(396003)(39860400002)(376002)(13464003)(189003)(199004)(486006)(6116002)(16526019)(33716001)(3846002)(1076002)(956004)(33656002)(229853002)(305945005)(5660300001)(58126008)(16586007)(186003)(386003)(53936002)(446003)(42882007)(9686003)(105586002)(26005)(25786009)(11346002)(44832011)(50466002)(106356001)(55016002)(4326008)(316002)(2906002)(7736002)(72206003)(478600001)(23726003)(476003)(76176011)(68736007)(575784001)(14444005)(81166006)(81156014)(6246003)(52116002)(6916009)(97736004)(6496006)(6666003)(8676002)(8936002)(47776003)(5009440100003)(66066001)(33896004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4997; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4997; 23:esNvpOUd8jGL118q0J57rOzTRgx+sDIdMIWCXna6L?= =?us-ascii?Q?J2qxOGg8f27FBAkx1rgKa0XO47qqVE3R30xfk8PJBPZTCPJ0tp0+gq4/dnPD?= =?us-ascii?Q?+Bfwl+RLUhG+HRCog70emYW6hJnAr7eesIFZK0fRDiWJ/63cKW3LbBDEGO3f?= =?us-ascii?Q?xKJ9DDi1NyPEyoazF07iQSd2vaJdKWAiJyxWiZDVSBZO+TRJlZEqCxo4JCDM?= =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Y3IiDgF0d2hR7VivzT1+26b7XW15PIHyt/AndBKtg9il3b4rZGSgOFekfHMuh4tqQBf1Pt1slNpOk0hZRT2qd+iPUH8VokM7zCn6ABSNUYiGhuAuyeQzd72q14AeEAmZ2VyVJ3Sq65EBBLwFuX+EBjoZvPtMTe7H2Eu/J9Afa5y+/07Dsb+B01d2nVflBxTvv2RqQRQw==; 5:66wzAW2CzAwMOruTeNM3LCBRpLiDuAStZIq7CR9I2N3BAoEpnS3ySSj/tZBSJeNKFj05Ux3jin7tjLPCTpuOPr09aR51nAWNyCGghi91qaWvyYa2XqAKrEXpFfo3N/Q/WLVRRlJTaZ0O8emjvgbvNqXaLNoeFCTYihMjpX5xtcM=; 7:z3hEUTBqerqvGjMvDTlefw+lRGy75m8C6JT/EHrnBeBgWW6CXOJ9fMUM5fG/kreIDxWoAeRaNpJ+GWGHLLXSg5OI13KFkhvKA7Z168o9BP01FzDo2msvB/EX1557USxjNsUdXZ3xiCi6oVahYOA0dYzurDL5nUNBAqYQaVcEGH5g+JDS8jXklOymA0mSaiDJ5PyoffmI18ih6UNrPzVkFu7+jpCYo2Alh57c91s1pxpV3WRndHBjQnv5X0+bItzM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2018 06:38:12.8779 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d4278d4-9fc0-4aa6-8bd2-08d61ec3a441 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4997 Subject: Re: [dpdk-dev] [PATCH 1/2] eventdev: fix eth Rx adapter hotplug incompatibility 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: Thu, 20 Sep 2018 06:38:17 -0000 -----Original Message----- > Date: Thu, 6 Sep 2018 14:41:42 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Nikhil Rao , stable@dpdk.org > Subject: [PATCH 1/2] eventdev: fix eth Rx adapter hotplug incompatibility > X-Mailer: git-send-email 1.8.3.1 > > > Use RTE_MAX_ETHPORTS instead of rte_eth_dev_count_total() > when allocating eth Rx adapter's per-eth device data structure > to account for hotplugged devices. > > Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation") > Cc: stable@dpdk.org > Signed-off-by: Nikhil Rao Acked-by: Jerin Jacob > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 5 ++--- > lib/librte_eventdev/rte_event_eth_rx_adapter.h | 4 ---- > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > index f5e5a0b..870ac8c 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -1998,8 +1998,7 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > rx_adapter->id = id; > strcpy(rx_adapter->mem_name, mem_name); > rx_adapter->eth_devices = rte_zmalloc_socket(rx_adapter->mem_name, > - /* FIXME: incompatible with hotplug */ > - rte_eth_dev_count_total() * > + RTE_MAX_ETHPORTS * > sizeof(struct eth_device_info), 0, > socket_id); > rte_convert_rss_key((const uint32_t *)default_rss_key, > @@ -2012,7 +2011,7 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > return -ENOMEM; > } > rte_spinlock_init(&rx_adapter->rx_lock); > - RTE_ETH_FOREACH_DEV(i) > + for (i = 0; i < RTE_MAX_ETHPORTS; i++) > rx_adapter->eth_devices[i].dev = &rte_eth_devices[i]; > > event_eth_rx_adapter[id] = rx_adapter; > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > index 332ee21..863b72a 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h > @@ -76,10 +76,6 @@ > * rte_event_eth_rx_adapter_cb_register() function allows the > * application to register a callback that selects which packets to enqueue > * to the event device. > - * > - * Note: > - * 1) Devices created after an instance of rte_event_eth_rx_adapter_create > - * should be added to a new instance of the rx adapter. > */ > > #ifdef __cplusplus > -- > 1.8.3.1 >