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 700FD454E9 for ; Tue, 25 Jun 2024 02:02:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6577742670; Tue, 25 Jun 2024 02:02:03 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 0F80140EDD for ; Tue, 25 Jun 2024 02:02:02 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3620ee2cdf7so3135648f8f.3 for ; Mon, 24 Jun 2024 17:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273722; x=1719878522; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cxmx/Lf7Wsv6vpn+ClD/tWkua9itVwRczSISmmmO06A=; b=a1f2CP/yxlb1taOb2tKRPJWH2lA/Ugv8FfntRER3Ytv4cKZ4rCChm1MwbCGqhbIrzH nPES86Tv6CqOvDtZvm6tpDqjfq1TCAlzRmGlTAYgBTtPhyFnGHy1TvXmupyLTFzGjz4g 4yAsYtrAtZqjeYt1IuTgQCe+NPulbiX7voujp37tr87YGyzuy8i4Z1byxKq1GsFZ92Vu 3iBB2JbF2PJdE2KNcy6tQ4t2DVnndNTwZvaDzqW8OOEMW2l9q2rQoiuAsUYeW4W4McXo 6tzC+EEyXJPUWZQX9q6LPqOiaxBMFEJCEqENjt2gTs1p27Tz4UN/YIt8ViCRrVG6xjUt rT2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273722; x=1719878522; h=content-transfer-encoding:mime-version: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=Cxmx/Lf7Wsv6vpn+ClD/tWkua9itVwRczSISmmmO06A=; b=I19ywT9aFfKdUmZy0DyLnpaCESwSsGxXVx1pBupWk9uzSlqeUuQGq2rQKjzjm8bSCV 6l5ZZOO7s/R6pKvLSDlpeqLe/g2VJ8/0ZehtlLADelInBve1HdJGwSTRQr8lkFLuuNkQ HNcYHKcu8M119ugOt4BM+YmsCPBarCQamNvaf0DQ8Od+RNZ2CTZ09nFKpZWghF//AHhl E+aAMpL0OuUQONmCMJDM8PoyTXFh7Ux0uQPvleJ+BZy5kWexibLjb3xAR01rQ+lJRVNh SqaMseO3ZZDFouPKPJX46Rgoqq0kcA2Q2WP7gZ2K5Kr54CM12pg36qKPmsdsFuvbJJl8 HmGQ== X-Forwarded-Encrypted: i=1; AJvYcCXG72Lw7gnXlVjQhEZAtXvNv/iBXcQtwgDBaXuKyFcpKKKC7+n8TR3J0zr6Y+945+FhxvMOpIYuBc38OQk/+go= X-Gm-Message-State: AOJu0YyG61aB05UwEG28p6axIpji1M2R1FO3rx1yQfp++ZyoEMc/p3O7 O2ZjGgOZ0rKbv5G2WIuN5/INqK0EqC3jDE00IitCplbk5hFVFhot X-Google-Smtp-Source: AGHT+IEwX29mLLkvo6Zs+mDVw6eYbsAUYSutyQUuqDpv3j/3xuFY5gvNGhVTy4Qab3XWu4T8VNSY/A== X-Received: by 2002:a05:6000:178c:b0:366:e9f3:c242 with SMTP id ffacd0b85a97d-366e9f3c287mr5646728f8f.12.1719273721618; Mon, 24 Jun 2024 17:02:01 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36638f858fbsm11314924f8f.65.2024.06.24.17.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:02:01 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Jun Wang , Bruce Richardson , dpdk stable Subject: patch 'net/ixgbe: do not update link status in secondary process' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:38 +0100 Message-Id: <20240624235907.885628-52-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 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/24. 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/23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f Thanks. Luca Boccassi --- >From 23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 20 Mar 2024 10:33:04 -0700 Subject: [PATCH] net/ixgbe: do not update link status in secondary process [ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ] The code to update link status is not safe in secondary process. If called from secondary it will crash, example from dumpcap: ixgbe_dev_link_update_share() ixgbe_dev_link_update() rte_eth_link_get() Fixes: af75078fece3 ("first public release") Reported-by: Jun Wang Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 9c0e0efb66..311a6828a0 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4283,6 +4283,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, int wait = 1; u32 esdp_reg; + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return -1; + memset(&link, 0, sizeof(link)); link.link_status = RTE_ETH_LINK_DOWN; link.link_speed = RTE_ETH_SPEED_NUM_NONE; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:16.549761459 +0100 +++ 0052-net-ixgbe-do-not-update-link-status-in-secondary-pro.patch 2024-06-25 00:22:13.193185812 +0100 @@ -1 +1 @@ -From 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 Mon Sep 17 00:00:00 2001 +From 23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index bbdc996f31..a6916da0c5 100644 +index 9c0e0efb66..311a6828a0 100644 @@ -26 +27 @@ -@@ -4293,6 +4293,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -4283,6 +4283,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,