From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00058.outbound.protection.outlook.com [40.107.0.58]) by dpdk.org (Postfix) with ESMTP id D16151BB41 for ; Thu, 10 May 2018 16:38:22 +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=xN6U/vZGObxkT7N767m9d0tYbzBnLnm5O4G7ErSH/uY=; b=mzEb4qrlsMoFPE/Rl5W6G45aQn/0G04WnvLdlCqEkV0dmgBRXqBhogmbDMfffVN2z17B2OHr5LFnniRYmfF3pHSaTNh8LbRI5rGl/9RmE+mLfAoKJ0uBHIdr2A4bCxBwhkX4wwuRnUjWrc5agRQEzz62Q02EQfknWPUPZv7yMOY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR0501MB2320.eurprd05.prod.outlook.com (2603:10a6:800:2c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Thu, 10 May 2018 14:38:19 +0000 From: Ophir Munk To: dev@dpdk.org, Gaetan Rivet Cc: Thomas Monjalon , Olga Shern , Ophir Munk , Shahaf Shuler Date: Thu, 10 May 2018 14:38:10 +0000 Message-Id: <1525963090-17097-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1P195CA0009.EURP195.PROD.OUTLOOK.COM (2603:10a6:800:d0::19) To VI1PR0501MB2320.eurprd05.prod.outlook.com (2603:10a6:800:2c::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2320; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2320; 3:u7+eBz4LAkSplMlsSN22RmDaOKOJ8qyAcVtmy4EkQDGXZAR1hl1zHCeSQi8mpZ7ZbCfLhrWF0pqakDSi/h4+hGSmIW3xXqR7dnM5C60evbj7fj08d0uJyLpOKRUAPcdyIfZvZM1ZVitrRRx7of5wKtopf0RoFS+ezaO2yj5YKQmn/qbgj8qvOAdmVZjeaqwHL2wIlK46osXrBIIjWBmmQxgIC8kB46+Lqn7JUp+yGL4DH4D0Jfst6P1gXfYjkg2A; 25:K0+5mgOOnWpy2pKkv2EDm3mxvMhoyCR9ZsNjbUR0HJEvwRC7VkB3RXCwoqQfVVsq7zX3Svd5WQSJvvPU71WmGkSwx0QsWXaSXf448UghOxfzXgoecRscACTS5hltslS04HC03xf+c7ZjG+ZMv1wTEzH9yG8iqG+nmr9mir56VHeKhyQB/yD4WxGEhM7d4NGnKqW7TQQ0W7GPJuneytEWcgNRIjXa5ujLzB6QzB7ui3MZsFPK/8LIyYgDIJ9W7x0rmUXGC7od2Ofq7veAPS0r/FMuFyOiRwS0aODmm8QkzObyr+0538ifGC9bCanLu06fU+B+Fa7g0UsBbJxgsRJwew==; 31:qlOJOQXPBH6Q77Z4waOYkUKMmqn0RJIqlW75WuDPEHlmnOUpfaIMM0TsuKlcU1Hgq00IcZzRRhouziThS0G4e52DUV01iFsnGO/uulAquVGtcckdaZF75Bd1yzl1G0eMU8McLYpxQAkm3Qf8563o/DqL0ySD8lOw/d2plokCZ+MiWXAD/h9ybIFR2k09cepPWzmcFNvsZDf8wgg8xZjfIADldVhbBI4Db0uFuHiy/Ew= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2320: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2320; 20:m1COvlb2b4bJmYdv8kBUOO0dcxkXtINL9dvqxvEwN3ugcPlNjtWEQCCm6s7xUmgvy7+KL21VDNdmcSzirS7RARx4821MKBRuteJSmNDecgUVJz60hHaXPozQug16W9Ej2lJgXiGVP910nBtcqcxrNYbZQGwrB1/HZBiu+vFre+CV2id/EQi1Qm1fPBVce4WapC64Vpwtb6h7daaCY2T/SR747HaTi1T3tXUh209LYZXWIGiEDhnJF3j8r2KpFXEesUmFyVl1SWxQV42AgbQTXkFwJWkean/OoLeQIGcY5wjr7lIuPgkKh9I9CjHHWq7EKFjJILWSrRSbxpxHP9LyZ+zjn39eHFJ0pdYhrMyQ2QS/6a2CY7edULTHdOWnpa8WtqZpN3T/hHgdhJR0cw5aq49+XTalJ5DoEySq/lGtIuFLl50VqL5nFVLfV8aJNOOXNB2lI7U6yKg8gbVoxxJxnMeKf1aMYVdcO39F3Du05E8w5V/dsLKUZwC3FuWBxs2Q; 4:5FFSlWbUZ4fOcprhDiqwc6SCbVDDZULzHtmbiw/ywEdLmYz+uNf4xd691KqaAQdG0KiWZnaSZv743Y4OJ0iId6u2Hlp8FbIInHvfcc9J4Uos0Iq0PwRugkrXWXoNB3Blary6klZl5ks7Tdlwa5DDXbH3EVU/MErry/2pOnmv9ORRuKP1jX7UWVj4AyJscI4Ckxxazq4SZIpVQVz9XmE3fPvMNp3qFWSVq+ubnT+k/fMnoP7GLGREKcUdwnQDgpmsCcxYxdZIcbPAZ4yjXzGtTA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0501MB2320; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2320; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(39380400002)(376002)(346002)(199004)(189003)(478600001)(2906002)(54906003)(48376002)(50466002)(8936002)(316002)(81166006)(8676002)(36756003)(81156014)(16586007)(50226002)(6666003)(6916009)(7736002)(4720700003)(33026002)(305945005)(5660300001)(26005)(105586002)(956004)(66066001)(486006)(106356001)(386003)(25786009)(51416003)(59450400001)(69596002)(21086003)(7696005)(52116002)(97736004)(86362001)(68736007)(3846002)(53936002)(15650500001)(16526019)(6116002)(186003)(4326008)(107886003)(55016002)(47776003)(2616005)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2320; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2320; 23:twMLItyKYFNY7E8wo0gI2CWTaHo2CEZLMAFUz1n?= =?us-ascii?Q?Jxk+VpJZUQJkLi6q2qw/ll6FFuTVerRhDcXqf63gcNMSoC7Unr9RK86yx3pV?= =?us-ascii?Q?mR0lUrZF+q/BJG05f5kmcVc14HsrPylmndmvbvekFS3CMNbxAqVt3y2JVYyG?= =?us-ascii?Q?afQSEIM3aHgqv1/EvNowfr+1XKYp3K4hsYZ3nJNUBn1rvRIwAfLz+B28DQl8?= =?us-ascii?Q?smKFzGBBZjI5MaPhh7EjFZ2iin8XKZxwQNOnqW40BNQN2iOPLK2Yaq6NCVVm?= =?us-ascii?Q?9uQ9tw2+MhbdCiJTeQYKY0QAaZarRMcQOEOOJ29qWeSJBp8uWd6n1GiYhFYm?= =?us-ascii?Q?C0PH33K2UuupoN/W3FJNtzef4+sozW4Q2GIhv1383u1L95exVQ+YEejEFrj6?= =?us-ascii?Q?sCInmYWS+iazwNcZkOTg+5AMLAsqcl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=3D?= X-Microsoft-Antispam-Message-Info: SMYnsxT75kLE2hy6PNQL4maBZlKc0swajkmxEUJiLAWFBCN2hFpBfoJUUhvVx/3P7g7ChpQAqpnYt4wjQcdsl5B2CgotqHRT+AfMllTfv1HG3D+u4832VGpyO9YOH7YqgaZTk9rGuZwsypUBlKniDh2Qs7JvVhmOvkm0tQdNnHJrt324GkCeZMZkce8d+Zuq X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2320; 6:e518sBKwg7kKBbmskoir5O8VbimHHO8wdVXLGhgGI6i/uGL68ikZgnS2K5grm7H9NxrE7HnmDC59ol1IvDXfBN+3u6OsAtIj1i3Pp2RfOJXPe7fASAAdmMLCXw1Kl9GZLQ2M92Xy56ZqxW9lKmM9Wqup/en+9dmT52s+Q0uXzM6Ha7gamOcstbn8hd93ud5E6rrxbtHOAtGwNye/N7kcx5ntuYfhPCmaI6IcHq+dtKoaGk9IXatcUMUt6tBUmEVzlYLRO18i8GyZ/2SAdumFbiRMojTrksEsvy5qYzcJqLcgGdo0DkLQdh6EOzR4ELinQuGbFX0guQqCJs2Ru/bWmnokG2QMDjkMRVNtPCk6CptYI7FB8+c8EOUvHGZdi9p6WNmIkjNOJXUhjR/g3I6ktI+xLhIp2uLrPv8+8nRuTOlg1l3aCbxxfh34g4klhAWnW4UqDDsK2ISuMyq/VM28pg==; 5:S5+OlPSaNGAPLwmK42LrkDJo73Jbnf7H6kaUhFjLArYFz3kBVhS2yTYJgWAg6jPzHg1l7v/zDK4RekR3jOEehxDhg+YFavTTj47gOo23phcRsJt2OmNApiQULMNngnQA9D14aThzPM91htwVlTw0chsbXigJDS+PV+/Jm2iZCvc=; 24:HOmTOw7Nu+MOZBBOZyq6LFbFGMkEnTyZm23R82+pceeshSTF0AZKRWksD/AvD8Sgxkw0pJNaDDrckvy6l7W66K/ifU+/mdabRsyj3XbIrTk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2320; 7:4f1LdFMW1PWGUSm3SNsAoXGbNZ9J6yiVWPWtPYF8SrNYOXJmxvM3VxOFBB8WqOwh5B0sffKmbuqYrfDoa57CbwiBkS/8DPDV3MMbfQnkOv/39AS5CbFdUtYcNFKfDhdTQ3EGRngxB+0SMQBZt0JCy5pH33bi/lch/YoHc/ApZQT2M2W4yA6YapyRasU11zZGYLr2t0zY4Mf8iZbVY0LgoUKd6ysv2NsQIygOT6AXSMJ71zJV84NBpwGGgtxb+cgJ X-MS-Office365-Filtering-Correlation-Id: 799b85d9-53f0-45a1-6136-08d5b683ad38 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 14:38:19.7011 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 799b85d9-53f0-45a1-6136-08d5b683ad38 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2320 Subject: [dpdk-dev] [PATCH v1] net/failsafe: add an RSS hash update callback 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, 10 May 2018 14:38:23 -0000 Add an RSS hash update callback to eth_dev_ops. Signed-off-by: Ophir Munk --- drivers/net/failsafe/failsafe_ops.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 089f114..d04277b 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "failsafe_private.h" @@ -947,6 +948,31 @@ fs_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr) } static int +fs_rss_hash_update(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf) +{ + struct sub_device *sdev; + uint8_t i; + int ret; + + fs_lock(dev, 0); + FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) { + ret = rte_eth_dev_rss_hash_update(PORT_ID(sdev), rss_conf); + ret = fs_err(sdev, ret); + if (ret) { + ERROR("Operation rte_eth_dev_rss_hash_update" + " failed for sub_device %d with error %d", + i, ret); + fs_unlock(dev, 0); + return ret; + } + } + fs_unlock(dev, 0); + + return 0; +} + +static int fs_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type type, enum rte_filter_op op, @@ -1005,5 +1031,6 @@ const struct eth_dev_ops failsafe_ops = { .mac_addr_remove = fs_mac_addr_remove, .mac_addr_add = fs_mac_addr_add, .mac_addr_set = fs_mac_addr_set, + .rss_hash_update = fs_rss_hash_update, .filter_ctrl = fs_filter_ctrl, }; -- 2.7.4