From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0089.outbound.protection.outlook.com [104.47.0.89]) by dpdk.org (Postfix) with ESMTP id 2241B11DE for ; Thu, 16 Mar 2017 23:41:12 +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=ftP4uepxI+jDktpIfAOoMnO20hvfmKM2mjm6JAKh6R5YnxkEwyn0mSTIqx7uAKEHKHSqloeWJ7kvy2VGVVAwUgO5aIciX8n0fXsAa+tqP5P2R1Zb11vEHSZHJDVT0/3FkUB15MIN3R02rdmOkqK+2oG2NZ08v/Pms2hnnAslBmw= 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.961.17; Thu, 16 Mar 2017 22:41:10 +0000 From: Yongseok Koh To: CC: , , , Yongseok Koh Date: Thu, 16 Mar 2017 15:40:54 -0700 Message-ID: <20170316224056.19685-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170316224056.19685-1-yskoh@mellanox.com> References: <20170316224056.19685-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [12.250.235.110] X-ClientProxiedBy: MWHPR01CA0023.prod.exchangelabs.com (10.168.201.161) To VI1PR0501MB2462.eurprd05.prod.outlook.com (10.168.136.13) X-MS-Office365-Filtering-Correlation-Id: 9be47cdf-c7ea-4678-4bca-08d46cbd8c15 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:TNoMt4ZCXLJ7IR0P5S2C0gePHGVM56sP+faTf8aMtywDuLDPn28m3bFXwq8fJ76wLCMQKMLh2S49PwDHDXKjyv1offFLMkP60VCA7lpzdNw13KsSyEbx8Vb0wj5wQs73DtJq8qKqbHdIVHelayo680cI8sfDbIRs9TMZINOMzMASRPt8dFjxAra2rrZv9rO1lQ3tOnjlBorLkjWAfJ+Y9cOylVJrE6U4SiBAYWud7UJNbLB0iOg551lYxdmwq9m3y1ycEz0K5OrC81VnFK7RBakGbkM8/4Bt7ZY21iub8DQ=; 25:694i9BZoNrxhAqvRthXK/Me/OoM5ualf4mWbd79lhqm0neUMiPbO4pzDFijmN6BjPCjs59+IQnZSXpLbGsPZPJqF6qkgtKitS1izg/gtKdFAB7wW3Yd76ggZaO5qy7HmHa8Zd4l+z3CK++5pS7mC4iM442cYq/9c4mg9doMZWKj8p6EW8a4KVBYkKYQHBl7KPe4dz1FaHdbpgL9peSuJsUupOiTFzj8Xb5dGlrntmadU2cqGMa96e1DgeDCwby8cAgUBIpT25XiQVkElo/pbh0nUE1143aGVmDciC+zhVAjre1rmqKRpr4NSrmdtHaKDPB6Rdk0828fIc5TOI5bKc/5FT+Fg2hzzU1ecUmtit9OTH1jFdnx0qaR0Vaxg7I2bieu43WhdJQT5YoBW0YbEGu1RFB0FaTYKxHpLT/4Z2PbqGV3ARbI/7JA62/8iFenrJv1vsH7ii04XIf1vsyD0DQ== X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 31:ID+pAqYciV3/fLahhaQrW6EQw/i1lAFznN6oiBk2txHdk8E8JIon5DTKi6i/+LvIPpi4fCFU5XgfBXNCmUE89cpBrc8GtFrNxcpJdx3IjvVRJkzeGZVrTQUJf7ao8EZaTT79DtQL8mqSyllHJ2GPBlcDSdRI2wSbbMlkLahiaS5xo/4SV7r29c1LY5pq1cCmnKDWB+WsY8GBgqoXB/4TDomAAlglTX/3vnROx3mmlFo=; 20:j6SwmDhDUEY3n0uTME0F/E6GNi3n9/J1vt6zlen4BG4NLndi1a3lXDA+K+VkzWuR3cHyRPbCUof7BbHAbzhMHTnT05nZfxXGCJnFtKxi2U3bd1q4JjImQRs4dnqwg7of73/cSLfa6Kvmlh6I9aqNb3xbp0db0STv5dJekI1yRHlQiU/En5qZ11CKS7DbvIqILG7GtlEItKDDC8jtVgokB/CRqb4Nm+NDA2YlsUA7eqlcRZJTYdUIIFRpvSsOOawVOSWHfa/EyV7b8wUHlWr5X7o/qJWWCxrkJyh5/s1hUm/z4UQCCTmxB7BsYG7NmlkEauuRiLIgdXpl3nu+AqXsCcFgAD1d+k6iGl7TfWogDPy/TN1QxNRmcDwft/wJ2wYaaKwyzNXqo/GFImB2RZnpwocUJD2HT51yElkPmQH2aBkoAwyFUqzWfykHVc08bHwGB0LswKuqPQtJnxUZhgsC5R6b3IiEUIWmhnr52guY2jfmKmvDjRpSmgPIEQGuRfEC 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)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:VI1PR0501MB2462; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2462; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 4:QVL/o4pTygsuYM6CE5IlLBJ3tMy59RPFp3NbjuLk0mxm35UiWF2LQz3/LAIsvTIgYQfP2WKVAIUNXZOXjPORF9EUt/sUqfA7I/P8XTJJsr7VlZ/gaeXrezQCeEV7oqjLU13qteJkfpcMI81lpwp0aIJEg+ZiklZKc18fapke9MqT9dYVPhZ5PYtJq1gPAUGY4qHW531+QXU50f3Q+I36aK32m4DgVm7SOfL59g6Hn99igHdlDcGflAKO6zhhqDgw1ZWA80Vtz82h+x9BJk/nkpU+IsgMd3+8DikIX7Gq1gRzTpOVaHxj/c0UtNn1xhfttTcjvBw5+hYOTBCtQCwQNWeC7PLYLqs5ZA0tVFvoEg73PQoZ1d6ibE5KxE7hgCddcz3/GuCLIteistXKS9FzwOrA4PJ9SK9Z2m+3sbScOIUN8ALXc+uqOyyunofmZ70HQWTI0PfTs7fsFcf4zNiT/OZAq0Glr4HIto6SQ2Gz4S181RuizN3PRfBYUbcCGiPFYbOGYk717AXMyxE7RUsAbm2inAlaiJ9VgOXCAglShAxl6D9RjGmqjArILjXpQYH2RubaHn43DsPy9qNoCNcJ9Kws0RynUDOD6Jz8CZERrED2IAbQcPgJ58uWR+OiYb65 X-Forefront-PRVS: 024847EE92 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39450400003)(39840400002)(66066001)(6116002)(5660300001)(6666003)(4326008)(54906002)(107886003)(50466002)(110136004)(2906002)(38730400002)(53936002)(81166006)(33646002)(1076002)(55016002)(8676002)(86362001)(575784001)(2950100002)(7736002)(33026002)(50226002)(76176999)(50986999)(189998001)(25786008)(42186005)(305945005)(47776003)(36756003)(6916009)(5003940100001)(2351001); 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:GW1JxZ6v9Ip9y3dtMwHOwMQ71iu8IuOcgVu2zvM?= =?us-ascii?Q?idRpfvmsCeDhZew47Asb/OS+6lV9FVaKUbfGMoEdgM/r2gbG4N2tpE6D11AR?= =?us-ascii?Q?KaVVgxoMuQ5jAH6PZTLE3sfOTuie4RDh31rUexIlpDyjhk7emNcG7EBGKgwy?= =?us-ascii?Q?J3Q5C5RE5ArhxxbjbIEj13tzk2No1OqJ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uwod+aH5ktA43LFSVrg/3XYiQ61rnPvr2BvF1a3gwion/9Fa4K9sCHuXnYKahLVutAYmqHrYN1ELu16cAaRLuP/4wsu6QgE3F0gUesH/m8t0DdUwDtUAZXaPnceafCf7sNdvT4piNSf7fpuSJeMxRBQHFkW1PIutIrrg1+O8DezXyGQ9ZPPrrIMoHp0jbA5uvTkFOeImYtbVgLJu1PEuogGipHPcXFzXxYM3L/S+p9RISFfKdiqXS4uJLSoKWeSo8h1S9vDKLI+VFwLmXYY1mnS03vhH+t+bvDA6BadtieoWs6NihTMnN8JYiKQthWgEzPunzeAwC9thf+yiQAYLm0W771YmaXJm88L9ostM7I3HzfHoluaNdfLiMxy2j9ZF/XUKlU6gBdqot0s=; 5:e//E4/SmnP+Lg/t5bhovsFiavXY9fKy1d0r3PV22PWpaUBdfCrJhWsyEn03Rt70NeMcLYa351cCFzuphG4Jn7SJ71gzqfqEb8nlixV0REaD+6NYViz8h3JFhEAaz/v/tFcKjtf/PYgxxl5QNpJ0p0w==; 24:DSeCYI6TE95iAm6+D9YT49ZSvjh7Xc9jetVbuU+CRJ52gli+jDu5EKudUVicCeERsPmWH4SEoRKw/YxODiEencPQLHufNjWgvhqN54aj8aU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 7:9N30M5vQSjxb9FrumXa/WijW89rvre+ynPL30A70cztO35oJN8eD35Bke9CP/3jDA/u8AzYLxFrjoT480RO5yMFm2eTb3e1+MwocplF2su81cm0/dqk07y4I0rHkXkzahzfYhpIVzlKX1j2Op0zUnxarJxMHIORaoWsI3f0H3pRpidZWZaItRAuRiMJLG36onQJILKx0wd0wNN/PqH2dIG0IBqWH+R05BTruVgEdKoaE1rYQKDNFDYUK+m/FJCRXV07TEZxiE//B9oNjg55/aMx6p9+zEuAjIomymN03UWooWhDzA/xziVMQ7LbxyEzZbdnKfQcg/ii8pv5GMwKduA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2017 22:41:10.7876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2462 Subject: [dpdk-dev] [PATCH 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: Thu, 16 Mar 2017 22:41:13 -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