patch 'net/tap: use correct length for interface names' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:02:43 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

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/23/26. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c4d27502065a443c435fdd3739fbcb1e18629d22

Thanks.

Kevin

---
>From c4d27502065a443c435fdd3739fbcb1e18629d22 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Sun, 22 Feb 2026 09:30:38 -0800
Subject: [PATCH] net/tap: use correct length for interface names

[ upstream commit 0e5bbe2a4b25aab4c83cf4234212a8064de18f52 ]

The interface names in the driver internals are Linux
kernel network interface names which have a maximum size of 16;
not DPDK device names which can take up to 64 characters.

Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 28 ++++++++++++++--------------
 drivers/net/tap/rte_eth_tap.h |  4 ++--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 8b233a3143..08d51c3a45 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -204,5 +204,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive, int persistent)
 	 */
 	TAP_LOG(DEBUG, "Device name is '%s'", ifr.ifr_name);
-	strlcpy(pmd->name, ifr.ifr_name, RTE_ETH_NAME_MAX_LEN);
+	strlcpy(pmd->name, ifr.ifr_name, IFNAMSIZ);
 
 	if (is_keepalive) {
@@ -1995,5 +1995,5 @@ static const struct eth_dev_ops ops = {
 static int
 eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
-		   char *remote_iface, struct rte_ether_addr *mac_addr,
+		   const char *remote_iface, struct rte_ether_addr *mac_addr,
 		   enum rte_tuntap_type type, int persist)
 {
@@ -2138,5 +2138,5 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 			goto error_remote;
 		}
-		strlcpy(pmd->remote_iface, remote_iface, RTE_ETH_NAME_MAX_LEN);
+		strlcpy(pmd->remote_iface, remote_iface, IFNAMSIZ);
 
 		/* Save state of remote device */
@@ -2251,8 +2251,8 @@ set_interface_name(const char *key __rte_unused,
 			return -1;
 		}
-		strlcpy(name, value, RTE_ETH_NAME_MAX_LEN);
+		strlcpy(name, value, IFNAMSIZ);
 	} else {
 		/* use tap%d which causes kernel to choose next available */
-		strlcpy(name, DEFAULT_TAP_NAME "%d", RTE_ETH_NAME_MAX_LEN);
+		strlcpy(name, DEFAULT_TAP_NAME "%d", IFNAMSIZ);
 	}
 	return 0;
@@ -2272,5 +2272,5 @@ set_remote_iface(const char *key __rte_unused,
 			return -1;
 		}
-		strlcpy(name, value, RTE_ETH_NAME_MAX_LEN);
+		strlcpy(name, value, IFNAMSIZ);
 	}
 
@@ -2323,11 +2323,11 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
 	int ret;
 	struct rte_kvargs *kvlist = NULL;
-	char tun_name[RTE_ETH_NAME_MAX_LEN];
-	char remote_iface[RTE_ETH_NAME_MAX_LEN];
+	char tun_name[IFNAMSIZ];
+	char remote_iface[IFNAMSIZ];
 	struct rte_eth_dev *eth_dev;
 
 	name = rte_vdev_device_name(dev);
 	params = rte_vdev_device_args(dev);
-	memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);
+	memset(remote_iface, 0, IFNAMSIZ);
 
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
@@ -2345,5 +2345,5 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
 
 	/* use tun%d which causes kernel to choose next available */
-	strlcpy(tun_name, DEFAULT_TUN_NAME "%d", RTE_ETH_NAME_MAX_LEN);
+	strlcpy(tun_name, DEFAULT_TUN_NAME "%d", IFNAMSIZ);
 
 	if (params && (params[0] != '\0')) {
@@ -2486,6 +2486,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 	struct rte_kvargs *kvlist = NULL;
 	int speed;
-	char tap_name[RTE_ETH_NAME_MAX_LEN];
-	char remote_iface[RTE_ETH_NAME_MAX_LEN];
+	char tap_name[IFNAMSIZ];
+	char remote_iface[IFNAMSIZ];
 	struct rte_ether_addr user_mac = { .addr_bytes = {0} };
 	struct rte_eth_dev *eth_dev;
@@ -2538,6 +2538,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 
 	/* use tap%d which causes kernel to choose next available */
-	strlcpy(tap_name, DEFAULT_TAP_NAME "%d", RTE_ETH_NAME_MAX_LEN);
-	memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);
+	strlcpy(tap_name, DEFAULT_TAP_NAME "%d", IFNAMSIZ);
+	memset(remote_iface, 0, IFNAMSIZ);
 
 	if (params && (params[0] != '\0')) {
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index 218ee1b811..7be8f4d01b 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -69,6 +69,6 @@ struct tx_queue {
 struct pmd_internals {
 	struct rte_eth_dev *dev;          /* Ethernet device. */
-	char remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */
-	char name[RTE_ETH_NAME_MAX_LEN];  /* Internal Tap device name */
+	char remote_iface[IFNAMSIZ];	  /* Remote netdevice name */
+	char name[IFNAMSIZ];		  /* Internal Tap device name */
 	int type;                         /* Type field - TUN|TAP */
 	int persist;			  /* 1 if keep link up, else 0 */
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:08.440664983 +0000
+++ 0045-net-tap-use-correct-length-for-interface-names.patch	2026-03-19 10:01:07.113331261 +0000
@@ -1 +1 @@
-From 0e5bbe2a4b25aab4c83cf4234212a8064de18f52 Mon Sep 17 00:00:00 2001
+From c4d27502065a443c435fdd3739fbcb1e18629d22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e5bbe2a4b25aab4c83cf4234212a8064de18f52 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 01af90e7b2..70180fac99 100644
+index 8b233a3143..08d51c3a45 100644
@@ -37 +38 @@
-@@ -2126,5 +2126,5 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
+@@ -2138,5 +2138,5 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
@@ -44 +45 @@
-@@ -2229,8 +2229,8 @@ set_interface_name(const char *key __rte_unused,
+@@ -2251,8 +2251,8 @@ set_interface_name(const char *key __rte_unused,
@@ -55 +56 @@
-@@ -2250,5 +2250,5 @@ set_remote_iface(const char *key __rte_unused,
+@@ -2272,5 +2272,5 @@ set_remote_iface(const char *key __rte_unused,
@@ -62 +63 @@
-@@ -2301,11 +2301,11 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
+@@ -2323,11 +2323,11 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
@@ -77 +78 @@
-@@ -2323,5 +2323,5 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
+@@ -2345,5 +2345,5 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
@@ -84 +85 @@
-@@ -2464,6 +2464,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2486,6 +2486,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -93 +94 @@
-@@ -2516,6 +2516,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2538,6 +2538,6 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -103 +104 @@
-index 59d61582cc..c9c6126d4c 100644
+index 218ee1b811..7be8f4d01b 100644



More information about the stable mailing list