DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
@ 2025-01-08 12:10 Tomasz Duszynski
  2025-01-08 15:43 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Duszynski @ 2025-01-08 12:10 UTC (permalink / raw)
  To: dev, Stephen Hemminger, Pascal Mazon; +Cc: jerinj, Tomasz Duszynski

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")
Cc: pascal.mazon@6wind.com

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
 drivers/net/tap/rte_eth_tap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 650ddbd706..8fa708c58d 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
  2025-01-08 12:10 [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing Tomasz Duszynski
@ 2025-01-08 15:43 ` Stephen Hemminger
  2025-01-09  7:31   ` [EXTERNAL] " Tomasz Duszynski
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2025-01-08 15:43 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: dev, Pascal Mazon, jerinj

On Wed, 8 Jan 2025 13:10:11 +0100
Tomasz Duszynski <tduszynski@marvell.com> wrote:

> From: Tomasz Duszynski <tduszynski@marvell.com>
> To: <dev@dpdk.org>, Stephen Hemminger <stephen@networkplumber.org>,         "Pascal  Mazon" <pascal.mazon@6wind.com>
> CC: <jerinj@marvell.com>, Tomasz Duszynski <tduszynski@marvell.com>
> 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")
> Cc: pascal.mazon@6wind.com
> 
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [EXTERNAL] Re: [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing
  2025-01-08 15:43 ` Stephen Hemminger
@ 2025-01-09  7:31   ` Tomasz Duszynski
  0 siblings, 0 replies; 3+ messages in thread
From: Tomasz Duszynski @ 2025-01-09  7:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Pascal Mazon, Jerin Jacob

>> From: Tomasz Duszynski <tduszynski@marvell.com>
>> To: <dev@dpdk.org>, Stephen Hemminger <stephen@networkplumber.org>,
>"Pascal  Mazon" <pascal.mazon@6wind.com>
>> CC: <jerinj@marvell.com>, Tomasz Duszynski <tduszynski@marvell.com>
>> 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")
>> Cc: pascal.mazon@6wind.com
>>
>> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
>
>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. 
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-09  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-08 12:10 [PATCH] net/tap: fix compilation issues if HAVE_TCA_FLOWER is missing Tomasz Duszynski
2025-01-08 15:43 ` Stephen Hemminger
2025-01-09  7:31   ` [EXTERNAL] " Tomasz Duszynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).