From patchwork Thu Nov 3 17:09:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030734 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 13A5AC433FE for ; Thu, 3 Nov 2022 17:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231881AbiKCRLk (ORCPT ); Thu, 3 Nov 2022 13:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbiKCRKq (ORCPT ); Thu, 3 Nov 2022 13:10:46 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408152603 for ; Thu, 3 Nov 2022 10:10:34 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13b23e29e36so2875049fac.8 for ; Thu, 03 Nov 2022 10:10:34 -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=iBxL8rRf1Oe69RztCHnf7jWSF5OcOMzzJW15fjKRDqA=; b=PKa+TP/vGacx1P8YU4ymklCJ8sfR9e+GNL6dyBIoZS4BmzXwtkRCuh6qapsShrBbc2 p5gI8qBnOl7X/w8GvxZWAQ5qPjOCb6iw7BvYcURm8AazARNsh/2avfpvBgTOL3sNANbf uRg6poQjrRNEmb0mS8Q1cSf+3loxjbQCXA6d0Wo0QsZC1WN5YQy7LH4dz//obqGAxGhF QAPc3PhgoQdSSt4tMA13yPcZmJg3OhT7U0kpmch81FO4eRNMX63jDkRDwow2FOHUPFrU 3sYXqYqlL3dFiPI49Df62dqBFQEJbo2QGqLC54CN7M33W0gRJR7VBQrcH0jjiNhoUwm+ Do+A== 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=iBxL8rRf1Oe69RztCHnf7jWSF5OcOMzzJW15fjKRDqA=; b=8ET3QWWEk6fLXmZyfw3LEv05ooRdvzZAz1eTZRjxvFhADY2xEkro+SOSa8lLw4Rw8t 4u9vEtSN/yBvOz8g1lHAQtSQlJlJQg7OmRtAO6NxG+L3KTTP2WTR3M66Fnmbs5UO7vgY OHnzEbQU4IAarqld5O8pQsWqcAykMXZmucj3GxcPWzfvCwRVKa+GkpWI8vPBmyJpIZf7 6hQPoXZu85pVfTPge/0nXvRP3zKTig2XEFMZyhna0f/Joltg4r72FHzwBcWvOLgN8iNf 3ydPWKedHjFF9yX5n+FSeVdLFlZuguNcgRHinhnQ1J/ejWB7N6htXl/u7L9bgxrjo3qq 3K/w== X-Gm-Message-State: ACrzQf1+JCjVXblpR9DjL17BEOiypTM940mFQNrUntUhq6XjSZN6TIBB qtEJhl4O8pC3c3bPGZyNydk= X-Google-Smtp-Source: AMsMyM7hok80c6pb/1sBbJeVk7IRObeRrCQGxC02jdS3X7UYuh0l4M7VufYhPNPM0HWFkp26jsHJ7A== X-Received: by 2002:a05:6870:9722:b0:13b:8822:bf8f with SMTP id n34-20020a056870972200b0013b8822bf8fmr17735398oaq.195.1667495433447; Thu, 03 Nov 2022 10:10:33 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:32 -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 v2 01/16] RDMA/rxe: Add ibdev_dbg macros for rxe Date: Thu, 3 Nov 2022 12:09:59 -0500 Message-Id: <20221103171013.20659-2-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-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 --- v2: Replaced uc->ibpd by uc->ibuc in rxe_dbg_uc(). Replaced obj by (obj) in the macros. Reported-by: Jason Gunthorp 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..ab334900fcc3 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)->ibuc.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 Thu Nov 3 17:10:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030731 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 E1C72C4332F for ; Thu, 3 Nov 2022 17:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231491AbiKCRLe (ORCPT ); Thu, 3 Nov 2022 13:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbiKCRKq (ORCPT ); Thu, 3 Nov 2022 13:10:46 -0400 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B8662624 for ; Thu, 3 Nov 2022 10:10:35 -0700 (PDT) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-13b23e29e36so2875110fac.8 for ; Thu, 03 Nov 2022 10:10:35 -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=VDWhhmoLCvQb/2C5OWiEIWP2Q00NyIokzTFhjSEPio8=; b=BMcYuEeBRaswdS1Mx7FULlFHg3CZ4wCueM7japi/2/0lP38jfLh5xlJGYHhkewaqQV EReGbL38CUR83h5WiK+clWB92EQgDEDB8Mxt9lv5DdMEz/JOdrwpgwg+Ul49uKNmZEEq XwVjw+YfU0NgmuMa4rDqNFpBg9SwIKxDvjEcqkmId2veQiWLlVVfHU7XU/h1QklnYCbE XiByurRYN9OSe6PVzXW5+ziDXeIGfdHQfkT71jGWyc60WQEIkeeGmOUj2GseLm5Zqhkp DxxPyoFqSh2Q+7OwzdPHblfAb1xmr6U6Fcju+KM4umUASSX3ACH3lFwRqWPMqnOOnxj/ jc5w== 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=VDWhhmoLCvQb/2C5OWiEIWP2Q00NyIokzTFhjSEPio8=; b=ZBHQjT7eoDmibKL+uHBlA0rJfbVWbee/EEp+bXwnFmuKUbWBUSMzl1dn7dTr1POJoW unpntyQ1HGzdTgXCcAiUgcI6q8XdVSR2lKJ9z2PlzugsLiAjqX0p+v/n42g/OOxwnplK gKxWlTB9bjPqQ/JK8X0z1p55nc/5ihI9j++/+/F6uYy9Drff0Px+x+P8fR0yOdqn1NGO r3JV4xdX4l9/3rGwuq/gAUaCC3rbJtBE+j7Y14JMYIPjVRNLPCLY0HyUxPr7y/NmokRn AMMDdHSkGe6drM1aSe7YzcQQQiZS3llH8RXZcOURj4cE6HRXxWpIVWQI+jE4Up2JXSka V+oA== X-Gm-Message-State: ACrzQf2Mkg6Jb/LCg9e5xtadMKlQeCwUwJUh5Gt2V8BKTTPq39/B2t97 kcmwlTQ990BFinN2PKXfmEM= X-Google-Smtp-Source: AMsMyM59sBwfrfCYadv5JhlUwiAkmEMmqQPxGm3ST2cerjvhNh5RDcUDeUBsBg6wA/65Uv32qFantw== X-Received: by 2002:a05:6870:b14f:b0:127:d4f1:6a90 with SMTP id a15-20020a056870b14f00b00127d4f16a90mr18527681oal.116.1667495434613; Thu, 03 Nov 2022 10:10:34 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:34 -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 v2 02/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_comp.c Date: Thu, 3 Nov 2022 12:10:00 -0500 Message-Id: <20221103171013.20659-3-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_comp.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030730 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 B8A25C43217 for ; Thu, 3 Nov 2022 17:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbiKCRLc (ORCPT ); Thu, 3 Nov 2022 13:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbiKCRKq (ORCPT ); Thu, 3 Nov 2022 13:10:46 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 692852651 for ; Thu, 3 Nov 2022 10:10:36 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1322d768ba7so2892416fac.5 for ; Thu, 03 Nov 2022 10:10:36 -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=GCy2bDlCBQ8PdVfXPhoVHT1lTJtBg3hJoknThX7Fg0k=; b=MOdSck6MGH2y4Z/8dDFUUhuKX/HvlSK296BHLTEN55u8KijyT92sOxapp/OFvNGefd Jj+KlLk24G8p+8Va925303ReZSIN6jiOB2BblSi7o48nmDIaS1EpIP+d21YTpxVnOGsu KnRimuDXBXAx7LdoGkO9oB8YAECjGarIg4Vm7XBYSbsdXrpsfA/y2sOxrSRvV1J9m1oC 63XkQ6aypFDoVE0djoROqskpBBLuCT8n0sl4ntjH+yyzarvtgdg9ljLJBetIUEseGAn7 8Vyvm4D3HnWVkhdBQQlj76PbjppbP42vDl1n7CHRRQ/jQAHhwbd3Hr9a72XBjMQXH4eG 98vQ== 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=GCy2bDlCBQ8PdVfXPhoVHT1lTJtBg3hJoknThX7Fg0k=; b=lK/embDegMNg/aQzsbpdcfrbNFpOjZsPq5cSym03EaUpUq11XtxmlnlQ82tbmjkbbM 9CvmcTlol9EU/HOlR2l4Xnu6QmlXXorfJARg5eWDkfy+U3BYN34RgecvPzhMCzmda//f 6FcTLfK9LTSVZcDN8mnNLXc47aNYshy/KgUqGfNML2vZzU+h2ASgu9EUrtBxeZ0tjOwL EPFYn0iNEeexqIboU8agY/w1GwpXJnn2FO2gX55VCDuK9mNsHqjWKfbejlxEI9akcme5 Z3bipOfpqArGXw7KCVz6jWpA3Qu9am9BcC9CjFowTh+H0g8eu9ngHhRyRlpP9skfZcFY cb6Q== X-Gm-Message-State: ACrzQf0fDj+ctYp2gBfj4O0z9SIBXJMcaKoGHEXbhdQ81RJztEmMiuU4 5OkPpqxYIVtsGGs6ejwK+pM= X-Google-Smtp-Source: AMsMyM7yKda+lJI0XhdhjiCb6UzvMN+f3dcFj2LTnGLKJ1btd+jXz6b+bpeHnY/IikMtf/TDi1gdYg== X-Received: by 2002:a05:6870:9627:b0:136:c323:2ad8 with SMTP id d39-20020a056870962700b00136c3232ad8mr28194176oaq.259.1667495435755; Thu, 03 Nov 2022 10:10:35 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:35 -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 v2 03/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_cq.c Date: Thu, 3 Nov 2022 12:10:01 -0500 Message-Id: <20221103171013.20659-4-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_cq.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030733 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 656BAC4332F for ; Thu, 3 Nov 2022 17:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbiKCRLi (ORCPT ); Thu, 3 Nov 2022 13:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231881AbiKCRKq (ORCPT ); Thu, 3 Nov 2022 13:10:46 -0400 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C27FF2675 for ; Thu, 3 Nov 2022 10:10:37 -0700 (PDT) Received: by mail-oi1-x22e.google.com with SMTP id p127so2623719oih.9 for ; Thu, 03 Nov 2022 10:10:37 -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=ozq+kRb8qK0CHF65N82soREGuTrR5RN6lEuV6BHYbQE=; b=l9D9lTrrmollWw+PhlOQt813J/XIWtYSEX4vc14CFLX4+MDhi/dQk+KdhKucZUT/p7 Ink1B1UC77d/2bvK23aQkJWkjDqprX14U42iRj/JSjPgR6JAIQEdh65NUuRkTgJZkhFF mdm04c2jBKkBBmbT/vq6XccDO0g6vq4HeW2qrvjC+GipONUPlwrDdWUX8CUo0d/UZrPE w/CfYchCBG28nVIpSsKiOICPvwDLgYq2gf2C2/akzbvMp048O7crXNiJ0xcr362SJtqY +sCkzBXswou0Jhoc3yyv3+DxO/vi1kWQO994yTzYzWiDzSb6ma5eznatrOxRRWfe8rP3 kMzw== 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=ozq+kRb8qK0CHF65N82soREGuTrR5RN6lEuV6BHYbQE=; b=Da6o+RzPxLP16szKtWz9WU+xMrft8daLd0Lcn8/HPQxWooHYEbPHfyjKRj2tgtbSmE vLIvV44tX5hmFLGXeXjIhWoY2rzoZ6T0a9B5OJq7Xy1D1xHjqaL8h7u2wx8dvoAGmE6h Pu1PfeQCbH+0u29Ge755PpQ9jwf9c4TmwG1Fq+knk9hzP96x0ZlSmFoiUjG44HWI47sh /a0cAcjhd5+Zv1Byx7ShR6YuHsB93HoXcNJ49bo9Za8gsOZ0iyUxbg47qxW+Y8wu2MeY WFrfikY2bwqSFp+NkauP05yw1fbYmPZK2gsX3ev+YERjIN62k954sOixgNCCmFy1SAie QaaQ== X-Gm-Message-State: ACrzQf3BCwMaH2fVF5RLPHRSL7ZgmjPC/py0CEdA5TJ1+fR3uBcYkNvA Yd6JF5kEVobxXkIxstk6l78= X-Google-Smtp-Source: AMsMyM5G/tQo5WuuGUbfrmg6mm5kjOnqMf1PPAltwvrmJFS8GCH4R4IJP8lN8KBk42n+L2Ld3Jx5mg== X-Received: by 2002:a05:6808:1292:b0:35a:5645:171c with SMTP id a18-20020a056808129200b0035a5645171cmr1062285oiw.146.1667495437142; Thu, 03 Nov 2022 10:10:37 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:36 -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 v2 04/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mr.c Date: Thu, 3 Nov 2022 12:10:02 -0500 Message-Id: <20221103171013.20659-5-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() 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 Thu Nov 3 17:10:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030737 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 3B543C4321E for ; Thu, 3 Nov 2022 17:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbiKCRLp (ORCPT ); Thu, 3 Nov 2022 13:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7238426EA for ; Thu, 3 Nov 2022 10:10:39 -0700 (PDT) Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-13b6c1c89bdso2852089fac.13 for ; Thu, 03 Nov 2022 10:10: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=cAhrhygiKpzQWMvqyQHcGjEEPmdXIk28dvB9t+mYowY=; b=C23sEtwNRi/Mz9qqOmLkEd20+DeguoXxMWtfG2QVdZphsaaj1oKwmSnOe9G/CuC5U5 Pp6vdgL4q9lOdX6TT3nTFqVySkNg+IEcsCT/NCxbXMY42zGVD2TiNnU447Sb9J9Q/8Fn dnzOlGz+gKiGSAAPW5IiqE2SeCFCs7XPlUu2FK98/jL0zWIQLpLQXkCTw7baw/Ru+jTw 2ZtgHpul+VzoF46HUMuAq5M07JLkONxTfMmxoWJm9QqjR0CBL3bhX/8afrVEm0avJSIy fAp2BaGvygt0uMZY9JaLRRMylD16ZJQe97eGQIkuCN7BvCwnl0xPOfE/8mNrooY5XY8Y y3jA== 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=cAhrhygiKpzQWMvqyQHcGjEEPmdXIk28dvB9t+mYowY=; b=eUaS3vmxIdQS/s09Wpg4/lSUushqnGrV4h6812Nr17+GJZ2Bq5ne48/cKK4I9uGQIE KMqgcKmltyFk9tK3QOx4QeUNbvi76B/OlbOBjAgGBAGpLEz11Ir5cY6NvaMH6IuQtryv wmXmFD+xLYKuDGL9ra35HLOHgETARvXN9IkwSavRke9hyO0K2JTqmkJrtOWp/4deioIw 2CbdHdZVocoZlNvdD75KTlnLxE//po1I09kcO/XmOeuYKhMx3jvuZDeJdz1g3Mmd3JJc QT/66c5jC7XL6d1jB/G+5G9FxNT4Ph3cqzq4SiLLYJr9CXwUvMlmhohf9BnB2QAfxH+m qyvA== X-Gm-Message-State: ACrzQf0xeYp2RSZdpYQVjUfmTOeZq1ucJwNdseW3WV76Nfow2kwqdG7l 4F5czj3cOO2kqZpIwFWP/n4= X-Google-Smtp-Source: AMsMyM4KSX1qwdHXhpUYwb7MoFWxtAYJbSCWFDwfhgAyhP1RkNef9doJLR3Jec19Sa5TtlMA33eL9A== X-Received: by 2002:a05:6870:9193:b0:13c:f48b:505b with SMTP id b19-20020a056870919300b0013cf48b505bmr14858798oaf.122.1667495438794; Thu, 03 Nov 2022 10:10:38 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:37 -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 v2 05/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mw.c Date: Thu, 3 Nov 2022 12:10:03 -0500 Message-Id: <20221103171013.20659-6-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() int rxe_mw.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030732 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 B2433C433FE for ; Thu, 3 Nov 2022 17:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232206AbiKCRLf (ORCPT ); Thu, 3 Nov 2022 13:11:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231633AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BD712655 for ; Thu, 3 Nov 2022 10:10:40 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id y67so2672017oiy.1 for ; Thu, 03 Nov 2022 10:10:40 -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=YOrCfxbhHa4AcI2L2O/I+6YAaOAln5/3tFPHUtWRx98=; b=nihsgTkIPumc2DEOTF/H1SFYnpCvOg8dWFd63jGnrov2Yy14O+p0IXvUQke8OhDW3A VmRTBliEtHK5pI4Chj64Qw2LWtzJumsyBkhCc+LrJzrPyJlO5cGNRPve19WX0klZmp0H piVT4xFGIq1lIf3iJ742nnA9N1SrUx96TKZ0jWazRCnseVr2i1FfBki6+n19PIM6HARc KXHjOtB+oq2mORhjrgZSqb8415cx3TK2LE43JhcGYVVpDWj4H2CzMIPBYmrH5ajakXjQ zIipKzBYSRiKPUzQdhagpfCXMvbkhwgomGgGWL8yBbl3/6WHivwtVFOYljLsUWx7vJwF uAAg== 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=YOrCfxbhHa4AcI2L2O/I+6YAaOAln5/3tFPHUtWRx98=; b=2MWLgKzJOivTKRr07NHlca/55jLWSMSihRlPWlEEumUl63SF5UDPt61ZqAiBztc1fe eZHzJgZeySXNczUOCs87AyKc2ji25doMfEPOG0mt80qhWFjC144urSCqm6KiKF86w2gZ iQlqul2lbirPbeL67ykQSqiIBCggU2j5U3hmYNQmZGna04/QZaHp1aB4Ra/if0WS+ezP OEbKYZ95ph6yB65D+r9+X/5u2o942BnQ19VsL7jxBJxIj+ILNlYR2bx3cqg6Nska408e Nlbb3vcH5fdz2LZlEmyqETfcTeWBr099igHCTL7XkpMLSCw5nJLxQczI4/SYTceHiI9g m0ZQ== X-Gm-Message-State: ACrzQf3tc3ANnpejUCa/04lnMkqfbvPUxB//qeWD2AabrxjfIuw22POM ClaSeyhN8m3BpfiNq90wJ7g= X-Google-Smtp-Source: AMsMyM7uWjHac2qFxD1q8GLM4e8OjgL5OWpZuDvUpqhLWTYip3xWrWmU0GrGyBoKy63bAUEHtL0zvw== X-Received: by 2002:a05:6808:ecc:b0:351:5b2e:e161 with SMTP id q12-20020a0568080ecc00b003515b2ee161mr25018070oiv.259.1667495439930; Thu, 03 Nov 2022 10:10:39 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:39 -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 , kernel test robot Subject: [PATCH for-next v2 06/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_net.c Date: Thu, 3 Nov 2022 12:10:04 -0500 Message-Id: <20221103171013.20659-7-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace (some) calls to pr_xxx() in rxe_net.c with rxe_dbg_xxx(). Calls with a rxe device not yet in scope are left as is. Signed-off-by: Bob Pearson --- v2: Fixed incorrect parameter list in rxe_find_route6() in the #else case. Reported-by: kernel test robot drivers/infiniband/sw/rxe/rxe_net.c | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index c36cad9c7a66..e02e1624bcf4 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; } @@ -77,7 +79,8 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev, #else -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) { @@ -105,14 +108,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 +285,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 +309,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 +368,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 +377,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 +415,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 +596,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 +608,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 Thu Nov 3 17:10:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030738 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 02C01C433FE for ; Thu, 3 Nov 2022 17:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232037AbiKCRLo (ORCPT ); Thu, 3 Nov 2022 13:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B889265D for ; Thu, 3 Nov 2022 10:10:41 -0700 (PDT) Received: by mail-oi1-x22e.google.com with SMTP id p127so2623922oih.9 for ; Thu, 03 Nov 2022 10:10:41 -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=/ADS8K8TlKXvyf1lsN+Hri+aecn1lm0LbJQAXo/GbHo=; b=QIj+a87LNmEoLp9q1zH0Fd4osdOOlI9scF2LQwsciPRQlRGxn4xI0NZANq3kIV1S/7 OuQGf0dwIBnUR8TDjiLHYyGNHXvKIkOPWa33SQ2dVu0SBow5crG4I/1oorrXa8kl2Icp C+67maqdVMMh3Gdwl8A+BKJqgLvn0L3nl2riyvKLoXzbYbLlxSD5dRQD/vv96yT6CJ0E aiUTpxh6v5QHjBS0BgyiQm1985wusXbp7x2zWJuVK97gQl8GJMcj5o3lcfQtHuSOkjqu f29SaOJ0PdAccNukTP2C2aTnpsteijaiYoUG+WT2/m3z+NHlkAURuraolFaQeKep/sim wn8A== 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=/ADS8K8TlKXvyf1lsN+Hri+aecn1lm0LbJQAXo/GbHo=; b=nluHVQV0taIUr/FLlTMhT7ZfwIrwvuEls6nZi62kHku4PMMWOEOYDmpq69+RbwUgem Jk6LD0tSwjZ2oQoXS0/pckhQdd98sRfDFL16ppmuOkNeAKnIrSaHREsYSrKmdwSylEjF 6LFv28cieEGtwRX4t4h2OKrU46eRTWCSmPKgeRJEW38xBZAJ81RsTjbtK7gm7CD8Y4Ql eNJs8DRiLIFppgB+6mMoyiP7+968QVvQJm62X93rIKv/ER+8PmSfBwmcn3XBVvhtLCDx Odd/2eWkhLdhancVxXmp5rNYokfdNlWOtzob7vNHd6saSfuOC3GfwjZRITT8nTeO2iWh UBCg== X-Gm-Message-State: ACrzQf0QoybYi1CYW3AVrDAD4DgNMK3GPKXJPfsR3I4jdhIZEhYvphSv XuiqmO3ysJbn+dG67eOMEhc= X-Google-Smtp-Source: AMsMyM55pWGmM++Ojt9rbpU6Nszo1eQ7/gtKVcw1IjUkcqr6F4CEitL9GvtCHsnJWDBnkyZrOrVDbg== X-Received: by 2002:aca:2804:0:b0:35a:ff1:b12f with SMTP id 4-20020aca2804000000b0035a0ff1b12fmr11886950oix.207.1667495441230; Thu, 03 Nov 2022 10:10:41 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:40 -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 v2 07/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_qp.c Date: Thu, 3 Nov 2022 12:10:05 -0500 Message-Id: <20221103171013.20659-8-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_qp.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030735 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 E1661C43217 for ; Thu, 3 Nov 2022 17:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbiKCRLm (ORCPT ); Thu, 3 Nov 2022 13:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EB926DA for ; Thu, 3 Nov 2022 10:10:42 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13b23e29e36so2875568fac.8 for ; Thu, 03 Nov 2022 10:10:42 -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=adSEA+BlhZc0du2LzSAT+OKe4esyfpgqC1IywAWGqgo=; b=G03G1WtzBRNjm/rIxa0Bih0s/T2FUGSQoRilLpZ7lP+HIjQMrQTrR6AXSkPdtrUxqR vkvN0QFDwwlYUCqP7t5uYWRec24ZF7cw9ZgelhPQNj9QxKJtAZcAGzna+495/hbD/xKd aYUK1LqMDFyzUl+cZwEDIBZYFYwg76VyuNp3PS7t2M2Tg7PYu/l9oWMa0L5llFDshiVD HdwePUhQbNIPUxXtn68qkONByVlEuag/oScM05lcc1wTuWx5xWyXYte6HUnhfXjGIWjX uVVWgIJc4PUUcNtPhtsFkJwWnVfpisCQofDcEH9gI19na4AybvvazDWrhPQp0JTPMsZ4 bDlg== 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=adSEA+BlhZc0du2LzSAT+OKe4esyfpgqC1IywAWGqgo=; b=ksmu7JFTO+Dbm9FL5XOhY+0IclZshiLOF/mDO0pouyXA0eaMKre9gfnesFUO1z2ysX 8W7n30b5tHaEPOnhxtiZKAdCBSAhMCnrkbANJkF/Jdtoi3hpe/YsMw+aSbxsciVjGO0v IsPAchOu70b4o2441OwOTinjxN3Yewg4IZe9xwy+pWSzD5vxisQW7G4L1+loPkbxZxNx zscIwjr/ufxrcy+7BOhP+g7p/HnGi5nPgfa0gz12t9kKkFq9uxY90CsBJlqm3Y6h46BL YBjEfft6HVNOkiDjQ/MKVKTxJh3XoQ2T55evGvhb0h6DxbSejuVkBEvwOd+bnMWm3yPQ 7hlA== X-Gm-Message-State: ACrzQf21DygWvFG6rk36KPvufwigK9h31ZTZaZtjSXuvdD3FSJ/qdj9w 7CQdhZkhv/zmC2E53wXdlkg= X-Google-Smtp-Source: AMsMyM7dk781YYkPebpKluGs1R2unPQkWySu6htp2KaSSYDC2vX31xyenfgY+unnIoKyF4+hGHjAqA== X-Received: by 2002:a05:6870:4798:b0:12c:989b:a3b7 with SMTP id c24-20020a056870479800b0012c989ba3b7mr28075440oaq.181.1667495442290; Thu, 03 Nov 2022 10:10:42 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:41 -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 v2 08/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_req.c Date: Thu, 3 Nov 2022 12:10:06 -0500 Message-Id: <20221103171013.20659-9-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_req.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030739 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 8EE0AC4332F for ; Thu, 3 Nov 2022 17:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232090AbiKCRLp (ORCPT ); Thu, 3 Nov 2022 13:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7A032701 for ; Thu, 3 Nov 2022 10:10:43 -0700 (PDT) Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-13d9a3bb27aso2096101fac.11 for ; Thu, 03 Nov 2022 10:10:43 -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=n2rx2fgKE99TDnv4C+vPp5pRsHBHSzQySfbxS6plKX0=; b=n6U4LAbSCsAiw16I8X/6YMbgfUjGvD3QS/PeKg6uAzL7EKzwbZbfBqZa1HP8cKkJ4J Ekoo5wz/ljlb/Z/syQXHwMDMD/q7xG36yoXA8c0Ei+X+Yvd/6xKlv5286qFM6Wm+EYZ9 Gkzd3LKOzOeb4aWEMN53vcyiqtcn9xTaMgLNZgpHBzhUDwf7QuVhYub4dNbkpOGQVZEd 9QeYrNcGGRhOU5N2YeXF0BYUVwKadSs30RAIm78o/W4Rxs8LSHAUVfV6OQrD6p/FHblu mfhja43NBXoiGycBjPSCAo2K/HQe3TCtM19uCY156mdoeH6WzIIG28Jh0Y4OIL8YbTmn Hevg== 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=n2rx2fgKE99TDnv4C+vPp5pRsHBHSzQySfbxS6plKX0=; b=jqrwNTmf46gjYIKQKqs68aAOzy72o043a9ho6Mb2sg4JTBouubroh70Tr+hF/waLfK wfKHPsbkdQhcnPskJjYXMxTIJ6AcRqGZcBRwCzWKncfItdTgk0Nyj5lD1OszK9zdpyXl 0CWqkZjYUeLYnMOjDo7PBabXkVvTfaRDEM2Jvr6ZeSZtwGTZ29sIoIMYnrGVXNrBsqbf km2eOkn10EfgwZvClB6kGaa9T84VRjJtQPI7wu37Yj6VnYMEoBb4cwRY0F7H+HxZx2GN aD9ozKHEtlEWU6bYTW/SyTSi+eSyDtCFW9tWyUziooXZjGmRCX9yoxkGVbvqA0FHwevQ SdGA== X-Gm-Message-State: ACrzQf2LWodZ767a0Uwp4Yoe7IV5uwXsL6TEqyQsKsGzOKHUisbTvxOA x0yXFmSJtJc9FfZnof0WOso= X-Google-Smtp-Source: AMsMyM5awgCnfE3bLiuNZsdJJmwQehy7DEUsFpNnN2aq/DW7A9ddeWdyHaf1s15cpyuGWKlM5p4XDw== X-Received: by 2002:a05:6870:a18b:b0:131:a278:7db9 with SMTP id a11-20020a056870a18b00b00131a2787db9mr18610488oaf.201.1667495443292; Thu, 03 Nov 2022 10:10:43 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:42 -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 v2 09/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_resp.c Date: Thu, 3 Nov 2022 12:10:07 -0500 Message-Id: <20221103171013.20659-10-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_resp.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030736 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 2DD01C4332F for ; Thu, 3 Nov 2022 17:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbiKCRLn (ORCPT ); Thu, 3 Nov 2022 13:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -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 0FE782AC3 for ; Thu, 3 Nov 2022 10:10:45 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-12c8312131fso2897372fac.4 for ; Thu, 03 Nov 2022 10:10:45 -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=+ROUOVTZBEJrJHlNFnElaU9wZ0yFZWb0G3OwfC77BEs=; b=hZ0EGycq+vYtfzClqqG2DP2sBaWtFH5q8VcGj7543Fd521xpI84/NQF9enT+cDnhVf N4ACINH1R2lo9kZXmPjHPDXdZJNN162KU3C1lPVThRW9qW6lnU6CCLrPjv948h67P4gn ehAtu+Njf2XGTbgTTTuTQzSd9ZtvgFPb+9urHQLt5zgmdkr8Pz4K9xQa/ZzqLRs8gSPz pKOePvrWEEmmTbvhRwiviUYuX+x+tfaw8p6s2E6kFp3OFQqAEz7i6AWqBjfpiphMPi34 bT3Kt5lxMy2CGOzAMZSdUSfebgB69kSmHzP9CuVcIsfJv+IT5jhCIUwSI73oY4tsliu2 fXWg== 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=+ROUOVTZBEJrJHlNFnElaU9wZ0yFZWb0G3OwfC77BEs=; b=aIgNCXv9k9UWJaeO550tEXDZ1nRxiT+/BbYWePgnsxKlugQ/UVSVDJMS/YWwu6C17k lvYbjeC7lTio4ZitDC3ZixQW0vxojKyJ3KsuiD1vloZ/GRMPu20bzrjbMbJduLejUS8R kYRxpjGq5B899fbPpaaZU7OgHTD3R8oQFwU57xCtVfGOSn9BslOS8xxnLQ2akOofbE5w 7ds8g2DsI7YSBlKdHjdD9CT/gNy0YdTfPoWJvnYW2lhjSm09jDz8mrcw1iZIHX552zWA MUBRKpiSEUkDhh2Jql7Hp4IMjkCK24ZTj4wKNZM5P8unF8FJgLDUr6SQROtpyeyQc8lH w2rA== X-Gm-Message-State: ACrzQf3xoiMZmjP6wHenE8Fext2DQ94mv5Lp3Vz+3NDz6FH+hM9LLQww rl01uwliQs+EWKBlE1P573Kpcdt06MI= X-Google-Smtp-Source: AMsMyM4eWFsAVbK0Ok+pbtxI3368NJUJNi2srhvk/7F7kqJzTyuBfBsf/3J1MaAfPURaY5zt5z/tjQ== X-Received: by 2002:a05:6870:6717:b0:13d:8222:329e with SMTP id gb23-20020a056870671700b0013d8222329emr3930256oab.128.1667495444422; Thu, 03 Nov 2022 10:10:44 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:43 -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 v2 10/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_srq.c Date: Thu, 3 Nov 2022 12:10:08 -0500 Message-Id: <20221103171013.20659-11-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_srq.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030740 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 B53ADC43217 for ; Thu, 3 Nov 2022 17:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231238AbiKCRLq (ORCPT ); Thu, 3 Nov 2022 13:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbiKCRKr (ORCPT ); Thu, 3 Nov 2022 13:10:47 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 708AF2BE8 for ; Thu, 3 Nov 2022 10:10:46 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id w26-20020a056830061a00b0066c320f5b49so1342002oti.5 for ; Thu, 03 Nov 2022 10:10:46 -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=v3qUaL73HopC3u45EXiZCzo0Ny/2NSAYaT7GrRPaNG8=; b=Tt0cjnqi3YJhYL1qu+kHgw7+9u2u4cbv2Rqc/+oR5gVbyPIruKhb1I5VMfbn+iEgHl JE7kn7mkDZ1vw/Xz1EyvWTDwhQdt5NVWjoBSXIgpotAw2sq2w3FA4B+CG4pxc6ON6EEN 39U+MJGVJD0J0Pky89JUYnoh7yQB0DrRq6GhkMii5ApQEUvfo0jXeNFEpMTR1IiFfKpx vj4RYEH8tsf16nSTUHbHXcCOw9I9jPd/PasNhx74HQdwhmgi2lhwfh/0+p4ixo/GyieE sHAkkkOi1R5BafRpmthqFfGj1ZMWyy7DcDQfBAMeg5tDFk5pYAnaBjXiSMAPaD2f/pAJ ASAw== 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=v3qUaL73HopC3u45EXiZCzo0Ny/2NSAYaT7GrRPaNG8=; b=GIg2106KH2H1zf8q4ZcXnV0GkqdxOWhiASZCxpIZEkD1RazmrpilzfZfoFiWlfKD77 MVT17K/xOIkJWXTSnMyrsh38IuNxzzFeu6UBYkZQGMVl+g5vMcG9MYKp5uLqoxEsHBex Xd75px6TbSPJsulfp811+M2/CkWFgAq119yasYqD1wO5Ea98+NAjoDHL4LxEelypzfUb lVzQ5lwAeQrIobYCZQGGtmvwRyXRdzAtKWSvaIuPAccIDvn4odv/0JuHT/flMNMlHepO T0JE30IGJNIzkfzXPx+mvybqLzBko7Ppwh41unF1PfKBpVV2CSFu0OVadICUCr+fsQvk aepg== X-Gm-Message-State: ACrzQf2AYgaRbsIJsW9SFKzpxCRA9B/mLUM7fspkoOrIVlEF1Mpn3xoN ZJmRgoA5fIR/GlaoHn8WvLU= X-Google-Smtp-Source: AMsMyM6Y38TA89gjhEqexXfTM2KbS+5+Ht2J2QnrOPxIceX+8O8YW6y+Lppbj89M266Y7yKr61wxAg== X-Received: by 2002:a9d:6417:0:b0:661:ab18:a361 with SMTP id h23-20020a9d6417000000b00661ab18a361mr14908364otl.100.1667495445797; Thu, 03 Nov 2022 10:10:45 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:45 -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 v2 11/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_verbs.c Date: Thu, 3 Nov 2022 12:10:09 -0500 Message-Id: <20221103171013.20659-12-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_verbs.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030742 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 6F5BCC4332F for ; Thu, 3 Nov 2022 17:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiKCRLt (ORCPT ); Thu, 3 Nov 2022 13:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231559AbiKCRKs (ORCPT ); Thu, 3 Nov 2022 13:10:48 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ABB7129 for ; Thu, 3 Nov 2022 10:10:47 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id r76so2605582oie.13 for ; Thu, 03 Nov 2022 10:10:47 -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=jRLbWGyzppaEcg12JplsRCjTGKb3cs8GwAQSVdceh6o=; b=A6B6SyDV4T3A4yKYlNcydyo5JmdBoXs7KOecEfs+3e3Rlv74EVc85OG4a4Qvs4XSCS GZ+g/UR4e/9FeGcGL/jSUzP9Gpq2Dl6SwvvIMBfJCKlmiO1U2qnaiRn6DRM8bKhG9Ozh qSY6W7xqktcAmfev9ChNL1pHjoiRKCHR2QS3gPmwZe9WDNR2fwdWhH2m37Cp9MGyf8fW 7Ux6F0PJjKqyV2tWQ08SJ/GZ3s5uKaRfwyl/Moi56PH9TzfBx9AiF7pHYpf0jWaYSR6z /meo4okQ/z0cv2znU26lute4+Ss5B/ruuFsU04eidBfyQzakGB0nPk8iv9y/i8HUHeIy EFBg== 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=jRLbWGyzppaEcg12JplsRCjTGKb3cs8GwAQSVdceh6o=; b=0lRZXCVsJTjgMcBcrWuSHJvcRgV4YuUKjs3tuW4VZoxiYu851v5dDLEA3UtAF5VeHP dkwTXRr03irgc5H/8+afTSrKXEfkOvgMgBYOOCZgSgk0NFsMLC8qqiJ6X4slyX1FREXz ugzunm5XBVT6opmRQi4LTjzDXl3tXIlFYNA1oZgQ2SREE0s7POxUgXWRezJ/fqoJQXrd KYHSqogJXhvIJELdl3grGk7MwSyMoKZLWc5H6U9caSJEN/4mHkUOiGFJxLESsy940bBG hBtXz9eBo73y7uePonR8/4CCCD++ZvUOO96bL98dryJQyXmfH70NKdTIcywV6veBLLVJ 0pUw== X-Gm-Message-State: ACrzQf08feg8JnOn13M8PYGbMh2nrkTKOp3g4ckGWV9nMHyCBMrxYlFC v9TeJKED5FPzJZWbFR+tL/0= X-Google-Smtp-Source: AMsMyM5mO63eqm1gEcXG/aTgx6T7RbRLfHTIC4owyRSPwO/7cuavBapyVAq0SUZ94+diealelk9bBw== X-Received: by 2002:a05:6808:f01:b0:354:2d95:3f96 with SMTP id m1-20020a0568080f0100b003542d953f96mr16037548oiw.41.1667495446780; Thu, 03 Nov 2022 10:10:46 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:46 -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 v2 12/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_av.c Date: Thu, 3 Nov 2022 12:10:10 -0500 Message-Id: <20221103171013.20659-13-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_av.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030743 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 2E27BC43217 for ; Thu, 3 Nov 2022 17:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbiKCRLu (ORCPT ); Thu, 3 Nov 2022 13:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbiKCRKt (ORCPT ); Thu, 3 Nov 2022 13:10:49 -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 6F8C42DC9 for ; Thu, 3 Nov 2022 10:10:48 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id a7-20020a056830008700b0066c82848060so1187288oto.4 for ; Thu, 03 Nov 2022 10:10:48 -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=wqJLki4XKPQ8vhzosGcdUtUe/+siVxVWCZGpW6KdDkg=; b=G0uHUy1xM3Apkm0UJfcmaeQpV+KyjWxeMeKILD7YVzrdnmGg4fdrM0ySX+CiFfSZ90 Q3m5FwLcxf7EKS51SKPb4mM6DWrZfK7leLm/HtXNl3K3zllyBLMG2Wd88QWJ+5qhwAyZ 3u35r29MkWaNdvSDHCA+vThGeLw5PkAUUcpHkY3H9W/Q+eaMIcJUI3YQEHkT9PqDXMal OvKHexwvMM5XZ9Y4JdUSjzC32/hBA9xFXrWnwRI08fHfEsf4bF+MBTDfH/KwxYLDAE0/ CUNsmQwsl+sIOOHKQG6m8XjjdjXvsawsRZHFYZ4ifZiIUTel3pbHsFT9OegmZufSTHpI Z6TA== 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=wqJLki4XKPQ8vhzosGcdUtUe/+siVxVWCZGpW6KdDkg=; b=ErweWNSsJiHbdPOm3kfqPB1vxCpRyl3lK1xQe7MbmABWr6Y/RNTL6at3s0waxrCu7l 3OnbAXJZUPKgb56B3yftDB33ZlhC/8p8Ak59/iY5XUMvI2FjdleAaNQQ8a9t26GoXcGs Fa+cx6O/HZfFBaWXV4zPy3/pieJvBDj/qg8dhd+S/pTsktNtaXozCSLpwCqwryIIs6fc 5BmJscBjnjJE5RDDwofvvpZgGjErIt14btVnzuzAXmWcQW6AWBNrxf40XhBlktCfCdy3 xvv6xUCuNGT/Qi5i4aLtKD+UWeA9mqE3SqRJTTLtkHcGdqftV86UixmdK+un4AJvDkqB OWDg== X-Gm-Message-State: ACrzQf2VCOUnsTuqyfZK+RNhZTO8FDyB1hsLoscD5G7TSzVWuNnKkvGN W/PImqRHySbslk1HmL8A/ARQU/ZT4C4= X-Google-Smtp-Source: AMsMyM7hnHTYkXmgFRvEyA1Dcqt2hakK8Z56r7j52/WVi+olJhXbi69CCKvtU0EcsHZdDm3j/G8h5A== X-Received: by 2002:a05:6830:2906:b0:655:d5b5:cb53 with SMTP id z6-20020a056830290600b00655d5b5cb53mr14399706otu.261.1667495447824; Thu, 03 Nov 2022 10:10:47 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10:47 -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 v2 13/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_task.c Date: Thu, 3 Nov 2022 12:10:11 -0500 Message-Id: <20221103171013.20659-14-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_task.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030745 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 EFDF5C43219 for ; Thu, 3 Nov 2022 17:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbiKCRLu (ORCPT ); Thu, 3 Nov 2022 13:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbiKCRKu (ORCPT ); Thu, 3 Nov 2022 13:10:50 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6EDE10F4 for ; Thu, 3 Nov 2022 10:10:49 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13c2cfd1126so2871303fac.10 for ; Thu, 03 Nov 2022 10:10:49 -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=UCEfxEkils71RYcvaHdWSSGot5DikQ5MmHIK2QvP17o=; b=KVln0ZOK87J8aH69CS1DLU5/i9Sl9ofahdE/yT/+4x25b0NuPbJIdMqyA3VyhwP4k/ YdhAbF1TwL47F8ErdTFtdLZzmStbgkv7zzj22S4PPoelPpgKxTs0sIT5cuJ6Q9QOMViD QP+VHzcdUPnRI1ywk25+WkeZrEy3G9eLNvdeancy+/lQHeeQUKQJve1gvY6mCXRDGhrk aQNGE9Slb+AwMlCB+5AvqRqzgcUo1YTcXBi2H6vyHDwQGHfERFgKi0/xhnamGSIk9C3Y tjl91FL26Mnd1F0HMSF4glhsfaur5YHHNPLoVBErUuwERWP2VtBTXR26iQhu+WwitoEv QSVg== 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=UCEfxEkils71RYcvaHdWSSGot5DikQ5MmHIK2QvP17o=; b=u4m0uESNfSSpO6kGudNdrI5zdzABTnPBCrBrF8vfIbxAU7NOST1MMyeSyCVYLQlrzn AbsViYxKQR/uMJCStHFFCRjQK2t+LzbetKtCzIkZ9sXFOLuG54EVPxUZksD2aDuh5H8a aSC9RByGwztZ6ABltb7FFxPrYiPHP0AIYz+9bzfEvpH7IgWD6xwsTRnpOoSAzb6HjiV7 B2sZ6Wq4l1mEiOrqN/p5F/MaNhIVxm/GirCq2EJY54004iQgNFHqHMYTkKy3GC/kaHuJ GaW5Ec7JckkNCTKAMyd7z/gA9T80ROExBVnuenHYwNVLzaW0gXxw0PYUsuvnj8UwMUKQ Xv4A== X-Gm-Message-State: ACrzQf3ssQaf/4O9VI36xuM7JfhJwh/NWFcZ5eblGu5jP4sSAtO0cfT3 DBrlRLdIMaLdTlQSvIWFxmk= X-Google-Smtp-Source: AMsMyM4zzIOkE3iGe+ReSYxG7ZTngepO2SVQlpyFJ+Sbe7RyavvcUNkN1wjayepUvC/dv51pmbtVVA== X-Received: by 2002:a05:6870:f6a6:b0:13c:c80:6d7d with SMTP id el38-20020a056870f6a600b0013c0c806d7dmr27745169oab.221.1667495449108; Thu, 03 Nov 2022 10:10:49 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10: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 v2 14/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe.c Date: Thu, 3 Nov 2022 12:10:12 -0500 Message-Id: <20221103171013.20659-15-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe.c with rxe_dbg_xxx(). Calls with a rxe device not yet in scope are left as is. 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 Thu Nov 3 17:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030741 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 55353C43219 for ; Thu, 3 Nov 2022 17:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231897AbiKCRLr (ORCPT ); Thu, 3 Nov 2022 13:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbiKCRKv (ORCPT ); Thu, 3 Nov 2022 13:10:51 -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 B60072DD2 for ; Thu, 3 Nov 2022 10:10:50 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-12c8312131fso2897692fac.4 for ; Thu, 03 Nov 2022 10:10: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=W9KN+nsy/jNz2u8oyOp3fs+Pd0Y5afz/sRJ9THx9gMw=; b=RXAV4wTqDMrmaWfD8eAUqUpLTkVv/HPjfP3y8iq/NJIJEVVWTZ0NrFBXio77tRuo9K yDWqsvlhwnsrw6Q0A0QIQKPOKmm9EvmYtzTU1bgX6KGmziK7HzLBlxNVBAWgPiApjVrp h1WkVkRLTMIJmnXtrf6IbYcjETFWVSWGiZuhnNf0Aq/iDKsKizJw7h2CAKdSrFazJnie 2v0HZ1GektQO2IYR8PtcZJB0MtQSGjKh23hy5mgXhBgavxF4ina0EF26PgCrQy52+rb9 I4esyJSPG60fk1jEB5X7/i4Aj4iYDRakfYYEaihsUDMpynLgidCJHvbxESzA+ac/5kFr wJ2Q== 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=W9KN+nsy/jNz2u8oyOp3fs+Pd0Y5afz/sRJ9THx9gMw=; b=Z8BHh+1pBuankgR8OcMdPBtO4BVeEKU7mAQhay786BWkxfarzZGOsxnn1B/fmOmf6w knSQ5A6Fx8g4gaVIg3SQmhNgfJcPVRNE9NmPaXb4gSZJxbxRZACG2sc+AeaGveMuyuE5 Kwhl4oP7iwy5wPwKFbrQlcStK5hxVO3upKj8FSGgN+chbZD/ydTmYJpuMth8fKeG2Ji/ 19kGBrUnog/g/5dltHD/D4EDMtEQpDlf6jvhnv4awK/gvTN+1Wg9IfFoCpPT3hoJki3A yKwjTVlT11YBkWLkdBDc3ywy7bzmKwk3gUcQtK5NpBCfuFBW/C/KT+8TcPEgTL8gfwP0 suzg== X-Gm-Message-State: ACrzQf28zJI5ZB1jCwccVRgNycWrH2OnxvE3aeEs0Jt0bza/r0yl17zp 4ck05rsX7PECIvgSlIdr6vY= X-Google-Smtp-Source: AMsMyM680n1oJ7hKMpvgWRKPnmLjuV9cqvoJpZKAIkk5rQEYi7jtoseKa2nZz9gE8ebuCx+vLiT31A== X-Received: by 2002:a05:6870:f6a3:b0:13c:db72:bb60 with SMTP id el35-20020a056870f6a300b0013cdb72bb60mr15392532oab.167.1667495450502; Thu, 03 Nov 2022 10:10:50 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10: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 v2 15/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_icrc.c Date: Thu, 3 Nov 2022 12:10:13 -0500 Message-Id: <20221103171013.20659-16-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_icrc.c with rxe_dbg_xxx(). 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 Thu Nov 3 17:10:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Pearson X-Patchwork-Id: 13030744 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 60814C4167B for ; Thu, 3 Nov 2022 17:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbiKCRLv (ORCPT ); Thu, 3 Nov 2022 13:11:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231653AbiKCRKx (ORCPT ); Thu, 3 Nov 2022 13:10:53 -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 B247110ED for ; Thu, 3 Nov 2022 10:10:51 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id a7-20020a056830008700b0066c82848060so1187364oto.4 for ; Thu, 03 Nov 2022 10:10: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=XaMckkcWbGrz5gkL7N+lZHQbz01KxlLQHTbEkTzcXcs=; b=a8PvjWHXCeM4wAVRLpyyQxyfFi+QPhmedlNbe7h2EFPOUcVdf62S73eT2Sy/sQecUY T7SAK3mR6utEVWORt+FS0g28e/9cCDeAGz3tpQyQbKTZRyen5gnfw6kB6Uhvzt+i4eJs 4wof6+1EpIizG17twR7+KD3yRXrDdrf3NlwO2PklgdapIc0twmnCFRbGq9MzpIoEoa57 6q9VuMSRJWf2DaMWDiqtqC+BUIolK1huAbfo45A1Y4q+8QOkTrWWjibT4WeUjRQj+UVn sk7oul5sSUrCIrRS2hLbu9cpELeOf/OVJ1D0ri5Ynm+lvQ++W+BetchScz8IbqO8Gvwa RfGg== 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=XaMckkcWbGrz5gkL7N+lZHQbz01KxlLQHTbEkTzcXcs=; b=SuhYb7xaXkP7wBrA4mx+hvVC1iyahr5N967Jg354oQV0U7M20C+pyHPzSTzVVSB2eE mRs+oIcYwAyMthpkoxO/6vwvf2T3KY3+udAnWNA9rWAHn+ioxEaRu7hxt4/urFwzfz8Q WQgu28GvMs2AgX2dsw+CtCpGQ0ZlszRGEit5ixovdUjPEl+POlFC8d7p4/uRhDIwMnyG 62lK9emK8AO4r/6aX1O91psmln4tsMdYHCgEJgolHLUHASj9Nnm+SL7qywEXkZJHZwo0 9TmrP71B1gGe4eTvG1iHD9oK1iHBEo4kE/a562vXOs0LfdS0IuKFcXHqDoExrlIcjDbB W12A== X-Gm-Message-State: ACrzQf1gYKcX8GoD8Xd3C3Hfdkj211ACstHNCwssvsR/PTXvl6j8UDpR f/fq+2UtiJfo1rmrVci0cQk= X-Google-Smtp-Source: AMsMyM5fKuUs2PvQ0CmEtBhDwPJn7AFCcV0IsVZcwRLol22x/PiCq++VH65VXMWKWSahbLk5z4W2qg== X-Received: by 2002:a9d:4002:0:b0:66c:5acc:ffe6 with SMTP id m2-20020a9d4002000000b0066c5accffe6mr9922484ote.301.1667495451468; Thu, 03 Nov 2022 10:10:51 -0700 (PDT) Received: from ubuntu-22.tx.rr.com (2603-8081-140c-1a00-b254-769c-82c0-77a4.res6.spectrum.com. [2603:8081:140c:1a00:b254:769c:82c0:77a4]) by smtp.googlemail.com with ESMTPSA id m1-20020a056870a10100b0012b298699dbsm624304oae.1.2022.11.03.10.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 10:10: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 v2 16/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mmap.c Date: Thu, 3 Nov 2022 12:10:14 -0500 Message-Id: <20221103171013.20659-17-rpearsonhpe@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103171013.20659-1-rpearsonhpe@gmail.com> References: <20221103171013.20659-1-rpearsonhpe@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Replace calls to pr_xxx() in rxe_mmap.c with rxe_dbg_xxx(). 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; }