From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0061.outbound.protection.outlook.com [104.47.2.61]) by dpdk.org (Postfix) with ESMTP id B2E1C133F for ; Tue, 21 Mar 2017 00:04:51 +0100 (CET) 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=ryFDhZVYVsmR9/v+x46V+WRuvOlEDMLjwXKJzbcERJU=; b=KWmst/jN/hUn162Okwdw9cpdC2FPZ5N/UzT4aHoeLfIivt67ZFh9mf0rakjWWS21za9r0k/2+vihh+7puTDD6P1PvZDkVDo9av5j5d+YOfDNKojnoAiPPiC76+Ni83DxgnErZH42COP1kaJ2aOsRM+yw4o8kbCGprbfVDQ0toZU= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=mellanox.com; Received: from mellanox.com (12.250.235.110) by VI1PR0501MB2462.eurprd05.prod.outlook.com (10.168.136.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Mon, 20 Mar 2017 23:04:49 +0000 From: Yongseok Koh To: , CC: , , , Yongseok Koh Date: Mon, 20 Mar 2017 16:04:33 -0700 Message-ID: <7783e46e840052a9abdd4e8962eede598ab848af.1490050764.git.yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: <20170316224056.19685-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [12.250.235.110] X-ClientProxiedBy: BN6PR1301CA0021.namprd13.prod.outlook.com (10.174.84.162) To VI1PR0501MB2462.eurprd05.prod.outlook.com (10.168.136.13) X-MS-Office365-Filtering-Correlation-Id: 26bbd2f8-daad-4d1c-d0e3-08d46fe58365 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:VI1PR0501MB2462; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 3:8MLL+S6B7zt5f/OdrlsU61HHQ8+QR7FIlkgFPTZNvVLkpMQYfAJER7ceQaxkGjyKKwanRVTu2/siUke7VLKAtDzdySUHy8bSiOEaUgJPZ3h0jZbItuIBUY7Le/XZR8HNVGEk5hoA9pkz6wg6CDt3A8U7AlwelvhrPFuggcNXqfghDcUJT84cBq5wRKBVhXUYD/8K1gGwaoJdHZID9zIoJAvHhmAH1MKg4l5LzhRm7nlob81c9Q8VzvTytW70Nt8d0sx6G1mvX9uZo0nBGzo3gAP0FbznAYlNdGmprjLSqow=; 25:jwTdKjyYY3bx+AtgBJMGjmn6ljVyvNtmysZCB7wvLpkOScXWgIWqMR2zFQ2JrfPo+WNkuAZPxUisc/6xE681iQ368vOA849XRDuN+p4HFK82Hoj63OjgEDekVWlBg/JOmvkse4S6dFQTdo0z5b7N0TQLsLqbICG5ZkbjKL+clQpSalfAXr6mraDfS84PpHqoBlqS2vBG83OXJdvRBbH4PgqtDlaFEDsmpHBchrMEHCSFFWYojJBVJZWbRV6bxP673F9DegT0qSqWFsbklEKzvnbfVnJSyOijiGzerFqanI5+bYfa6ZFgK1G5EweamYt2ZpZjlfHeESInZWoCvfcEdYtr5HUxRaQl5RSN5yShQT7gMh8TktPEuuWnREMO8t7zGh78tvnxCkqeAjjOG5bvxB1YJfcS1RJpvQg2XyqPIUZvUcpLkEObmxDBTg9CQ2SiMVecKRdkSAientbW34RA2g== X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 31:weLXzrfnQN2Sp54oTZJWGUDGk1lwwKmQe3qJLWhtiDB3i8jsrBeqUGW4pm8DoU+s9sBsf6QzsLIHeJ1SRoxi0dZJzE8fx72fMGXlMaAOvQRF4oB6fCoys3CvhAMmLMZtbwDKqLpqneTxmJ2SCJfIUHG9qMoaFxfunvzgxCw8uX22odnuQO3Eec9jetCNJTinMjVQ8fkLuJlGEDG1b4MchrmAIs0Y/5Yjv2uJOKIoFsyC0TAP0osPoU7uz80VKTAc; 20:/tYb0l1UeXbKuWWTQl2yr0eoos7aqYgwAZofB2Y/x9GTVtMwgHEYTrI34fnqWztyw58RlyqJUPEcyHr+YV49q3IOIKQ7CDVpibRmTHYVlOQ49Mz3NueV3cLdmn9TaO08X1J5/+c9g1y0tzo/ZnSdCuJ1F2UGE69LgXAYuLTswouEFnJ1vOPRkFwFEWPoZW+giMXa8AfuNn7gGeZkpVieJF8NWbeXdzNjbudYCF4xbVf7e12A4frK5xtBEw72La21irHt6J/nHXlD6AT6PuJVvSzjv2A5pG06U8p499CgIitAMQ0YJPZGREuxVwGPfCWu/M9oSbkoMi0gOh2IWio58lEmOiH5ZvuefmO4VVq7uUnBCX+KPVdjvkzXT+xUPmR9LUfY1X2cq+n8v6q8wX1k76k7ZCL7ihYQIAQHgHO06rkZtdhawMR+NwjRgP9QLDid99XSYO5qReaRtzWtBCSZAAuAB85MunaPwg96+6lxNFB53upSTITptoYw//BFKfC+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558025)(6072148); SRVR:VI1PR0501MB2462; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2462; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 4:4PdTebQBb5UHLyIxT2NT1oSUfJUowAqnKJZiQVYNBczlQQmYjf8MI0rdGnayg44yiRGe2zYMD73+bROyjCP+vCYWA8WWQC1jBEivv4OKGrcm46EF97wPmZsjhb38QkfTmSeQjZyYe8UiSmtfIkov0myssKzeVCZvhLjsngTxJr8HfZC4+xIZyaeTHO81bqGY/zR2VXMa1Ex5hm2zeJkmnLzDGjfwoiVCIJ/kqJtH8FEDCcO4mEkxgx0z06tzn5383o+R1pWtA+9lX4albX9LTj/LB/uSdkGLPOP/mwMZF5Y5SSQhVl4OaPz6QX/63IF5dUuw1LvnlR+WOr+7RdqGLTt66HnVGLxMItTbtfP5FA/FP3f0wyHJ59SOboJn7SR95TT+NRtJUPWUj6QWK+cVhc9rtUh4/HjVKn2gTbbsKXT2APaqKJ3QtJbYQs7cek+pcYC8Ay6mptyFmLvaVDeEnmeE4WUJbkaEyIL9P+q++xIW4Guxn0DTZcFci7zC9/sJW8TRNHr8RaRg6YUFobRnGGWockZwnAm+6yiFrTcCfdL1EmBHFdJ8u2bl6x+t0TEJGRoR2ocKGlIAbzmVqAOgyfAV4yMEAG7bms+f+xS1iFHFHwy3KvqpHDiYjubxBqSV X-Forefront-PRVS: 02524402D6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39860400002)(39410400002)(39850400002)(39450400003)(305945005)(47776003)(33026002)(7736002)(5003940100001)(118296001)(5660300001)(575784001)(66066001)(86362001)(81166006)(6116002)(2906002)(8676002)(107886003)(4326008)(3846002)(50226002)(38730400002)(53936002)(189998001)(6666003)(2950100002)(36756003)(54906002)(55016002)(48376002)(50466002)(33646002)(50986999)(76176999)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2462; H:mellanox.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2462; 23:0CvswtcJdX/nnoBxRbpOev/9vrD3dVeF/XJr+V4?= =?us-ascii?Q?NDSHOzkfHMPE0Q1i06nlJJDHQ18ZtPkAYj16RdfqFGcl5XCWQxLoIkgg0RWQ?= =?us-ascii?Q?8Miid++2PNwj+WZN8+W88KNu9rIEmuXfW4SGvy3u5fMV6PTgeL2LURzGbPPi?= =?us-ascii?Q?q0AZpbRbBXj1AFS4H8UGPbed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yCggD6oMr1f4dQFLGTtfQYnLQiXbsAoCq6stEV2Ig== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2017 23:04:49.4902 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2462 Subject: [dpdk-dev] [PATCH v2 1/3] lib/librte_ether: remove requirement of aligned RETA size 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: Mon, 20 Mar 2017 23:04:51 -0000 In rte_eth_check_reta_mask(), it is required to align the size of the RETA table to RTE_RETA_GROUP_SIZE but as the size can be less than the limit, this should be removed. The change is also applied to a command of testpmd. Signed-off-by: Yongseok Koh --- app/test-pmd/cmdline.c | 4 +++- lib/librte_ether/rte_ethdev.c | 8 +------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 47f935d20..463a77e5a 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2063,7 +2063,9 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf, char s[256]; char *end; char *str_fld[8]; - uint16_t i, num = nb_entries / RTE_RETA_GROUP_SIZE; + uint16_t i; + uint16_t num = (nb_entries + RTE_RETA_GROUP_SIZE - 1) / + RTE_RETA_GROUP_SIZE; int ret; p = strchr(p0, '('); diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index eb0a94a9a..806fff6ec 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1935,13 +1935,7 @@ rte_eth_check_reta_mask(struct rte_eth_rss_reta_entry64 *reta_conf, if (!reta_conf) return -EINVAL; - if (reta_size != RTE_ALIGN(reta_size, RTE_RETA_GROUP_SIZE)) { - RTE_PMD_DEBUG_TRACE("Invalid reta size, should be %u aligned\n", - RTE_RETA_GROUP_SIZE); - return -EINVAL; - } - - num = reta_size / RTE_RETA_GROUP_SIZE; + num = (reta_size + RTE_RETA_GROUP_SIZE - 1) / RTE_RETA_GROUP_SIZE; for (i = 0; i < num; i++) { if (reta_conf[i].mask) return 0; -- 2.11.0