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 5879DA0032 for ; Fri, 24 Jun 2022 18:10:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52A3B400EF; Fri, 24 Jun 2022 18:10:43 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6514E400EF for ; Fri, 24 Jun 2022 18:10:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656087038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1iCskoMl0+2PB3rM0MMwsx/yqM7YzLYXuSL2Fdg2eSE=; b=DCy4nyN9/MBycGcel8RMDzlEn+dIerkmM25LSmD1MrhdB9c9diLNYMSNkn0SGRTBCByuh4 jypJ9Lut2OZze9V1E/zDdVQ36eOBscxzIlA9ueejRJESegzVOs62GUuTSIFBQvmMQe9rek 1L22Eh/ZK70e4A0T/Tk22o2TfobGkZk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-275-LnChPgw-Np6M8Qgqwd7ztw-1; Fri, 24 Jun 2022 12:10:37 -0400 X-MC-Unique: LnChPgw-Np6M8Qgqwd7ztw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5091819705A8; Fri, 24 Jun 2022 16:10:37 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6797840334F; Fri, 24 Jun 2022 16:10:36 +0000 (UTC) From: Kevin Traynor To: Shun Hao Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: add limitation for E-Switch Manager match' has been queued to stable release 21.11.2 Date: Fri, 24 Jun 2022 17:10:13 +0100 Message-Id: <20220624161016.1881349-11-ktraynor@redhat.com> In-Reply-To: <20220624161016.1881349-1-ktraynor@redhat.com> References: <20220624161016.1881349-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/aa8fb4afda77b0e0161f296a3f511cc0c8b5835e Thanks. Kevin --- >From aa8fb4afda77b0e0161f296a3f511cc0c8b5835e Mon Sep 17 00:00:00 2001 From: Shun Hao Date: Sun, 19 Jun 2022 06:21:27 +0300 Subject: [PATCH] net/mlx5: add limitation for E-Switch Manager match [ upstream commit 68e9925c30a1a311a945ea72f23a08ce3deebdce ] For BF with old FW which doesn't expose the E-Switch Manager vport ID, E-Switch Manager port matching works correctly only when BF is in embedded CPU mode. This patch adds the limitation description. Fixes: a564038699f9 ("net/mlx5: support E-Switch manager egress traffic match") Signed-off-by: Shun Hao Acked-by: Matan Azrad --- doc/guides/nics/mlx5.rst | 6 ++++++ drivers/net/mlx5/mlx5_flow.h | 4 ++++ drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index b3f1673b55..7a616784eb 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -361,4 +361,10 @@ Limitations - must specify PF port action (packet redirection from VF to PF). +- E-Switch Manager matching: + + - For Bluefield with old FW + which doesn't expose the E-Switch Manager vport ID in the capability, + matching E-Switch Manager should be used only in Bluefield embedded CPU mode. + - Raw encapsulation: diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 64335b8670..3e34b1c08a 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1767,3 +1767,7 @@ mlx5_get_tof(const struct rte_flow_item *items, const struct rte_flow_action *actions, enum mlx5_tof_rule_type *rule_type); + +#define MLX5_PF_VPORT_ID 0 +#define MLX5_ECPF_VPORT_ID 0xFFFE + #endif /* RTE_PMD_MLX5_FLOW_H_ */ diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index b6f552bc62..1ceb6a0cd7 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -100,4 +100,5 @@ flow_dv_get_esw_manager_vport_id(struct rte_eth_dev *dev) struct mlx5_common_device *cdev = priv->sh->cdev; + /* New FW exposes E-Switch Manager vport ID, can use it directly. */ if (cdev->config.hca_attr.esw_mgr_vport_id_valid) return (int16_t)cdev->config.hca_attr.esw_mgr_vport_id; @@ -109,7 +110,12 @@ flow_dv_get_esw_manager_vport_id(struct rte_eth_dev *dev) case PCI_DEVICE_ID_MELLANOX_CONNECTX6DXBF: case PCI_DEVICE_ID_MELLANOX_CONNECTX7BF: - return (int16_t)0xfffe; + /* + * In old FW which doesn't expose the E-Switch Manager vport ID in the capability, + * only the BF embedded CPUs control the E-Switch Manager port. Hence, + * ECPF vport ID is selected and not the host port (0) in any BF case. + */ + return (int16_t)MLX5_ECPF_VPORT_ID; default: - return 0; + return MLX5_PF_VPORT_ID; } } -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-24 16:54:05.871645776 +0100 +++ 0011-net-mlx5-add-limitation-for-E-Switch-Manager-match.patch 2022-06-24 16:54:05.571165130 +0100 @@ -1 +1 @@ -From 68e9925c30a1a311a945ea72f23a08ce3deebdce Mon Sep 17 00:00:00 2001 +From aa8fb4afda77b0e0161f296a3f511cc0c8b5835e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 68e9925c30a1a311a945ea72f23a08ce3deebdce ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 4cd693ab4a..915467d58a 100644 +index b3f1673b55..7a616784eb 100644 @@ -27 +28 @@ -@@ -359,4 +359,10 @@ Limitations +@@ -361,4 +361,10 @@ Limitations @@ -39 +40 @@ -index f00c033fc5..7300390070 100644 +index 64335b8670..3e34b1c08a 100644 @@ -42,3 +43,3 @@ -@@ -2077,3 +2077,7 @@ size_t flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type); - int flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf, - size_t *size, struct rte_flow_error *error); +@@ -1767,3 +1767,7 @@ mlx5_get_tof(const struct rte_flow_item *items, + const struct rte_flow_action *actions, + enum mlx5_tof_rule_type *rule_type); @@ -51 +52 @@ -index 65b02b20ce..09f662bdcf 100644 +index b6f552bc62..1ceb6a0cd7 100644