* [dpdk-dev] [PATCH] net/tap: fix compilation issue glibc < 2.24
@ 2020-05-10 12:23 Raslan Darawsheh
2020-05-11 16:13 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Raslan Darawsheh @ 2020-05-10 12:23 UTC (permalink / raw)
To: ferruh.yigit; +Cc: dev, stephen
When trying to compile with glibc < 2.24 that doesn't
support SOL_NETLINK it will cause compilation failure:
drivers/net/tap/tap_netlink.c:70:17: error:
'SOL_NETLINK' undeclared (first use in this function)
setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one));
Fixes: b9cf1a882820 ("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 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index b73802b51..dcd7ab99b 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -17,6 +17,11 @@
#include "tap_log.h"
+/*define SOL_NETLINK for old kernels usage. */
+#ifndef SOL_NETLINK
+#define SOL_NETLINK 270
+#endif
+
/* Must be quite large to support dumping a huge list of QDISC or filters. */
#define BUF_SIZE (32 * 1024) /* Size of the buffer to receive kernel messages */
#define SNDBUF_SIZE 32768 /* Send buffer size for the netlink socket */
--
2.26.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/tap: fix compilation issue glibc < 2.24
2020-05-10 12:23 [dpdk-dev] [PATCH] net/tap: fix compilation issue glibc < 2.24 Raslan Darawsheh
@ 2020-05-11 16:13 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2020-05-11 16:13 UTC (permalink / raw)
To: Raslan Darawsheh; +Cc: dev, stephen
On 5/10/2020 1:23 PM, Raslan Darawsheh wrote:
> When trying to compile with glibc < 2.24 that doesn't
> support SOL_NETLINK it will cause compilation failure:
>
> drivers/net/tap/tap_netlink.c:70:17: error:
> 'SOL_NETLINK' undeclared (first use in this function)
> setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one));
>
> Fixes: b9cf1a882820 ("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 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
> index b73802b51..dcd7ab99b 100644
> --- a/drivers/net/tap/tap_netlink.c
> +++ b/drivers/net/tap/tap_netlink.c
> @@ -17,6 +17,11 @@
>
> #include "tap_log.h"
>
> +/*define SOL_NETLINK for old kernels usage. */
> +#ifndef SOL_NETLINK
> +#define SOL_NETLINK 270
> +#endif
> +
> /* Must be quite large to support dumping a huge list of QDISC or filters. */
> #define BUF_SIZE (32 * 1024) /* Size of the buffer to receive kernel messages */
> #define SNDBUF_SIZE 32768 /* Send buffer size for the netlink socket */
>
(relevant glibc commit provided added to commit log)
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-11 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 12:23 [dpdk-dev] [PATCH] net/tap: fix compilation issue glibc < 2.24 Raslan Darawsheh
2020-05-11 16:13 ` Ferruh Yigit
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).