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 1344943CAD for ; Thu, 14 Mar 2024 01:12:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08A1242E50; Thu, 14 Mar 2024 01:12:17 +0100 (CET) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id 95CC540297 for ; Thu, 14 Mar 2024 01:12:15 +0100 (CET) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-512e39226efso462030e87.0 for ; Wed, 13 Mar 2024 17:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710375135; x=1710979935; 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=k6qNx/2fwgMIeccbX6oDc4UOWRdR3NMyIpsrR56JmbU=; b=CSADjfoAXOUw46VHMgRmJTaak4btIIO3kSeD4ly1KD3aIqVDtGVS38/JCClFnwxQec oS2qpU0jdb0OdPjaTwIIbszgxN1ms3PF+Hen6HksnM88rzcajtDL9/+cMbs+rMNHbj11 KQ8k01B8XSNpvTAuJE9eY+01/glXhkaAKwktQKLvrW+K084QGlJvCUD2uPRPmdHG+0Uh jYPNVP44OxeZ7oYcsmxVTSbPJO5nqO360Tc7gYIjQO5h0jxfFiymC2qNtT4/fwiqOscu uBUqLstbD/Obuz/rIaZjifqp9AUs8Ev7Y47xMSe7TefKgjdPzxq3MnG79shv+HFYlT9V ecjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710375135; x=1710979935; 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=k6qNx/2fwgMIeccbX6oDc4UOWRdR3NMyIpsrR56JmbU=; b=RC7Zc+Q7UU3gLH67TzrZ3dLnEwYgAFqG4rnfkp2ypPicCaEaZXq+8rReeFLI1zUg01 gsLyeTiemEAxH0gbGJHOmAogGML/d1ehgA42dqoTU9OVqndr4GJVcmVf76WfM/5UAkLe jgrxTocZjw02edEmwnZBmvJn0+TboDO51y14tnjABT8QA2ivbXQy09roDxTwaiHLa6kK 0SClrkoHrRz420ZzL/kjQgSZitjega+bfBum/6rdK+58MugGloSFNOn+/M0g9yHhahoe YTxkb0OLgjP1CV7HjqbG/76oH/Ct7UFHrgmLl/OGp6qqrHj1pKIIMHAd4bnj0vZwGaO5 kXKQ== X-Forwarded-Encrypted: i=1; AJvYcCXcb1Bjt4NQ0kgoM2Yc6+u1YB6/VYZPUUQG89KcAVwZkWsoLzcqvGbDJ2gC2gfdXXmANG32csYLNSf13RDIPFc= X-Gm-Message-State: AOJu0Yx1fczKKpBbubyMzhwCkfb0kcxbyKEQTnO1GNpW2AV8xkt8JCrV AIjQ1qqAz8hVFE0X11m7FNrVrr8f7wygcInVeCuq5WkmjDozgIvK X-Google-Smtp-Source: AGHT+IFKn+P4dz2XFGJrdUv7KuHItcMes0tfJ3PJ1YfhaCxGe0oUvj6jFvsgeFrX1mWhcLCcgbsYKA== X-Received: by 2002:ac2:5f8c:0:b0:513:5af1:c70b with SMTP id r12-20020ac25f8c000000b005135af1c70bmr49871lfe.46.1710375134948; Wed, 13 Mar 2024 17:12:14 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id e10-20020a05600c4e4a00b0041316e91c99sm624706wmq.1.2024.03.13.17.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 17:12:14 -0700 (PDT) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Suanming Mou , dpdk stable Subject: patch 'net/mlx5: prevent querying aged flows on uninit port' has been queued to stable release 22.11.5 Date: Thu, 14 Mar 2024 00:09:38 +0000 Message-Id: <20240314000957.2810803-42-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240314000957.2810803-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-102-luca.boccassi@gmail.com> <20240314000957.2810803-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/16/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/afe47440d13a52b9493c3e8776fa0d369436806b Thanks. Luca Boccassi --- >From afe47440d13a52b9493c3e8776fa0d369436806b Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 21 Feb 2024 05:23:22 +0200 Subject: [PATCH] net/mlx5: prevent querying aged flows on uninit port [ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ] In HWS template API, the aging mechanism doesn't support shared host mode now. When the guest's counter is set to 0, the aging won't be initialized. The current implementation didn't prevent the user from querying the aged flows on the uninitialized port. The access of invalid pointers would cause a crash. With this commit, the flag of the per port aging initialization will be checked. This would help to get rid of the invalid accessing. Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS") Signed-off-by: Bing Zhao Acked-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow_hw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 6b889e9f81..2b90748d04 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -8526,6 +8526,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, "empty context"); + if (!priv->hws_age_req) + return rte_flow_error_set(error, ENOENT, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, "No aging initialized"); if (priv->hws_strict_queue) { if (queue_id >= age_info->hw_q_age->nb_rings) return rte_flow_error_set(error, EINVAL, -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-14 00:09:22.613646054 +0000 +++ 0042-net-mlx5-prevent-querying-aged-flows-on-uninit-port.patch 2024-03-14 00:09:20.641615777 +0000 @@ -1 +1 @@ -From 3b1ccc5833b0bd89931e90c5e843134839ba46ce Mon Sep 17 00:00:00 2001 +From afe47440d13a52b9493c3e8776fa0d369436806b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index bd5c46b6ad..91d1c59fbd 100644 +index 6b889e9f81..2b90748d04 100644 @@ -30 +31 @@ -@@ -11219,6 +11219,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id, +@@ -8526,6 +8526,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id,