]> git.proxmox.com Git - mirror_frr.git/commitdiff
configure, zebra: include DPDK headers and shared libs in the dp-dpdk build
authorAnuradha Karuppiah <anuradhak@nvidia.com>
Thu, 30 Dec 2021 22:41:42 +0000 (14:41 -0800)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 27 Jun 2022 11:56:55 +0000 (07:56 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
   -> Moved new capabilities needed to under HAVE_DPDK
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
configure.ac
zebra/main.c
zebra/subdir.am

index b901d7a423598a9ee63ce97d47c4f960c1c1f4f1..330752a79f985702ebb318ffc1e2e8ae972205e6 100644 (file)
@@ -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 -----
index 2d492f86496256b699ce1eed6fa3c6c7ac591927..e516688a1955a54f766f090f4c9f193bd45d079c 100644 (file)
@@ -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 = {
index 89836f3ba4683d0cad1364331eb35da9bbe478c2..a926c14adf0585b87a1647f97f70b968a4b05f57 100644 (file)
@@ -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)