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 134DE42ECF for ; Thu, 20 Jul 2023 17:31:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F8DE42D29; Thu, 20 Jul 2023 17:31:35 +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 0F2E8400D6 for ; Thu, 20 Jul 2023 17:31:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689867092; 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=OmrA/4GLVNEnBhUH4rHbrCg6GxDSlAWAS+hkAcG+1UA=; b=GQojH1JeFNVwJpCNo2ZFt0w9vNIHmdNbZ3QiGVt+zyMaFu0q83bEI4whMR6oqhLCtW/cgd yeT/8VSCnhpa8tbqBgRcweDO1aSQyMeHQoNgcwsdoI7us+hoPjDcZ3LrxnPVTapHCXPxZE cQQponTzUXyflhBqzseO+WwXiMvXPio= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-361-ih0eFDRKPZC5qk_5B1Y3eQ-1; Thu, 20 Jul 2023 11:23:09 -0400 X-MC-Unique: ih0eFDRKPZC5qk_5B1Y3eQ-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 104F428EA6FA; Thu, 20 Jul 2023 15:22:14 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D3DB4A9004; Thu, 20 Jul 2023 15:22:12 +0000 (UTC) From: Kevin Traynor To: Zerun Fu Cc: Peng Zhang , Chaoyong He , Long Wu , Min Hu , dpdk stable Subject: patch 'net/bonding: fix startup when NUMA is not supported' has been queued to stable release 21.11.5 Date: Thu, 20 Jul 2023 16:18:39 +0100 Message-ID: <20230720151942.262154-88-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.5 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/25/23. 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/b11127de28b254a137552bc4f91e6735e5bb4dc7 Thanks. Kevin --- >From b11127de28b254a137552bc4f91e6735e5bb4dc7 Mon Sep 17 00:00:00 2001 From: Zerun Fu Date: Fri, 16 Jun 2023 15:20:34 +0800 Subject: [PATCH] net/bonding: fix startup when NUMA is not supported [ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ] After the mainline Linux kernel commit "fe205d984e7730f4d21f6f8ebc60f0698404ac31" (ACPI: Remove side effect of partly creating a node in acpi_map_pxm_to_online_node) by Jonathan Cameron. When the system does not support NUMA architecture, the "socket_id" is expected to be -1. The valid "socket_id" in BOND PMD is greater than or equal to zero. So it will cause an error when DPDK checks the validity of the "socket_id" when starting the bond. This commit can fix this bug. Fixes: f294e04851fd ("net/bonding: fix socket ID check") Signed-off-by: Zerun Fu Reviewed-by: Peng Zhang Reviewed-by: Chaoyong He Reviewed-by: Long Wu Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_args.c | 6 ++++++ drivers/net/bonding/rte_eth_bond_pmd.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c index 5406e1c934..a20a461159 100644 --- a/drivers/net/bonding/rte_eth_bond_args.c +++ b/drivers/net/bonding/rte_eth_bond_args.c @@ -212,4 +212,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused, return -1; + /* SOCKET_ID_ANY also consider a valid socket id */ + if ((int8_t)socket_id == SOCKET_ID_ANY) { + *(int *)extra_args = SOCKET_ID_ANY; + return 0; + } + /* validate socket id value */ if (socket_id >= 0 && socket_id < RTE_MAX_NUMA_NODES) { diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 4a9b9a015c..9f970ae4ed 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3323,5 +3323,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) { const char *name = rte_vdev_device_name(dev); - uint8_t socket_id = dev->device.numa_node; + int socket_id = dev->device.numa_node; struct bond_dev_private *internals = NULL; struct rte_eth_dev *eth_dev = NULL; @@ -3523,5 +3523,5 @@ bond_probe(struct rte_vdev_device *dev) if (port_id < 0) { RTE_BOND_LOG(ERR, "Failed to create socket %s in mode %u on " - "socket %u.", name, bonding_mode, socket_id); + "socket %d.", name, bonding_mode, socket_id); goto parse_error; } @@ -3548,5 +3548,5 @@ bond_probe(struct rte_vdev_device *dev) rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on " - "socket %u.", name, port_id, bonding_mode, socket_id); + "socket %d.", name, port_id, bonding_mode, socket_id); return 0; -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-20 16:18:05.668643522 +0100 +++ 0088-net-bonding-fix-startup-when-NUMA-is-not-supported.patch 2023-07-20 16:17:54.967751758 +0100 @@ -1 +1 @@ -From 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 Mon Sep 17 00:00:00 2001 +From b11127de28b254a137552bc4f91e6735e5bb4dc7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index 6553166f5c..c137efd55f 100644 +index 5406e1c934..a20a461159 100644 @@ -32 +33 @@ -@@ -213,4 +213,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused, +@@ -212,4 +212,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused, @@ -44 +45 @@ -index f0c4f7d26b..73205f78f4 100644 +index 4a9b9a015c..9f970ae4ed 100644 @@ -47 +48 @@ -@@ -3605,5 +3605,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3323,5 +3323,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) @@ -54 +55 @@ -@@ -3807,5 +3807,5 @@ bond_probe(struct rte_vdev_device *dev) +@@ -3523,5 +3523,5 @@ bond_probe(struct rte_vdev_device *dev) @@ -61 +62 @@ -@@ -3832,5 +3832,5 @@ bond_probe(struct rte_vdev_device *dev) +@@ -3548,5 +3548,5 @@ bond_probe(struct rte_vdev_device *dev)