From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62DEAA0C47 for ; Mon, 26 Jul 2021 15:55:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C9AC410E6; Mon, 26 Jul 2021 15:55:08 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 058CE40DDA for ; Mon, 26 Jul 2021 15:55:07 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id q3so11272315wrx.0 for ; Mon, 26 Jul 2021 06:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mGjS7YxqAUn5Y6Fa20ulsUwQ83vLY96yuvrM3GMyUq4=; b=W4RRF1S1sJGIPiKGpeqgAiBWImfk6MQ9LbB6aWesDIwN6yGUu9SSFfs4a+dNR4sNma jQ2vKp76qlbD2oZuIi5xcYspq+ijU5Q5rXqtGZNhnEyS33BEf+hxY5KwxqvPYN5G/0Sw dHf97NUSK/i57coZm4Wqm7kSiYWVkyGF8b74n+Judn59zhtxoudcBWePWo5Za4Gz1EzZ MIZJNqMWWLTkiyBxYLVkgmq56jpkDGSu9BpwDUlDkGcqvQUBQjGgSxrCuSxGtW4nApOe JYAq7z9lhc55XYo0rsk9F2oyZSzMfnyYqTw7jOgipdP4k+xu/nETH5HKpRtdeqKXpS/4 2Mlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mGjS7YxqAUn5Y6Fa20ulsUwQ83vLY96yuvrM3GMyUq4=; b=KAUvjuMOtkx4c5eGiF5MqgxUB7FwyGm3Hz+QuyZ4A2cR3mFOiZxAvY4VuN0L70qkyS R/OQef8d1uuAId9CJbhpibxeZ/bb9jxUm1L4S91mSqRc2uXW7NkYS/WDVUZJagW6Zog4 bc3fF0L+++MQkzngd5xRmAklGoFtAR/RCQ955ycSEva6iMa1RJ10DJtaOYvp2FNid8DW O5pLoj2RWB9lNXfzsbbLxb/sIDORAYP+rOXFC0Sn4YRL+5YTCXFY3ZXQXw3X+nxYwpWN wvL36G9sJPg4g4laBMXgscIn8IuD8+DChx7fhoXOs3Lm9oZIw9st2fuaMQQu3cop2J/g N5xQ== X-Gm-Message-State: AOAM533T5roFUtLz1NH8HCGoSu/ZkoDOYE0jIsx6gwz5r2SIS1g4By8n vzlDzZ4UEIFJI9D4M60zpt4= X-Google-Smtp-Source: ABdhPJyavSd7dEZduIYdjWO1cdaB4UU0zZFnWci08cIdglu/wPU6zdxf1nSTxdhDXwzMSoqueEEZ/Q== X-Received: by 2002:a5d:64cc:: with SMTP id f12mr19288633wri.201.1627307706749; Mon, 26 Jul 2021 06:55:06 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id j1sm12286239wrm.86.2021.07.26.06.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:55:06 -0700 (PDT) From: luca.boccassi@gmail.com To: Viacheslav Ovsiienko Cc: Matan Azrad , dpdk stable Date: Mon, 26 Jul 2021 14:52:55 +0100 Message-Id: <20210726135322.149850-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix RoCE LAG bond device probing' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/3fd282e728767285e9e80fddaaff2aba167e5dce Thanks. Luca Boccassi --- >From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Wed, 21 Jul 2021 11:31:40 +0300 Subject: [PATCH] net/mlx5: fix RoCE LAG bond device probing [ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ] The RoCE LAG bond device requires neither E-Switch nor SR-IOV configurations. It means the RoCE LAG bond device might be presented as a single port Infiniband device. The mlx5 PMD wrongly recognized standalone RoCE LAG bond device as E-Switch configuration, this triggered the calls of E-Switch ports related API and the latter failed (over the new OFED kernel driver, starting since 5.4.1), causing the overall device probe failure. If there is a single port Infiniband bond device found the E-Switch related flags must be cleared indicating standalone configuration. Also, it is not true anymore the bond device can exist over E-Switch configurations only (as it was claimed for VF LAG bond devices). The related checks are not relevant anymore and removed. Fixes: 790164ce1d2d ("net/mlx5: check kernel support for VF LAG bonding") Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 56e2bf64f4..e25d6ffe22 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, goto exit; } } -#ifndef HAVE_MLX5DV_DR_DEVX_PORT - if (bd >= 0) { - /* - * This may happen if there is VF LAG kernel support and - * application is compiled with older rdma_core library. - */ - DRV_LOG(ERR, - "No kernel/verbs support for VF LAG bonding found."); - rte_errno = ENOTSUP; - ret = -rte_errno; - goto exit; - } -#endif /* * Now we can determine the maximal * amount of devices to be spawned. @@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, (list[ns].ifindex, &list[ns].info); } -#ifdef HAVE_MLX5DV_DR_DEVX_PORT if (!ret && bd >= 0) { switch (list[ns].info.name_type) { case MLX5_PHYS_PORT_NAME_TYPE_UPLINK: + if (np == 1) { + /* + * Force standalone bonding + * device for ROCE LAG + * confgiurations. + */ + list[ns].info.master = 0; + list[ns].info.representor = 0; + } if (list[ns].info.port_name == bd) ns++; break; @@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, } continue; } -#endif if (!ret && (list[ns].info.representor ^ list[ns].info.master)) ns++; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:17.529268106 +0100 +++ 0032-net-mlx5-fix-RoCE-LAG-bond-device-probing.patch 2021-07-26 13:53:15.865292959 +0100 @@ -1 +1 @@ -From 9f430dd75107d47fb9b67ab756503397b59b8955 Mon Sep 17 00:00:00 2001 +From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -35 +36 @@ -index 81fbed2872..4712bd6f9b 100644 +index 56e2bf64f4..e25d6ffe22 100644 @@ -38 +39 @@ -@@ -2238,19 +2238,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev, +@@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, @@ -58 +59 @@ -@@ -2314,10 +2301,18 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev, +@@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, @@ -78 +79 @@ -@@ -2334,7 +2329,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev, +@@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,