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 AE9BF45B14; Fri, 11 Oct 2024 19:30:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2122E40DCA; Fri, 11 Oct 2024 19:30:40 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id D4EDF40B98 for ; Fri, 11 Oct 2024 19:30:37 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2e2e6a1042dso1286378a91.2 for ; Fri, 11 Oct 2024 10:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728667837; x=1729272637; 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=XDg7QkwKVm3XqEXSOZewIzXoxnQSzjxK3NGaqOK2olw=; b=TdL39/6wqIz+9DECUGOXGevE6KLxtHvCnWMQlVEgqGdScu8NgXEW4xlVZG2G575OMt r2XOdr77ttTFNH/lL2FtflwwUc3MfQKHURVOdLtofRNEpTsNiKke2weMpct6UfhORQk1 cpxdjnlmhsge/Lq3piQlZ2Cw9fBjVnz3gYIus0SBY5Fz0jMVOs7YgseqyfdHgEP0ymnu jTE+iHsI8S963PJgAEP+u55Ixofc4pNRWOLvVwtqN/AvTKY7h8CVnLa7+VYOxbTdHLWz JKoWsmOeXOKHXUDEBEY6OfvnET8mV8FQEF0G6daRSUG5vVeoeoM2DhbKhHRKi3Cnn86v TmsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728667837; x=1729272637; 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=XDg7QkwKVm3XqEXSOZewIzXoxnQSzjxK3NGaqOK2olw=; b=wGnV8tf1fU3fQnp5c//7IYjskUD1FY3UK2vzbMzTa78BmoSexOHGTHBff/oPLBemRx jlOJzYza2PYLXCTLqwoASxz5+kq6s4V4irZQuY/pn7ujtuZ3sIyiMtukcIckQ7gH44Sp MEKS9KzWkVBsWS/xRq4Qpx6REoMPggTtu+UVShTBdS3/XpuKW37ZVrVc4JeFylNlT7Mz HPQ3D08omF1acWLnW8+V7PRHZbF5ED9EJrBfUBFxHwRWVTq7PvBDKB1To0VuI6mVoUVF qTO566HVdNaPkcDXXNTfcWeiJ/fY0qDEhlf/pNrpiKXOZc5b8L0D/bMYyi26/t16xC9a I6bQ== X-Gm-Message-State: AOJu0YykLfEBxzxZMzth1JMVcJ/P3fW9glN6bCdQ1qbUxXerLyJeyb06 /CKAQuDI+iI8IyszQzeikv4hX12P1+9gHFNHuyc2j3vnz1BltJzgkMV2I4HfGuNBUYaylYTJkn6 2 X-Google-Smtp-Source: AGHT+IFuWBR90pt332edpbCLK0J5Coa/D75jsLjKOxcKBZCELXBZJGB1r6Fupe33/ZpdcYhuiUDsUw== X-Received: by 2002:a17:90b:204:b0:2e2:de95:34eb with SMTP id 98e67ed59e1d1-2e3152c01e7mr228036a91.10.1728667837044; Fri, 11 Oct 2024 10:30:37 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2a5aaae34sm5768328a91.46.2024.10.11.10.30.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 10:30:36 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 1/3] net/tap: handle increase in mp_max_fds Date: Fri, 11 Oct 2024 10:29:23 -0700 Message-ID: <20241011173026.170884-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241011173026.170884-1-stephen@networkplumber.org> References: <20241011173026.170884-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- drivers/net/tap/rte_eth_tap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 5ad3bbadd1..c486c6f073 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -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); return -1; } -- 2.45.2