From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8564BC531CA for ; Thu, 23 Jul 2026 12:42:31 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA6D440693; Thu, 23 Jul 2026 14:42:30 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 552E34067C for ; Thu, 23 Jul 2026 14:42:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784810548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=98YXsBq9uffcz7OVw/h9gsWBra1Fi0yyldQ27B19f28=; b=R1cKPDn75YwwbiOqQS9BK6ZvcsyseyUp104n87D4y28U2nO7DT3T2m4E74Voe3lt73n2ri iU8RvfgpNpKK4hqUrVtAwr39nNPMj2eayX//pJbzwa2k5MRO6/Zi8fqf9wer0em14LxQRD Ky+flALkVFnoQngLx8MWuBEabKc/sLE= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-nClZ_tZ7OMKodtHmRzlrYQ-1; Thu, 23 Jul 2026 08:42:25 -0400 X-MC-Unique: nClZ_tZ7OMKodtHmRzlrYQ-1 X-Mimecast-MFC-AGG-ID: nClZ_tZ7OMKodtHmRzlrYQ_1784810544 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5843119775AF; Thu, 23 Jul 2026 12:42:24 +0000 (UTC) Received: from dmarchan.lan (unknown [10.44.48.202]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 276341800361; Thu, 23 Jul 2026 12:42:21 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: rjarry@redhat.com, cfontain@redhat.com, Andrew Rybchenko , Thomas Monjalon Subject: [PATCH v5 03/10] ethdev: hide VMDq internal sizes Date: Thu, 23 Jul 2026 14:41:49 +0200 Message-ID: <20260723124200.3069410-4-david.marchand@redhat.com> In-Reply-To: <20260723124200.3069410-1-david.marchand@redhat.com> References: <20260403091836.1073484-1-david.marchand@redhat.com> <20260723124200.3069410-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Z_FtHZNi9J6WJavAIITBwuAtGWcqZBFz26SOgkvMIbs_1784810544 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hide RTE_ETH_NUM_RECEIVE_MAC_ADDR and RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY in the driver API as those (ambiguous) macros are only a driver concern. In practice, this is only used by the bnxt and ixgbe (+ clones) drivers. Signed-off-by: David Marchand Acked-by: Andrew Rybchenko --- Changes since v4: - rebased, Changes since v2: - added an entry in release notes, --- doc/guides/rel_notes/release_26_11.rst | 3 +++ lib/ethdev/ethdev_driver.h | 8 +++++++- lib/ethdev/rte_ethdev.h | 6 ------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst index fe6860a47c..1a234d1be3 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -91,6 +91,9 @@ API Changes ``RTE_ETH_MQ_TX_VMDQ_ONLY``). * A check was added in ``rte_eth_dev_mac_addr_add`` to validate that the ``pool`` parameter is 0 when VMDq is not configured. + * The ``RTE_ETH_NUM_RECEIVE_MAC_ADDR`` and ``RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY`` macros are VMDq + related and are sizes of internal arrays in ethdev that only drivers need to care about. + Those macros are moved to the driver only ethdev API. ABI Changes diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 0f336f9567..294f68504b 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -119,6 +119,12 @@ struct __rte_cache_aligned rte_eth_dev { struct rte_eth_dev_sriov; struct rte_eth_dev_owner; +/* Definitions used for receive MAC address */ +#define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 /**< Maximum nb. of receive mac addr. */ + +/* Definitions used for unicast hash */ +#define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 /**< Maximum nb. of UC hash array. */ + /** * @internal * The data part, with no function pointers, associated with each Ethernet @@ -153,7 +159,7 @@ struct __rte_cache_aligned rte_eth_dev_data { * The first entry (index zero) is the default address. */ struct rte_ether_addr *mac_addrs; - /** Bitmap associating MAC addresses to pools */ + /** Bitmap associating MAC addresses to VMDq pools */ uint64_t mac_pool_sel[RTE_ETH_NUM_RECEIVE_MAC_ADDR]; /** * Device Ethernet MAC addresses of hash filtering. diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index e2a5ba1549..bee47549cb 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -903,12 +903,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) #define RTE_ETH_VLAN_ID_MAX 0x0FFF /**< VLAN ID is in lower 12 bits*/ /**@}*/ -/* Definitions used for receive MAC address */ -#define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 /**< Maximum nb. of receive mac addr. */ - -/* Definitions used for unicast hash */ -#define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 /**< Maximum nb. of UC hash array. */ - /**@{@name VMDq Rx mode * @see rte_eth_vmdq_rx_conf.rx_mode */ -- 2.54.0