From patchwork Thu May 18 08:11:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13246291 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 DCFF1C7EE23 for ; Thu, 18 May 2023 08:23:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjERIXw (ORCPT ); Thu, 18 May 2023 04:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbjERIXt (ORCPT ); Thu, 18 May 2023 04:23:49 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D8EA26BD for ; Thu, 18 May 2023 01:23:28 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-643bb9cdd6eso1859481b3a.1 for ; Thu, 18 May 2023 01:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684398188; x=1686990188; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=LqzSgtf+78nE14prUkos87ovavccWYpZfseQiW1ADFg=; b=VRxF+ycNSwLhBrXF4Pyd0nnnE+AhrLs6CGJXGPqD7RrWyPJEuC0brKyeSgo8Kxxweu 6LwLMp8NkSrwUEu/lHj0uAZ9VMOvoqEpLdNt5xW4c0Fw8bgUd7szPAovzVK5eDa83eBb hqJTSwwdG8QH50+AU22dgCaJ8z+mnXe9XypTM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684398188; x=1686990188; 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=LqzSgtf+78nE14prUkos87ovavccWYpZfseQiW1ADFg=; b=krLQOP+6GMy8m/elQNIfiy9Hg49jejrLEChcfR7m1coKr5onctBMGpwZzI5TQ+RFvE 5Uao/Tvv/9B0PH7vlO7zxJDxujki3f2Eok/j0WQTlkIwE+mak/WPOgzfy9cxqowEU0e8 Qa3nEx7IxP4ZzCxEymIaR2puNK1wKtu9NuMzqaTxL15KYIY9sObnmEw64swBUNNOPsKX ePIOq2xsWYRkFkc32QhOcJt+5udxT6jq8htLpxicIg7I8uQhTjQm4icFBg+9hDKhyHU0 BWUs0kHVI0fGxGhOYkVZzUlb/rjLSLeQsvq3ZqDETL+T4/AqYPwFgA7SLivkbTDoPQfZ 1i1g== X-Gm-Message-State: AC+VfDy3rS/TQi4H5e6+g6a/Hz4/8MJnPe3CvEueXBUR2afDIKtpLcXX L0jS5/mInt7lq6q8tAHw5+rKSw== X-Google-Smtp-Source: ACHHUZ66mAkskuLpqxv/OFJ62wMnWvk0kvsT47ucw8k13U55lIG4GmrVXoZWViI6UWa/+E/4aCu/KA== X-Received: by 2002:a05:6a00:1907:b0:647:7ee8:6251 with SMTP id y7-20020a056a00190700b006477ee86251mr3249434pfi.21.1684398187883; Thu, 18 May 2023 01:23:07 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id b24-20020aa78718000000b0062dd9a8c1b8sm806922pfo.100.2023.05.18.01.23.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2023 01:23:07 -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 v2 for-rc 3/3] RDMA/bnxt_re: Do not enable congestion control on VFs Date: Thu, 18 May 2023 01:11:01 -0700 Message-Id: <1684397461-23082-4-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1684397461-23082-1-git-send-email-selvin.xavier@broadcom.com> References: <1684397461-23082-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 Reviewed-by: Selvin Thyparampil Xavier 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 b9e2f89..e34eccd 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;