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 86D7345B17; Sat, 12 Oct 2024 04:19:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06BCB402E4; Sat, 12 Oct 2024 04:18:58 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id 643FC40268 for ; Sat, 12 Oct 2024 04:18:55 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7ea56070f86so778205a12.0 for ; Fri, 11 Oct 2024 19:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728699534; x=1729304334; 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=JBRYVjXoOH5Kod0UN8YzkNBdF4bXr1ask+XU6nGip8JlZOvIiQEKXbM4vJuRoXEuLG oosEatenqwJBSGj/4rmQnPLd/7FIeqt+Gs/ey+muQYToL/80mJp0qWz68sok6f1iGiWs UrqszSecTOnwjzSLWoqWyyQmoLzhHWESDcPPv5HlyPf9HHKOK5sJtaUIaFy+9u3pxscT sN/E7OB5PR2VNthBbqtpMFbpBNF2zXF6vkxGq6nBnih+mAXixTUFU7P0SeW8hkSIWLY6 X8V8kbUnAVzhns1gd1GAqgCtawsuZ61qDO0WEuoiHWSxhVt77+3RIa5dePrmHacMgIFW 2ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728699534; x=1729304334; 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=hS6MeSpwbBjeH9KAl0YnWAGq8sFDsR31Oj2OtKEoOeD8k8t6Iz+f2VhHWBSePfJDJv xDU11649nQfc85z4Su31sIKEegOKy3yJtbyUJl8sx1AHBDY1bJ44vPuBNcPRg8HJETc0 Cf/noPLS4XPS0CC/+b5C1oS9u2JsEfOSjpmkR9qu7NQWSpwzovMjnbcEEYLm81XdWS6b MscrsE0xj+NhTEQbPFwpFUks9kuryjVmvTzYXU1zTwuwagRQdEbBkwf+ApoU/EeOxHbw nGIljosE4DC5KgQ4iF/Cj5MaxxI5liLtAlhTDyGJVkGPbcHTz81HNlB3EQGXRKqWyVOQ ZOpA== X-Gm-Message-State: AOJu0YwuJFh+JZoh28UK5jeFpnN8hWY7q++OU8pybx5/yf/W3uHoaxxA N+PLfFxr675tB6eVm0JNUhrCRkihfbVEcKEgE+nez4vBQ6lXNZGD4582Zb6PGhYnSzT7qs+FTGE Q X-Google-Smtp-Source: AGHT+IGfv6HRO/SGqy+QpyklEDcbz7O4H2jFRtECVPr+KMei0IgMeJJDYaadIqD0P4gx5FS0xQy/5Q== X-Received: by 2002:a05:6a20:7488:b0:1d8:c646:f51 with SMTP id adf61e73a8af0-1d8c64610bamr3324003637.20.1728699534550; Fri, 11 Oct 2024 19:18:54 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e2aa9386bsm3320079b3a.116.2024.10.11.19.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 19:18:54 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 1/3] net/tap: handle increase in mp_max_fds Date: Fri, 11 Oct 2024 19:17:27 -0700 Message-ID: <20241012021844.536316-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241012021844.536316-1-stephen@networkplumber.org> References: <20241011173026.170884-1-stephen@networkplumber.org> <20241012021844.536316-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