From patchwork Tue Nov 1 20:22:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027441 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 5BFE1C4332F for ; Tue, 1 Nov 2022 20:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbiKAUXs (ORCPT ); Tue, 1 Nov 2022 16:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbiKAUXk (ORCPT ); Tue, 1 Nov 2022 16:23:40 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D23D1C416 for ; Tue, 1 Nov 2022 13:23:39 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id s1-20020a4a81c1000000b0047d5e28cdc0so2217165oog.12 for ; Tue, 01 Nov 2022 13:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UTc8DYxRHwrx7moBbowmcIUIPuxWr0WrNqCa5fecqEg=; b=LV5C6tRwzTbc+wm+Z9RveiIjmjgeb5ydhQmPaT4xjU5uumoG3aOn0JQW+Zt6yRvDE7 ZShVEQ8xvktau0EFXXlksgc4J5p+KcjeLt8TiSHtpMAkVgThKMDAJQFiIwd/mBwj5AYJ uaa93vLoPuP4ZJyMD/HkrbXIMyD6qtrRVsBytJHK/tNgDf2SrbsDOgWSAiCFssMfopbs fDmDlwGA5FhKayV2O9hymuZtKfpKDBxX45d2MqR3kKy6k1yTsE9yYj8Rwm+adNZr4qqb 5qanVT5j1i++zPexQOxlzJiQC/w/yWx6uGDfPXramB8nE5bN4eN5fp8dYmSesQYGYVyy MmvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UTc8DYxRHwrx7moBbowmcIUIPuxWr0WrNqCa5fecqEg=; b=3UpRygws1di3gSYFqyCnS7swI3rmznkJVIQtMT78SZ147VQdNrsWiw5HK7h18tVb5Q bjbVBBqgdMliM+7syBRo9spSTnzT01UHXElj7SkZkJopNXChwVSkBpvUZjJq90UzTA85 5JplOdzzixYn5AkXzxt5wMIisKGU48IDSfPPtyagNWnAblAczRSzeyNk87h8hqTSihxz Y6WA7YaguP6hwTg78SX+tQwDtEok+GCKYUaSgHwyfwsUtHz7D/KWhcORzhEOImYvkAB5 FVTsFw+tCVLIevusxiVRp+HS9mM2KtU2L6wnyvoQyhknL4xDl3+e/7yWwm2KezxaNIjz fQ3w== X-Gm-Message-State: ACrzQf0mcoBcwL60qhLUrwoP81MO+daTGArpSkNogSW9UjS1QfqXBsXG H/c4oJLBWOXp5ZKP5kPKic8= X-Google-Smtp-Source: AMsMyM5BZTOfwi8Dt09OMIxLi3UlZU4y8d8/ueferawvA7/zzC4vRGReF3His7mqZuiVB4ABQngdkQ== X-Received: by 2002:a4a:b648:0:b0:47f:90bb:e7e8 with SMTP id f8-20020a4ab648000000b0047f90bbe7e8mr8924993ooo.32.1667334218760; Tue, 01 Nov 2022 13:23:38 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:38 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 01/16] RDMA/rxe: Add ibdev_dbg macros for rxe Date: Tue, 1 Nov 2022 15:22:25 -0500 Message-Id: <20221101202238.32836-2-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Add macros borrowed from siw to call dynamic debug macro ibdev_dbg. Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rxe.h index 30fbdf3bc76a..1c5186c26bce 100644 --- a/drivers/infiniband/sw/rxe/rxe.h +++ b/drivers/infiniband/sw/rxe/rxe.h @@ -38,6 +38,25 @@ #define RXE_ROCE_V2_SPORT (0xc000) +#define rxe_dbg(rxe, fmt, ...) ibdev_dbg(&rxe->ib_dev, \ + "%s: " fmt, __func__, ##__VA_ARGS__) +#define rxe_dbg_uc(uc, fmt, ...) ibdev_dbg(uc->ibpd.device, \ + "uc#%d %s: " fmt, uc->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_pd(pd, fmt, ...) ibdev_dbg(pd->ibpd.device, \ + "pd#%d %s: " fmt, pd->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_ah(ah, fmt, ...) ibdev_dbg(ah->ibah.device, \ + "ah#%d %s: " fmt, ah->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_srq(srq, fmt, ...) ibdev_dbg(srq->ibsrq.device, \ + "srq#%d %s: " fmt, srq->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_qp(qp, fmt, ...) ibdev_dbg(qp->ibqp.device, \ + "qp#%d %s: " fmt, qp->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_cq(cq, fmt, ...) ibdev_dbg(cq->ibcq.device, \ + "cq#%d %s: " fmt, cq->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_mr(mr, fmt, ...) ibdev_dbg(mr->ibmr.device, \ + "mr#%d %s: " fmt, mr->elem.index, __func__, ##__VA_ARGS__) +#define rxe_dbg_mw(mw, fmt, ...) ibdev_dbg(mw->ibmw.device, \ + "mw#%d %s: " fmt, mw->elem.index, __func__, ##__VA_ARGS__) + void rxe_set_mtu(struct rxe_dev *rxe, unsigned int dev_mtu); int rxe_add(struct rxe_dev *rxe, unsigned int mtu, const char *ibdev_name); From patchwork Tue Nov 1 20:22:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027442 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 038DCC433FE for ; Tue, 1 Nov 2022 20:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbiKAUXx (ORCPT ); Tue, 1 Nov 2022 16:23:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbiKAUXw (ORCPT ); Tue, 1 Nov 2022 16:23:52 -0400 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0840317052 for ; Tue, 1 Nov 2022 13:23:50 -0700 (PDT) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-13c2cfd1126so18082358fac.10 for ; Tue, 01 Nov 2022 13:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jjp9wYlavuPz4LHH71+rdE2DpYiSE2m/SsqEKdhE490=; b=YgGdMzGR5AzNE+8BHfaDe8VS6iKFqCPogKRW0srAI5cPAAmlrXLyu5/Zbjj7yFPv8h 3mTe9vHm9Q15EJYBspaCdholCZ6CDq6Q2F+PO3NVhEWjQxTvwye4HItMEfEZE1i7A04p 7crCNlCnm8NnPKDazqlFrlhxW4+/XL7FQY4WFqGLZO1+PhgyXtcyr57v3gDv46XAt/om PkSf5YFyNUC1w10E0NtACBE3gen6xGVzqFh7Wz8M4QOlRCXGTKIrnmeGXz8eumwkLB2V 0pO3TYvmJU7BWEf8Rhc1gue5+7QREgcEKZaT7o/aNruQBQx8Bji+iVXHYnyl0mjHkxH6 Fu4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jjp9wYlavuPz4LHH71+rdE2DpYiSE2m/SsqEKdhE490=; b=SZ7MBseqAFo5ID1k4Hq6cE9xaxF92J/orALiURI2o+p6ajZGvi+08PG/OCCn705QrW NdQG4awyOwZeyLLYhClL9oR8q6lv0f/1hRO55dpj6mQijFCF0Xnn9CfiCZVqtcIEru1x j0lI8UOrbioDlYQja0DCboTnUya158FoBJAzj29erEcfKI1a7zc00Vrt7ReCedwe8kwE HBvHdsS+bgwZIK3xkQOLy6vr56CrhARjT3075hP66Ira9JU2rEaw3/MRMa7QkSz2ZW8l A8O8TLKC9ZlCmGjfpK2MTOsIIh4lBjoxquzDeh40o67sjcsp+6EQGOgI8BnO45a7R9Yg UCcg== X-Gm-Message-State: ACrzQf2J0felN9bhDQpMp/3XEKJgFIAPCy4rx+LaGqfJJQ4PYnVLUVd4 Dzp2aVf3A9r/+mnL3tEaq9E= X-Google-Smtp-Source: AMsMyM6qkUszLRMlE7LpULEBpv35GjqAN6Hhnj5Yddy8SeVlPm+JJMJ4nhkhuzfQVDlF/C4vThpC0g== X-Received: by 2002:a05:6870:51a:b0:130:ae8d:daaf with SMTP id j26-20020a056870051a00b00130ae8ddaafmr20713783oao.103.1667334229052; Tue, 01 Nov 2022 13:23:49 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:48 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 02/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_comp.c Date: Tue, 1 Nov 2022 15:22:27 -0500 Message-Id: <20221101202238.32836-3-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn() in rxe_comp.c with rxe_dbg_qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_comp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c index 66f392810c86..4dca4f8bbb5a 100644 --- a/drivers/infiniband/sw/rxe/rxe_comp.c +++ b/drivers/infiniband/sw/rxe/rxe_comp.c @@ -114,7 +114,7 @@ void retransmit_timer(struct timer_list *t) { struct rxe_qp *qp = from_timer(qp, t, retrans_timer); - pr_debug("%s: fired for qp#%d\n", __func__, qp->elem.index); + rxe_dbg_qp(qp, "retransmit timer fired\n"); if (qp->valid) { qp->comp.timeout = 1; @@ -334,7 +334,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, return COMPST_ERROR; default: - pr_warn("unexpected nak %x\n", syn); + rxe_dbg_qp(qp, "unexpected nak %x\n", syn); wqe->status = IB_WC_REM_OP_ERR; return COMPST_ERROR; } @@ -345,7 +345,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, break; default: - pr_warn("unexpected opcode\n"); + rxe_dbg_qp(qp, "unexpected opcode\n"); } return COMPST_ERROR; @@ -598,8 +598,7 @@ int rxe_completer(void *arg) state = COMPST_GET_ACK; while (1) { - pr_debug("qp#%d state = %s\n", qp_num(qp), - comp_state_name[state]); + rxe_dbg_qp(qp, "state = %s\n", comp_state_name[state]); switch (state) { case COMPST_GET_ACK: skb = skb_dequeue(&qp->resp_pkts); @@ -746,8 +745,7 @@ int rxe_completer(void *arg) * rnr timer has fired */ qp->req.wait_for_rnr_timer = 1; - pr_debug("qp#%d set rnr nak timer\n", - qp_num(qp)); + rxe_dbg_qp(qp, "set rnr nak timer\n"); mod_timer(&qp->rnr_nak_timer, jiffies + rnrnak_jiffies(aeth_syn(pkt) & ~AETH_TYPE_MASK)); From patchwork Tue Nov 1 20:22:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027443 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 24C7DC4332F for ; Tue, 1 Nov 2022 20:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230232AbiKAUXz (ORCPT ); Tue, 1 Nov 2022 16:23:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbiKAUXx (ORCPT ); Tue, 1 Nov 2022 16:23:53 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 945F61EAD3 for ; Tue, 1 Nov 2022 13:23:50 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id y67so17175712oiy.1 for ; Tue, 01 Nov 2022 13:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QHbOXnY8o7rTAT8DVu9lCYSozb8GmEwnDOfzCyO8zXI=; b=NhUvAd1B35JMigi7bR+e6LL7otdvLimb69vQ0ZCnzzN5DbaHpJ7JEjJVDPaADh4lIM 92sFzkIuP0vK2ZcykKGfcf11dAI9+wewXSPJ49wIgwtwZecRC3zd3cV/KFNfzmXlsk3b ug1VweSmrnAsW6m/StGD97daM4+1o6hVWS5DPIJj0BXs8aQH5uSTFaSXJcIFb77ib/03 z2xMYNtJw7cvaPXxOxKBsB2z3m8XnpRV65W7gOBGrCMV/Bjym2vszKIkO0I40HbKpd4D cNZQUIpbUQX98xI9jDpqvw5ewCQwzdscRSb/fC7mffx561AOoHTIAQfsmb3d14YQWtBU 77nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QHbOXnY8o7rTAT8DVu9lCYSozb8GmEwnDOfzCyO8zXI=; b=AVNsDFJ0BVYJcbsOYE5tsHxU+JbnClHPJrccSTAYKyH60yMCBeUnsrvBg3rJSHdwT1 e2QBFLVfd2r5MayyA+FYS3cOXiU9Ixf6Ff2fZcDgMUCQMUkYwXX9gBrtutWgGb5Em1D8 4IT3NgSFsnnPVcqs0OaMLqxEfDTrDUnNDL26qELmDD2WFvhA/q9orZT0gz869jwE4SaC XlDbJMS2X2BmMNb0vv865xyJdLzfu5YvyVPbnwn19PqE1MqlavmNgyh31WZ7HVONsyjn pl/GKbWQgQaYoy0n6UtjPsuWJ5y8aTjBSPsRIt3r/nP7RJQVmpW8teoh+BHsC7GOvoXc /hmg== X-Gm-Message-State: ACrzQf2aY68/AeYTUBrq//HHhBv+1KYX85Zy+7X0LyzaHcyyTGWS18sv IhOxPo7/6PvfGeypNLrur0E= X-Google-Smtp-Source: AMsMyM4VQ/PORrv/rf3RAQIWQ7oGCDA63B06T9kBdhBdalE3bSA3c+qwicHgxaHZ20Cncu/v/E60tQ== X-Received: by 2002:a05:6808:2c7:b0:35a:35b:9171 with SMTP id a7-20020a05680802c700b0035a035b9171mr7408202oid.200.1667334229992; Tue, 01 Nov 2022 13:23:49 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:49 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 03/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_cq in rxe_cq.c Date: Tue, 1 Nov 2022 15:22:28 -0500 Message-Id: <20221101202238.32836-4-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn() in rxe_cq.c with rxe_dbg/_cq(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_cq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c index b1a0ab3cd4bd..1df186534639 100644 --- a/drivers/infiniband/sw/rxe/rxe_cq.c +++ b/drivers/infiniband/sw/rxe/rxe_cq.c @@ -14,12 +14,12 @@ int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, int count; if (cqe <= 0) { - pr_warn("cqe(%d) <= 0\n", cqe); + rxe_dbg(rxe, "cqe(%d) <= 0\n", cqe); goto err1; } if (cqe > rxe->attr.max_cqe) { - pr_debug("cqe(%d) > max_cqe(%d)\n", + rxe_dbg(rxe, "cqe(%d) > max_cqe(%d)\n", cqe, rxe->attr.max_cqe); goto err1; } @@ -27,7 +27,7 @@ int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, if (cq) { count = queue_count(cq->queue, QUEUE_TYPE_TO_CLIENT); if (cqe < count) { - pr_debug("cqe(%d) < current # elements in queue (%d)", + rxe_dbg_cq(cq, "cqe(%d) < current # elements in queue (%d)", cqe, count); goto err1; } @@ -65,7 +65,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, cq->queue = rxe_queue_init(rxe, &cqe, sizeof(struct rxe_cqe), type); if (!cq->queue) { - pr_warn("unable to create cq\n"); + rxe_dbg(rxe, "unable to create cq\n"); return -ENOMEM; } From patchwork Tue Nov 1 20:22:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027444 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 94CF5C433FE for ; Tue, 1 Nov 2022 20:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229471AbiKAUX5 (ORCPT ); Tue, 1 Nov 2022 16:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiKAUXz (ORCPT ); Tue, 1 Nov 2022 16:23:55 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D73751EC42 for ; Tue, 1 Nov 2022 13:23:51 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id t62so6330733oib.12 for ; Tue, 01 Nov 2022 13:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fxVPpFHYKbZEACwtxYU811ZotzxpSaoA/gJpi0jRUas=; b=Etf+hH26/14xHjdX6PsCBB4ihQSXLfDD/oJ0a4ex+UXDvTNX7LQ9+7LfiR0FN9rE1a mhD8iswPN8O6ngESn79pZNNtheiuAOHwN954+CWTNP8B5PBqs/9PypdNCEzSrSbzsyc2 2yac5fQJ9bgUiC684ESZqgHhvMFjqU0plAMVT7wGVgm0XOMUCoI+9dZ/jmB/FH/Y6KhI oYuD53Gv1Akv/1qoerMAv+JGohqRYCCD9kxu39WNrkzfO4E3jALFL+scoDEtKH2pi2nF kNvZaGCoGsvn5aKltLEzNKr8YxkJCQrepXq7zMKmp+OEbiMY81WJTso826OpEtOPOte4 uTkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fxVPpFHYKbZEACwtxYU811ZotzxpSaoA/gJpi0jRUas=; b=r63V+vuT+M+MKggOLAAYSTU51I7DENZnUlA0ctpNYBVqzVixrFWJOluF7S7Z+fDXo7 /yBKC8+wdUQdDQVQUM5FXWy8WuufPSQWGRIzd18mB8AMLiEWjvlUVFbM5VGnnZPwhZUH wRqnXml57K8hXWbhh5Rgw8X8rzy2/1kkfrYH3aGhMtNMci8BAJQpUwvLOn1btShvmu1V x69JkT3QdK4CD9vEwIdRsfugGSZJz3p+rgpLjNCjN7pe74Lj6hKJ6xMXclEXKucwzgG9 fzP7ATCgbLca3IkpKeIWAz2rGUPsEi/jkRIhcGJgj+rKcXPCGP5ew9KHnk37wgTIWICi zAHg== X-Gm-Message-State: ACrzQf1s9nCGUxzTbclW8bo5B4ZZXtNh8dnSgZvZbzGQoA4AJyk0t29g aVy7RhfBxrGiQGiqj5cTWhc= X-Google-Smtp-Source: AMsMyM54+L/jFsW53zlrExNikGv5P+F3hAPpxo6C6DgUaV+24oV5jLAzcxEzHXTcF29ayk+ZlVlVdA== X-Received: by 2002:a05:6808:3007:b0:351:3de7:82f4 with SMTP id ay7-20020a056808300700b003513de782f4mr18355199oib.103.1667334231164; Tue, 01 Nov 2022 13:23:51 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:50 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 04/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_mr in rxe_mr.c Date: Tue, 1 Nov 2022 15:22:29 -0500 Message-Id: <20221101202238.32836-5-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn() in rxe_mr.c by rxe_dbg_mr(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_mr.c | 40 ++++++++++++--------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 3 ++ 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c index bc081002bddc..cd846cf82a84 100644 --- a/drivers/infiniband/sw/rxe/rxe_mr.c +++ b/drivers/infiniband/sw/rxe/rxe_mr.c @@ -38,8 +38,7 @@ int mr_check_range(struct rxe_mr *mr, u64 iova, size_t length) return 0; default: - pr_warn("%s: mr type (%d) not supported\n", - __func__, mr->ibmr.type); + rxe_dbg_mr(mr, "type (%d) not supported\n", mr->ibmr.type); return -EFAULT; } } @@ -125,8 +124,8 @@ int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova, umem = ib_umem_get(&rxe->ib_dev, start, length, access); if (IS_ERR(umem)) { - pr_warn("%s: Unable to pin memory region err = %d\n", - __func__, (int)PTR_ERR(umem)); + rxe_dbg_mr(mr, "Unable to pin memory region err = %d\n", + (int)PTR_ERR(umem)); err = PTR_ERR(umem); goto err_out; } @@ -137,8 +136,7 @@ int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova, err = rxe_mr_alloc(mr, num_buf); if (err) { - pr_warn("%s: Unable to allocate memory for map\n", - __func__); + rxe_dbg_mr(mr, "Unable to allocate memory for map\n"); goto err_release_umem; } @@ -159,8 +157,7 @@ int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova, vaddr = page_address(sg_page_iter_page(&sg_iter)); if (!vaddr) { - pr_warn("%s: Unable to get virtual address\n", - __func__); + rxe_dbg_mr(mr, "Unable to get virtual address\n"); err = -ENOMEM; goto err_cleanup_map; } @@ -255,7 +252,7 @@ void *iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length) void *addr; if (mr->state != RXE_MR_STATE_VALID) { - pr_warn("mr not in valid state\n"); + rxe_dbg_mr(mr, "Not in valid state\n"); addr = NULL; goto out; } @@ -266,7 +263,7 @@ void *iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length) } if (mr_check_range(mr, iova, length)) { - pr_warn("range violation\n"); + rxe_dbg_mr(mr, "Range violation\n"); addr = NULL; goto out; } @@ -274,7 +271,7 @@ void *iova_to_vaddr(struct rxe_mr *mr, u64 iova, int length) lookup_iova(mr, iova, &m, &n, &offset); if (offset + length > mr->map[m]->buf[n].size) { - pr_warn("crosses page boundary\n"); + rxe_dbg_mr(mr, "Crosses page boundary\n"); addr = NULL; goto out; } @@ -527,27 +524,26 @@ int rxe_invalidate_mr(struct rxe_qp *qp, u32 key) mr = rxe_pool_get_index(&rxe->mr_pool, key >> 8); if (!mr) { - pr_err("%s: No MR for key %#x\n", __func__, key); + rxe_dbg_mr(mr, "No MR for key %#x\n", key); ret = -EINVAL; goto err; } if (mr->rkey ? (key != mr->rkey) : (key != mr->lkey)) { - pr_err("%s: wr key (%#x) doesn't match mr key (%#x)\n", - __func__, key, (mr->rkey ? mr->rkey : mr->lkey)); + rxe_dbg_mr(mr, "wr key (%#x) doesn't match mr key (%#x)\n", + key, (mr->rkey ? mr->rkey : mr->lkey)); ret = -EINVAL; goto err_drop_ref; } if (atomic_read(&mr->num_mw) > 0) { - pr_warn("%s: Attempt to invalidate an MR while bound to MWs\n", - __func__); + rxe_dbg_mr(mr, "Attempt to invalidate an MR while bound to MWs\n"); ret = -EINVAL; goto err_drop_ref; } if (unlikely(mr->ibmr.type != IB_MR_TYPE_MEM_REG)) { - pr_warn("%s: mr type (%d) is wrong\n", __func__, mr->ibmr.type); + rxe_dbg_mr(mr, "Type (%d) is wrong\n", mr->ibmr.type); ret = -EINVAL; goto err_drop_ref; } @@ -576,22 +572,20 @@ int rxe_reg_fast_mr(struct rxe_qp *qp, struct rxe_send_wqe *wqe) /* user can only register MR in free state */ if (unlikely(mr->state != RXE_MR_STATE_FREE)) { - pr_warn("%s: mr->lkey = 0x%x not free\n", - __func__, mr->lkey); + rxe_dbg_mr(mr, "mr->lkey = 0x%x not free\n", mr->lkey); return -EINVAL; } /* user can only register mr with qp in same protection domain */ if (unlikely(qp->ibqp.pd != mr->ibmr.pd)) { - pr_warn("%s: qp->pd and mr->pd don't match\n", - __func__); + rxe_dbg_mr(mr, "qp->pd and mr->pd don't match\n"); return -EINVAL; } /* user is only allowed to change key portion of l/rkey */ if (unlikely((mr->lkey & ~0xff) != (key & ~0xff))) { - pr_warn("%s: key = 0x%x has wrong index mr->lkey = 0x%x\n", - __func__, key, mr->lkey); + rxe_dbg_mr(mr, "key = 0x%x has wrong index mr->lkey = 0x%x\n", + key, mr->lkey); return -EINVAL; } diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index bcdfdadaebbc..510ae471ac7a 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -875,6 +875,7 @@ static struct ib_mr *rxe_get_dma_mr(struct ib_pd *ibpd, int access) rxe_get(pd); mr->ibmr.pd = ibpd; + mr->ibmr.device = ibpd->device; rxe_mr_init_dma(access, mr); rxe_finalize(mr); @@ -899,6 +900,7 @@ static struct ib_mr *rxe_reg_user_mr(struct ib_pd *ibpd, rxe_get(pd); mr->ibmr.pd = ibpd; + mr->ibmr.device = ibpd->device; err = rxe_mr_init_user(rxe, start, length, iova, access, mr); if (err) @@ -930,6 +932,7 @@ static struct ib_mr *rxe_alloc_mr(struct ib_pd *ibpd, enum ib_mr_type mr_type, rxe_get(pd); mr->ibmr.pd = ibpd; + mr->ibmr.device = ibpd->device; err = rxe_mr_init_fast(max_num_sg, mr); if (err) From patchwork Tue Nov 1 20:22:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027447 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 DA7FDC43217 for ; Tue, 1 Nov 2022 20:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbiKAUX7 (ORCPT ); Tue, 1 Nov 2022 16:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbiKAUXz (ORCPT ); Tue, 1 Nov 2022 16:23:55 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA361EC65 for ; Tue, 1 Nov 2022 13:23:52 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-13c569e5ff5so17714133fac.6 for ; Tue, 01 Nov 2022 13:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xr1kvXJvgw1UbM8mu0WDkZsP/Lg9tsuyirjps0ms1hY=; b=q5Zae9mV6+Wmh9P5lNTFDzydh6VS79sPRiXtpWqSqgAtdUrUKC0p5wKLLqLu9N8ha7 bgZt9oq3ns7RxBk5PDLSeyG0YC/x4qPJXoqM08MGZ5XngSPzTg9C1jFZQHgYKVgCOuMq i4Mitklsr7T+24oqYc7RD/R2jvEEqtat5T6XMYeSZYlSjIB4Vm0R9UpWHBbVBlmW3djy 3GQjyLVCVjNvg+jsVuH7p3ETYC27VLGOORqPJXGQQ7z/7Aw1mBj5t2YsNHFU1wmgjuzq Jq/3Rqrolpsm4+nEEjq0lU1dMHcAaut8j/lBaHT5p98D3+SzGkh68cR2WYRlSNnz4RNZ XYbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xr1kvXJvgw1UbM8mu0WDkZsP/Lg9tsuyirjps0ms1hY=; b=Nt9k6/7T7l699rd5g1EcZhRhN9s8i1i6UyadJC/qghPJn8YuN6Ta3TQ9A9ges05IY3 pkLI6Vs9UyP6adSQqhF5Id6fExvGNyf6j9Yg2ut97UPR78T09qC2lT2YzdjUcWcj7sbU Eb1BpbwMGB2+hpWRyFjt/WaHY4rOXuyKoPyDedKXoaLrgOjgWHLRkpt+hymCuIOolqlV V5CLAAKyBq2p3xI/08q6ofuvRF41XqLyZOV7Kf1uVRpg1hWnkwfi6uPMq4c8ZItlKiRB CL2yjeiMMYpaKGougnq/ghIovIP9l2FEsRRSWV9yW858yo5eNL/nadgT9kPQM8XSqjss /Uqg== X-Gm-Message-State: ACrzQf18I3OD2CEnbDimiugsi3j74htMI5mpI/SFS1sVgpFecRCym3kV /GumZUdvVowOMT9A46aTZcRzs7sDLOI= X-Google-Smtp-Source: AMsMyM7uz76uIMYQEgSiGLN8YtSoLKLsouGkCuZ0ztidy87MiSZZsL/VPIDY0/Sbn5S2Ydblell1iQ== X-Received: by 2002:a05:6870:4607:b0:127:fd93:4752 with SMTP id z7-20020a056870460700b00127fd934752mr21867085oao.64.1667334232249; Tue, 01 Nov 2022 13:23:52 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:51 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 05/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_mw in rxe_mw.c Date: Tue, 1 Nov 2022 15:22:30 -0500 Message-Id: <20221101202238.32836-6-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn() int rxe_mw.c with rxe_dbg_mw(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_mw.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_mw.c b/drivers/infiniband/sw/rxe/rxe_mw.c index 8df1c9066ed8..afa5ce1a7116 100644 --- a/drivers/infiniband/sw/rxe/rxe_mw.c +++ b/drivers/infiniband/sw/rxe/rxe_mw.c @@ -52,14 +52,14 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, { if (mw->ibmw.type == IB_MW_TYPE_1) { if (unlikely(mw->state != RXE_MW_STATE_VALID)) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind a type 1 MW not in the valid state\n"); return -EINVAL; } /* o10-36.2.2 */ if (unlikely((mw->access & IB_ZERO_BASED))) { - pr_err_once("attempt to bind a zero based type 1 MW\n"); + rxe_dbg_mw(mw, "attempt to bind a zero based type 1 MW\n"); return -EINVAL; } } @@ -67,21 +67,21 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, if (mw->ibmw.type == IB_MW_TYPE_2) { /* o10-37.2.30 */ if (unlikely(mw->state != RXE_MW_STATE_FREE)) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind a type 2 MW not in the free state\n"); return -EINVAL; } /* C10-72 */ if (unlikely(qp->pd != to_rpd(mw->ibmw.pd))) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind type 2 MW with qp with different PD\n"); return -EINVAL; } /* o10-37.2.40 */ if (unlikely(!mr || wqe->wr.wr.mw.length == 0)) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to invalidate type 2 MW by binding with NULL or zero length MR\n"); return -EINVAL; } @@ -92,13 +92,13 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, return 0; if (unlikely(mr->access & IB_ZERO_BASED)) { - pr_err_once("attempt to bind MW to zero based MR\n"); + rxe_dbg_mw(mw, "attempt to bind MW to zero based MR\n"); return -EINVAL; } /* C10-73 */ if (unlikely(!(mr->access & IB_ACCESS_MW_BIND))) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind an MW to an MR without bind access\n"); return -EINVAL; } @@ -107,7 +107,7 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, if (unlikely((mw->access & (IB_ACCESS_REMOTE_WRITE | IB_ACCESS_REMOTE_ATOMIC)) && !(mr->access & IB_ACCESS_LOCAL_WRITE))) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind an Writable MW to an MR without local write access\n"); return -EINVAL; } @@ -115,7 +115,7 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, /* C10-75 */ if (mw->access & IB_ZERO_BASED) { if (unlikely(wqe->wr.wr.mw.length > mr->ibmr.length)) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind a ZB MW outside of the MR\n"); return -EINVAL; } @@ -123,7 +123,7 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe, if (unlikely((wqe->wr.wr.mw.addr < mr->ibmr.iova) || ((wqe->wr.wr.mw.addr + wqe->wr.wr.mw.length) > (mr->ibmr.iova + mr->ibmr.length)))) { - pr_err_once( + rxe_dbg_mw(mw, "attempt to bind a VA MW outside of the MR\n"); return -EINVAL; } From patchwork Tue Nov 1 20:22:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027445 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 54082C4332F for ; Tue, 1 Nov 2022 20:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbiKAUX5 (ORCPT ); Tue, 1 Nov 2022 16:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230273AbiKAUXz (ORCPT ); Tue, 1 Nov 2022 16:23:55 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E37501C416 for ; Tue, 1 Nov 2022 13:23:53 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13bd19c3b68so18085997fac.7 for ; Tue, 01 Nov 2022 13:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JzBPHRxaUUb1Zoh6Me3eudM5Ah8347rqn+cCcX54UDE=; b=cGUor6IA8zDHFokcqA+4nrw2gHMQInMJc3U2avcPg8GS49GlXOC25gKtnTEhRsV68w xGuFtZGUnGZfF7bI0Wv63Ve5RdlWop0sUZKzTAigWdOodxdsb972zG42YEbTMdYMZXcC lcZC/lAge0c/Om0N9aQ6yww+edfF4qzym9FwOD4amoonQZllxj1D7CBJlVjf+9V2WmMB iPlbqkvIdSzi0rWRIqtWdMC5arw5P1iLs9qK84PqdYasn5mrNyf1Wn5PEMDXrG8edJSu Kp8nnK++SnovQljbCCz4o45KMzANvFGjO11Dos9GCeqKYAFiP9x67mLTPQNibS3x8ln/ G+jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JzBPHRxaUUb1Zoh6Me3eudM5Ah8347rqn+cCcX54UDE=; b=kFjhemyKBSG6at6WF0K0M/MXQbVleyWJg1EVuG1eOC8mTTnVKpwK/+AyD8dZYJJkk8 Bk0Hin2Nx7ZgswbpjV6CswU4mQxlY+h65wrD0z7I6tk2rbCrdqqir8NNBrwKilQPGPE7 6NCXPmXtfWBj0sFv5vVOBfdw2edee7ahWYvDWeOt5nof1bZNa1FJ/vrcPcJTN8C1F7LZ EdTqgGRfMkfnC3itYf8LuT5cxmd2c32HgopaTb/bQnGRwj7O1QX4YMkPQlHY4DtXnp+N 6jNMPyB98riNatpgJXGhaXr2Vfg0x+QX3XRU4IxnQ+UCq9Xl4u1EjTEkCwHiExKooGPn mkrg== X-Gm-Message-State: ACrzQf3ibwrOw1eqZSFxlPvX1cLMSbxjEV+aRzvCbetljZGpKk1m20ln MyEjfa1LV3QBqU4f/c0iEnI= X-Google-Smtp-Source: AMsMyM7gP8Q6dAuPx2vcE0vBHJZJm+oVjAW76HikakWD0C5mPVeAtqrNtWuQGVXoSth/LRY4er97Fw== X-Received: by 2002:a05:6871:1d2:b0:13d:1aee:a7e5 with SMTP id q18-20020a05687101d200b0013d1aeea7e5mr5392338oad.241.1667334233227; Tue, 01 Nov 2022 13:23:53 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:52 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 06/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_net.c Date: Tue, 1 Nov 2022 15:22:31 -0500 Message-Id: <20221101202238.32836-7-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace some calls to rxe_err/warn() in rxe_net.c with rxe_dbg_qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_net.c | 35 ++++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index c36cad9c7a66..76a7668ca5bc 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -20,9 +20,10 @@ static struct rxe_recv_sockets recv_sockets; -static struct dst_entry *rxe_find_route4(struct net_device *ndev, - struct in_addr *saddr, - struct in_addr *daddr) +static struct dst_entry *rxe_find_route4(struct rxe_qp *qp, + struct net_device *ndev, + struct in_addr *saddr, + struct in_addr *daddr) { struct rtable *rt; struct flowi4 fl = { { 0 } }; @@ -35,7 +36,7 @@ static struct dst_entry *rxe_find_route4(struct net_device *ndev, rt = ip_route_output_key(&init_net, &fl); if (IS_ERR(rt)) { - pr_err_ratelimited("no route to %pI4\n", &daddr->s_addr); + rxe_dbg_qp(qp, "no route to %pI4\n", &daddr->s_addr); return NULL; } @@ -43,7 +44,8 @@ static struct dst_entry *rxe_find_route4(struct net_device *ndev, } #if IS_ENABLED(CONFIG_IPV6) -static struct dst_entry *rxe_find_route6(struct net_device *ndev, +static struct dst_entry *rxe_find_route6(struct rxe_qp *qp, + struct net_device *ndev, struct in6_addr *saddr, struct in6_addr *daddr) { @@ -60,12 +62,12 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev, recv_sockets.sk6->sk, &fl6, NULL); if (IS_ERR(ndst)) { - pr_err_ratelimited("no route to %pI6\n", daddr); + rxe_dbg_qp(qp, "no route to %pI6\n", daddr); return NULL; } if (unlikely(ndst->error)) { - pr_err("no route to %pI6\n", daddr); + rxe_dbg_qp(qp, "no route to %pI6\n", daddr); goto put; } @@ -105,14 +107,14 @@ static struct dst_entry *rxe_find_route(struct net_device *ndev, saddr = &av->sgid_addr._sockaddr_in.sin_addr; daddr = &av->dgid_addr._sockaddr_in.sin_addr; - dst = rxe_find_route4(ndev, saddr, daddr); + dst = rxe_find_route4(qp, ndev, saddr, daddr); } else if (av->network_type == RXE_NETWORK_TYPE_IPV6) { struct in6_addr *saddr6; struct in6_addr *daddr6; saddr6 = &av->sgid_addr._sockaddr_in6.sin6_addr; daddr6 = &av->dgid_addr._sockaddr_in6.sin6_addr; - dst = rxe_find_route6(ndev, saddr6, daddr6); + dst = rxe_find_route6(qp, ndev, saddr6, daddr6); #if IS_ENABLED(CONFIG_IPV6) if (dst) qp->dst_cookie = @@ -282,7 +284,7 @@ static int prepare4(struct rxe_av *av, struct rxe_pkt_info *pkt, dst = rxe_find_route(skb->dev, qp, av); if (!dst) { - pr_err("Host not reachable\n"); + rxe_dbg_qp(qp, "Host not reachable\n"); return -EHOSTUNREACH; } @@ -306,7 +308,7 @@ static int prepare6(struct rxe_av *av, struct rxe_pkt_info *pkt, dst = rxe_find_route(skb->dev, qp, av); if (!dst) { - pr_err("Host not reachable\n"); + rxe_dbg_qp(qp, "Host not reachable\n"); return -EHOSTUNREACH; } @@ -365,7 +367,8 @@ static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt) } else if (skb->protocol == htons(ETH_P_IPV6)) { err = ip6_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb); } else { - pr_err("Unknown layer 3 protocol: %d\n", skb->protocol); + rxe_dbg_qp(pkt->qp, "Unknown layer 3 protocol: %d\n", + skb->protocol); atomic_dec(&pkt->qp->skb_out); rxe_put(pkt->qp); kfree_skb(skb); @@ -373,7 +376,7 @@ static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt) } if (unlikely(net_xmit_eval(err))) { - pr_debug("error sending packet: %d\n", err); + rxe_dbg_qp(pkt->qp, "error sending packet: %d\n", err); return -EAGAIN; } @@ -411,7 +414,7 @@ int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt, if ((is_request && (qp->req.state != QP_STATE_READY)) || (!is_request && (qp->resp.state != QP_STATE_READY))) { - pr_info("Packet dropped. QP is not in ready state\n"); + rxe_dbg_qp(qp, "Packet dropped. QP is not in ready state\n"); goto drop; } @@ -592,7 +595,7 @@ static int rxe_notify(struct notifier_block *not_blk, rxe_port_down(rxe); break; case NETDEV_CHANGEMTU: - pr_info("%s changed mtu to %d\n", ndev->name, ndev->mtu); + rxe_dbg(rxe, "%s changed mtu to %d\n", ndev->name, ndev->mtu); rxe_set_mtu(rxe, ndev->mtu); break; case NETDEV_CHANGE: @@ -604,7 +607,7 @@ static int rxe_notify(struct notifier_block *not_blk, case NETDEV_CHANGENAME: case NETDEV_FEAT_CHANGE: default: - pr_info("ignoring netdev event = %ld for %s\n", + rxe_dbg(rxe, "ignoring netdev event = %ld for %s\n", event, ndev->name); break; } From patchwork Tue Nov 1 20:22:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027446 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 95C8CC43219 for ; Tue, 1 Nov 2022 20:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230258AbiKAUX7 (ORCPT ); Tue, 1 Nov 2022 16:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbiKAUX4 (ORCPT ); Tue, 1 Nov 2022 16:23:56 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFCB21E739 for ; Tue, 1 Nov 2022 13:23:54 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13bd2aea61bso18180569fac.0 for ; Tue, 01 Nov 2022 13:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tQ7DCyzkZ6nMSM+VdRHceedBj7K9M6zd6viNU3CchRw=; b=lczm3aOxo91anD594WlIfrGqOkAgPz8r2V+ydo1a8S8I5JGGoaJ8TJrjKO6+R6G20P 4svVjTFN73+N9PcqjL/ruhfYPoft5h0RqcSwHQCIRw3TmCSGb8lvhPfdbPm+0ok7Ro5y z33G8C+T9RBvPSn/2eWqwjGID37woQBMQtLPqEdmleEc6Jtfa0mxaDS4E5epDK1LBQhY BvyEl3tH4/PNQo7Uou3DesDyug/NKvZh/YF0XlrSeolPkU3jvpmWnne7nh4ZRrh54KGI GMX7N38C6ottz9KayzvL3QxqJRL0OWfsbRcGslvMnbgzYgIVzdu07uIBtSmL373azEKq aO2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tQ7DCyzkZ6nMSM+VdRHceedBj7K9M6zd6viNU3CchRw=; b=fmAWIF/5i2YedA98Lsq+W+iQOa/6MK+6CpZ0AyL5ux7CAvSyF9L2sR66Iig7V6k0Cv SgdRNQgj+Q4k3b8kGjH8g2yNSY1RJ7keYJJ8zqLA7+/UReLRWuhuHFYiKqLmn6re/0Cr /HB9xwemsdLEMv9IT7s42fAgrMZioqCQSGRqVl+m6vYUxv2pKpEjT6CBoHRdOtGrZ+DX 5hso+T/ThmEbUBPhbpDjBfa6k9Mea2WI60zdf40vK0zOQgegBqGWXP0g6950PbESnWne HI54D9VoGeBnjP15VzxhZjf4JWvBAFO7qRWFRRqNKBIUDQ3W2rGP5f6u3SpaBUsZrgsR FFrA== X-Gm-Message-State: ACrzQf1R4ldkQMxUA65LnumEJALXvsqzHhE+kHpfjRky8liyQw/GW6yB FDhS/wwahviwEi89orM0Jiw= X-Google-Smtp-Source: AMsMyM7nfFHfflF2kx4ayevjg/HNsFwWm/IDt0IDFNdXQC9RSIH4jnXqdSOAkf3qkRX9fwzGcRMegQ== X-Received: by 2002:a05:6870:3414:b0:13c:787e:15ba with SMTP id g20-20020a056870341400b0013c787e15bamr11817219oah.164.1667334234230; Tue, 01 Nov 2022 13:23:54 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:53 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 07/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_qp.c Date: Tue, 1 Nov 2022 15:22:32 -0500 Message-Id: <20221101202238.32836-8-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn in rxe_qp.c with rxe_dbg or rxe_dbg_qp. Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_qp.c | 65 ++++++++++++++---------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index 3f6d62a80bea..bcbfe6068b8b 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -19,33 +19,33 @@ static int rxe_qp_chk_cap(struct rxe_dev *rxe, struct ib_qp_cap *cap, int has_srq) { if (cap->max_send_wr > rxe->attr.max_qp_wr) { - pr_debug("invalid send wr = %u > %d\n", + rxe_dbg(rxe, "invalid send wr = %u > %d\n", cap->max_send_wr, rxe->attr.max_qp_wr); goto err1; } if (cap->max_send_sge > rxe->attr.max_send_sge) { - pr_debug("invalid send sge = %u > %d\n", + rxe_dbg(rxe, "invalid send sge = %u > %d\n", cap->max_send_sge, rxe->attr.max_send_sge); goto err1; } if (!has_srq) { if (cap->max_recv_wr > rxe->attr.max_qp_wr) { - pr_debug("invalid recv wr = %u > %d\n", + rxe_dbg(rxe, "invalid recv wr = %u > %d\n", cap->max_recv_wr, rxe->attr.max_qp_wr); goto err1; } if (cap->max_recv_sge > rxe->attr.max_recv_sge) { - pr_debug("invalid recv sge = %u > %d\n", + rxe_dbg(rxe, "invalid recv sge = %u > %d\n", cap->max_recv_sge, rxe->attr.max_recv_sge); goto err1; } } if (cap->max_inline_data > rxe->max_inline_data) { - pr_debug("invalid max inline data = %u > %d\n", + rxe_dbg(rxe, "invalid max inline data = %u > %d\n", cap->max_inline_data, rxe->max_inline_data); goto err1; } @@ -73,7 +73,7 @@ int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init) } if (!init->recv_cq || !init->send_cq) { - pr_debug("missing cq\n"); + rxe_dbg(rxe, "missing cq\n"); goto err1; } @@ -82,14 +82,14 @@ int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init) if (init->qp_type == IB_QPT_GSI) { if (!rdma_is_port_valid(&rxe->ib_dev, port_num)) { - pr_debug("invalid port = %d\n", port_num); + rxe_dbg(rxe, "invalid port = %d\n", port_num); goto err1; } port = &rxe->port; if (init->qp_type == IB_QPT_GSI && port->qp_gsi_index) { - pr_debug("GSI QP exists for port %d\n", port_num); + rxe_dbg(rxe, "GSI QP exists for port %d\n", port_num); goto err1; } } @@ -264,9 +264,6 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, wqe_size = rcv_wqe_size(qp->rq.max_sge); - pr_debug("qp#%d max_wr = %d, max_sge = %d, wqe_size = %d\n", - qp_num(qp), qp->rq.max_wr, qp->rq.max_sge, wqe_size); - type = QUEUE_TYPE_FROM_CLIENT; qp->rq.queue = rxe_queue_init(rxe, &qp->rq.max_wr, wqe_size, type); @@ -395,7 +392,7 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, attr->qp_state : cur_state; if (!ib_modify_qp_is_ok(cur_state, new_state, qp_type(qp), mask)) { - pr_debug("invalid mask or state for qp\n"); + rxe_dbg_qp(qp, "invalid mask or state\n"); goto err1; } @@ -409,7 +406,7 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, if (mask & IB_QP_PORT) { if (!rdma_is_port_valid(&rxe->ib_dev, attr->port_num)) { - pr_debug("invalid port %d\n", attr->port_num); + rxe_dbg_qp(qp, "invalid port %d\n", attr->port_num); goto err1; } } @@ -424,11 +421,11 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, if (rxe_av_chk_attr(rxe, &attr->alt_ah_attr)) goto err1; if (!rdma_is_port_valid(&rxe->ib_dev, attr->alt_port_num)) { - pr_debug("invalid alt port %d\n", attr->alt_port_num); + rxe_dbg_qp(qp, "invalid alt port %d\n", attr->alt_port_num); goto err1; } if (attr->alt_timeout > 31) { - pr_debug("invalid QP alt timeout %d > 31\n", + rxe_dbg_qp(qp, "invalid alt timeout %d > 31\n", attr->alt_timeout); goto err1; } @@ -441,7 +438,7 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, enum ib_mtu mtu = attr->path_mtu; if (mtu > max_mtu) { - pr_debug("invalid mtu (%d) > (%d)\n", + rxe_dbg_qp(qp, "invalid mtu (%d) > (%d)\n", ib_mtu_enum_to_int(mtu), ib_mtu_enum_to_int(max_mtu)); goto err1; @@ -450,7 +447,7 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, if (mask & IB_QP_MAX_QP_RD_ATOMIC) { if (attr->max_rd_atomic > rxe->attr.max_qp_rd_atom) { - pr_debug("invalid max_rd_atomic %d > %d\n", + rxe_dbg_qp(qp, "invalid max_rd_atomic %d > %d\n", attr->max_rd_atomic, rxe->attr.max_qp_rd_atom); goto err1; @@ -459,7 +456,8 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, if (mask & IB_QP_TIMEOUT) { if (attr->timeout > 31) { - pr_debug("invalid QP timeout %d > 31\n", attr->timeout); + rxe_dbg_qp(qp, "invalid timeout %d > 31\n", + attr->timeout); goto err1; } } @@ -637,27 +635,24 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, if (mask & IB_QP_RETRY_CNT) { qp->attr.retry_cnt = attr->retry_cnt; qp->comp.retry_cnt = attr->retry_cnt; - pr_debug("qp#%d set retry count = %d\n", qp_num(qp), - attr->retry_cnt); + rxe_dbg_qp(qp, "set retry count = %d\n", attr->retry_cnt); } if (mask & IB_QP_RNR_RETRY) { qp->attr.rnr_retry = attr->rnr_retry; qp->comp.rnr_retry = attr->rnr_retry; - pr_debug("qp#%d set rnr retry count = %d\n", qp_num(qp), - attr->rnr_retry); + rxe_dbg_qp(qp, "set rnr retry count = %d\n", attr->rnr_retry); } if (mask & IB_QP_RQ_PSN) { qp->attr.rq_psn = (attr->rq_psn & BTH_PSN_MASK); qp->resp.psn = qp->attr.rq_psn; - pr_debug("qp#%d set resp psn = 0x%x\n", qp_num(qp), - qp->resp.psn); + rxe_dbg_qp(qp, "set resp psn = 0x%x\n", qp->resp.psn); } if (mask & IB_QP_MIN_RNR_TIMER) { qp->attr.min_rnr_timer = attr->min_rnr_timer; - pr_debug("qp#%d set min rnr timer = 0x%x\n", qp_num(qp), + rxe_dbg_qp(qp, "set min rnr timer = 0x%x\n", attr->min_rnr_timer); } @@ -665,7 +660,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, qp->attr.sq_psn = (attr->sq_psn & BTH_PSN_MASK); qp->req.psn = qp->attr.sq_psn; qp->comp.psn = qp->attr.sq_psn; - pr_debug("qp#%d set req psn = 0x%x\n", qp_num(qp), qp->req.psn); + rxe_dbg_qp(qp, "set req psn = 0x%x\n", qp->req.psn); } if (mask & IB_QP_PATH_MIG_STATE) @@ -679,40 +674,40 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask, switch (attr->qp_state) { case IB_QPS_RESET: - pr_debug("qp#%d state -> RESET\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> RESET\n"); rxe_qp_reset(qp); break; case IB_QPS_INIT: - pr_debug("qp#%d state -> INIT\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> INIT\n"); qp->req.state = QP_STATE_INIT; qp->resp.state = QP_STATE_INIT; qp->comp.state = QP_STATE_INIT; break; case IB_QPS_RTR: - pr_debug("qp#%d state -> RTR\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> RTR\n"); qp->resp.state = QP_STATE_READY; break; case IB_QPS_RTS: - pr_debug("qp#%d state -> RTS\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> RTS\n"); qp->req.state = QP_STATE_READY; qp->comp.state = QP_STATE_READY; break; case IB_QPS_SQD: - pr_debug("qp#%d state -> SQD\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> SQD\n"); rxe_qp_drain(qp); break; case IB_QPS_SQE: - pr_warn("qp#%d state -> SQE !!?\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> SQE !!?\n"); /* Not possible from modify_qp. */ break; case IB_QPS_ERR: - pr_debug("qp#%d state -> ERR\n", qp_num(qp)); + rxe_dbg_qp(qp, "state -> ERR\n"); rxe_qp_error(qp); break; } @@ -752,7 +747,7 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask) attr->sq_draining = 0; } - pr_debug("attr->sq_draining = %d\n", attr->sq_draining); + rxe_dbg_qp(qp, "attr->sq_draining = %d\n", attr->sq_draining); return 0; } @@ -764,7 +759,7 @@ int rxe_qp_chk_destroy(struct rxe_qp *qp) * will fail immediately. */ if (atomic_read(&qp->mcg_num)) { - pr_debug("Attempt to destroy QP while attached to multicast group\n"); + rxe_dbg_qp(qp, "Attempt to destroy while attached to multicast group\n"); return -EBUSY; } From patchwork Tue Nov 1 20:22:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027448 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 879DDC433FE for ; Tue, 1 Nov 2022 20:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbiKAUYA (ORCPT ); Tue, 1 Nov 2022 16:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiKAUX6 (ORCPT ); Tue, 1 Nov 2022 16:23:58 -0400 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CB811EC5A for ; Tue, 1 Nov 2022 13:23:56 -0700 (PDT) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-13bd2aea61bso18180644fac.0 for ; Tue, 01 Nov 2022 13:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WxXQWRXx2VSWrNX2SesjY05W4BgTQKiZzjs6+V20W2I=; b=PsI8bbFk6RBmWhfhUTi7JAxMqqFprdvumuy1KpX1RQYTzYxO1cLjpDoucvamFnzq2D imjIOZbo6G6c2L33AbdpxWSEtOZ2TTIyacL8xqP+7Xw9T0JeIZtnpB4oIiwaucmX4stY HyPjftG+McwcOGTzqh8M7GLGjI8z8JVSeoZf/yH3My8gN3hTcQpP7n1PNALfOhJ9VGFp ChF8zNLsewt+7Jb/N9WokCocV4vs8ahmfpNSQVrHFEJyAUPG4cjQrkCGPSj2Hl0LfZYn t5xjr3Gzdd7Q+KlPPHbNWHk3hvw3XcdjPrSMMXQWQHqsz2Wl7laAbCotHo8G4PeQquw0 UeHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WxXQWRXx2VSWrNX2SesjY05W4BgTQKiZzjs6+V20W2I=; b=HoVjoYrJat7+64qg1McEryyQPAVOCHz6oqC95ZwoqEDI8oqjGCIeq5YKPmWnORNMo1 QJZYGG/XC1JvsnTJ35/JwVtkaDkArH1uzKUrRvE3YtncTSAvV5x6zTOlyLPmZWmDqG7d 3Q2r3rZ9kfMZ4k0CL5N1Jik2/1rUYKqJnkG1icmZxrPUs/KpPSvTAUBvIcBa7z4YQLZv eL/bvcdwwn7XfkZfjBpcvTZAFmhlqBeiPeTViO2zvS18JEdRRkByYTvODGfQl2WFbyRi MZVuDo13E1r08nh5oaCgj+xn/KRHsWXmEQOatbei/OfMF4W684HFRqkTNCQkd6dIY3wb UhoA== X-Gm-Message-State: ACrzQf24Bvaya6aSnZhn7kuM+lCGMHwtongAiRSChqBzUQIkshp9VyOA QECPiyTlgyJlEwOIla8hRo0= X-Google-Smtp-Source: AMsMyM573vNMmDzX709FBcxEgJT9xqIZQpUhrBnpoxP/YBdn5pC+I10Lxotjm3aaywDEBx1ccx07LQ== X-Received: by 2002:a05:6871:79f:b0:13c:265b:75d2 with SMTP id o31-20020a056871079f00b0013c265b75d2mr20057276oap.175.1667334235823; Tue, 01 Nov 2022 13:23:55 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:55 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 08/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_req.c Date: Tue, 1 Nov 2022 15:22:33 -0500 Message-Id: <20221101202238.32836-9-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn in rxe_req.c with rxe_dbg_qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_req.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 41f1d84f0acb..4d45f508392f 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -100,7 +100,7 @@ void rnr_nak_timer(struct timer_list *t) { struct rxe_qp *qp = from_timer(qp, t, rnr_nak_timer); - pr_debug("%s: fired for qp#%d\n", __func__, qp_num(qp)); + rxe_dbg_qp(qp, "nak timer fired\n"); /* request a send queue retry */ qp->req.need_retry = 1; @@ -595,7 +595,7 @@ static int rxe_do_local_ops(struct rxe_qp *qp, struct rxe_send_wqe *wqe) } break; default: - pr_err("Unexpected send wqe opcode %d\n", opcode); + rxe_dbg_qp(qp, "Unexpected send wqe opcode %d\n", opcode); wqe->status = IB_WC_LOC_QP_OP_ERR; return -EINVAL; } @@ -748,14 +748,14 @@ int rxe_requester(void *arg) av = rxe_get_av(&pkt, &ah); if (unlikely(!av)) { - pr_err("qp#%d Failed no address vector\n", qp_num(qp)); + rxe_dbg_qp(qp, "Failed no address vector\n"); wqe->status = IB_WC_LOC_QP_OP_ERR; goto err; } skb = init_req_packet(qp, av, wqe, opcode, payload, &pkt); if (unlikely(!skb)) { - pr_err("qp#%d Failed allocating skb\n", qp_num(qp)); + rxe_dbg_qp(qp, "Failed allocating skb\n"); wqe->status = IB_WC_LOC_QP_OP_ERR; if (ah) rxe_put(ah); @@ -764,7 +764,7 @@ int rxe_requester(void *arg) err = finish_packet(qp, av, wqe, &pkt, skb, payload); if (unlikely(err)) { - pr_debug("qp#%d Error during finish packet\n", qp_num(qp)); + rxe_dbg_qp(qp, "Error during finish packet\n"); if (err == -EFAULT) wqe->status = IB_WC_LOC_PROT_ERR; else From patchwork Tue Nov 1 20:22:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027449 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 4FF92C4332F for ; Tue, 1 Nov 2022 20:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229487AbiKAUYB (ORCPT ); Tue, 1 Nov 2022 16:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230254AbiKAUX6 (ORCPT ); Tue, 1 Nov 2022 16:23:58 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84BA41E739 for ; Tue, 1 Nov 2022 13:23:57 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13d604e207aso663861fac.11 for ; Tue, 01 Nov 2022 13:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zVe9ZfLRPNYHOfmtzWp4JC0kPR3TnPVQz8nZ+/weqCs=; b=Y6pD2RXG7X8DZ411ySdi1ETNdSY4f6mVIGPbc9TaCT07vVrlNodBCXfEngElHUthYC bNaqQpT+XBs985PfpqbjDq1FV45c4u9D4DNmVmbmnwB48Rtep0WygQ6ASf8HjykD/Pu+ +ZDem07VQ95gWLnh5Ed6XH+Sj2zZ4l1aSnFhvRE9cV0GcPtl8Ehz1b0hIe07paNEGiiK xbUqPk2mKi7zrT+ti6TPkuhSXtpMZQDjdmGXOEEJmfj/luH79m5F6VQymP5Icw4OCEJX Fnym9mkEmd1HO9ZHWiTGPROY+jFOt79OwNfMvNF2PluXwrEyPn79VbCmShR7DvBHS3Wq d0qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zVe9ZfLRPNYHOfmtzWp4JC0kPR3TnPVQz8nZ+/weqCs=; b=bgQIZxC7rF0+/MNT9cedcF+YEoHZ7C/lofN3VHC8KZMoE76M3X4qGwDhfjPhXMbWHz aZoo/T5+jTutwo/nJpKT7+2wSAKbCWsjgZ1Ws4TqJrVnbszZzZ8Dsy3QohJNDpH4zqZC 8P0SxsnDDKsCR2kiu1Q7tVzUw19e+XwcyfYjbuxHR5rXY/4VnALucaOZOWf/trkJ6x6y xYN1jZjvjrzyDnT0dskmkcJzaODHsFh9ersrjWpRCmtfolrRinSlPW29+2jARrF+ORri 6q8MT+5lxsSY+NigPx920xpsF6hwW/2quAGXOtAYp8evcCFvLrD6knlY+1tkkmpuRvvL lM+Q== X-Gm-Message-State: ACrzQf1F/wJytDa//VTBDfg+eBN4ZkDdn/o/S7S7ILmONAvuFXGLKLL+ 6JwDDVPfO3sB3QtAfBBjNWg7F0hoVXs= X-Google-Smtp-Source: AMsMyM43CRLSUO1WWGLSdCBkXrmCXf5nea1iLVujd60Jfcudcmeu/IaUyhPYmjF4wnd9tDR3IECwIQ== X-Received: by 2002:a05:6870:a997:b0:11c:5a86:e11a with SMTP id ep23-20020a056870a99700b0011c5a86e11amr11907877oab.270.1667334236866; Tue, 01 Nov 2022 13:23:56 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:56 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 09/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_resp.c Date: Tue, 1 Nov 2022 15:22:34 -0500 Message-Id: <20221101202238.32836-10-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn() in rxe_resp.c with rxe_dbg_qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_resp.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index c32bc12cc82f..61f03ff3c696 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -317,7 +317,7 @@ static enum resp_states get_srq_wqe(struct rxe_qp *qp) /* don't trust user space data */ if (unlikely(wqe->dma.num_sge > srq->rq.max_sge)) { spin_unlock_irqrestore(&srq->rq.consumer_lock, flags); - pr_warn("%s: invalid num_sge in SRQ entry\n", __func__); + rxe_dbg_qp(qp, "invalid num_sge in SRQ entry\n"); return RESPST_ERR_MALFORMED_WQE; } size = sizeof(*wqe) + wqe->dma.num_sge*sizeof(struct rxe_sge); @@ -453,15 +453,14 @@ static enum resp_states check_rkey(struct rxe_qp *qp, if (rkey_is_mw(rkey)) { mw = rxe_lookup_mw(qp, access, rkey); if (!mw) { - pr_debug("%s: no MW matches rkey %#x\n", - __func__, rkey); + rxe_dbg_qp(qp, "no MW matches rkey %#x\n", rkey); state = RESPST_ERR_RKEY_VIOLATION; goto err; } mr = mw->mr; if (!mr) { - pr_err("%s: MW doesn't have an MR\n", __func__); + rxe_dbg_qp(qp, "MW doesn't have an MR\n"); state = RESPST_ERR_RKEY_VIOLATION; goto err; } @@ -474,8 +473,7 @@ static enum resp_states check_rkey(struct rxe_qp *qp, } else { mr = lookup_mr(qp->pd, access, rkey, RXE_LOOKUP_REMOTE); if (!mr) { - pr_debug("%s: no MR matches rkey %#x\n", - __func__, rkey); + rxe_dbg_qp(qp, "no MR matches rkey %#x\n", rkey); state = RESPST_ERR_RKEY_VIOLATION; goto err; } @@ -1044,7 +1042,7 @@ static int send_common_ack(struct rxe_qp *qp, u8 syndrome, u32 psn, err = rxe_xmit_packet(qp, &ack_pkt, skb); if (err) - pr_err_ratelimited("Failed sending %s\n", msg); + rxe_dbg_qp(qp, "Failed sending %s\n", msg); return err; } @@ -1290,8 +1288,7 @@ int rxe_responder(void *arg) } while (1) { - pr_debug("qp#%d state = %s\n", qp_num(qp), - resp_state_name[state]); + rxe_dbg_qp(qp, "state = %s\n", resp_state_name[state]); switch (state) { case RESPST_GET_REQ: state = get_req(qp, &pkt); @@ -1448,7 +1445,7 @@ int rxe_responder(void *arg) case RESPST_ERROR: qp->resp.goto_error = 0; - pr_debug("qp#%d moved to error state\n", qp_num(qp)); + rxe_dbg_qp(qp, "moved to error state\n"); rxe_qp_error(qp); goto exit; From patchwork Tue Nov 1 20:22:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027451 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 93046C433FE for ; Tue, 1 Nov 2022 20:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbiKAUYE (ORCPT ); Tue, 1 Nov 2022 16:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbiKAUYB (ORCPT ); Tue, 1 Nov 2022 16:24:01 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E8241EC71 for ; Tue, 1 Nov 2022 13:23:58 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id br15-20020a056830390f00b0061c9d73b8bdso9166248otb.6 for ; Tue, 01 Nov 2022 13:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EJWftdyeXBm9wF1AzRAnKgMZKBrEO1waOP1rNpHh3EI=; b=fi3zbqxZ3FyKXgQyfi+zi6TFRb80WztbO67+09gGmLzlwub0kUj10Tik+aIGHHkn6m CxID6tAwI38ndVqXXz2rWmlGV0WoJnXeeckVXj2AFI0GHJqcJx1E5YHHxFAn8DhLJSBS hs2ekLH+9y3bhHmsqOAEVS+8V2tjYZaNDVqGXoFc1Nblw5gOTF0CyRbJoq+YGM4g5jpr FIIuVXYbOtxNvdx69FEn3MgQWi5OGfIONl2t1P7U9G5M4DmV8RxAXJRECaLF0ljjLFiq PthOsMCqVunb9Ljx6tczVK6iNpdENBmGFXKSftqR/xqdyOBVHVaY6rxld0iqeKlJEYqW ByXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EJWftdyeXBm9wF1AzRAnKgMZKBrEO1waOP1rNpHh3EI=; b=S5r+bLU7qwiOMnncD/nma1PqISgKk3EN93T/CcFofjuddQ79m3HpWo3xfzbxYhlavC f0kl+92VezUSr6rQ3LvzpZHQ/kI/bfK/I5uW9h1rT24i9SBDM5Sl3dfNcEfuVOA08w0j G1aVodAr017r436m8ETE1L+59EuAYmHqfTXxvF1H/IVYBsvgp5uLfh6vfPFB+dOxfQWK 14W10OvsRgEbIUy05e62+zQOA5HKSqr9wjd0SpZNZhZ6sAWumlbvmtImZoklMRAoZ6nH TfhC9xbIZP+qDnVRxJdIatdxKlRhiMpMGPGDOXVGzZP7zj8ibGdhD9PAEuk/vbWhowyN bfiA== X-Gm-Message-State: ACrzQf2JfIPV2g0SdmC3k6X2vozBTcrA+PJML/3hdL1x1MLGNfXv0eUc qZXK0DpWV7B00XW6KhWW0Ok= X-Google-Smtp-Source: AMsMyM4GRQR0jmeW/xXqe9/XJv3wWC+ytDWCUMetHpMKF+2ZqqfwBVJYKUWLrhWlAbctcMEVVR7OhQ== X-Received: by 2002:a9d:6d16:0:b0:66b:b674:4a4b with SMTP id o22-20020a9d6d16000000b0066bb6744a4bmr10934041otp.363.1667334237787; Tue, 01 Nov 2022 13:23:57 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:57 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 10/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_srq in rxe_srq.c Date: Tue, 1 Nov 2022 15:22:35 -0500 Message-Id: <20221101202238.32836-11-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn in rxe_srq.c with rxe_dbg_srq(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_srq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_srq.c b/drivers/infiniband/sw/rxe/rxe_srq.c index 02b39498c370..82e37a41ced4 100644 --- a/drivers/infiniband/sw/rxe/rxe_srq.c +++ b/drivers/infiniband/sw/rxe/rxe_srq.c @@ -13,13 +13,13 @@ int rxe_srq_chk_init(struct rxe_dev *rxe, struct ib_srq_init_attr *init) struct ib_srq_attr *attr = &init->attr; if (attr->max_wr > rxe->attr.max_srq_wr) { - pr_warn("max_wr(%d) > max_srq_wr(%d)\n", + rxe_dbg(rxe, "max_wr(%d) > max_srq_wr(%d)\n", attr->max_wr, rxe->attr.max_srq_wr); goto err1; } if (attr->max_wr <= 0) { - pr_warn("max_wr(%d) <= 0\n", attr->max_wr); + rxe_dbg(rxe, "max_wr(%d) <= 0\n", attr->max_wr); goto err1; } @@ -27,7 +27,7 @@ int rxe_srq_chk_init(struct rxe_dev *rxe, struct ib_srq_init_attr *init) attr->max_wr = RXE_MIN_SRQ_WR; if (attr->max_sge > rxe->attr.max_srq_sge) { - pr_warn("max_sge(%d) > max_srq_sge(%d)\n", + rxe_dbg(rxe, "max_sge(%d) > max_srq_sge(%d)\n", attr->max_sge, rxe->attr.max_srq_sge); goto err1; } @@ -65,7 +65,7 @@ int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq, type = QUEUE_TYPE_FROM_CLIENT; q = rxe_queue_init(rxe, &srq->rq.max_wr, srq_wqe_size, type); if (!q) { - pr_warn("unable to allocate queue for srq\n"); + rxe_dbg_srq(srq, "Unable to allocate queue\n"); return -ENOMEM; } @@ -94,24 +94,24 @@ int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq, struct ib_srq_attr *attr, enum ib_srq_attr_mask mask) { if (srq->error) { - pr_warn("srq in error state\n"); + rxe_dbg_srq(srq, "in error state\n"); goto err1; } if (mask & IB_SRQ_MAX_WR) { if (attr->max_wr > rxe->attr.max_srq_wr) { - pr_warn("max_wr(%d) > max_srq_wr(%d)\n", + rxe_dbg_srq(srq, "max_wr(%d) > max_srq_wr(%d)\n", attr->max_wr, rxe->attr.max_srq_wr); goto err1; } if (attr->max_wr <= 0) { - pr_warn("max_wr(%d) <= 0\n", attr->max_wr); + rxe_dbg_srq(srq, "max_wr(%d) <= 0\n", attr->max_wr); goto err1; } if (srq->limit && (attr->max_wr < srq->limit)) { - pr_warn("max_wr (%d) < srq->limit (%d)\n", + rxe_dbg_srq(srq, "max_wr (%d) < srq->limit (%d)\n", attr->max_wr, srq->limit); goto err1; } @@ -122,13 +122,13 @@ int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq, if (mask & IB_SRQ_LIMIT) { if (attr->srq_limit > rxe->attr.max_srq_wr) { - pr_warn("srq_limit(%d) > max_srq_wr(%d)\n", + rxe_dbg_srq(srq, "srq_limit(%d) > max_srq_wr(%d)\n", attr->srq_limit, rxe->attr.max_srq_wr); goto err1; } if (attr->srq_limit > srq->rq.queue->buf->index_mask) { - pr_warn("srq_limit (%d) > cur limit(%d)\n", + rxe_dbg_srq(srq, "srq_limit (%d) > cur limit(%d)\n", attr->srq_limit, srq->rq.queue->buf->index_mask); goto err1; From patchwork Tue Nov 1 20:22:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027450 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 AB98BC4332F for ; Tue, 1 Nov 2022 20:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbiKAUYC (ORCPT ); Tue, 1 Nov 2022 16:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbiKAUYB (ORCPT ); Tue, 1 Nov 2022 16:24:01 -0400 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81E0E1EAE5 for ; Tue, 1 Nov 2022 13:23:59 -0700 (PDT) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-13b23e29e36so18099338fac.8 for ; Tue, 01 Nov 2022 13:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p3rQEWll29OjU+ecMAk0UIt23uSILXVIrphaLoNTl9g=; b=AcHwO1s54d8os4kAo9febr+BwsYCS55/o5MEbHYyL2Y0W30awBcYj65hc5QoeI8NM1 2+o0j/bzqSLMWdn+MyJWTibibOKchYgXyjRvw4FMPiGLmtmSrMQOXSepm5y0wtAN4Bt9 vvS122hoX5n/Sb9vDa4YbQIA3qUV52j3YOdA0QPi9GsKKoq08bsmTQ9Yo79y7BiaDheO 9GLuOxwaswgN9bG7554VV0tKbobxPAhquQFG3wh/ivzNnRRl6pn697b9+2pTERYJJHmz E8WBwfeyS6yaTe0YZ33YGpQ+qAs6++VXYCUrQ1bSamfrvdXMCHo2+3FTtxrZ/EJfnqau vUXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p3rQEWll29OjU+ecMAk0UIt23uSILXVIrphaLoNTl9g=; b=ZYWwZ8S/1jC6bat8OwynVllhiJj9jGYIGA+/M9UvoIYxYUjD9yGxY1/K33U/ZM1b/q 2p+iNRcme/IOLLYd/8GH4BCyJ8nSSqKmL8KGi1CElMkI/WVRz5ASubgSe6YBzMzLzcBR 5hLaMzoFuzsqDeMDKkhP4gCs+wKeSvJC7Ism2D8INt7bzOS9vvYskBbwywk19lktzBwe SSITrc+WgDsthLusOy9LwQENgB7gysFamZnfEkgoYtXV+cY9ED70ubBYN2mv5/Qx8yoQ 6ihVaTy4mHaaFU9OVFU37e9dsnIIYWfCG7gplLwblRwqqccWwNEoXFSPjcFnXggftJ1o FYvw== X-Gm-Message-State: ACrzQf3SMXb9uQIOsntpbKfKI4pvBBbOwlH1lkHvLfzDQAjFbf7AgTnS dseLuue67KdDVmA0Lv92K2M= X-Google-Smtp-Source: AMsMyM4vxcs0KsxG2NEAgrNGhxOpuR9w9ykMFoqjbMqMFTHECvtza9Kpp49nPcRpg0ddr9HCC0ToLg== X-Received: by 2002:a05:6870:808f:b0:13d:3e44:49ff with SMTP id q15-20020a056870808f00b0013d3e4449ffmr2876776oab.63.1667334238920; Tue, 01 Nov 2022 13:23:58 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:58 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 11/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_verbs.c Date: Tue, 1 Nov 2022 15:22:36 -0500 Message-Id: <20221101202238.32836-12-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Repalce calls to rxe_err/warn in rxe_verbs.c with rxe_dbg(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 510ae471ac7a..e6eca21c54e6 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -1103,7 +1103,7 @@ int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name) err = ib_register_device(dev, ibdev_name, NULL); if (err) - pr_warn("%s failed with error %d\n", __func__, err); + rxe_dbg(rxe, "failed with error %d\n", err); /* * Note that rxe may be invalid at this point if another thread From patchwork Tue Nov 1 20:22:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027452 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 5C2F1C433FE for ; Tue, 1 Nov 2022 20:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbiKAUYG (ORCPT ); Tue, 1 Nov 2022 16:24:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiKAUYF (ORCPT ); Tue, 1 Nov 2022 16:24:05 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE431EC6B for ; Tue, 1 Nov 2022 13:24:00 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id 16-20020a9d0490000000b0066938311495so9147073otm.4 for ; Tue, 01 Nov 2022 13:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3+4PfPgefki07+dnKgvWOv3N2++mu4QJya08px0YDCk=; b=c3avYLq1c/+y2jd5r6e+f4c16VZ4J42Pkzk9o3OcmqzcdrHgzhEYKdziz4JhXV59M5 Xor0wG87ZGiGAWmS/T8KufELI4lUWjWQQeR69TUIQ0YIhboHZFuPJBH+QzER7FtKolpK lPoMU5IdV3bg6UygeSqNqr0YleEdOnBVwCxYh92/ZgoQ8PRZxqI5zMEKimkI09QsePJH /K7OkDHlezRJtJs+UKjbZTEj0VDubB0MSTdl6/OYSJUHEgI00TCg7VDOx/2cSA3IWiMa lIbCsYG4+/NtbbJrI6sbeHfoEMVtzHe/T617f0sy1UH/nkDvKu8EUmTGztZAYToGFsue f+dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3+4PfPgefki07+dnKgvWOv3N2++mu4QJya08px0YDCk=; b=L5x7gJ03mUAM/9Zg+Cta8xWYmAo7n17HyjusDvFrWRxkW5SxL5w7HQL8wbFPgrk1/B pCxzXpPo040N5fHuzMOVYe8qj7nEqxzkW0ownhJQwg34UMcUrULBl1eY/OAJ+BPyvMX/ HllLCC3Q01QqJan42+SbAWfONDANDmeyTqvzlONtSKe0q8fnvtbU8DiXGHxg1ZAvDxNq Giq7fMuB57QYX9MWXHDY4cyH56W4zDrRZHWjEmhFyVM0dGvl/JJr+l13cwwiS5EJN9+z ATBWtZHHu4Mnu3wsD6bt7ZJK725/nrZAzWJJ6nkSzuYEjH0OYJeu7AboLmRhmwVO11xE dbCg== X-Gm-Message-State: ACrzQf2lUxep2VHz0eR8zWAXksHroNyztdKTWov0mYU352RZJVv6+aIQ uBRb4WPK0IiwH+5D6p7q/Ts= X-Google-Smtp-Source: AMsMyM43pdMdrGSUSWXOdeTXbRFKlbd5xAUngzfH0HVvaVuB2HaQrstkCJQoIWz1wq9e5gsd4X8YuQ== X-Received: by 2002:a05:6830:4120:b0:661:a0a2:3f2e with SMTP id w32-20020a056830412000b00661a0a23f2emr10007119ott.127.1667334240116; Tue, 01 Nov 2022 13:24:00 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:23:59 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 12/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_av.c Date: Tue, 1 Nov 2022 15:22:37 -0500 Message-Id: <20221101202238.32836-13-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn() in rxe_av.c with rxe_dbg_ah/qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_av.c | 43 ++++++++++++++++++++++----- drivers/infiniband/sw/rxe/rxe_loc.h | 8 ++--- drivers/infiniband/sw/rxe/rxe_qp.c | 4 +-- drivers/infiniband/sw/rxe/rxe_verbs.c | 13 ++++---- 4 files changed, 47 insertions(+), 21 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c index 3b05314ca739..889d7adbd455 100644 --- a/drivers/infiniband/sw/rxe/rxe_av.c +++ b/drivers/infiniband/sw/rxe/rxe_av.c @@ -14,26 +14,45 @@ void rxe_init_av(struct rdma_ah_attr *attr, struct rxe_av *av) memcpy(av->dmac, attr->roce.dmac, ETH_ALEN); } -int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr) +static int chk_attr(void *obj, struct rdma_ah_attr *attr, bool obj_is_ah) { const struct ib_global_route *grh = rdma_ah_read_grh(attr); struct rxe_port *port; + struct rxe_dev *rxe; + struct rxe_qp *qp; + struct rxe_ah *ah; int type; + if (obj_is_ah) { + ah = obj; + rxe = to_rdev(ah->ibah.device); + } else { + qp = obj; + rxe = to_rdev(qp->ibqp.device); + } + port = &rxe->port; if (rdma_ah_get_ah_flags(attr) & IB_AH_GRH) { if (grh->sgid_index > port->attr.gid_tbl_len) { - pr_warn("invalid sgid index = %d\n", - grh->sgid_index); + if (obj_is_ah) + rxe_dbg_ah(ah, "invalid sgid index = %d\n", + grh->sgid_index); + else + rxe_dbg_qp(qp, "invalid sgid index = %d\n", + grh->sgid_index); return -EINVAL; } type = rdma_gid_attr_network_type(grh->sgid_attr); if (type < RDMA_NETWORK_IPV4 || type > RDMA_NETWORK_IPV6) { - pr_warn("invalid network type for rdma_rxe = %d\n", - type); + if (obj_is_ah) + rxe_dbg_ah(ah, "invalid network type for rdma_rxe = %d\n", + type); + else + rxe_dbg_qp(qp, "invalid network type for rdma_rxe = %d\n", + type); return -EINVAL; } } @@ -41,6 +60,16 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr) return 0; } +int rxe_av_chk_attr(struct rxe_qp *qp, struct rdma_ah_attr *attr) +{ + return chk_attr(qp, attr, false); +} + +int rxe_ah_chk_attr(struct rxe_ah *ah, struct rdma_ah_attr *attr) +{ + return chk_attr(ah, attr, true); +} + void rxe_av_from_attr(u8 port_num, struct rxe_av *av, struct rdma_ah_attr *attr) { @@ -121,12 +150,12 @@ struct rxe_av *rxe_get_av(struct rxe_pkt_info *pkt, struct rxe_ah **ahp) /* only new user provider or kernel client */ ah = rxe_pool_get_index(&pkt->rxe->ah_pool, ah_num); if (!ah) { - pr_warn("Unable to find AH matching ah_num\n"); + rxe_dbg_qp(pkt->qp, "Unable to find AH matching ah_num\n"); return NULL; } if (rxe_ah_pd(ah) != pkt->qp->pd) { - pr_warn("PDs don't match for AH and QP\n"); + rxe_dbg_qp(pkt->qp, "PDs don't match for AH and QP\n"); rxe_put(ah); return NULL; } diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h index c2a5c8814a48..a22476d27b38 100644 --- a/drivers/infiniband/sw/rxe/rxe_loc.h +++ b/drivers/infiniband/sw/rxe/rxe_loc.h @@ -9,16 +9,12 @@ /* rxe_av.c */ void rxe_init_av(struct rdma_ah_attr *attr, struct rxe_av *av); - -int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr); - +int rxe_av_chk_attr(struct rxe_qp *qp, struct rdma_ah_attr *attr); +int rxe_ah_chk_attr(struct rxe_ah *ah, struct rdma_ah_attr *attr); void rxe_av_from_attr(u8 port_num, struct rxe_av *av, struct rdma_ah_attr *attr); - void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr); - void rxe_av_fill_ip_info(struct rxe_av *av, struct rdma_ah_attr *attr); - struct rxe_av *rxe_get_av(struct rxe_pkt_info *pkt, struct rxe_ah **ahp); /* rxe_cq.c */ diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index bcbfe6068b8b..46f6c74ce00e 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -414,11 +414,11 @@ int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, if (mask & IB_QP_CAP && rxe_qp_chk_cap(rxe, &attr->cap, !!qp->srq)) goto err1; - if (mask & IB_QP_AV && rxe_av_chk_attr(rxe, &attr->ah_attr)) + if (mask & IB_QP_AV && rxe_av_chk_attr(qp, &attr->ah_attr)) goto err1; if (mask & IB_QP_ALT_PATH) { - if (rxe_av_chk_attr(rxe, &attr->alt_ah_attr)) + if (rxe_av_chk_attr(qp, &attr->alt_ah_attr)) goto err1; if (!rdma_is_port_valid(&rxe->ib_dev, attr->alt_port_num)) { rxe_dbg_qp(qp, "invalid alt port %d\n", attr->alt_port_num); diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index e6eca21c54e6..025b35bf014e 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -172,10 +172,6 @@ static int rxe_create_ah(struct ib_ah *ibah, ah->is_user = false; } - err = rxe_av_chk_attr(rxe, init_attr->ah_attr); - if (err) - return err; - err = rxe_add_to_pool_ah(&rxe->ah_pool, ah, init_attr->flags & RDMA_CREATE_AH_SLEEPABLE); if (err) @@ -184,6 +180,12 @@ static int rxe_create_ah(struct ib_ah *ibah, /* create index > 0 */ ah->ah_num = ah->elem.index; + err = rxe_ah_chk_attr(ah, init_attr->ah_attr); + if (err) { + rxe_cleanup(ah); + return err; + } + if (uresp) { /* only if new user provider */ err = copy_to_user(&uresp->ah_num, &ah->ah_num, @@ -206,10 +208,9 @@ static int rxe_create_ah(struct ib_ah *ibah, static int rxe_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr) { int err; - struct rxe_dev *rxe = to_rdev(ibah->device); struct rxe_ah *ah = to_rah(ibah); - err = rxe_av_chk_attr(rxe, attr); + err = rxe_ah_chk_attr(ah, attr); if (err) return err; From patchwork Tue Nov 1 20:22:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027453 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 EB3DCC4332F for ; Tue, 1 Nov 2022 20:25:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbiKAUYk (ORCPT ); Tue, 1 Nov 2022 16:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiKAUYH (ORCPT ); Tue, 1 Nov 2022 16:24:07 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F911EEC4 for ; Tue, 1 Nov 2022 13:24:01 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id v8-20020a4ab688000000b00486ac81143fso2217195ooo.1 for ; Tue, 01 Nov 2022 13:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eoJjhKZrbgkuVHlvtoanzHI8drWJoSVBL5ZAF5DXUUE=; b=mON0BaqggleDcSx7LO0ANLbCHUNXUMmLa8kdwjnH3IKKIoJxFWSElCkLke525MxAXN IjYrE3EHmGDy3onk+8A82I0uMWt3BpXUuSqWUmmy97ywkLfpJ5j1qniDbnCs6f/w+/30 Wdlun5EM+b6ItgnzLQdxti3rhp709CUt2rgTpZn5DPokrpmjhGOjgoST8Kt8f1Vxnxe3 fYxA8IRgkf0yhVgbT7Vi5romgbpNC7px3dwfCUA84RZlyPuSLcApdxqVfbixM1mY3qWF Il1kDKxYh3PNvtXpKuv9bsSLtnJ9vtNzKxhcoTDDVeZTOre1FQPeBmyVOmW00XQ4hoMd HS8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eoJjhKZrbgkuVHlvtoanzHI8drWJoSVBL5ZAF5DXUUE=; b=y/OTuIDv5yI08liBEJ7Emg3XgG7ZsMx6JhnP23oQ1EOm0t3r8IQ1h4qjlHdL3YZWhp L4+n9I8/RsGhIA3ZIoRf0lGNdDuepBWG4WVbFOxrH1Ru/2F7u8/50srPhc48ti4OPCTh b+Bf5ASqaYjyuFYgkRr/5bDJFZjxNVhbxHD9h8ZvXabtVw0exbRlZaolRAkZjzbzqlfy +7/O/o/heEzrsiR5/ECx9bZjqHxkQBNd0a5QErUSJZ9F+uOZ4purY6oa4Cn++6+STq6N t1ZCENZg0AU0YtH3FPJTQhW9eHQIzQyPrawml/s2z7gIy8yQ/TPEqxAKlp+NXOUvombV fwpg== X-Gm-Message-State: ACrzQf0GKOL7ekad2hxhNh+Q3lRZw7DsMZyGUP2HtVqaz0s3EOJ26i92 Db1FWlRQCJ9RsIFD3OlUFGc= X-Google-Smtp-Source: AMsMyM6wMU69gsgrif/pC0DJWKwKLlDO0buE2mfdoh/8J5oelDGuYkBPipapFKIlf0cvtl0ItdA6pA== X-Received: by 2002:a4a:c20e:0:b0:476:59ad:b02b with SMTP id z14-20020a4ac20e000000b0047659adb02bmr8754830oop.65.1667334241222; Tue, 01 Nov 2022 13:24:01 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:24:00 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 13/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_task.c Date: Tue, 1 Nov 2022 15:22:38 -0500 Message-Id: <20221101202238.32836-14-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn() in rxe_task.c with rxe_dbg_qp(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_task.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c index 0208d833a41b..60b90e33a884 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.c +++ b/drivers/infiniband/sw/rxe/rxe_task.c @@ -29,6 +29,7 @@ static void do_task(struct tasklet_struct *t) int cont; int ret; struct rxe_task *task = from_tasklet(task, t, tasklet); + struct rxe_qp *qp = (struct rxe_qp *)task->arg; unsigned int iterations = RXE_MAX_ITERATIONS; spin_lock_bh(&task->lock); @@ -47,7 +48,7 @@ static void do_task(struct tasklet_struct *t) default: spin_unlock_bh(&task->lock); - pr_warn("%s failed with bad state %d\n", __func__, task->state); + rxe_dbg_qp(qp, "failed with bad state %d\n", task->state); return; } @@ -81,8 +82,8 @@ static void do_task(struct tasklet_struct *t) break; default: - pr_warn("%s failed with bad state %d\n", __func__, - task->state); + rxe_dbg_qp(qp, "failed with bad state %d\n", + task->state); } spin_unlock_bh(&task->lock); } while (cont); From patchwork Tue Nov 1 20:22:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027456 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 230F9C43219 for ; Tue, 1 Nov 2022 20:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbiKAUYl (ORCPT ); Tue, 1 Nov 2022 16:24:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbiKAUYJ (ORCPT ); Tue, 1 Nov 2022 16:24:09 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 999CE1EED5 for ; Tue, 1 Nov 2022 13:24:03 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id k59-20020a9d19c1000000b0066c45cdfca5so4724929otk.10 for ; Tue, 01 Nov 2022 13:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U2pSdTKM7iQu0Jk8e7av42NZMTW0FwfFiXKtcz2t9Rk=; b=ApYbHbmZEzGOl3tT+R9mtAD65/gm/Anyi07HYUA3OVjSFjw/cX4WDjhQV2a4KEZVQv nWDvM6hGGhblDVRZulQCzv1p14huW3cB/Oc+16sFE/cudpiba4FlTDvGWAvVQKoBgtoh Yp2mJ2O6HZdpEcfi6g6xybl/RxLRrMWzZFb90cHJnaws+aPcZsd3IGpPZtc2kpbnFTfX DNY0QCGfMu4oQjJsdDX8B5lpOR1kt8JFtggI1gCjRVDvqd8AykYqN58T7JYmLT4RzSAZ chKPa1a5VgOtMhW/CkHRBxgyODg37snSLettP6T++qM2Gx8qM1IHxPIYnT4ea53srdkm HKjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U2pSdTKM7iQu0Jk8e7av42NZMTW0FwfFiXKtcz2t9Rk=; b=TRX9ZD1TPueoUSsenIY2BZ4RahHMJMVxn93O3HQLQcvaMv6nq3g1RmfHb3Nm7cp+cP bWsmmOOnLCQQymDhuRaEO2ZX+68MGhuxPlozHXQIC52Aq8c0J42d9StCYCQ95/lH4c/Y HTTPqkLlDJfCHbn6KFNsCDSPH3VXFI4uC6yjnFQRJeYOKUoJa7IMMMFeToOxk8owKKn2 0FWWAGAfPU3PXJ4NQozWIQpnrSYGxKonDhfOPnBhmX/4QShsPvORz6xHk2aB8qOQLPnN Tj2KHusiahL02qU3/Dn74qF/fsYBQVNl4vPuLtCAXX4GMxzAIAKXCZ1Ocd/OrtjvBWeh MPrw== X-Gm-Message-State: ACrzQf0lFNzJPgclJXLoTk9mzaayvU/NXcFC4NNV3IO55vRYvBsNpMvx 5bdW5nop5vHcNDTiZiAlYZ0= X-Google-Smtp-Source: AMsMyM54FrZuUoqOMoQnn/ZzfJdsQJZ2Hv04nLRKyM2wygZfzpvSBNOEyd3KYoMtd0wy/iJpUkhcVQ== X-Received: by 2002:a05:6830:4c9:b0:661:e80b:bd4b with SMTP id s9-20020a05683004c900b00661e80bbd4bmr10361871otd.22.1667334242677; Tue, 01 Nov 2022 13:24:02 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:24:02 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 14/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe.c Date: Tue, 1 Nov 2022 15:22:39 -0500 Message-Id: <20221101202238.32836-15-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err() in rxe.c with rxe_dbg(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index 51daac5c4feb..136c2efe3466 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -187,14 +187,14 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev) exists = rxe_get_dev_from_net(ndev); if (exists) { ib_device_put(&exists->ib_dev); - pr_err("already configured on %s\n", ndev->name); + rxe_dbg(exists, "already configured on %s\n", ndev->name); err = -EEXIST; goto err; } err = rxe_net_add(ibdev_name, ndev); if (err) { - pr_err("failed to add %s\n", ndev->name); + rxe_dbg(exists, "failed to add %s\n", ndev->name); goto err; } err: From patchwork Tue Nov 1 20:22:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027455 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 3D41EC43217 for ; Tue, 1 Nov 2022 20:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbiKAUYn (ORCPT ); Tue, 1 Nov 2022 16:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230309AbiKAUYL (ORCPT ); Tue, 1 Nov 2022 16:24:11 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 656781EEE4 for ; Tue, 1 Nov 2022 13:24:04 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-12c8312131fso18117403fac.4 for ; Tue, 01 Nov 2022 13:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X8kjCkmDp8qX2VpLn2gD9O5IPnX7KvkfQZ6zg8BpYMY=; b=pVpIT/mdREaQ3OzO2hjq1jciqlDUlHKm59w0drzVVFB6fCjyWpzMjA8dbtPb93XQgb wQ+Q1WQkIlYc91X70VOeOBHZnWurG3ZPwWGNbKS+9jAd4Nam2nYDea8rZRHmXH0pAr3D kdla+DGNozu1ku88cirPlDiwJnA8G5zpZjZe15ye6CoASqbCaQ5+PmPbmXKhmCmP4Z68 DM8cU41W6D/bf5tIXJws1JwvzhLBHbtMqFL9iTjO8Q/k6lxB9XZlZLln/zjZ8P/H3Dbo IVfxXIQ/YCQx3IAm6gOikown4gga3BDTR3xJ7SKVpTxkfuJ+DaJUSzEo1vtJ4zOjY911 fxqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X8kjCkmDp8qX2VpLn2gD9O5IPnX7KvkfQZ6zg8BpYMY=; b=fdUjpWJzIU8LMQxx13jB5N4n7USbvhcCTzd9djk+WRM+NvRftT/d39mmu2xQAEDzIc S5Uje4FLe+txuQRu2fwllBW3JoKU4fzd3OWk+OMkYFmN0WnTmLdfHXtv1pgKSciwDQOd tH36Xrgc/UHEZmKl6zaRgHx1OkFI1KssoEVj4VFfGbwZT4RW/48dak85REf77gZaKHf9 TeLYJ58H3p/fIr2Ii+TBUeXYJeJtFSbzk0royF2JfBFZOed0s0imxzh1YKSGQXUgDEsg 54JJyinHznj8mY2Z6dQwzqHLf02Zoiaxjz0ZuYbFpL1sjPNMszU+NXg7RWEhAsooPgla nIMA== X-Gm-Message-State: ACrzQf1AdqIgHYjK2m4kZQq+HYeH7QUOYMesGhl8Ua8YS9tMCJ9bW9Vf xhniJkhZSzsa7Cp2WSfmp+I= X-Google-Smtp-Source: AMsMyM7BAC9zYFyMyAOvPxfrJjeuvZSA9v4oV4eFevoWsu3wxaAmnon4Ej7v/7qdBYYaCqIvHc56IA== X-Received: by 2002:a05:6870:d14f:b0:13c:673d:6799 with SMTP id f15-20020a056870d14f00b0013c673d6799mr12305175oac.149.1667334243634; Tue, 01 Nov 2022 13:24:03 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:24:03 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 15/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_icrc.c Date: Tue, 1 Nov 2022 15:22:40 -0500 Message-Id: <20221101202238.32836-16-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_err/warn in rxe_icrc.c with rxe_dbg(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_icrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_icrc.c b/drivers/infiniband/sw/rxe/rxe_icrc.c index 46bb07c5c4df..71bc2c189588 100644 --- a/drivers/infiniband/sw/rxe/rxe_icrc.c +++ b/drivers/infiniband/sw/rxe/rxe_icrc.c @@ -21,7 +21,7 @@ int rxe_icrc_init(struct rxe_dev *rxe) tfm = crypto_alloc_shash("crc32", 0, 0); if (IS_ERR(tfm)) { - pr_warn("failed to init crc32 algorithm err:%ld\n", + rxe_dbg(rxe, "failed to init crc32 algorithm err: %ld\n", PTR_ERR(tfm)); return PTR_ERR(tfm); } @@ -51,7 +51,7 @@ static __be32 rxe_crc32(struct rxe_dev *rxe, __be32 crc, void *next, size_t len) *(__be32 *)shash_desc_ctx(shash) = crc; err = crypto_shash_update(shash, next, len); if (unlikely(err)) { - pr_warn_ratelimited("failed crc calculation, err: %d\n", err); + rxe_dbg(rxe, "failed crc calculation, err: %d\n", err); return (__force __be32)crc32_le((__force u32)crc, next, len); } From patchwork Tue Nov 1 20:22:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13027454 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 0A7F6C433FE for ; Tue, 1 Nov 2022 20:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbiKAUYm (ORCPT ); Tue, 1 Nov 2022 16:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiKAUYL (ORCPT ); Tue, 1 Nov 2022 16:24:11 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 740DC17052 for ; Tue, 1 Nov 2022 13:24:05 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso9139618otr.9 for ; Tue, 01 Nov 2022 13:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wm9xmAep6vmB6XfIEYzr2NGYXLxYsPR4rvmMeyBVmRY=; b=Tt2hooTr6H9TG+OOHxT29v4kXRQ30h8KkE66lsofXG9nFD0EzEKIKNj2/36WVEGEmZ uxRmjl97G5F7Kb2tM9EU4deax4NoKm1zJWxdgvRinNrJIGiSP5in1U+ZOlOnuAi8jHoM /B+BB5BxgcJiiB6EFyIZvekdHeCaa3DrNU1iHpb8t2S7/HeBphwr353LorA2LOJx4nAZ P5EFijPau4D67hx7Q6NbSuL6yyoQ9IjpZv0JmZgDmgLjJeOt3sP5YoyIfkC+xxJpMKuP 5ht0t3gdNnZIArVg9tb16W/TVNbnFzi1wiUjXGhBTO4QK+he6DqjRpIoScIKugBMrFzS 2RtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wm9xmAep6vmB6XfIEYzr2NGYXLxYsPR4rvmMeyBVmRY=; b=lqHYFgN+VolErk7yapDAMLJ9xui8AIJGw07pDCXm/ynlinIj6K+2/fiPT5TmDBQEa0 AnnvUZ+UdVPMHIW5ExfzGX02imyYwD1t+JpWiL8w7AGkUyT+Lu/2VpZC/6o9SIQGmjYg JcV05bfnLViVqm3A/JItw92S0YHqh/az6B4Ua9LBQqXN33kDiDoF8DbMVfDuwtspO3Ns zzzhTAlj2M5Kxy2rLUdVR4NJl8Kxv0q2+ThRAliOK3VQ59Dydx8cUJJFRnOD9L3rJkmg x38lVMjjVG3gcWSp1okcM8XE3lM4Dr8gVzrh45kCCEhO0FTKu5Jz5f8pEzYDI4w04Moz f9rg== X-Gm-Message-State: ACrzQf1Ik6ZAsSxS+MsPLgK9fGhhiKkFtLEyYOUfsjosUC5/6QPOhFiK eYO+B47p0hx2SAHoE4uRK6F85XTHu/0= X-Google-Smtp-Source: AMsMyM4rGVXYeSjq6M3hx3+PT6WaJrlOqE9iiS4qk4V0okCwFBQArg47F4Ccd3Nd7uWlKtu4cWAuRg== X-Received: by 2002:a05:6830:12cb:b0:66c:6dd9:d983 with SMTP id a11-20020a05683012cb00b0066c6dd9d983mr1959577otq.349.1667334244679; Tue, 01 Nov 2022 13:24:04 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-e052-4710-92ba-8142.res6.spectrum.com. [2603:8081:140c:1a00:e052:4710:92ba:8142]) by smtp.googlemail.com with ESMTPSA id d22-20020a056830045600b0066210467fb1sm4337493otc.41.2022.11.01.13.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:24:04 -0700 (PDT) From: Bob Pearson To: leon@kernel.org, jgg@nvidia.com, zyjzyj2000@gmail.com, jhack@hpe.com, linux-rdma@vger.kernel.org Cc: Bob Pearson Subject: [PATCH for-next 16/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_mmap.c Date: Tue, 1 Nov 2022 15:22:41 -0500 Message-Id: <20221101202238.32836-17-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221101202238.32836-1-rpearsonhpe@gmail.com> References: <20221101202238.32836-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to rxe_err/warn in rxe_mmap.c with rxe_dbg(). Signed-off-by: Bob Pearson --- drivers/infiniband/sw/rxe/rxe_mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c index 9149b6095429..a47d72dbc537 100644 --- a/drivers/infiniband/sw/rxe/rxe_mmap.c +++ b/drivers/infiniband/sw/rxe/rxe_mmap.c @@ -79,7 +79,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) /* Don't allow a mmap larger than the object. */ if (size > ip->info.size) { - pr_err("mmap region is larger than the object!\n"); + rxe_dbg(rxe, "mmap region is larger than the object!\n"); spin_unlock_bh(&rxe->pending_lock); ret = -EINVAL; goto done; @@ -87,7 +87,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) goto found_it; } - pr_warn("unable to find pending mmap info\n"); + rxe_dbg(rxe, "unable to find pending mmap info\n"); spin_unlock_bh(&rxe->pending_lock); ret = -EINVAL; goto done; @@ -98,7 +98,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) ret = remap_vmalloc_range(vma, ip->obj, 0); if (ret) { - pr_err("err %d from remap_vmalloc_range\n", ret); + rxe_dbg(rxe, "err %d from remap_vmalloc_range\n", ret); goto done; }