Skip to contentSkip to conversation

net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing

PATCH In review Tomasz Duszynski 2 participants 4 messages Jan 8, 2025 – Jan 14, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing

If HAVE_TCA_FLOWER is undefined compilation errors / warnings may appear. This addresses following spotted issues:

../drivers/net/tap/rte_eth_tap.c:2113:1: error: label ‘disable_rte_flow’ defined but not used [-Werror=unused-label]

../drivers/net/tap/rte_eth_tap.c:1908:26: error: unused parameter ‘remote_iface’ [-Werror=unused-parameter]

Fixes bf7b7f437b49 ("net/tap: create netdevice during probing")
---
 drivers/net/tap/rte_eth_tap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/tap/rte_eth_tap.c +3 -1
index 650ddbd706..8fa708c58d 100644
@@ -1905,7 +1905,7 @@ 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,
+		   char *remote_iface __rte_unused, struct rte_ether_addr *mac_addr,
 		   enum rte_tuntap_type type, int persist)
 {
 	int numa_node = rte_socket_id();
@@ -2109,6 +2109,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	rte_eth_dev_probing_finish(dev);
 	return 0;
 
+#ifdef HAVE_TCA_FLOWER
 disable_rte_flow:
 	TAP_LOG(ERR, " Disabling rte flow support: %s(%d)",
 		strerror(errno), errno);
@@ -2118,6 +2119,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	}
 	rte_eth_dev_probing_finish(dev);
 	return 0;
+#endif
 
 #ifdef HAVE_TCA_FLOWER
 error_remote:

--
2.34.1

#1 lore raw
Quoted 13 lines · On Wed, 8 Jan 2025 13:10:11 +0100 Tomasz Duszynski <[email protected]>…

From: Tomasz Duszynski <[email protected]>
To: <[email protected]>, Stephen Hemminger <[email protected]>, "Pascal Mazon" <[email protected]>
CC: <[email protected]>, Tomasz Duszynski <[email protected]>
Subject: [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
Date: Wed, 8 Jan 2025 13:10:11 +0100
X-Mailer: git-send-email 2.34.1

If HAVE_TCA_FLOWER is undefined compilation errors / warnings may appear. This addresses following spotted issues:

../drivers/net/tap/rte_eth_tap.c:2113:1: error: label ‘disable_rte_flow’ defined but not used [-Werror=unused-label]

Quoted 7 lines

../drivers/net/tap/rte_eth_tap.c:1908:26: error: unused parameter ‘remote_iface’ [-Werror=unused-parameter]

Fixes bf7b7f437b49 ("net/tap: create netdevice during probing")

Looks good, but realize that flower was added in kernel 4.2 and the current oldest supported upstream kernel is 4.4. So if you are using a supported kernel, flower will be present.

#2 lore raw
Quoted 18 lines
Quoted 2 lines

From: Tomasz Duszynski <[email protected]>
To: <[email protected]>, Stephen Hemminger <[email protected]>,

"Pascal Mazon" <[email protected]>

Quoted 15 lines

CC: <[email protected]>, Tomasz Duszynski <[email protected]>
Subject: [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
Date: Wed, 8 Jan 2025 13:10:11 +0100
X-Mailer: git-send-email 2.34.1

If HAVE_TCA_FLOWER is undefined compilation errors / warnings may appear. This addresses following spotted issues:

../drivers/net/tap/rte_eth_tap.c:2113:1: error: label ‘disable_rte_flow’ defined but not used [-Werror=unused-label]

../drivers/net/tap/rte_eth_tap.c:1908:26: error: unused parameter ‘remote_iface’ [-Werror=unused-parameter]

Quoted 8 lines
Quoted 4 lines
Fixes bf7b7f437b49 ("net/tap: create netdevice during probing")

Looks good, but realize that flower was added in kernel 4.2 and the current oldest supported upstream kernel is 4.4.
So if you are using a supported kernel, flower will be present.

It only pops up on 32bit build. That build is maybe not too common so error might have gone unnoticed. Anyway, I thought I would add these fixes just in case.

#3 lore raw
Quoted 21 lines · On Thu, 9 Jan 2025 07:31:32 +0000 Tomasz Duszynski <[email protected]>…
Quoted 21 lines
Quoted 2 lines

From: Tomasz Duszynski <[email protected]>
To: <[email protected]>, Stephen Hemminger <[email protected]>,

"Pascal Mazon" <[email protected]>

Quoted 18 lines

CC: <[email protected]>, Tomasz Duszynski <[email protected]>
Subject: [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
Date: Wed, 8 Jan 2025 13:10:11 +0100
X-Mailer: git-send-email 2.34.1

If HAVE_TCA_FLOWER is undefined compilation errors / warnings may appear. This addresses following spotted issues:

../drivers/net/tap/rte_eth_tap.c:2113:1: error: label ‘disable_rte_flow’ defined but not used [-Werror=unused-label]

../drivers/net/tap/rte_eth_tap.c:1908:26: error: unused parameter ‘remote_iface’ [-Werror=unused-parameter]

Fixes bf7b7f437b49 ("net/tap: create netdevice during probing")
Quoted 9 lines
Quoted 5 lines
Quoted 1 line

Looks good, but realize that flower was added in kernel 4.2 and the current oldest supported upstream kernel is 4.4.
So if you are using a supported kernel, flower will be present.

It only pops up on 32bit build. That build is maybe not too common so error might have gone unnoticed. Anyway, I thought I would add these fixes just in case.

TCA_FLOWER is still available in 32 bit kernel looks like your build envrionment is not using a supported kernel.

My goal is to get rid of #ifdef's since it creates untested variants and multiple ifdef's create combinational chaos.