diff options
author | Anuradha Karuppiah <anuradhak@nvidia.com> | 2021-12-30 23:41:42 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-27 13:56:55 +0200 |
commit | fd03f1d4b7c9d03846b300258dc3d2d3ab70432c (patch) | |
tree | 1a7decd46ccdbfca5b7dd9602b83c3ddf3b913ea | |
parent | zebra: infastructure for the new dataplane plugin (diff) | |
download | frr-fd03f1d4b7c9d03846b300258dc3d2d3ab70432c.tar.xz frr-fd03f1d4b7c9d03846b300258dc3d2d3ab70432c.zip |
configure, zebra: include DPDK headers and shared libs in the dp-dpdk build
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-> Moved new capabilities needed to under HAVE_DPDK
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | zebra/main.c | 10 | ||||
-rw-r--r-- | zebra/subdir.am | 2 |
3 files changed, 21 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b901d7a42..330752a79 100644 --- a/configure.ac +++ b/configure.ac @@ -1998,6 +1998,18 @@ if test "$enable_grpc" = "yes"; then AC_LANG_POP([C++]) fi +dnl --------- +dnl DPDK +dnl --------- +if test "$enable_dp_dpdk" = "yes"; then + PKG_CHECK_MODULES([DPDK], [libdpdk], [ + AC_DEFINE([HAVE_DPDK], [1], [Enable DPDK backend]) + DPDK=true + ], [ + AC_MSG_ERROR([configuration specifies --enable-dp-dpdk but DPDK libs were not found]) + ]) +fi + dnl ----- dnl LTTng dnl ----- diff --git a/zebra/main.c b/zebra/main.c index 2d492f864..e516688a1 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -105,9 +105,13 @@ const struct option longopts[] = { #endif /* HAVE_NETLINK */ {0}}; -zebra_capabilities_t _caps_p[] = {ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN, - ZCAP_NET_RAW, ZCAP_IPC_LOCK, - ZCAP_READ_SEARCH, ZCAP_SYS_RAWIO}; +zebra_capabilities_t _caps_p[] = {ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN, + ZCAP_NET_RAW, +#ifdef HAVE_DPDK + ZCAP_IPC_LOCK, ZCAP_READ_SEARCH, + ZCAP_SYS_RAWIO +#endif +}; /* zebra privileges to run with */ struct zebra_privs_t zserv_privs = { diff --git a/zebra/subdir.am b/zebra/subdir.am index 89836f3ba..a926c14ad 100644 --- a/zebra/subdir.am +++ b/zebra/subdir.am @@ -268,3 +268,5 @@ endif zebra_zebra_dplane_dpdk_la_SOURCES = zebra/dpdk/zebra_dplane_dpdk.c zebra/dpdk/zebra_dplane_dpdk_vty.c zebra_zebra_dplane_dpdk_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -L/usr/local/lib -v +zebra_zebra_dplane_dpdk_la_CFLAGS = $(DPDK_CFLAGS) +zebra_zebra_dplane_dpdk_la_LIBADD = $(DPDK_LIBS) |