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 8C619A0543 for ; Sat, 5 Nov 2022 18:12:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86CA242D23; Sat, 5 Nov 2022 18:12:10 +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 1FEC9400D5 for ; Sat, 5 Nov 2022 18:12:09 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id t4so4612812wmj.5 for ; Sat, 05 Nov 2022 10:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=me3a0zw8qfscAvqow57Ztdyi3RnZp7v30ZcYlKXom1g=; b=l0/pvC8jqe8H1WUCA1z6gWFMnSdcInGqfWRGhlY6hgdrLGDyynUhTe2f6dE+SMqQCW pJz81RWCDbG++HMTQOIsgOdwpToOs7sTh6BNFdxujz8UmAR0CMcQZldOVrGGBWLeM4i3 l81R3jf1wcXRdtXkywy6+XoIynybvVg/hp4D0wVi3xK2h94AWL/E1o+Q0L7iq08v5De8 fhsm8vPOzu/NFjIiXKRyAxGDRPpQ+YCkmQvPLRKQ4OhjOd4LtkrgfIsKXce228ps14sL DvrR3fzu79EhwFcd5dksQynUzofJwEp/rZogV6pE0BdqobVft2gEORoA6FYmJHsnyl04 ZZRg== 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=me3a0zw8qfscAvqow57Ztdyi3RnZp7v30ZcYlKXom1g=; b=snDBKzPiuTvdtue9450a+N9faY/LZ3wDAFj6F0BUQrA6BHAPAlHyVH7NY3oGY414Kp 1wy11Aro5n3H8E2kcHqYQEWETQXouPc7fg8qztYQlrpwBpjbgO5sIVT65twQ2dnQ98Oe QVb9wN0Oum50ZJ1hKpIpJE2qj0ybqb2g7zO6/6BRw1fX3d26IUAbsl4j4WLsB51+dz6d h7nVcKw/9rmAYxwgv/nVJBgRVTQL+jT5OlSEjgDbM7PjOEatFhV3oyHvteehot8HlTMB 4xmcjOuQ7xOG3o6JrZOW5uA14dkIPMy88qLSBWNm3CR2Q4sXCIY2tWd2K4gc58yvL22q rr6g== X-Gm-Message-State: ACrzQf3M8WtmV8nB1j6QigLaVF6YA9K7acj5sOK/Bj2lCNbFoQkzCSZo H2JLuwfJ5RuJy98Q7c8uzOHkJWJ4HxE= X-Google-Smtp-Source: AMsMyM6ThCB8kBZsFMOV+D4GlOtg1l3jf6M6U22nW+uxlfFkfjgP4b/rCIfpKcgtCA5yxTRElYMTeQ== X-Received: by 2002:a05:600c:24c:b0:3cf:6ab3:49a4 with SMTP id 12-20020a05600c024c00b003cf6ab349a4mr24206723wmj.10.1667668328792; Sat, 05 Nov 2022 10:12:08 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id o13-20020a05600c510d00b003cf54b77bfesm6907335wms.28.2022.11.05.10.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 10:12:08 -0700 (PDT) From: luca.boccassi@gmail.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 20.11.7 Date: Sat, 5 Nov 2022 17:11:06 +0000 Message-Id: <20221105171146.1520039-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221105171146.1520039-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-100-luca.boccassi@gmail.com> <20221105171146.1520039-1-luca.boccassi@gmail.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 20.11.7 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/07/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 Thanks. Luca Boccassi --- >From a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 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 b3c8d5ce43..1ef1525ff1 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -442,6 +442,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) { + PDUMP_LOG(ERR, + "pdump enable/disable not allowed in primary process\n"); + return -EINVAL; + } + req->ver = 1; req->flags = flags; req->op = operation; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.350821369 +0000 +++ 0007-pdump-do-not-allow-enable-disable-in-primary-process.patch 2022-11-05 17:11:08.578940581 +0000 @@ -1 +1 @@ -From 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f Mon Sep 17 00:00:00 2001 +From a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 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 b3c8d5ce43..1ef1525ff1 100644 +--- a/lib/librte_pdump/rte_pdump.c ++++ b/lib/librte_pdump/rte_pdump.c +@@ -442,6 +442,12 @@ pdump_prepare_client_request(char *device, uint16_t queue, @@ -35 +36 @@ -+ "pdump enable/disable not allowed in primary process\n"); ++ "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;