From patchwork Thu Aug 25 11:02:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daisuke Matsuda (Fujitsu)" X-Patchwork-Id: 12954549 X-Patchwork-Delegate: jgg@ziepe.ca 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 45C73C04AA5 for ; Thu, 25 Aug 2022 11:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240635AbiHYLDk (ORCPT ); Thu, 25 Aug 2022 07:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbiHYLDj (ORCPT ); Thu, 25 Aug 2022 07:03:39 -0400 Received: from esa3.hc1455-7.c3s2.iphmx.com (esa3.hc1455-7.c3s2.iphmx.com [207.54.90.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51914AC24C for ; Thu, 25 Aug 2022 04:03:38 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10449"; a="85970233" X-IronPort-AV: E=Sophos;i="5.93,262,1654527600"; d="scan'208";a="85970233" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa3.hc1455-7.c3s2.iphmx.com with ESMTP; 25 Aug 2022 20:03:37 +0900 Received: from oym-m1.gw.nic.fujitsu.com (oym-nat-oym-m1.gw.nic.fujitsu.com [192.168.87.58]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 59A6FD29E5 for ; Thu, 25 Aug 2022 20:03:35 +0900 (JST) Received: from m3003.s.css.fujitsu.com (m3003.s.css.fujitsu.com [10.128.233.114]) by oym-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id 864CED999D for ; Thu, 25 Aug 2022 20:03:34 +0900 (JST) Received: from localhost.localdomain (unknown [10.19.3.107]) by m3003.s.css.fujitsu.com (Postfix) with ESMTP id 469A1203EF2A; Thu, 25 Aug 2022 20:03:34 +0900 (JST) From: Daisuke Matsuda To: leonro@nvidia.com, jgg@nvidia.com, zyjzyj2000@gmail.com Cc: linux-rdma@vger.kernel.org, Daisuke Matsuda Subject: [PATCH] RDMA/rxe: Ratelimit error messages of read_reply() Date: Thu, 25 Aug 2022 20:02:55 +0900 Message-Id: <20220825110255.658706-1-matsuda-daisuke@fujitsu.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org When responder cannot copy data from a user MR, error messages overflow. This is because an incoming RDMA Read request can results in multiple Read responses. If the target MR is somehow unavailable, then the error message is generated for every Read response. For the same reason, the error message for packet transmission should also be ratelimited. Signed-off-by: Daisuke Matsuda Reviewed-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index b36ec5c4d5e0..f9e9679b5e32 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -812,7 +812,7 @@ static enum resp_states read_reply(struct rxe_qp *qp, err = rxe_mr_copy(mr, res->read.va, payload_addr(&ack_pkt), payload, RXE_FROM_MR_OBJ); if (err) - pr_err("Failed copying memory\n"); + pr_err_ratelimited("Failed copying memory\n"); if (mr) rxe_put(mr); @@ -824,7 +824,7 @@ static enum resp_states read_reply(struct rxe_qp *qp, err = rxe_xmit_packet(qp, &ack_pkt, skb); if (err) { - pr_err("Failed sending RDMA reply.\n"); + pr_err_ratelimited("Failed sending RDMA reply.\n"); return RESPST_ERR_RNR; }