From patchwork Thu May 11 07:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13237592 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 A7384C77B7F for ; Thu, 11 May 2023 07:38:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237437AbjEKHio (ORCPT ); Thu, 11 May 2023 03:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237235AbjEKHim (ORCPT ); Thu, 11 May 2023 03:38:42 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 347931BE9 for ; Thu, 11 May 2023 00:38:41 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6439d505274so4885331b3a.0 for ; Thu, 11 May 2023 00:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1683790720; x=1686382720; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=lxbOKLr6Ds9DZcwymjSj1YfYMnrwTZ+1SF/cDL9yQUg=; b=ejT1Q8lSzq99atj9yLtrY8OaSO/z1e9ySfRibWGqSZryTHxZoQNmKie9zS9F5ypGcJ z+eQvpEMhWeANBzZCc+vHvDa0nfrndmjYJp0ucvuwPpngs/3/mwi/RjlSbG5bddBJRzJ KdeYpK4vlBH5p05k2LJ+t1gHh43ocVzIgi3rQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683790720; x=1686382720; h=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=lxbOKLr6Ds9DZcwymjSj1YfYMnrwTZ+1SF/cDL9yQUg=; b=BAdofQJ/T0PtQQ4sNlWnXMDpVqEKMFDRIny40vMnyVQsE4tRIvPVS/ZexwV/ahRD8n zIgt7ZbPgAKSG7Oygcy0Q3yd+3nq5mBeJnoQd7TOhdq2hBDGQwoHje4qhD1LSK9SnQGw Cl8bDEL+hkdom1r3oxYBLvjkQ2LXFcDKOxQY8kRbsAKd7k4xEmInVdeLmaf9d/YLG2jh AZSMq8hsyMe4s/+nKspBXWTR/zOB6QQn27aX+semB7LdAZHHClXRKK6XDeSYM+hvRll5 1C+W1BtFHfYigEZz1Ok+p1tHUwjDucnb6QWsAfCkkc9cWiQWT0Dhw2vucyl5s+E51iN4 CeTg== X-Gm-Message-State: AC+VfDyE9+bTOoxrMFXh6aJURN/TqmFhRQilhGp+iWStNiM86KNYXJVi fGBcnC9y0Ps9GDxPEgH4MlFmRLdPafgox+ZTsYc= X-Google-Smtp-Source: ACHHUZ6mcT0OroJUtqGwi+4MjA97XFpY1Sz9csPJaX23Lqwatv5zAKYp2u3mKQm4ixINwOTcE3bM5w== X-Received: by 2002:a05:6a00:1587:b0:649:76a8:df49 with SMTP id u7-20020a056a00158700b0064976a8df49mr1319068pfk.26.1683790720535; Thu, 11 May 2023 00:38:40 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id n14-20020a65488e000000b00502f4c62fd3sm4174332pgs.33.2023.05.11.00.38.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2023 00:38:39 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Kalesh AP , Selvin Xavier Subject: [PATCH for-rc 08/10] RDMA/bnxt_re: Do not enable congestion control on VFs Date: Thu, 11 May 2023 00:26:23 -0700 Message-Id: <1683789985-22917-9-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1683789985-22917-1-git-send-email-selvin.xavier@broadcom.com> References: <1683789985-22917-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Kalesh AP Congestion control needs to be enabled only on the PFs. FW fails the command if issued on VFs. Avoid sending the command on VFs. Fixes: f13bcef04ba0 ("RDMA/bnxt_re: Enable congestion control by default") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 4718af6..e185fda 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1336,6 +1336,10 @@ static void bnxt_re_setup_cc(struct bnxt_re_dev *rdev, bool enable) { struct bnxt_qplib_cc_param cc_param = {}; + /* Do not enable congestion control on VFs */ + if (rdev->is_virtfn) + return; + /* Currently enabling only for GenP5 adapters */ if (!bnxt_qplib_is_chip_gen_p5(rdev->chip_ctx)) return;