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 7F7AE43C60 for ; Thu, 7 Mar 2024 02:38:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CC4F42F0D; Thu, 7 Mar 2024 02:38:02 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 8ACE542EE3 for ; Thu, 7 Mar 2024 02:38:01 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-33d6f26ff33so225922f8f.0 for ; Wed, 06 Mar 2024 17:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775481; x=1710380281; 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=SgPBTO5+ywENyi7oPw4OpCmzGFhTnbqtc5WbHmcsgPU=; b=ifIYYFP+wkyjeV6Rdz3USJiz97lJryxv4ymYXof45rk8DNZHQMjNm9ql0brU+hyIvw TPmqGsXzZRaCfebP8Z5535Pfm6DZJbrccFUKhfwSq/0lXKmYBJ6voucwDt2L58w6yg3K kwFnhnoK2VJy15IgrABj6TkKh2e9XFdiRza3S1+NAgufSpcRGQMiMMDajQeobvHbOIp9 AcIUfsgvDzZWmrMavIAAxc1FhOVinwTWkN2EP/td+fPtJoI50r9gHOtfvTr9YlX3KUyS /NUsAiie2W91jRTkcIPELTgVdioN1J+1N6aJDqvutCyRJlBEJBgmLfQVHaD2ORhevgfF rQag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775481; x=1710380281; 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=SgPBTO5+ywENyi7oPw4OpCmzGFhTnbqtc5WbHmcsgPU=; b=as9r4g19X16+ot2lPaLcQDlRwiiaNeZtWs+DwqaQgsdhW1qnNUBmTxj3ahpKJjXHGj 1T36oLUjlhcjQ6/EfImqfwdpdFA1uEf+Jd11gD2XAxhl1GKv6coCCRNQESApvdENrcYA AlcJZ+EYhHatq4PQvnQQjA0A/78vgUx3mTNU6RvMZxJm6TXBk3eglKRXVH6fzb29YxT0 kVCd13d07YnovR11r2fkA1wyN3u1deLCcFJnyJOU6M0KqVyXQMq3Bu5Jur165iXgVSsw 38tSPH5ChITE6Efvfs/ltAIMCiHCSbvJ+dE0il378Wkb4i3BNo7UaNOvexwBhWryl+Bq Pi1A== X-Forwarded-Encrypted: i=1; AJvYcCW3bZBSzsLTRXkX5UAb9RWythlKJCi/hLbWUV/WgcGb+wIS8K5o5zxWhFHXOR2PHK7sO5h4BSddIVYrDOjwOxo= X-Gm-Message-State: AOJu0YxBv6T7hKiZTolcXJYXv+GnyinM8IsXQAXUcI4dYRjdl3cezoEL bmYCkwzaSf1tL3ZsvRbgk93Z4mGddfVJg+d12LBz2WgqxVM4hkrZ X-Google-Smtp-Source: AGHT+IFhZnLxLq8/A6hN7/6zqT8IdnRzEdHM48sbuJWHZ+QU+5pno0ixPIkMe/U8PrTIT0NqJCoC0Q== X-Received: by 2002:a5d:660d:0:b0:33e:206b:8112 with SMTP id n13-20020a5d660d000000b0033e206b8112mr12943465wru.14.1709775481103; Wed, 06 Mar 2024 17:38:01 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id f15-20020adffccf000000b0033dedd63382sm18926103wrs.101.2024.03.06.17.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:38:00 -0800 (PST) From: luca.boccassi@gmail.com To: Rongwei Liu Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix stats query crash in secondary process' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:31:58 +0000 Message-Id: <20240307013159.1735343-101-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-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.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 03/09/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/b14df7f20a4934c7ec3e235ccd1e51dcad562789 Thanks. Luca Boccassi --- >From b14df7f20a4934c7ec3e235ccd1e51dcad562789 Mon Sep 17 00:00:00 2001 From: Rongwei Liu Date: Mon, 22 Jan 2024 09:44:05 +0200 Subject: [PATCH] net/mlx5: fix stats query crash in secondary process [ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ] The "outer_of_buffer" counter is owned by the primary process devx object and it is pointer by pointer in mlx5_priv structure. Actually, there are 4 levels' pointers in this piece of code. The secondary process can't access this part directly since it belongs to another process's heap. Return ENOTSUP as a workaround. Fixes: 750e48c7d8c3 ("common/mlx5: add DevX commands for queue counters") Signed-off-by: Rongwei Liu Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 28bf7211e4..8477e83917 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -2682,9 +2682,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name, if (priv->sh) { if (priv->q_counters != NULL && - strcmp(ctr_name, "out_of_buffer") == 0) + strcmp(ctr_name, "out_of_buffer") == 0) { + if (rte_eal_process_type() == RTE_PROC_SECONDARY) { + DRV_LOG(WARNING, "Devx out_of_buffer counter is not supported in the secondary process"); + rte_errno = ENOTSUP; + return 1; + } return mlx5_devx_cmd_queue_counter_query (priv->q_counters, 0, (uint32_t *)stat); + } MKSTR(path, "%s/ports/%d/hw_counters/%s", priv->sh->ibdev_path, priv->dev_port, -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:43.357200643 +0000 +++ 0101-net-mlx5-fix-stats-query-crash-in-secondary-process.patch 2024-03-07 01:05:35.138947232 +0000 @@ -1 +1 @@ -From d312cab568ecdc8411cb3dc896e7d5020836399b Mon Sep 17 00:00:00 2001 +From b14df7f20a4934c7ec3e235ccd1e51dcad562789 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index cc8e1919e8..f10e623953 100644 +index 28bf7211e4..8477e83917 100644 @@ -28 +29 @@ -@@ -2998,9 +2998,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name, +@@ -2682,9 +2682,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,