From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700088.outbound.protection.outlook.com [40.107.70.88]) by dpdk.org (Postfix) with ESMTP id C3B511B4EF for ; Sun, 17 Jun 2018 15:31:49 +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=CwOkpvitzt/ZpeT0c93JBHDpywmISwVZU+ZEUYZGpqs=; b=VPHsz7gcKv98yUKVOlHZKWY+XwGc9bkNu5ICfvvsEKfBZCSr6brWZZLlHEdL8nysvJ67cPSceGfWFS5BUOLs7HBnrYlxWZpdK6wo4hlR2PT5InmLAfcYLpHmftIQv2VA8e6u9NcDVIi33echFsWqgZfqNXLFTB04hpxWvm7i3GY= Received: from jerin (171.61.94.72) by CO2PR07MB2518.namprd07.prod.outlook.com (2603:10b6:102:12::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Sun, 17 Jun 2018 13:31:46 +0000 Date: Sun, 17 Jun 2018 19:01:28 +0530 From: Jerin Jacob To: Nikhil Rao Cc: dev@dpdk.org Message-ID: <20180617133127.GC7498@jerin> References: <1528481718-7241-1-git-send-email-nikhil.rao@intel.com> <1528481718-7241-3-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528481718-7241-3-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [171.61.94.72] X-ClientProxiedBy: MAXPR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::17) To CO2PR07MB2518.namprd07.prod.outlook.com (2603:10b6:102:12::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fa66d07-34ff-4095-9153-08d5d456ad28 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CO2PR07MB2518; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 3:U2e6x19tXV5OPv4i1aHyf1IxNxXgoYHHhQpBl8VeVvIh5Vsac0N5wsuwDERx12wmH9I0fqzEPgVf6kh19kO2O6f5uIpIN7FlwITvs6+H0MXnVJ9cZfXzObhmTvP/j0WejxlCLt1xBPhW3boumcj3eWJgsT/1ADjc9VSFOM5CStPvzbX5kGt+AqxZh7yyOQce9SAFMMpUMjDwLldRCJwjKQdWZ2rHKT1kxP6q14SHjMBNLjjSWD/1jsuIpVJCDKKC; 25:KljbWt2XUIhNsb5JtK1gPZtoVLF1JXEbE/vuNfzUcqW7SjJ4mzumNnEhlSYCGHL36Aa+D9nLm99x3H8PQnwOi6wLZeavh/C5Mn2fugje8gOfCDvKnQcqeIVL5Mx566e1gyarJOU8a8uYBguAZEFdcg3aaOFrqt0/qhhGA8N4EYHB6W2HbaggJn5mvLURXBAp7ogPclx7LBNJ5TtDTSwceIvRcL/tM98Oxa6cGqIZTtcH0Jsic2oLJ+7aioVfxwWRC9TcD9NSIovNcMYXJr9Hsx5AdCXVQXFMkD7oib+ZoKl9W1JGGgjHXQBbolDMUjgZby90ifMMURCZZFrYEvNQeA==; 31:4A5Izz96GCMbP5Fu6o5qr+kqDj75gTHPop1DfsIBTv/WRqdPJzn7W+tiX6li7/h4g2TUUX4M9u5hLxXYMYFkKBl9l5zHCexL6GurBwEjIWNzU2vpLoKhOcqxY8zxmZhAeS0ntc8QYEPp74sc3jmVDT4AVyuiQzk29Wpk19lWKA45NvgNdz5uWpA0jZ/WIad7QfUcRo5W04mehVNBG1oBLF6DNwCW0BiF10aX1ed/KKc= X-MS-TrafficTypeDiagnostic: CO2PR07MB2518: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 20:IyE/eA1vkuhIARGLCcDqy3/IWoJY04/woLoPMTcGuz3+HCf0joAqwEVtG6tAB05i+7oB+gCoTAWomZBAh4Nzp+RvMLbAp0zNw56Xc73Zz46eB/I87aOargDKiAKjqOhpKrIwouo8JEsIsblF+pGBAK2gEnS/AQu0u+B8Up+mW0D/4wO4ts6rLhul5Xn/ebdfTC8hDAPFT0vJIe93GglOX9CoT2VSRGYTDMrLHGucMPn45XdQwZOe+6/gRHX5kz3S8jtwBADf/F/rvPIlyZCSmXOYPqONVDr536+eqMyd3AXxJObiuUJWmYOIW5LP4iGCUvlKkW4XmKA5e9OUC+YAs9Zz2BEDc9PZb6dGvgqtVqKbFRn82lOKDkEr+mgZaUhkLFh6ufVW0H+s1l8v6uV/dl7KMSdbO1EmY/aj7cg3s1WVHQhz++OfbklcHsRKQxBUK5/xkw4PHDevd04SdMYgoEGmvtQdQb1wdnf5hOFd9ZI2P0Wj25Y84pABlO5bk1x5Tc3bHS6Rd5ECt3rr6At4u7297cNRAZNMEPAdkVKHndEQIgF/jW6psUYhvOKpJA9nfKZnt9EQeZ+bD+kydkZa651Yj8NzUwjcQH05HTD0sBM=; 4:gYXy2FOOxw7dB+y/7OUpglF3fPobDCcNB2RRZuIEZq1nNFYX4jZt4ymUYBzLjARzA9MlPYig4TguwL5HP7tSwrET8mc/vc5R4rFwmD+AMBHfwbfndMhFS+6RgUZfcQR8JzZBi7OflCyA05Ajts/ftNtEl/rmpCPjfVX7ERE6e1/TYQjxu8HR7zQy+SrUKUroFc1nEshKnzFdRbfaLEoNJroNkOh6oIlYoOM7zN8HjQrA6jP2m+oaB2TfyS+DmxVzWsT0rUHmTVABWndPy04nWbLrs/72Cxm7MBXL3jjaq/bhdpTypCx2sTHMw+x6g9of 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)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2518; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2518; X-Forefront-PRVS: 07063A0A30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(346002)(39380400002)(396003)(39850400004)(199004)(189003)(13464003)(316002)(58126008)(72206003)(6496006)(446003)(68736007)(50466002)(55016002)(229853002)(33716001)(16586007)(52116002)(956004)(478600001)(486006)(44832011)(476003)(11346002)(42882007)(26005)(66066001)(59450400001)(8676002)(16526019)(81156014)(1076002)(33656002)(25786009)(305945005)(6116002)(76176011)(8936002)(7736002)(97736004)(23726003)(5660300001)(81166006)(4326008)(47776003)(3846002)(186003)(33896004)(2906002)(9686003)(6246003)(105586002)(106356001)(386003)(6916009)(53936002)(6666003)(18370500001)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2518; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2518; 23:1uf//gGoZppVvsSdd7hsorqqXT6iPrdnS2gsLjUWN?= =?us-ascii?Q?HXq7Vp1TqZIJgSVufwP61D/iPaihygpCNg66Xi5cDCYfLZlFGYPcRR9SrYBv?= =?us-ascii?Q?SOmDNbaVwyrjmmsL1JsRIFbK27M2THnkJYASFbbmvFLG3HY37sYETE47wQQB?= =?us-ascii?Q?o7btH/5szZt8DaEfsH6tgA381wXOvj07PFZM6DTpgVzAQWC5KKrr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8exg9V1vimumSNL7jwXCqVGm0gAee8vBh7P5t3V0Mn9sBw==; 5:Y8qY+Ou8vHZK+ZYyg5kAAeF1u/AnPLdFPn8iqpCxRleIxczXreOF4OZmz38VcvyfQvBY+JZYIVM7qfPZhGTphP62Ikf7fReC2DKnzFFIIT8ukNhfBLzsw00e7DOU6LMcZp4C/3EKLTy32m0LRM4q+WjGgq6sShQzHhqvADwB0W4=; 24:GdRCuwgKWXDJZwkC/0LzXxDhoYk31Rq1tv9cb4a9Skgvw/FVao3xWvTkogo+UfOd9j3SxlQMi1NLW68rt4bQ2CTLERfYu5q2qlFvc5834Tw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2518; 7:dDXm2NWNp43BxFgtrS9UTYKJyN2lf9wXHhVyjXAUOwfUH2Rwn9l5/YqxEwzAN+D5xfQlp51z86T+rWf21ussBtwVlcKdwEM3KbwZ8uyBUll3B3HRaTCRDSys5na7KAyXK5U7dkkcP/yF6rDvbwpLqmy6a1QjZsj4tIw2cUB5j2Lax7t1iDkfPjVZf1S6hX5pXC/QJD7+gaGwuVTINNRLH9ERmGbr7zxh78d1hwCOuEiPJ1RSfRJJ45Brp7oN7KtC X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2018 13:31:46.7425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fa66d07-34ff-4095-9153-08d5d456ad28 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2518 Subject: Re: [dpdk-dev] [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue add/del 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: Sun, 17 Jun 2018 13:31:50 -0000 -----Original Message----- > Date: Fri, 8 Jun 2018 23:45:15 +0530 > From: Nikhil Rao > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Nikhil Rao > Subject: [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue > add/del > X-Mailer: git-send-email 1.8.3.1 > > The new WRR sequence applicable after queue add/del is set > up after setting the new queue state, so a memory allocation > failure will leave behind an incorrect state. > > This change separates the memory sizing + allocation for the > Rx poll and WRR array from calculation of the WRR sequence. > If there is a memory allocation failure, existing Rx queue > configuration remains unchanged. > > Signed-off-by: Nikhil Rao > --- > @@ -995,7 +1177,6 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > struct rte_event_eth_rx_adapter *rx_adapter; > struct rte_eventdev *dev; > struct eth_device_info *dev_info; > - int start_service; > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); > RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL); > @@ -1038,7 +1219,6 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > return -EINVAL; > } > > - start_service = 0; > dev_info = &rx_adapter->eth_devices[eth_dev_id]; > > if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > @@ -1072,16 +1252,13 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter, > ret = rxa_sw_add(rx_adapter, eth_dev_id, rx_queue_id, > queue_conf); > rte_spinlock_unlock(&rx_adapter->rx_lock); > - if (ret == 0) > - start_service = > - !!rxa_sw_adapter_queue_count(rx_adapter); > } > > if (ret) > return ret; > > - if (start_service) > - rte_service_component_runstate_set(rx_adapter->service_id, 1); > + rte_service_component_runstate_set(rx_adapter->service_id, > + rxa_sw_adapter_queue_count(rx_adapter)); Please move this logic under above !cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT condition as rte_service not valid for internal ports. >