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 CB869A0544 for ; Fri, 11 Nov 2022 12:40:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6AEE427F2; Fri, 11 Nov 2022 12:40:13 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id BF232427F2 for ; Fri, 11 Nov 2022 12:40:12 +0100 (CET) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 81742412D1 for ; Fri, 11 Nov 2022 11:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166811; bh=1I+yhwzoFfsB5MPPthHxs+XC1cOpH2WXXLPQPRx1Nwo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qelih7H/TM9SDJgg3o0n/rLtUaHQOJmjfjnh9MMSqCvE78z/+/Ht++VYgwn1mmAOT OPMKI0St2rkw3VgXFpkru7adeQvUuc2RexEN3YOgeqdKF1dY11D/BcW3wEpBiJ2yJy O0fzfTFhV04yUltRdSZ/MLb1NTkoNaSOh27bQ511mbNGAYxOV9OmU7tpEDVtpFwGfy NuLZFTIfe5I6Br8TPc3j7QNIf09WBY6TKQL70zMVigeK4QPtIEHn6BJQI49SD9Gyfx HCRN+xMXee6ND8j3vc2mwyJ7onsspM3ejZfOyqRF7/45rl1IJTa9eLYFKWlMWH4F+8 hwm0Tq4ZhLnqA== Received: by mail-ed1-f71.google.com with SMTP id f20-20020a0564021e9400b00461ea0ce17cso3458349edf.16 for ; Fri, 11 Nov 2022 03:40:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=1I+yhwzoFfsB5MPPthHxs+XC1cOpH2WXXLPQPRx1Nwo=; b=btg/1hqiNGTc1FfmdyehrYiafmOU65+jU6tHZtARSBJdhX/W5kxLOK7oWUo4yl14Dx nPdGoNCe5hPs138mNcFHhO3yqYJFVDOskYxF3TLnuVXr+2yO7MoV6hqWpfHhsIY98BZw AM2kY/B0qt3VDjRCogn0Xih7GdS+VbttR/AXlQhQjefcGHqGQw2djWpPvXtM+/C6lHdL cqnbp/KPL8MN1YKE2MiN1BhsR0Bzae2TJ/3EQ7phUIb5FDX+hfkZN+91lAR5XVEoafIA sj0gFT8I2E7/dgWdL5IV90W4csFsR08L1TYfST4s1B5/jePbXw8SYVRJ4dr2x7nvnnT/ 9kpg== X-Gm-Message-State: ANoB5pl+L97+W5SOAggaBG2YpfHwV7+vf9AbIKFQraQmEhA7ZgSBktCg IumEDWquYJ4aSCW1WX4rlgPrXfChieCZzOBfTAlSOkNmLc1z3LtEjjr/DXiMW1egalZPZAPixXj h2BclzA8rchqKUR3FnbyFQJKJ X-Received: by 2002:aa7:d90f:0:b0:461:ac11:2df6 with SMTP id a15-20020aa7d90f000000b00461ac112df6mr1062112edr.284.1668166808878; Fri, 11 Nov 2022 03:40:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cerzY7GKxSUKgMr9CkqOKUWScweu47IaTj+YAfybI07ohtncFLsFEdbDq70LmkGgCWbSyTA== X-Received: by 2002:aa7:d90f:0:b0:461:ac11:2df6 with SMTP id a15-20020aa7d90f000000b00461ac112df6mr1062099edr.284.1668166808632; Fri, 11 Nov 2022 03:40:08 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id s6-20020a170906bc4600b007815ca7ae57sm751435ejv.212.2022.11.11.03.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:40:07 -0800 (PST) From: christian.ehrhardt@canonical.com To: Ke Zhang Cc: Yuying Zhang , dpdk stable Subject: patch 'net/i40e: fix VF representor release' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:38:35 +0100 Message-Id: <20221111113904.1549618-18-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.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 19.11.14 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/18/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/da62944cd52661d4ce91ccb8ea4be7434d6ff223 Thanks. Christian Ehrhardt --- >From da62944cd52661d4ce91ccb8ea4be7434d6ff223 Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Thu, 4 Aug 2022 17:50:03 +0800 Subject: [PATCH] net/i40e: fix VF representor release [ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ] A segmentation fault occurs when testpmd exit. This is due to fetching the device name from PF, PF is freed firstly and then VF representor is called later. This commit fixes the bug by fetching the device name from VF representor instead of PF. Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data") Signed-off-by: Ke Zhang Acked-by: Yuying Zhang --- drivers/net/i40e/i40e_vf_representor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 40065e1524..ca083e0ee3 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -28,8 +28,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, struct rte_eth_dev_info *dev_info) { struct i40e_vf_representor *representor = ethdev->data->dev_private; - struct rte_eth_dev_data *pf_dev_data = - representor->adapter->pf.dev_data; /* get dev info for the vdev */ dev_info->device = ethdev->device; @@ -101,7 +99,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, }; dev_info->switch_info.name = - rte_eth_devices[pf_dev_data->port_id].device->name; + rte_eth_devices[ethdev->data->port_id].device->name; dev_info->switch_info.domain_id = representor->switch_domain_id; dev_info->switch_info.port_id = representor->vf_id; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:05.432527510 +0100 +++ 0018-net-i40e-fix-VF-representor-release.patch 2022-11-11 12:35:04.745191908 +0100 @@ -1 +1 @@ -From ba10df53e486ef7918c1236ef4d8da16ae3a32e1 Mon Sep 17 00:00:00 2001 +From da62944cd52661d4ce91ccb8ea4be7434d6ff223 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index cc0f992453..c00ae832aa 100644 +index 40065e1524..ca083e0ee3 100644 @@ -28 +29 @@ -@@ -29,8 +29,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, +@@ -28,8 +28,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, @@ -37 +38 @@ -@@ -104,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, +@@ -101,7 +99,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,