From patchwork Fri Jan 29 23:17:01 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: 8168631 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4630F9F96D for ; Fri, 29 Jan 2016 23:17:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69E4820340 for ; Fri, 29 Jan 2016 23:17:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B73020328 for ; Fri, 29 Jan 2016 23:17:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864AbcA2XRH (ORCPT ); Fri, 29 Jan 2016 18:17:07 -0500 Received: from mail-bl2on0066.outbound.protection.outlook.com ([65.55.169.66]:50784 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754030AbcA2XRF (ORCPT ); Fri, 29 Jan 2016 18:17:05 -0500 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=slfqEjejQdZOQqP+e8m00Dm0DqcCukhdrvPwkhu+Y7I=; b=rX4WHZbeMMSCXxuARcUjWbUfUdcacuelmcEK/3u8pL9SYhz6zd09luPsy8X5CSvY1PbUfmViq1bf7kdKRF3QpMbvRSsxuaDck4ASBNzXRppxaQ/H8iakqtPL34/hszRXCBh0YECzMO3lvb4P3jF7SCNIkxZIWLdux1esKkDnVMg= Received: from BY2PR02CA0111.namprd02.prod.outlook.com (10.163.44.165) by DM2PR02MB303.namprd02.prod.outlook.com (10.141.83.146) with Microsoft SMTP Server (TLS) id 15.1.390.13; Fri, 29 Jan 2016 23:17:02 +0000 Received: from BY2FFO11FD052.protection.gbl (2a01:111:f400:7c0c::148) by BY2PR02CA0111.outlook.office365.com (2a01:111:e400:5261::37) with Microsoft SMTP Server (TLS) id 15.1.396.15 via Frontend Transport; Fri, 29 Jan 2016 23:17:02 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BY2FFO11FD052.mail.protection.outlook.com (10.1.15.189) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Fri, 29 Jan 2016 23:17:02 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id FF.40.29304.EE2FBA65; Fri, 29 Jan 2016 15:17:02 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.248.2; Fri, 29 Jan 2016 15:17:02 -0800 X-AuditID: ac160a68-f4bff70000007278-a1-56abf2eedf36 Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id B1.77.02700.EE2FBA65; Fri, 29 Jan 2016 15:17:02 -0800 (PST) Subject: [PATCH v2 16/22] IB/srpt: Log private data associated with REJ To: Doug Ledford References: <56ABF16E.7070006@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56ABF2ED.8020204@sandisk.com> Date: Fri, 29 Jan 2016 15:17:01 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56ABF16E.7070006@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsWyRoxnke67T6vDDH7vE7e48PQ7k8XL8x9Y LVauPspk8exQL4vFjbYHbA6sHov3vGTy2H2zgc3j2fTDTB7v911l8/i8SS6ANYrLJiU1J7Ms tUjfLoEr4+6j8oJnnBUTJjo2MDZzdDFyckgImEgseL2ftYuRi0NIYBOjRN/BbewQzg5GiYm9 b9lgqhq2rWWDSMxhlOi6cggsISzgLnFj9jpGEFtEQE1i06tF7CC2kICWxLkLX8AmMQusYpTY dPU6WIJNwEji2/uZLF2MHBy8QEUtv0xAwiwCqhJ7fz0GmyMqECFxuLMLrJxXQFDi5MwnLCA2 p4C2xJLZF8BamQU0Jdbv0gcJMwvIS2x/O4cZZJWEwEFWiRcrL7NC3KAucXLJfKYJjMKzkIya hdA+C0n7AkbmVYxiuZk5xbnpqQWGhnrFiXkpmcXZesn5uZsYwZHBlbGDcesk80OMAhyMSjy8 HstWhwmxJpYVV+YeYpTgYFYS4a17ARTiTUmsrEotyo8vKs1JLT7EKM3BoiTOa92iFiYkkJ5Y kpqdmlqQWgSTZeLglGpg9PS4eFWvXvOQ00WzhNSEK84VHLP5DPm1Un/zsLXNzK6a61fpZH77 zyKP9YHPDj7RePI2SvJc1a31XfN/FDRdiD93wjb60aV9Vp9usXdu7pD7++Sz4ZvzWztm7+md 32FSs/Ld2h9Szeavm4MCZs+eyFx+p8S3zDhPK3bntuquq5U76+V+/+q7pcRSnJFoqMVcVJwI ANiUX56IAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDJMWRmVeSWpSXmKPExsXCtZEjRffdp9VhBs/vs1pcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CVcfdRecEzzooJEx0bGJs5uhg5OSQETCQatq1l62Lk4hASmMUoceT4EWaQhLCAu8SN 2esYQWwRATWJTa8WsYPYQgJaEucufGEHaWAWWMUo8XvlBzaQBJuAkcS39zNZuhg5OHiBilp+ mYCEWQRUJfb+egw2R1QgQuJwZxfYHF4BQYmTM5+wgNicAtoSS2ZfALOZBdQl/sy7xAxhy0ts fzuHeQIj3ywkLbOQlM1CUraAkXkVo1huZk5xbnpmgaGhXnFiXkpmcbZecn7uJkZweHJG7mB8 OtH8ECMTB6dUA+PyjxkxaplH76S8fmM0zy10ZmWcwZplnQH5JmnXDJc/O8vhE3/0tWtDh1NK 1VSHTy9PyBQes1ly6OncZ3a6PTPiw34Zvz8SUZ6stlVG+WJ93vuqBIOejS+6RGMypLjc3wb9 c9I7KvNjxrGI3+XGvx9v6fNvTNt1PPS5Rkqgvq2a3u5913VP9iqxFGckGmoxFxUnAgClLlT+ /wEAAA== X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD052; 1:NldCIyiguve8Seu/a0HugI5EyOJhRbpyTTgUm8lKyxAeGOvhH77TS/NmePilD0Vxd9SoJe83NOxZO9sNuk8wtQCWh58Z9W1LiO+jIolFZoQjroRkGNpxfyJu+UzpADX8KAMO3tEQeZGlTzK0SGi60uEVI/3gG50QDgdEi8o1iM2/CPanEkAdhzlve03R42xuZQt234CJBuVhBDEz1aEYIhJfiQjjxgXa2uMPlUwBDoLlUjZzBsBjc2yLwxYpcJ5M1xgpX73k4utzNvsctou91jZDZESqIvOGmjstZfG9rhvU0doqvF2RwX6rnctRGZizgK8LLQrwnEgGGcttfoSF08sCsDkThi+JMtZLBlyvBoLV1LQosA/43cb69Ld6gJ794xEgUUv5y2n+xDB7WeWcPwSzGrXL+BRUTq3oXiTlf8exg68qyI2ZzVNyBuXBWU4E X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(438002)(199003)(189002)(4001350100001)(83506001)(50466002)(65816999)(47776003)(19580395003)(87936001)(80316001)(54356999)(110136002)(50986999)(87266999)(76176999)(19580405001)(77096005)(2950100001)(230700001)(65806001)(65956001)(86362001)(189998001)(106466001)(5001960100002)(229853001)(36756003)(59896002)(64126003)(5008740100001)(33656002)(11100500001)(23676002)(92566002)(4326007)(2906002)(1096002)(586003)(1220700001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB303; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB303; 2:PTRMurZGQT+OK/X2B39QsdsFhopjqC6KLk+64HThOFVtiA2x3YwqMVk4YaWIZ56gdkQ0xQvs4Nw2orkKFGazwem7bfLcE/U+mmB4WFVI1nFw2aZ8KgYJTu61H0FnJKWaePQjKJ+yNLZgTEAYNuWFRQ==; 3:CtO3nS7tIlKRCs++5XhvDGwfclD8P7ifQigKp2423v52Nsy6JyeuL7UDbSgsnczKdLjGX2O5mDEa7P9i9naNUgT2Xaqhyo5JYBTwsuMkP6QG2r299UrWn3F12byjheR49A6DtBIIsU5V12oWVExhgwzjBmqynZPNqgoutKC1MYMVYG6h2nr+y9DIau5xECi/f259E8PUZGhSxlUH9uSgoJxYGE2pVHqOatd7f1T7VPF7XtohtRDzQCtx5LyYOD7RBzOKs3tmrd18+lMQ7NVPiQ==; 25:OlaQMrwm0EyewR14/9PzKSCXFcJSJEbWqACSL++k/FEuW/s80nQYleNaxXZ4IekWpSd+/Bz/ZLbA3NcKDEXdP5AxvTSo/8gsmpWkrqGf3ePdEqbpVBKmr29PRA23ZAodNLBK7vMjN9EH6BLUu80Yu2EEJZt0G7HveENAjw4byrJZx76ZIxBtncfwNTY0qmpml/CfVoCFFc4/H0JvmChddggKio/TwLlp3CqzHXOaoH+Y4C7bv5qLubrp0g86goWw X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:DM2PR02MB303; X-MS-Office365-Filtering-Correlation-Id: cb26f8e0-8fa6-4754-1fb7-08d329024bc4 X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB303; 20:6T8bVbBsU6und3ME3qfsx807kwUuPZBsFX0ZfpjcNE2ExB3z4SyaIiWUagr2uoJho7Kq1bQyusWeSsIFtwvvBAnOovuOzf5qmotPlw7shThnZGwzOKWyi8iXy15jUHxaQbvGAnogVI11EcFija6IWEEh+s1mNJLQVTOpy8qzeqKchhVcYC36f71RcoHmF3GrGdQPFzMmtx7jDVRVKiJxAoQ7Ttgzvo07Nex/KpkWZKfvwgmgdWKcB3o2dbMxG54WUoUdDeE1em0F6VR96Irfpyw/ilMoFQqda2rTZ8glN9IICqSm0kiO7Skm9ZrR6mEMChw6H7oj2veLiak0BF9e7pdyHJ+XP6PUDwpRk3GpXINqDGwW5LL2DLaSOWvYLrP5K75DPkscX2F1JyWhMI9bJIsJi/mmduRO7UpSZO0pylwOZhSTGBZ14k/R0Ma0acAQu2myFWT//om+UTVvlXqRWwkmaUkeseb2QwFTpf/b4mE+BdbMB1gmOb99FBzO3F99 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(5005006)(13024025)(13017025)(13023025)(8121501046)(13015025)(10201501046)(3002001); SRVR:DM2PR02MB303; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB303; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB303; 4:klRZG/0aY1WfvPAWczfrvTilA98WerMaMJaV5AfSDa06FUTyaGPbX0BoOusDCxsByStVSuRsAliATgLHuwK5IdhuDiqmDCd1/1hqoZA4qCRG3FhKeWag2g17VLyqIZvpxtabcUInE4/QynZcTfpDOpvyAGkSWLv22df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ZVJzUFBCOHdWRlZFS3Ntak5PWjI4bWZQV2F2?= =?utf-8?B?VDUwVTFGN0NXbWhKTFg3MGc2cHROQ1padXh1WFE5MUVBaHpwMU5HZ2h4OUsz?= =?utf-8?B?ZkhLVzJCenQyNjV6MjVFcU5mQXE3NUZLYkkvMlk1aUwxVkxlYnpEaEx5RmJY?= =?utf-8?B?SWZKZkRwRjQ2VG5yZmZUUFFubitzRjhsS3FTSUxqQXhrUVhENTJ0NFNmMXVy?= =?utf-8?Q?I2Hhh7pSEugKIIjGFuH?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB303; 5:FYjLAMuvAXSgy67bJmeFDyTPTItYk1wGtlMCWRMdZqyN3bFFaUvDTmsAM1CokfTBqqxmUlAlZvKuVAQJAIrAbX2h7EeftCWLf48U39H+LPNiIulnC5bKbCHJx/XkU4uBkbxV+G5dvhgAvCnFptMKww==; 24:vS+avn7zinCbv3qWeSEAvi9BvMQgu0N6dPdEdFFlbgothLqrH/W/Rs+DULhHkBh45Pk6yneUvO5jzAuXruO0xzdUisFyDR4w37MCyOWxtXU=; 20:FKydQvUf76MnVYBJpUpx5Bupw7G5CNCCaUhzscTsE/H7pSb4zygYKp4bt4ask/AY8jL4uq4KYA/IX+935gr0eVUTLvXmz+gzrfT4Z868FeWdhT1zCC0Y2kfulvdYpMXTFoFlQViVEhkseqLMpeQv9U4fJrwz74zN/abidDaXTvxiV3XRg3zrW9pipgjqbsSXOY+00A35TPwEEeNjb/HqTJZC+ZabZZUqT8EVnirAeaHc8HsStASsvZwCH3mW2h/v SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2016 23:17:02.6721 (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.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR02MB303 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To make it possible to determine why an initiator sent a REJ, log the private data associated with the received REJ packet. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Sagi Grimberg Reviewed-by: Christoph Hellwig --- drivers/infiniband/ulp/srpt/ib_srpt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 93f6800..256b5bf 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2247,8 +2247,17 @@ static void srpt_cm_rej_recv(struct srpt_rdma_ch *ch, const u8 *private_data, u8 private_data_len) { - pr_info("Received CM REJ for ch %s-%d; reason %d.\n", - ch->sess_name, ch->qp->qp_num, reason); + char *priv = kmalloc(private_data_len * 3 + 1, GFP_KERNEL); + int i; + + if (priv) { + priv[0] = '\0'; + for (i = 0; i < private_data_len; i++) + sprintf(priv + 3 * i, "%02x ", private_data[i]); + } + pr_info("Received CM REJ for ch %s-%d; reason %d; private data %s.\n", + ch->sess_name, ch->qp->qp_num, reason, priv ? : "(?)"); + kfree(priv); srpt_drain_channel(ch); }