From patchwork Thu Mar 30 13:13:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 13194143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21981C761AF for ; Thu, 30 Mar 2023 13:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbjC3NNw (ORCPT ); Thu, 30 Mar 2023 09:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbjC3NNv (ORCPT ); Thu, 30 Mar 2023 09:13:51 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2079.outbound.protection.outlook.com [40.107.223.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0AAF8A7B for ; Thu, 30 Mar 2023 06:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B9Pc7SdIZAj3rUBCGQQRjQNB4tyqxRYL3Gdr1uJTmoSGO0T3qVbikaeYb85S+Dnqwua8KgCKzpap09JTpm4v0zK0FZvvQgltmWsx+LUOFcESr1VdWxLelkM/3JbPkYFQo8lKHq+PUUpb2CoOBe4TfblRQGdI5JMfsMyY820U6atybj00RGECf96+mrm2/eFXCwNf30E3cBEXcqHl+YVOkztic797K0GAMCb58CMLzdMvr/XQWIDoTR3u7J5W22eNlZSWjsiQLNI9ES3ZG4DjduoOtV+xrtlI3CKgtg9ebNJWOGY1/MICQMa3PHuOk0cSBHapQHaaM9yx1G0nzBtosA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=95bSpiYNBq84mooa77VzcRbH3MGgwiMkhQb8/pmxTg4=; b=FNlPEBvJnUn7Rsl1rn+zdaGZmGoochhsyNVSuHp2uJrf7xg8si1/jnCLAmQD7/IcpezysF4y9OgIddeMMVkPDDPAvPV3icmEerX9M8NeYWMQ+f6AeMEtQnx0JCAhy2Cgx0bSWeG/tymfmTU+HhmZxRVMJe0Z24LdZIo5Mnp7cOZf9FlmS0L45+46r/vxlCAVoPvHuVIxOBu/2BAOURQmNERRWwUIpVzwPFIGrNzRCyUulQqiUFqloaUuapaQQlwGSbOJw9YMR5/u2VfhMnyMCZfDnju79qjMHxAbi0BGkW9aNxyJQ3QOBcxBhh4UKcjy6PoneKfwKIsayCsZ0m2NcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=grimberg.me smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=95bSpiYNBq84mooa77VzcRbH3MGgwiMkhQb8/pmxTg4=; b=RevU5cn3eOYWMGeuCOArETWBLJLJQEL/WCCtWcOetbWFed4uIDNNN8yhK/tLYD/g5m2tYSW7IoNwYdOKgvq95y2yupXq6GVh4uXazE3BBLyllWgl2i++KReudOsui+/Nlr+lnabpgDLwzynxowAkBEoQerzDXUjzms52Q5r6huDYomjt24T1zz7/wFI7cRNlQcv9pMmjFTHU1pnFEgFAhympwxajJX16rvy+OXCcKZwD8ovstVTwiVnWLvbCH1H/mbMwVwo0OuhTHhSvRtczssFrb2U/gtG9hSTrmbqjl3IOHbOUIBuQ33ViPVhmO3nthl5/m870vKP7Aot1ByW8Qg== Received: from MW4PR03CA0210.namprd03.prod.outlook.com (2603:10b6:303:b8::35) by PH8PR12MB6795.namprd12.prod.outlook.com (2603:10b6:510:1c6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Thu, 30 Mar 2023 13:13:44 +0000 Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b8:cafe::7d) by MW4PR03CA0210.outlook.office365.com (2603:10b6:303:b8::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Thu, 30 Mar 2023 13:13:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1NAM11FT027.mail.protection.outlook.com (10.13.174.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.23 via Frontend Transport; Thu, 30 Mar 2023 13:13:44 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 30 Mar 2023 06:13:36 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 30 Mar 2023 06:13:36 -0700 Received: from r-arch-stor03.mtr.labs.mlnx (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 30 Mar 2023 06:13:34 -0700 From: Max Gurtovoy To: , , , CC: , , , "Max Gurtovoy" Subject: [PATCH 1/3] IB/iser: remove unused macros Date: Thu, 30 Mar 2023 16:13:31 +0300 Message-ID: <20230330131333.37900-1-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT027:EE_|PH8PR12MB6795:EE_ X-MS-Office365-Filtering-Correlation-Id: b456163b-b726-4db6-e261-08db312096f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QjJYhNZgX0KNOYPNa3JESELjHSjrzVksgM+Z4e/hKJeUOLixTc+fPdQOc3rNkoO2y0gYgEXAAU0ekfUrYlD4iJHETNy4p6W7cwKXtOyN1YuHCcrAbrHfpGNgLCqkn8i5z2cDPo6yp/cb3+p8KR1SUa6c1QcblhNHEFoBm8ioWpSepOfA4h0lJx7C59xD5nwP1Fxz3tGkqxZJYzPU1q/5zFTqhDVrMxt51JYSfe9C48kH/ghBbT5Y4DF3u8nWZBA9RqUBruBIhYMlx3bT/6QDnxOVo3skreWSZntKVVQsqxlfr79wtnQCrsFFFe1HU8pPB9W+vsk5/5keX9/kjtwK5qQqIPsiBa8WuvqhNKNf93t+JH6Ht38aewrC/5U5TZB/gpLIrm7d3B+fe7QSr7fL5LX91TC1lVcDzpgJKBkT5DkvCPeZ5S114mz2owUNaKX6uW59mHTSlc3btKA0RaLDVMGvrcBd/4fIlTS6WXoUov6IA2JJeKfOIKfeQPDmo4FnOQ4Uk+KYXoTjTW8mykMPX1xFnXo4VUhJh6qwCKIPh9/mRBidl6zV7i8bSGCwMqCytUEhdTAyPuPpBDYiD44M65jw6OwkrIQxUD85FTTsvEU/muEp+6QGZ9DSk+GTq+kRdbZU/EMlZ+AtY5Gag/yCuS0dGjI15cCeD1FwhaSeN5AA7BELU2v86PtkgAXkVp+8Vpnd8zEZhjnjfb9oslgl3MPXgnukRoElmsVs/8TTHT/DZi58IdWEw3KS2/KRExXyV6LltRLg46pB1CNCsNzbEuOVJY/45m1TISrQmdJc8Z+XJl3e9wbX5VCeDuVTkNRM X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(396003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(86362001)(36756003)(82310400005)(478600001)(40480700001)(40460700003)(82740400003)(54906003)(110136005)(70206006)(70586007)(36860700001)(4326008)(8676002)(41300700001)(34020700004)(6636002)(186003)(336012)(26005)(107886003)(1076003)(47076005)(2616005)(426003)(83380400001)(6666004)(7636003)(316002)(2906002)(356005)(5660300002)(8936002)(4744005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2023 13:13:44.3530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b456163b-b726-4db6-e261-08db312096f5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6795 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The removed macros are old leftovers. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_verbs.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 1b8eda0dae4e..95b8eebf7e04 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -37,12 +37,6 @@ #include "iscsi_iser.h" -#define ISCSI_ISER_MAX_CONN 8 -#define ISER_MAX_RX_LEN (ISER_QP_MAX_RECV_DTOS * ISCSI_ISER_MAX_CONN) -#define ISER_MAX_TX_LEN (ISER_QP_MAX_REQ_DTOS * ISCSI_ISER_MAX_CONN) -#define ISER_MAX_CQ_LEN (ISER_MAX_RX_LEN + ISER_MAX_TX_LEN + \ - ISCSI_ISER_MAX_CONN) - static void iser_qp_event_callback(struct ib_event *cause, void *context) { iser_err("qp event %s (%d)\n", From patchwork Thu Mar 30 13:13:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 13194142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A1FC6FD1D for ; Thu, 30 Mar 2023 13:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231932AbjC3NNu (ORCPT ); Thu, 30 Mar 2023 09:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231935AbjC3NNr (ORCPT ); Thu, 30 Mar 2023 09:13:47 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2071.outbound.protection.outlook.com [40.107.92.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E799020 for ; Thu, 30 Mar 2023 06:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6Q9Mkygc5h9NcYMHQ/TBW55BRrnCIz2/vT6wWln71VZw77JYyAORICvIbE7ivYa5Q+uhf+gmSzuUldRupzZm7BVW2Re4cy1o2UMOlAgxNqOAJ72BL+5EdSmoiWVWIoQLV+6TRzfTzC8ZQS0XpXjnmVEIHVtiKqydORvfZ4Zx0k7lyj7CzFynkSf15aFx5/6+Y+exWGmHEjFVyWeQj8iLUXyL2GCyULy3EgRd3h8c1QkFHtVsr5TpWZpfapzJKiPHHG3rMt7Jt43y7GxWhHJM1aKmj8TDxaDtWRXj9wT2XGnedNNN0bFNcDwsS4UUWk3nKsZcPoB/aQ3+k/TBOBDRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1SlHHg6CsupYgaHzzZhn3afJOGyFzmrjg+dG/gh9aoE=; b=O7TBHIeaLxplTHnL6ke4FxTHPWndlfFsh2G237h25tvKTzCdQKKnwBeDapLVEKz5q4Vl2WO0wKsuIMkJe25LcIuwwwjqVBXrwPG41QqooGMZjWtR5AB0ho9XChNSjRN/VAzIO+f8gqp6kdpwpXraHvqJlwH0tgTXyxFvI9rP6vpb2dZ7nJVP42eqOXrfZUKaE6gLQAQWIOlk0dN9QZ5Z6q/EWLytn5g83H6lwiTGRrwwPs6UBLL9GH003BWNxQJSNzA3IvwjSXhZ7X5CgBUm1rdYSXqkCqxRLQDrRQ+2eKK25brVNxdRXMdxjg4Qb5UWefI1Z3iM+oliMlrqNWwAUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=grimberg.me smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1SlHHg6CsupYgaHzzZhn3afJOGyFzmrjg+dG/gh9aoE=; b=djNxEErwlmVkdjVerTEnNgQs4zA8PSmj5jI0D59MKh35+6ErbZlVjK48j7g4AurCc5fM8eImrtYrAvTBh0Fw/5uV9++JE+53S2o7KNNkF8DGA4DICwgwf5buNIJ3jttrZ5T/I4S0qc2aRBbiEIcqfCSLo1M4ZfPM2S8wMHWNx/RxQ+hxNlWWn4EAU6NIsJ25MsZvUI1g+8XxCdKC3dBE5zj04BZIEA6jWwuyJmwmRTxkbI0zP/iZCK97m/w1HvEkfm2KbJll/SXxoZm0O18uMt2ti7/LlGNV1ueF9V4CZ3vPqyMXy52aAxNzUvvUM3Ql5JM54OKe2IysVpvthgnX7Q== Received: from DM6PR13CA0041.namprd13.prod.outlook.com (2603:10b6:5:134::18) by SJ2PR12MB8183.namprd12.prod.outlook.com (2603:10b6:a03:4f4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.33; Thu, 30 Mar 2023 13:13:41 +0000 Received: from DS1PEPF0000B076.namprd05.prod.outlook.com (2603:10b6:5:134:cafe::d) by DM6PR13CA0041.outlook.office365.com (2603:10b6:5:134::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Thu, 30 Mar 2023 13:13:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS1PEPF0000B076.mail.protection.outlook.com (10.167.17.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Thu, 30 Mar 2023 13:13:41 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 30 Mar 2023 06:13:39 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 30 Mar 2023 06:13:39 -0700 Received: from r-arch-stor03.mtr.labs.mlnx (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 30 Mar 2023 06:13:36 -0700 From: Max Gurtovoy To: , , , CC: , , , "Max Gurtovoy" Subject: [PATCH 2/3] IB/iser: centralize setting desc type and done callback Date: Thu, 30 Mar 2023 16:13:32 +0300 Message-ID: <20230330131333.37900-2-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230330131333.37900-1-mgurtovoy@nvidia.com> References: <20230330131333.37900-1-mgurtovoy@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B076:EE_|SJ2PR12MB8183:EE_ X-MS-Office365-Filtering-Correlation-Id: dd56a876-5036-43e5-8484-08db31209547 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8T0Xa12qcYKCtdUfv8+gRgL9OUmjfcmiCJL0zNDGZrZKjTyY1L0UC/IoMbovOgtLzpeVPzVEhRZxqxN7G1ZCi4+7NSF4c6IsLUMCYCE/BBExSgDfM7jFnefG/FnSSsNkjg7wnuRsELEG458m2P0Cr2CzE/oWjsAaVBfm3Nl6mEJ0lWF92plkY2r519k/iIjtiA57Lm8uA/7tXl1qR2zk/0NTc87QhQB/mM+0UK2bHgMyvXi3x6LVBw0kT69QOf1nWepp+xkVuDcu3W69ZOIz/jQJyyAI4VYxEnVY3wBDppTDbZjyHQ6smM8AF4zHShvMGAX8Q9hmmo0lPmh40sY2ahXl9sL8hs+TVU3ptapmMmjMvjapxTf4OystyBus5C6zwTI3Sq3fz3ZlspwiP7+XDh6cB27bArkGZZx1J4f0AmBUOD7lQEtPZKy1v2eWoGGqB0r1cqSOGEw4Pnfwm2Q5IWJ1MuPIDYx3xI+qaoBOqL0/q8cwhAkube0gAj42vsk358tC7kttJUmhccVKoS/u4CGaDKpYCH+/5hoJvmMp3uGVgb2k/tWEqyYlQvkTWWhBQAiRya1unuQ4ZvjlitWSzACLYbgfGDp69iexACHcd4MOEkMXr39Sb+2CrKtWVqJ+F8q8kQgxKeeSwb6HsaMfr2TI8Gq+wBzuxb7oB3H0g4u50v1DwZ6MSScd3h7d53rN4zVNaEk0I8fTpyHj5gB0exDwAJNBpT6PRtKPOYA6Tu3/LmtjLtlVZCU2ar5eWOmtus2XhRzJLX4LQZ6Wr0nThQ== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(39860400002)(396003)(376002)(451199021)(36840700001)(40470700004)(46966006)(336012)(83380400001)(47076005)(36756003)(426003)(2616005)(186003)(107886003)(1076003)(6666004)(82310400005)(478600001)(86362001)(110136005)(54906003)(316002)(36860700001)(26005)(41300700001)(4326008)(40480700001)(6636002)(40460700003)(82740400003)(7636003)(356005)(8676002)(70586007)(70206006)(8936002)(2906002)(5660300002)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2023 13:13:41.4857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd56a876-5036-43e5-8484-08db31209547 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B076.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8183 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Move this common logic into iser_create_send_desc instead of duplicating the code. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_initiator.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 7b83f48f60c5..354928408399 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -141,10 +141,14 @@ static int iser_prepare_write_cmd(struct iscsi_task *task, unsigned int imm_sz, /* creates a new tx descriptor and adds header regd buffer */ static void iser_create_send_desc(struct iser_conn *iser_conn, - struct iser_tx_desc *tx_desc) + struct iser_tx_desc *tx_desc, enum iser_desc_type type, + void (*done)(struct ib_cq *cq, struct ib_wc *wc)) { struct iser_device *device = iser_conn->ib_conn.device; + tx_desc->type = type; + tx_desc->cqe.done = done; + ib_dma_sync_single_for_cpu(device->ib_device, tx_desc->dma_addr, ISER_HEADERS_LEN, DMA_TO_DEVICE); @@ -349,9 +353,8 @@ int iser_send_command(struct iscsi_conn *conn, struct iscsi_task *task) edtl = ntohl(hdr->data_length); /* build the tx desc regd header and add it to the tx desc dto */ - tx_desc->type = ISCSI_TX_SCSI_COMMAND; - tx_desc->cqe.done = iser_cmd_comp; - iser_create_send_desc(iser_conn, tx_desc); + iser_create_send_desc(iser_conn, tx_desc, ISCSI_TX_SCSI_COMMAND, + iser_cmd_comp); if (hdr->flags & ISCSI_FLAG_CMD_READ) { data_buf = &iser_task->data[ISER_DIR_IN]; @@ -478,9 +481,8 @@ int iser_send_control(struct iscsi_conn *conn, struct iscsi_task *task) struct iser_device *device; /* build the tx desc regd header and add it to the tx desc dto */ - mdesc->type = ISCSI_TX_CONTROL; - mdesc->cqe.done = iser_ctrl_comp; - iser_create_send_desc(iser_conn, mdesc); + iser_create_send_desc(iser_conn, mdesc, ISCSI_TX_CONTROL, + iser_ctrl_comp); device = iser_conn->ib_conn.device; From patchwork Thu Mar 30 13:13:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 13194144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35CC5C6FD1D for ; Thu, 30 Mar 2023 13:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbjC3NNy (ORCPT ); Thu, 30 Mar 2023 09:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjC3NNw (ORCPT ); Thu, 30 Mar 2023 09:13:52 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2069.outbound.protection.outlook.com [40.107.223.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BA42AF1D for ; Thu, 30 Mar 2023 06:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SfLYKtV4ft5Qg3YYqHuufAhu4iRYbrqr2rJJjZoa6pLbo7Xa4DdPlEj94RAXJKQRO8fYBIynVdsXFtNT6Nvzo294/Wq+vYLAAf4nOg7pXpOooysHe5APuVTWWfiGZZWJEROUscPQPG61Mm2qFAy/2IAOlgJFko1tBaiZW+FVnX6C7qPehyTaSYzq50I71jsomjf/q/7OA7tUiNNOX6ERTBedR9tkUbtNW8aDoCOzzQr1/VnJ1YNNSZ8PBmh/+j7kX9BnfUksNjvelV4IBpfb08640x0kMCsvPET1eVxxSA2mDNak7NbEotydggHCGLnNhkgz0W0C/KMmRrkr8yf0Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P6W8y2/d2QQJqS2g3SEgm4WE5Xlj2uDgwT4EPBVbxrA=; b=kR58AdmcQRekw776lrpp0iNPh6i53LfD7BUhyPKbopht3PUYp0lZ032GXUPVXY+PqRvbdKNQfKPzhqRp+aibIV7V0tR+b0X6InKkGMnniT4v+b1Nh++qeOhpsLoQg25wkPtxOQa5wM7UhMTP/v5dLBGT+yhgkqb8NiYUfoQ5F+zLeFpbeLoyFuSSwL8eJJauORjorea6pqpDt/gmrsN6TDRUTF+D73/CqB/McGBOWeIG8xvlHhdvh1e4UHnzBdHQoVYbfbGcNhCeUD1pNZa7lYnYrQdr1dKavAn3lpxboLy2VqoQhHY2dbD3QlxhLQBpBoKZHSZzJebRVjTMs06xwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=grimberg.me smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P6W8y2/d2QQJqS2g3SEgm4WE5Xlj2uDgwT4EPBVbxrA=; b=YeC2sGj2Z7uzrsSYcxjDzW+8xGUQg2MlHi+tou/BeN/X+56M5x9ModJGS3a30o/KVskwGqAULSFQ+hiYaOpLc6MCKu09Gfw4uzjcHZ95PDUZQ+4CS0eefRCvAyXlbWuCqZA1G3DcpJUObez4UlG0C01WNW9r6FK2TEdmx/RQGBrfzS3MILRg5n3qzrBJa7wtuEX60Daii06jb1DzwJA9zGKkrLo1OBkxePcKC9IQ9XQdbuXj1c0NgPdXgaluxQyTJNAaUSOgrCJWHdd9N8WMW/IDlj3BZrFFzXtD1VzubahXgE6uVPYntfXd/HA2WzhniVqWC+WRnW/H5xHDkXyWBQ== Received: from DM6PR13CA0047.namprd13.prod.outlook.com (2603:10b6:5:134::24) by MW6PR12MB8733.namprd12.prod.outlook.com (2603:10b6:303:24c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Thu, 30 Mar 2023 13:13:45 +0000 Received: from DS1PEPF0000B076.namprd05.prod.outlook.com (2603:10b6:5:134:cafe::14) by DM6PR13CA0047.outlook.office365.com (2603:10b6:5:134::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Thu, 30 Mar 2023 13:13:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS1PEPF0000B076.mail.protection.outlook.com (10.167.17.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Thu, 30 Mar 2023 13:13:44 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 30 Mar 2023 06:13:42 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 30 Mar 2023 06:13:41 -0700 Received: from r-arch-stor03.mtr.labs.mlnx (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 30 Mar 2023 06:13:39 -0700 From: Max Gurtovoy To: , , , CC: , , , "Max Gurtovoy" Subject: [PATCH 3/3] IB/iser: remove redundant new line Date: Thu, 30 Mar 2023 16:13:33 +0300 Message-ID: <20230330131333.37900-3-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230330131333.37900-1-mgurtovoy@nvidia.com> References: <20230330131333.37900-1-mgurtovoy@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B076:EE_|MW6PR12MB8733:EE_ X-MS-Office365-Filtering-Correlation-Id: 23218639-7ad4-4358-4527-08db31209730 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QuvpJ37V9VkWYB8xNkC4QIdQEULocVssKV0/LrNqycfANUlQf168Tfkw0vOIFEyxVZIa7CYBZ1Uu3NICLu4uJByOyTQdS5xkAaAp7zVYvp7KX6RLCtLRWzE35e3Ow61RD2BOfAaIFn9h/B9+YnoHT0y1YVblhahjNa9R3yXwTJxWW+GdPZWIgtTvMmDqPBao13UqjfZ4S1lcYkWvgptm89AXC783GAC75pPnX7zxk59qxNkUR4cXPjwGYaWy+eU1EKLpO6mBvKIVoBBoXeRumzDeNxWiiXmzZ0iRKTEd2w5PcxsKI0+yuf23zsB9Hk9CA14Fzvt9zDt12dRKASH4f4fCSjVMWnd8C6sCQ+qyX0Q3PRHoj4NefAg9ZTEzmLVeOcKW8XwkgYHxG3jUsZ3/3ngqRbXrzNu7XwZ6MNTIYQ9q2R9zeUFh9VWKJjSR5y7FwHnyfcCxM322tG2RiXswuOI2UFV4q7ToL7tBQ4AfnkB/CkUe+HZ7J9Td7ab6b3Xrz2QIIKhrOj8kvT+RUmc3h+TNEW9+7Bj4yYzkLv2QQfPr4I9YOZhTcgfHygWc3J9YQSbHf9Z1t/WMxu1JppQ50bN0tPohKfWnmZw7D5gTGLDe0kRgF5dgFPcgBVgsHKLl+FN2X7weTAA39SCuvLR3gMI/RV6uxK4AcQBI7SfdyigFZLT/6/jm4JHaSKj5WXbSee9gGm8h9zWlsw15VvewV4hJgKVd50sey+2w8uuEl5+vvvYtBJ1+eO8RV6iqagObhPA8GDCpZm2Ry4t5nrM6Sw== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(136003)(376002)(451199021)(40470700004)(46966006)(36840700001)(1076003)(316002)(26005)(47076005)(107886003)(110136005)(6666004)(54906003)(4326008)(6636002)(186003)(70586007)(8676002)(70206006)(478600001)(36860700001)(41300700001)(82740400003)(4744005)(356005)(5660300002)(7636003)(36756003)(2906002)(40460700003)(83380400001)(40480700001)(2616005)(336012)(426003)(86362001)(8936002)(82310400005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2023 13:13:44.7044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23218639-7ad4-4358-4527-08db31209730 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B076.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8733 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org This commit doesn't change any logic. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_initiator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 354928408399..39ea73f69016 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -460,7 +460,6 @@ int iser_send_data_out(struct iscsi_conn *conn, struct iscsi_task *task, iser_dbg("data-out itt: %d, offset: %ld, sz: %ld\n", itt, buf_offset, data_seg_len); - err = iser_post_send(&iser_conn->ib_conn, tx_desc); if (!err) return 0;