From patchwork Thu Jun 2 00:07:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9148815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D07760751 for ; Thu, 2 Jun 2016 00:07:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73461271CA for ; Thu, 2 Jun 2016 00:07:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57DA2271FD; Thu, 2 Jun 2016 00:07:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE5D9271CA for ; Thu, 2 Jun 2016 00:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbcFBAH3 (ORCPT ); Wed, 1 Jun 2016 20:07:29 -0400 Received: from mail-bn1on0056.outbound.protection.outlook.com ([157.56.110.56]:2944 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750931AbcFBAH1 (ORCPT ); Wed, 1 Jun 2016 20:07:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=F1o/pAinyYcmVjsZbePHAFkBVefPrSQX75a9sFvFTXA=; b=dF++vsI/tBZdGQUJ8EgABCoCD/nMxlo/XjPF615Wbro72zkjTHn18Y3PdtfrAsxo0yu3C2Bbd9Km4Q0dbJNqy+PNIYry19sLqZOryWFoTsGOeBWgG947vnEeYg73UkmS3wRPNvKpSe9k4cD9vbvPBqoOBKtxlsTVm4lPSzho1ic= Received: from BY2PR02CA0046.namprd02.prod.outlook.com (10.141.216.36) by BY2PR0201MB1926.namprd02.prod.outlook.com (10.163.75.156) with Microsoft SMTP Server (TLS) id 15.1.492.11; Thu, 2 Jun 2016 00:07:24 +0000 Received: from BY2FFO11FD044.protection.gbl (2a01:111:f400:7c0c::119) by BY2PR02CA0046.outlook.office365.com (2a01:111:e400:2c40::36) with Microsoft SMTP Server (TLS) id 15.1.506.9 via Frontend Transport; Thu, 2 Jun 2016 00:07:24 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD044.mail.protection.outlook.com (10.1.14.229) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Thu, 2 Jun 2016 00:07:23 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id E8.8F.03023.5C77F475; Wed, 1 Jun 2016 17:03:20 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.279.2; Wed, 1 Jun 2016 17:07:21 -0700 X-AuditID: ac160c69-353ff70000000bcf-50-574f77c5d4d0 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 39.2A.02607.5B87F475; Wed, 1 Jun 2016 17:07:20 -0700 (PDT) To: "leon@kernel.org" , Sagi Grimberg CC: "linux-rdma@vger.kernel.org" From: Bart Van Assche Subject: [PATCH, RFC] mlx4_ib: Make steering support independent of MLX4_BMME_FLAG_TYPE_2_WIN Message-ID: <2a929a48-559e-41ad-c42e-a722801c11d0@sandisk.com> Date: Wed, 1 Jun 2016 17:07:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsWyRoxnke6Jcv9wgyVP5S2m/FrKbPHsUC+L xbrX71kcmD3O39vI4rFpVSebx+dNcgHMUVw2Kak5mWWpRfp2CVwZXZd5C+awV0z9sZitgbGJ rYuRk0NCwETiyO9pjF2MXBxCAnOZJL5eWsMOkhAS2M4oMacjEKZo0foDrBBFSxkltnU9YwFJ iAh4Sqz+OI8JxGYWsJX4++UzWJxNwEji2/uZYLawQLzEg72/GEFsXgE7ie9r94LZLAIqEvtb PoP1igpESHz6/YUVokZQ4uTMJ0C9HEAzNSXW79KHGC8vsf3tHGaQGyQEmlglXp74BXWousTJ JfOZJjAKzkLSPguhfRaS9gWMzKsYxXIzc4pz01MLDE31ihPzUjKLs/WS83M3MUICOHMH490n 3ocYBTgYlXh4V2j6hwuxJpYVV+YeYpTgYFYS4b2dDRTiTUmsrEotyo8vKs1JLT7EKM3BoiTO 63bvS5iQQHpiSWp2ampBahFMlomDU6qB8YJj8Wx+PzezRdukrpyYMK+YXWX58zWcN9awf85K uDBpo6BZnRRLpVF9T+ld6dgYqZXy1zqC4w9ypOyNC5e0rxe8N/1Nv8uRhdl5y7yjtH4qHrP7 Hh7ZpHorju3sLbE126Kv+K7ZUZf2X9bJ43PCjpR5j44xrbf616+l8Nq0/j5jmkzTAdUsJZbi jERDLeai4kQAQnYw4FwCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIJMWRmVeSWpSXmKPExsXCtZEjRXdHhX+4weOlmhZTfi1ltnh2qJfF Yt3r9ywOzB7n721k8di0qpPN4/MmuQDmKC6blNSczLLUIn27BK6Mrsu8BXPYK6b+WMzWwNjE 1sXIySEhYCKxaP0B1i5GLg4hgcWMEs+ezGMESYgIeEqs/jiPCcRmFrCV2LK5nRXEZhMwkvj2 fiYLiC0sEC/xYO8vsHpeATuJ72v3gtksAioS+1s+g/WKCkRIfPr9hRWiRlDi5MwnLBAz1SX+ zLvEDGHLS2x/O4d5AiPPLCRls5CUzUJStoCReRWjWG5mTnFuemaBoaFecWJeSmZxtl5yfu4m RnAgcUbuYHw60fwQIxMHp1QDY9lt88IDXievpP7/un7jfFWf+pXKh17GV24PNlKJOdXP8vbp jNdrZrCU6NVuuxMx1XM9xwczAw+DnSwf428Hxm5//kF+7SMe8bmXeRJarTqetCtPeya0b4l5 5EyZn8eu7w30CXwk81JfUf6uwYNVrp8ylVpf+xbOtyne+pM/0HbeThvdy7e0JiixFGckGmox FxUnAgCdkwaQ1AEAAA== X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(9170700003)(83506001)(92566002)(77096005)(31696002)(54356999)(86362001)(5001770100001)(87936001)(65806001)(229853001)(586003)(5008740100001)(230700001)(33646002)(4001350100001)(189998001)(575784001)(8936002)(50986999)(81166006)(65956001)(106466001)(6806005)(11100500001)(31686004)(8676002)(36756003)(4326007)(2270400002)(53416004)(50466002)(5003600100002)(47776003)(2906002)(2501003)(23676002)(65826006)(15760500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1926; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD044; 1:ODNTyBphfAWE0iZ/1Vde3wsGVKt5O18rKJBrupq4wY3dDtYmPImuxI0fmXAQXgbX+SZqrvqpQTIEKCuOjhhDR4//wm3FqO5kF3SRBOnj6yXvkoJBmjmYCEz+e2OJjAaslbHWz/7Z4oBJTo1eEXF3sejhLdJIJpf2S8UrYh94T2vv0tdkvL90v/Gg3ujb5or3ZBlMzODoGDab9KsVxf7K2A+mBApM76xRNPQhs0xMOE83KURTVVcbM18R68xMde3pEKvjAGVGBGe3py7InXtneLMX/uHRHF1jbE6RuT8x/u5eNXvu5xvgJj6dWw9J8Uz0ctFYQIBYei7ATR+aDsh5vVz3/eLv6nl/lZeJRhqWPrR7ZiLakGNG+pSD+l3FVm9qduYTN+t0vXfeEFlramN1uIoqYWG01J5Wj1684PSlkhI= X-MS-Office365-Filtering-Correlation-Id: 7b5ecd54-b703-4a09-047e-08d38a79df92 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1926; 2:3YlHS+jR9rF6fIrkexnW7wT7l3LSoui13VwQ75dCcHOqrot34t9kOupKMMtfTbvg7rOmj81EvjRLnxWgUeyRtu8EiEMoh8QDvqruPgeO6CSK3Su1T3VxtTMwGPiH+n9756+pnXeh/aV88vAYv3wZs6jjwRlzs7aeUAfJffaHebJG+LhH+uLWa3TmrQd+vexE; 3:Cxq/czNWePttCFjjTgIzDP8ch46gC/3wACjFreGSBSPE+XGRhUheS8ysov/1/UAVX7wZ1GUzPJac5LLgt0GXvZ+XmCoHJ0kRumVpK/xCtSOr6UVQc5HIlqPUU6/7+BZfvhrcxrH256h6k/qzR7bzwvx1ca8U7gvZtGGvTQ45o5GLwQ4hUP17T4qqnzXn6MDM1QPDJp8sHGRUpcv02OLSVuHhy5Dzkld3BoXZ30YlzxPOHRznW+eoMzWgG/V56d5mTxp5+NYJz0WVuGewkfysmQ==; 25:csQ0BGaTSKV/DzV53W3qiKzwGDYwxGXDsYOKm1lSeA1flGwoTLTDs+Zed1ZS9z9FWPgDcoCsT9V44F7Nw+qOOliTCTU5N+ylMiGv0CX6GZIVJf+agn/PrxARO9VxlgcqFMpIXi49Dbelffrq7TVRcFcV0eNsGs+F6H5QdzGPaXb++3M13YXa9TdThCYnSRgoGYHF6u9rxIV4SjLBXQmzzv1d35+WAyVAdzR3bPTl26m6SUL0SgX/p+4LiMNkqQHgsRsO+zGKxvJ4PHd2tJMeuI4TmL9lRldye3VxcFv6TruXy+eHIYEaKv8eMaA+PrUaBY3KBVj6fkLTo0ZVuXLPcs25afTboyHKWm+IZsMgfje8BiDhF1xw3pIbBcC2D3Z16G9RsTtGbitzebJ/v+hdFDt7pasVoZuR8thG+9rPLyE= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR0201MB1926; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1926; 20:femfbOWLL2XJm4TGHhcG5xFcfiMz/zE/9Jk+FE6cTNNltotJvYBraxGryZNqngi9bRBuDR/KQXQta91wEyYJbg5tcYr4QQy7GNE1txKJyZqESmxfGTnlerRD7KJadmglS2KohoJ2RTluq5qMQYPgtG0UKSrSm78KO36Qp0z80yIVIM1wLeIfltC31LVPiYe8fmVGcuYlx1bHlRZVYcpRFftCQcUOPnqwcHwfTf3+YSjQl47iz3NezyyDebqo8aGAeJan0Os+4bHyXDMJ0XGh+YM22ZpHZi63NJIQL9KQqYWyNqq5+X22I0jCT+q/Kcgjf8YMewWwfqKtw1JY2faoZGruRjwcuyQRTdeDNksL/FlAKw7MScelbFV7rHqbmUd1cJO6Wy8jGWScyl6nUXE+4JqvzskHbzTE0YFtSWciKYDkZpzaTWq2HCf+iiVq2YpA/eoxsKyJszY/44jXaPdu798/dC9Azi1QbG5rGAVjLhTu7L4+ips99x1VzuDQvRuT; 4:KKasfrRaSojfxSg8yiiw7CV23Sq07eljJLTvcH52FfHSjyUX2K6vRSX2E8FCgJzHk96V473hQlBEdgZzY6rJH8f7gtt+xqqcZt7rt/+9/IkIGhV3zcE9xZ1rTfYJxivV6eo8bwYWixxuwp/TRzFbrJtr/t9Z4PUJGHWTWs8yxrUWCiIy10CdbLGjK1aKlkF9F4Y3T/eHGd3SOmH7i9aFuIyesHQQ6kGkH/PP8oi3pPlZ4lh7lMDm0wfPmG38uPImpBsyXIIbeIHmyjA9SRfVD7J1WxRCIIHixQJUhAX8nEruwOd7NAiUpvhu1+CAwuz1iulp1Yx9eSBbA/tKPo460JdI/fOuSRs4YCbT63TPrV6BCubFVzTKy7silJ9xBWS1WrWwS7Y5dEEtxEKwWdYjQyr+xQ6s4uIo7Tqf k+r0pEA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(3002001)(10201501046)(6055026); SRVR:BY2PR0201MB1926; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB1926; X-Forefront-PRVS: 0961DF5286 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjAyMDFNQjE5MjY7MjM6dnI2UjJyQjRFd0JlMzVPc1VwL3ZLL0N0?= =?utf-8?B?TmRiajV4ZjA2NUo3Zi9WSSswZEhmR2RDQmlTV1dVZ2t4NnVMc3IxdDIrZERj?= =?utf-8?B?bzhTTFdDTkNBZ2hXSjdKNnB5YnVvZ0lYWVZ5SlVyQXB1OVBvSERiS0N3WW9G?= =?utf-8?B?enNEZzZMWGI2UUZkYy9zVVBDWVBScXNvTzJTWVUvZG1hSzFIV3I2dVkvWXVv?= =?utf-8?B?Syt4aFRiWlBZOCsvYVB1TEt1TTdCSWxmZ2h0ellhWEhUN3FmWmkxWGJyMDVN?= =?utf-8?B?Q01JSnVTSUc0Wmp1cEp4Z2pzWUNhVHFzNFdqTGdqUEx6NHdWL1IweWNKbzFB?= =?utf-8?B?OWpmTHVuM3R2eTZiUzdJK2wwUjJrRnpYTFV0MWt0K2Jze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UkUc38ZhT93bG50BKW7YTUp31uPTuyag23jc18kPh2t SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2016 00:07:23.5624 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1926 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, Can anyone who is familiar with the mlx4 driver tell me whether or not the patch below makes sense? I ran into this code by analyzing the mlx4 source code with smatch. Thanks, Bart. Reviewed-by: Sagi Grimberg --- drivers/infiniband/hw/mlx4/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index b01ef6e..db7d0bc 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -505,9 +505,9 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2B; else props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2A; + } if (dev->steering_support == MLX4_STEERING_MODE_DEVICE_MANAGED) props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING; - } props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM;