Commit a86248d0 authored by Tom Barbette's avatar Tom Barbette

Fixing NUMA library dependency

parent 33b3dfa6
......@@ -47,6 +47,9 @@
/* Define if a Click user-level driver uses Netmap. */
#undef HAVE_NETMAP
/* Define if you have the <nuda.h> header file. */
#undef HAVE_NUMA
/* Define if dynamic linking is possible. */
#undef HAVE_DYNAMIC_LINKING
......
......@@ -121,9 +121,6 @@
#undef HAVE_TASK_HEAP
#endif
/* Use zerocopy */
#undef HAVE_ZEROCOPY
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
......
......@@ -794,6 +794,7 @@ enable_select
enable_poll
enable_kqueue
enable_dpdk
enable_zerocopy
enable_linuxmodule
enable_fixincludes
enable_multithread
......@@ -819,7 +820,6 @@ enable_ethernet
enable_etherswitch
enable_grid
enable_icmp
enable_zerocopy
enable_ip
enable_ip6
enable_ipsec
......@@ -1489,6 +1489,7 @@ Optional Features:
--disable-poll do not use poll()
--disable-kqueue do not use kqueue()
--enable-dpdk use Intel DPDK
--enable-zerocopy use Zero Copy
--disable-linuxmodule disable Linux kernel driver
--disable-fixincludes do not patch Linux kernel headers for C++
--enable-multithread support kernel multithreading
......@@ -1510,7 +1511,6 @@ Optional Features:
--enable-etherswitch include Ethernet switch elements
--enable-grid include Grid elements (see FAQ)
--disable-icmp do not include ICMP elements
--disable-zerocopy do not use zero copy
--disable-ip do not include IP elements
--enable-ip6 include IPv6 elements
--enable-ipsec include IP security elements
......@@ -6527,6 +6527,18 @@ Define \$RTE_SDK and \$RTE_TARGET as per Intel DPDK documentation.
fi
# Check whether --enable-zerocopy was given.
if test "${enable_zerocopy+set}" = set; then :
enableval=$enable_zerocopy; :
else
enable_zerocopy=no
fi
if test "x$enable_zerocopy" = xyes; then
$as_echo "#define HAVE_ZEROCOPY 1" >>confdefs.h
fi
# Check whether --enable-linuxmodule was given.
if test "${enable_linuxmodule+set}" = set; then :
......@@ -6967,18 +6979,6 @@ test "x$enable_all_elements" = xyes -a \( "x$enable_icmp" = xNO -o "x$enable_icm
if test "x$enable_icmp" = xyes; then
:
fi
# Check whether --enable-zerocopy was given.
if test "${enable_zerocopy+set}" = set; then :
enableval=$enable_zerocopy;
else
enable_zerocopy=yes
fi
test "x$enable_all_elements" = xyes -a \( "x$enable_zerocopy" = xNO -o "x$enable_zerocopy" = x \) && enable_zerocopy=yes
if test "x$enable_zerocopy" = xyes; then
:
$as_echo "#define HAVE_ZEROCOPY 1" >>confdefs.h
fi
# Check whether --enable-ip was given.
if test "${enable_ip+set}" = set; then :
......@@ -10678,6 +10678,13 @@ $as_echo "$ac_cv_numa_header_path" >&6; }
HAVE_NUMA=yes
fi
if test "$HAVE_NUMA" = yes; then
$as_echo "#define HAVE_NUMA 1" >>confdefs.h
LDFLAGS="$LDFLAGS -Lnuma"
fi
if test "$HAVE_NUMA" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether numa.h works" >&5
$as_echo_n "checking whether numa.h works... " >&6; }
......@@ -10776,6 +10783,7 @@ $as_echo "#define HAVE_NET_NETMAP_H 1" >>confdefs.h
fi
if test "$HAVE_PCAP" != yes -a "$HAVE_NETMAP" != yes -a "$ac_cv_under_linux" != yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
=========================================
......@@ -10797,7 +10805,6 @@ pcap.h and/or -lpcap not found; user-level driver can't steal packets.
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct if_data has ifi_datalen" >&5
$as_echo_n "checking whether struct if_data has ifi_datalen... " >&6; }
if ${ac_cv_if_data_ifi_datalen+:} false; then :
......
......@@ -1220,6 +1220,7 @@ if test "$enable_userlevel" = yes; then
CLICK_CHECK_LIBPCAP
CLICK_CHECK_NUMA
CLICK_CHECK_NETMAP
if test "$HAVE_PCAP" != yes -a "$HAVE_NETMAP" != yes -a "$ac_cv_under_linux" != yes; then
AC_MSG_WARN([
=========================================
......@@ -1234,7 +1235,6 @@ pcap.h and/or -lpcap not found; user-level driver can't steal packets.
HAVE_USERLEVEL_DRIVER=1
fi
dnl other user-level specifics
AC_CACHE_CHECK([whether struct if_data has ifi_datalen], [ac_cv_if_data_ifi_datalen],
......
......@@ -98,7 +98,7 @@ int QueueDevice::initialize_tx(ErrorHandler * errh) {
int QueueDevice::initialize_rx(ErrorHandler *errh) {
NumaCpuBitmask b = NumaCpuBitmask::allocate();
#if HAVE_NUMA
if (numa_available()==0)) {
if (numa_available()==0) {
if (_this_node >= 0) {
b = Numa::node_to_cpus(_this_node);
} else
......
......@@ -487,10 +487,17 @@ AC_DEFUN([CLICK_CHECK_NUMA], [
[ac_cv_numa_header_path="not found"])
AC_MSG_RESULT($ac_cv_numa_header_path)
if test "$ac_cv_net_numa_header_path" = "found"; then
if test "$ac_cv_numa_header_path" = "found"; then
HAVE_NUMA=yes
fi
if test "$HAVE_NUMA" = yes; then
AC_DEFINE([HAVE_NUMA], [1], [Define if you have the <nuda.h> header file.])
LDFLAGS="$LDFLAGS -lnuma"
fi
if test "$HAVE_NUMA" = yes; then
AC_CACHE_CHECK([whether numa.h works],
[ac_cv_working_numa_h], [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment