DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels
@ 2020-05-07  9:45 Raslan Darawsheh
  2020-05-07 12:56 ` Ferruh Yigit
  2020-05-10 12:48 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2020-05-07  9:45 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, stephen

With old kernels that don't have support for extended ack
the variable one is not used which will cause a compilation
failure:
drivers/net/tap/tap_netlink.c:48:6:
error: unused variable 'one' [-Werror=unused-variable]
  int one = 1;
      ^~~
cc1: all warnings being treated as errors
Fixes: f11e38d90980 ("net/tap: use netlink extended ack support")
Cc: stephen@networkplumber.org

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 drivers/net/tap/tap_netlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index a77486d8e..b73802b51 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -45,7 +45,9 @@ tap_nl_init(uint32_t nl_groups)
 		.nl_family = AF_NETLINK,
 		.nl_groups = nl_groups,
 	};
+#ifdef NETLINK_EXT_ACK
 	int one = 1;
+#endif
 
 	fd = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE);
 	if (fd < 0) {
-- 
2.26.0


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

* Re: [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels
  2020-05-07  9:45 [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels Raslan Darawsheh
@ 2020-05-07 12:56 ` Ferruh Yigit
  2020-05-10 12:48 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-05-07 12:56 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: dev, stephen

On 5/7/2020 10:45 AM, Raslan Darawsheh wrote:
> With old kernels that don't have support for extended ack
> the variable one is not used which will cause a compilation
> failure:
> drivers/net/tap/tap_netlink.c:48:6:
> error: unused variable 'one' [-Werror=unused-variable]
>   int one = 1;
>       ^~~
> cc1: all warnings being treated as errors
> Fixes: f11e38d90980 ("net/tap: use netlink extended ack support")
> Cc: stephen@networkplumber.org
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>

Thanks for reporting and fixing the issue.

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Squashed into relevant commit in next-net, thanks.

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

* Re: [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels
  2020-05-07  9:45 [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels Raslan Darawsheh
  2020-05-07 12:56 ` Ferruh Yigit
@ 2020-05-10 12:48 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2020-05-10 12:48 UTC (permalink / raw)
  To: Raslan Darawsheh, ferruh.yigit; +Cc: dev, stephen

reference to glibc which is missing from commit log:
https://github.com/bminor/glibc/commit/f9b437d5efce93800b51ad2a437c8b1c9616bf80

Kindest regards,
Raslan Darawsheh

> -----Original Message-----
> From: Raslan Darawsheh <rasland@mellanox.com>
> Sent: Thursday, May 7, 2020 12:46 PM
> To: ferruh.yigit@intel.com
> Cc: dev@dpdk.org; stephen@networkplumber.org
> Subject: [PATCH] net/tap: fix compilation issue with old kernels
> 
> With old kernels that don't have support for extended ack
> the variable one is not used which will cause a compilation
> failure:
> drivers/net/tap/tap_netlink.c:48:6:
> error: unused variable 'one' [-Werror=unused-variable]
>   int one = 1;
>       ^~~
> cc1: all warnings being treated as errors
> Fixes: f11e38d90980 ("net/tap: use netlink extended ack support")
> Cc: stephen@networkplumber.org
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> ---
>  drivers/net/tap/tap_netlink.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
> index a77486d8e..b73802b51 100644
> --- a/drivers/net/tap/tap_netlink.c
> +++ b/drivers/net/tap/tap_netlink.c
> @@ -45,7 +45,9 @@ tap_nl_init(uint32_t nl_groups)
>  		.nl_family = AF_NETLINK,
>  		.nl_groups = nl_groups,
>  	};
> +#ifdef NETLINK_EXT_ACK
>  	int one = 1;
> +#endif
> 
>  	fd = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC,
> NETLINK_ROUTE);
>  	if (fd < 0) {
> --
> 2.26.0


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

end of thread, other threads:[~2020-05-10 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  9:45 [dpdk-dev] [PATCH] net/tap: fix compilation issue with old kernels Raslan Darawsheh
2020-05-07 12:56 ` Ferruh Yigit
2020-05-10 12:48 ` Raslan Darawsheh

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).