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 548AD45BB6 for ; Wed, 23 Oct 2024 23:21:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FB3043316; Wed, 23 Oct 2024 23:21:00 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 63D7A43316 for ; Wed, 23 Oct 2024 23:20:58 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so2192565e9.0 for ; Wed, 23 Oct 2024 14:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718458; x=1730323258; 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=H/VsuP77lkQ1L8AHFKwEOLEciPmAbvJ4KMN41W34cPs=; b=PD9QptQQH1ZPaMPEdhkwy05aYqOCG/Wq8ur4jNynIPjJrMP+8VVWwKSCxp1B1XY7yp tkf1Jq+tE0+rYJDLabckI/9pHCTIWfHVhKALbx8ZrL/Bb9bU0gJxAPOxALar6AODpo7d rqFNfPGjwmBO9sam0AVJBN0i9rt0EJ7kEsmGFCzaJRq+98BWfRWuNmBlHeeeVOgIQcn2 IvGKs4aTvdcl/keffc8fWI/4JYU42gGW6huCIkJPt/t5wEg4MDgwWsj/LXGhsJavcSwd bCNkPQzf+8xfxQAi+jt3qXFA711YpEKa7I9atXSuuBNM/wODrSFMYadg+NaJGAZrMhXH e1Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718458; x=1730323258; 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=H/VsuP77lkQ1L8AHFKwEOLEciPmAbvJ4KMN41W34cPs=; b=WlKYaJgmWsMPG+x7mjpDOldfzpTsuzKMCyte07K7WVXKC7dmfVAveOloZkZNWSN/4P 84ezGF/A88WRig+niP5oRY1kvRZwzrsMBHzAwKs/9xwNR6+d5Sp745Uv7nbYdUuoUutx 6Ru8/Bf8yr9SmaG8kypy4BclR2oN9qPk0AOIwZs4tVwebXOpm+hpC15VaoTt2Yx8/Yf5 wECR3M48xDwALX7Q2UuPDuyf8y8SHAOISycc6NEhIZqouj1EVy3QzmhY8VZ4bu4J1WR0 fdX2sHLrhdIIjPiyIwo5EH+mW31CTavbLWoIHMPvoCn5PPlOv38VxFY5exFXpH1Ez9O8 Ab1Q== X-Forwarded-Encrypted: i=1; AJvYcCUJxybpMa3wg3B6iBpww5kUbfjpDqyH/l4GEEyp6B4j8E19DlC1FOTXw5WEzpxIYVFk6H9jNjg=@dpdk.org X-Gm-Message-State: AOJu0YxlqIQmckmDr1K+fVDnJ+xIyj6vZFHW55xWX2ZS7KV8CNj7kIrc XUkjGYKNvtvPco1WEYyH5hwEqh1p92SkOjAmLX3qg0TlREExrA950XmcKI5d X-Google-Smtp-Source: AGHT+IHgrnGa/orbJlxsrMt1lsq4d9Q5pGTFaE+ZMo/TUHUmqyedcSRL1Igsv2++GtKHsLhxhocCtw== X-Received: by 2002:a05:600c:3b9b:b0:431:58cd:b259 with SMTP id 5b1f17b1804b1-431841b1fdbmr31468765e9.31.1729718457891; Wed, 23 Oct 2024 14:20:57 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0a48903sm9766492f8f.37.2024.10.23.14.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:20:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/tap: restrict maximum number of MP FDs' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:42 +0100 Message-ID: <20241023211704.1216956-62-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-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.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 10/25/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/1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Thanks. Luca Boccassi --- >From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 11 Oct 2024 10:29:23 -0700 Subject: [PATCH] net/tap: restrict maximum number of MP FDs [ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ] Now that max MP fds has increased to 253 it is possible that the number of queues the TAP device can handle is less than that. Therefore the code to handle MP message should only allow the number of queues it can handle. Coverity issue: 445386 Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index a6bf6eec55..68f9a5ce34 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) reply.num_fds = 0; reply_param->rxq_count = 0; if (dev->data->nb_rx_queues + dev->data->nb_tx_queues > - RTE_MP_MAX_FD_NUM){ + RTE_PMD_TAP_MAX_QUEUES){ TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds"); return -1; } -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:42.861915300 +0100 +++ 0062-net-tap-restrict-maximum-number-of-MP-FDs.patch 2024-10-23 22:16:40.523943674 +0100 @@ -1 +1 @@ -From 288649a11a8a332727f2a988c676ff7dfd1bc4c5 Mon Sep 17 00:00:00 2001 +From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/tap/rte_eth_tap.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + drivers/net/tap/rte_eth_tap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) @@ -21 +22 @@ -index 5ad3bbadd1..c486c6f073 100644 +index a6bf6eec55..68f9a5ce34 100644 @@ -24,10 +25,7 @@ -@@ -2391,9 +2391,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) - reply_param->q_count = 0; - - RTE_ASSERT(dev->data->nb_rx_queues == dev->data->nb_tx_queues); -- if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) { -+ -+ if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) { - TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u", -- dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM); -+ dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES); +@@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer) + reply.num_fds = 0; + reply_param->rxq_count = 0; + if (dev->data->nb_rx_queues + dev->data->nb_tx_queues > +- RTE_MP_MAX_FD_NUM){ ++ RTE_PMD_TAP_MAX_QUEUES){ + TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds"); @@ -36 +33,0 @@ -