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 0078BA0544 for ; Fri, 11 Nov 2022 12:41:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF77E40697; Fri, 11 Nov 2022 12:41:17 +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 8891740141 for ; Fri, 11 Nov 2022 12:41:14 +0100 (CET) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (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 4F2DA412C2 for ; Fri, 11 Nov 2022 11:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166872; bh=wZHz0jQijfXD1lItRlcIstpgEX5gOmb2JnV9CEbQE9U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=bC8HH4TUn4xXKktPNltfirS563EH+bFx0ZT2nECnIQDlIkBT8jqZYu2F+0YHeXc4Q +7/fOiL3ppJqTgvuag1g8L3XYsDXGdcWVZpeWdnaI4lzUzU7YJZSollnm0TMNABeZU pAGc1xXWGVvEZ4vY6v6Ydqr+kqZkUs/8UWURdAq1bY30iX+XuIT9EZ6V9Q5l4x0t8g FdX2CGwE/KqrHrg7oEsxSdtX5tB0PRRczG0nIW1KXdhhHzlPyOtf/fchZ7DtvWArrm WYvOfkhDYzEO13zAt4J6UVn1QdQ+zrrh2H2YgewLricLD1BKpDaH8L4XaVNqTF1Q9q fdTC0fNNP19/w== Received: by mail-ej1-f70.google.com with SMTP id hp16-20020a1709073e1000b007adf5a83df7so2911342ejc.1 for ; Fri, 11 Nov 2022 03:41:12 -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=wZHz0jQijfXD1lItRlcIstpgEX5gOmb2JnV9CEbQE9U=; b=PblkEbzz7Uhtd5byY6/uzzyasMmju+/Lg9/t9co+Ib2dv1nC5D4mk9naLg8zwiVkTe I0KR9cyker7H1209URWfCeilZ3DBE7JwTae6F6P5nKrgpN9QUf2Xo52l51vHulSKKWe2 stzF9OT5yjFLO1ja1Cg2Yy7gQFyegYZg+DEZb8bmuV5roxnr0YzXfmCMyROYw8IvoaBR /QohEh/jnJVu1WZcfwPuIRR1gKs88M147xOtoRCYc+mBsU3pIt42q0P7+U3tVwHR0Cn7 Djo8wYfMFN4SrDVtjVmGeK3wCuRqC2fjgu3Z70gKs4+zL+KzU8I2aAf/SNjjIu/nsT8G swog== X-Gm-Message-State: ANoB5plKdrxnwXlItr5uFdXmiy+2FgZolTSfy5g9cITxN4bHu/2jXJxc wfJ5syTMwZk+T5LSiok6u0KMZYWuwhzONP6JT4gMl9ieoY06CwSlxxEzlAuiuyx5hMJh7bzcfbD T8uHH/ltpSeC0jOTQn26Co9Ey X-Received: by 2002:aa7:d553:0:b0:458:f012:bacb with SMTP id u19-20020aa7d553000000b00458f012bacbmr1083111edr.345.1668166871760; Fri, 11 Nov 2022 03:41:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ISPdKG7736UlQ4gtif/vz4CxpVKhMrn8h7AY4+6MUYpJv/kPPoEdRDQPsAXcumztw0KSsFg== X-Received: by 2002:aa7:d553:0:b0:458:f012:bacb with SMTP id u19-20020aa7d553000000b00458f012bacbmr1083096edr.345.1668166871481; Fri, 11 Nov 2022 03:41:11 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id i2-20020a1709061e4200b007ad84cf1346sm788585ejj.110.2022.11.11.03.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:41:11 -0800 (PST) From: christian.ehrhardt@canonical.com To: Stephen Hemminger Cc: =?UTF-8?q?Sylvia=20Grundw=C3=BCrmer?= , dpdk stable Subject: patch 'pdump: do not allow enable/disable in primary process' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:38:53 +0100 Message-Id: <20221111113904.1549618-36-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-Type: text/plain; charset=UTF-8 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/74e2561970b8586d4c1354b7b850b195c50eb2f6 Thanks. Christian Ehrhardt --- >From 74e2561970b8586d4c1354b7b850b195c50eb2f6 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 19 Oct 2022 09:37:33 -0700 Subject: [PATCH] pdump: do not allow enable/disable in primary process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f ] Attempts to enable or disable pdump in primary process will fail with core dump because it is not valid to call rte_mp_request_sync() unless in a secondary process. Trap the error in the common code used for both enable and disable requests. Fixes: 660098d61f57 ("pdump: use generic multi-process channel") Reported-by: Sylvia Grundwürmer Signed-off-by: Stephen Hemminger --- lib/librte_pdump/rte_pdump.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index ac94fea936..3421d180a5 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -507,6 +507,12 @@ pdump_prepare_client_request(char *device, uint16_t queue, struct pdump_request *req = (struct pdump_request *)mp_req.param; struct pdump_response *resp; + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + RTE_LOG(ERR, PDUMP, + "pdump enable/disable not allowed in primary process\n"); + return -EINVAL; + } + req->ver = 1; req->flags = flags; req->op = operation; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:06.052538630 +0100 +++ 0036-pdump-do-not-allow-enable-disable-in-primary-process.patch 2022-11-11 12:35:04.793192173 +0100 @@ -1 +1 @@ -From 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f Mon Sep 17 00:00:00 2001 +From 74e2561970b8586d4c1354b7b850b195c50eb2f6 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - lib/pdump/rte_pdump.c | 6 ++++++ + lib/librte_pdump/rte_pdump.c | 6 ++++++ @@ -25,5 +26,5 @@ -diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c -index 98dcbc037b..a81544cb57 100644 ---- a/lib/pdump/rte_pdump.c -+++ b/lib/pdump/rte_pdump.c -@@ -537,6 +537,12 @@ pdump_prepare_client_request(const char *device, uint16_t queue, +diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c +index ac94fea936..3421d180a5 100644 +--- a/lib/librte_pdump/rte_pdump.c ++++ b/lib/librte_pdump/rte_pdump.c +@@ -507,6 +507,12 @@ pdump_prepare_client_request(char *device, uint16_t queue, @@ -34,2 +35,2 @@ -+ PDUMP_LOG(ERR, -+ "pdump enable/disable not allowed in primary process\n"); ++ RTE_LOG(ERR, PDUMP, ++ "pdump enable/disable not allowed in primary process\n"); @@ -39,3 +40,3 @@ - memset(req, 0, sizeof(*req)); - - req->ver = (flags & RTE_PDUMP_FLAG_PCAPNG) ? V2 : V1; + req->ver = 1; + req->flags = flags; + req->op = operation;