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 DF19FA0524 for ; Fri, 5 Feb 2021 12:38:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D77A04067B; Fri, 5 Feb 2021 12:38:11 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 52BD84067B for ; Fri, 5 Feb 2021 12:38:10 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id m1so5661326wml.2 for ; Fri, 05 Feb 2021 03:38:10 -0800 (PST) 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=7n64SCbIxo4oTttZ/kIZr41hUV4SD3qXLw8rE4qDwew=; b=jdv7voRmy3bazd4jm3g0Q5vBg8UQ/LVOv3E9WqZQ0mFQ7eGXlUDbIlBSNWiBGnO8uZ Ezv+m+z1LljkUE3rBzrQ/JO5RghVMDICR6EXqg1g0noJ9okeW2zvsSTIUYXY4WsnG0H9 oYuiJsUvOgaJTlPB4wAuRg7jRdEPgI8l8ZWNu8Rv8MnzxrId2rIMBMyMlhzxqgv1OViZ EegrbLxrgtxlMREVwqur5Qy/o58EWoK4R7QHgwwnSkX9wmQrzmen3U6KFm9i8VhvcPVK uDfKZnrTY6cuMqyevoMqNfb2BtzpJq38g+mMIhx04H5SIXR1kokO0QiRkHN7BsJYDdEc fbfQ== 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=7n64SCbIxo4oTttZ/kIZr41hUV4SD3qXLw8rE4qDwew=; b=ZkReDXYBLudJDV8Qgf91tACCSMOP0lcLv2ZeI9MGu/3axFXkjTJsMmsCKL9i5n2YVK 5vSiItM0g8+7fNUot3W6zGaUkZ3ZzjIXIlP1k+sKvU+JhCMXDCEYDcvAFycfa3Kk1I7x 4I3y/1N5kMqX8+ntpNmrwFlR2MTa7GzyByFqulC2AiMlLFWO3tzhtahH+izLuNDooex3 7Mugp3jX70tsWO5+eW8sskzJx0moJxBSYoitJ0XMqwim9darg970kkDXPUVHCNB1xU6t Blbm/vxK8FNSNpXSiOzwY+ZWnPylvWzCpThQaWKHsLEMliFyDecAEx+z7xDGjyKthtZ2 wTIQ== X-Gm-Message-State: AOAM5338Fdlv7XpuF8KqdaK17U7OOWtBXCRrsr5+k4PSNMz8EkuHKJb/ qaml/KTsRTOXNQcO0KkZYV4= X-Google-Smtp-Source: ABdhPJyXDZFdunMfEBtkY5Vob7nyulf3pz3JDDBGo4+uFXEGkTy/wfjJH5uYpAbtdlndbyVuW0m0hw== X-Received: by 2002:a7b:cf33:: with SMTP id m19mr3239082wmg.53.1612525090108; Fri, 05 Feb 2021 03:38:10 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id j125sm565385wmb.44.2021.02.05.03.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:38:09 -0800 (PST) From: luca.boccassi@gmail.com To: Suanming Mou Cc: Viacheslav Ovsiienko , dpdk stable Date: Fri, 5 Feb 2021 11:18:47 +0000 Message-Id: <20210205111920.1272063-241-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix multi-process port ID' has been queued to stable release 20.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/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/b2d4868e791b586e19507cfc9eea23de0f7fe037 Thanks. Luca Boccassi --- >From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001 From: Suanming Mou Date: Sun, 24 Jan 2021 19:02:03 +0800 Subject: [PATCH] net/mlx5: fix multi-process port ID [ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ] The device port_id is used for inter-process communication and must be the same both for primary and secondary process This IPC port_id was configured with the invalid temporary value in port spawn routine. This temporary value was used by the function rte_eth_dev_get_port_by_name() to check whether the port exists. This commit corrects the mp port_id with rte_eth_dev port_id. Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux") Signed-off-by: Suanming Mou Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 01bbc14ea5..a055a8dd1c 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -924,8 +924,6 @@ err_secondary: priv->dev_port = spawn->phys_port; priv->pci_dev = spawn->pci_dev; priv->mtu = RTE_ETHER_MTU; - priv->mp_id.port_id = port_id; - strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN); /* Some internal functions rely on Netlink sockets, open them now. */ priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA); priv->nl_socket_route = mlx5_nl_init(NETLINK_ROUTE); @@ -1341,6 +1339,8 @@ err_secondary: eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR; eth_dev->data->representor_id = priv->representor_id; } + priv->mp_id.port_id = eth_dev->data->port_id; + strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN); /* * Store associated network device interface index. This index * is permanent throughout the lifetime of device. So, we may store -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:39.799001446 +0000 +++ 0241-net-mlx5-fix-multi-process-port-ID.patch 2021-02-05 11:18:29.242699412 +0000 @@ -1 +1 @@ -From 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 Mon Sep 17 00:00:00 2001 +From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 7efa7c6cd2..a8cc5f3116 100644 +index 01bbc14ea5..a055a8dd1c 100644 @@ -28 +29 @@ -@@ -930,8 +930,6 @@ err_secondary: +@@ -924,8 +924,6 @@ err_secondary: @@ -37 +38 @@ -@@ -1347,6 +1345,8 @@ err_secondary: +@@ -1341,6 +1339,8 @@ err_secondary: