frr: updat to 9.0
authorLucian Cristian <lucian.cristian@gmail.com>
Wed, 16 Aug 2023 11:37:35 +0000 (11:37 +0000)
committerTianling Shen <cnsztl@gmail.com>
Thu, 17 Aug 2023 10:35:06 +0000 (18:35 +0800)
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
net/frr/Makefile
net/frr/patches/098-fix_mips_libyang.patch
net/frr/patches/996-qpb_header_fix.patch [new file with mode: 0644]
net/frr/patches/997-reverse_python_test.patch
net/frr/patches/999-thread_reverse.patch [deleted file]

index b985c1f40ea740efd4f5f0fc3511b120cb617148..1387de25a842c385e910bc34acafe0a2975a5b23 100644 (file)
@@ -7,15 +7,15 @@
 
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
-PKG_VERSION:=8.5.1
+PKG_VERSION:=9.0.0
 PKG_RELEASE:=1
-PKG_SOURCE_DATE:=2023-05-12
+PKG_SOURCE_DATE:=2023-08-12
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_VERSION:=05469ab2b553302c2a7032f4c89e4510dc3fa6d9
+PKG_SOURCE_VERSION:=9852228d1e87bdbad13e0fed8313203f00bf26af
 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)?
 
-PKG_HASH:=caf3fcf1998ecd9a08e67373921a2d4bf49dbfc707008d20a1d38fd1606ef298
+PKG_HASH:=6e611cd86ae9787a4b8d71411fdc38ad1fe843a839756c9c386848ffde81f6cf
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
@@ -59,7 +59,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 PKG_BUILD_FLAGS:=lto
 
-PKG_BUILD_DEPENDS:=frr/host
+PKG_BUILD_DEPENDS:=frr/host protobuf-c/host
 HOST_BUILD_DEPENDS:=python3/host
 
 include $(INCLUDE_DIR)/package.mk
@@ -96,7 +96,7 @@ endef
 define Package/frr-libfrr
   $(call Package/frr/Default)
   TITLE:=zebra library
-  DEPENDS+=+librt +libatomic +libcap +libjson-c +libyang +FRR_OPENSSL:libopenssl +FRR_SNMP:libnetsnmp
+  DEPENDS+=+librt +libatomic +libcap +libjson-c +libyang +libprotobuf-c +FRR_OPENSSL:libopenssl +FRR_SNMP:libnetsnmp
   CONFLICTS:=quagga-libzebra
 endef
 
index 3cf24c9853df1ed5afc6ada3c46d454794a4df91..b69b6e4373eb1da761f4701b395e60b8ce08df4c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/northbound.h
 +++ b/lib/northbound.h
-@@ -593,11 +593,7 @@ struct frr_yang_module_info {
+@@ -627,11 +627,7 @@ struct frr_yang_module_info {
  
                /* Priority - lower priorities are processed first. */
                uint32_t priority;
diff --git a/net/frr/patches/996-qpb_header_fix.patch b/net/frr/patches/996-qpb_header_fix.patch
new file mode 100644 (file)
index 0000000..07b06fe
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/qpb/qpb_allocator.h
++++ b/qpb/qpb_allocator.h
+@@ -14,7 +14,7 @@
+ #ifndef _QPB_ALLOCATOR_H_
+ #define _QPB_ALLOCATOR_H_
+-#include <google/protobuf-c/protobuf-c.h>
++#include <protobuf-c/protobuf-c.h>
+ struct linear_allocator_t_;
index 8e454a45667363a593210be3fcda213fefe57dcf..aa3e0f87df554ea9b8eba81298259d0792cf47be 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -839,7 +839,6 @@ fi
+@@ -855,7 +855,6 @@ fi
  #
  
  AS_IF([test "$host" = "$build"], [
diff --git a/net/frr/patches/999-thread_reverse.patch b/net/frr/patches/999-thread_reverse.patch
deleted file mode 100644 (file)
index 0f5b24b..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
---- a/lib/thread.c
-+++ b/lib/thread.c
-@@ -868,13 +868,9 @@ static void thread_free(struct thread_ma
-       XFREE(MTYPE_THREAD, thread);
- }
--static int fd_poll(struct thread_master *m, const struct timeval *timer_wait,
--                 bool *eintr_p)
-+static int fd_poll(struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize,
-+                 nfds_t count, const struct timeval *timer_wait)
- {
--      sigset_t origsigs;
--      unsigned char trash[64];
--      nfds_t count = m->handler.copycount;
--
-       /*
-        * If timer_wait is null here, that means poll() should block
-        * indefinitely, unless the thread_master has overridden it by setting
-@@ -905,58 +901,15 @@ static int fd_poll(struct thread_master
-       rcu_assert_read_unlocked();
-       /* add poll pipe poker */
--      assert(count + 1 < m->handler.pfdsize);
--      m->handler.copy[count].fd = m->io_pipe[0];
--      m->handler.copy[count].events = POLLIN;
--      m->handler.copy[count].revents = 0x00;
--
--      /* We need to deal with a signal-handling race here: we
--       * don't want to miss a crucial signal, such as SIGTERM or SIGINT,
--       * that may arrive just before we enter poll(). We will block the
--       * key signals, then check whether any have arrived - if so, we return
--       * before calling poll(). If not, we'll re-enable the signals
--       * in the ppoll() call.
--       */
--
--      sigemptyset(&origsigs);
--      if (m->handle_signals) {
--              /* Main pthread that handles the app signals */
--              if (frr_sigevent_check(&origsigs)) {
--                      /* Signal to process - restore signal mask and return */
--                      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
--                      num = -1;
--                      *eintr_p = true;
--                      goto done;
--              }
--      } else {
--              /* Don't make any changes for the non-main pthreads */
--              pthread_sigmask(SIG_SETMASK, NULL, &origsigs);
--      }
-+      assert(count + 1 < pfdsize);
-+      pfds[count].fd = m->io_pipe[0];
-+      pfds[count].events = POLLIN;
-+      pfds[count].revents = 0x00;
--#if defined(HAVE_PPOLL)
--      struct timespec ts, *tsp;
-+      num = poll(pfds, count + 1, timeout);
--      if (timeout >= 0) {
--              ts.tv_sec = timeout / 1000;
--              ts.tv_nsec = (timeout % 1000) * 1000000;
--              tsp = &ts;
--      } else
--              tsp = NULL;
--
--      num = ppoll(m->handler.copy, count + 1, tsp, &origsigs);
--      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
--#else
--      /* Not ideal - there is a race after we restore the signal mask */
--      pthread_sigmask(SIG_SETMASK, &origsigs, NULL);
--      num = poll(m->handler.copy, count + 1, timeout);
--#endif
--
--done:
--
--      if (num < 0 && errno == EINTR)
--              *eintr_p = true;
--
--      if (num > 0 && m->handler.copy[count].revents != 0 && num--)
-+      unsigned char trash[64];
-+      if (num > 0 && pfds[count].revents != 0 && num--)
-               while (read(m->io_pipe[0], &trash, sizeof(trash)) > 0)
-                       ;
-@@ -1766,7 +1719,7 @@ struct thread *thread_fetch(struct threa
-       struct timeval zerotime = {0, 0};
-       struct timeval tv;
-       struct timeval *tw = NULL;
--      bool eintr_p = false;
-+
-       int num = 0;
-       do {
-@@ -1842,14 +1795,14 @@ struct thread *thread_fetch(struct threa
-               pthread_mutex_unlock(&m->mtx);
-               {
--                      eintr_p = false;
--                      num = fd_poll(m, tw, &eintr_p);
-+                      num = fd_poll(m, m->handler.copy, m->handler.pfdsize,
-+                                    m->handler.copycount, tw);
-               }
-               pthread_mutex_lock(&m->mtx);
-               /* Handle any errors received in poll() */
-               if (num < 0) {
--                      if (eintr_p) {
-+                      if (errno == EINTR) {
-                               pthread_mutex_unlock(&m->mtx);
-                               /* loop around to signal handler */
-                               continue;