summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/user/basic.rst6
-rw-r--r--doc/user/bgp.rst8
-rw-r--r--doc/user/isisd.rst2
-rw-r--r--doc/user/kernel.rst20
-rw-r--r--lib/log_vty.c13
-rw-r--r--lib/thread.c5
-rw-r--r--lib/zlog.c15
-rw-r--r--lib/zlog.h3
8 files changed, 52 insertions, 20 deletions
diff --git a/doc/user/basic.rst b/doc/user/basic.rst
index 519f30d5e6..2def835f0b 100644
--- a/doc/user/basic.rst
+++ b/doc/user/basic.rst
@@ -188,6 +188,12 @@ Basic Config Commands
This command clears all current filters in the log-filter table. Can be
daemon independent.
+
+.. clicmd:: log immediate-mode
+
+ Use unbuffered output for log and debug messages; normally there is
+ some internal buffering.
+
.. clicmd:: service password-encryption
Encrypt password.
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
index fbcf2fb48e..87710e98c6 100644
--- a/doc/user/bgp.rst
+++ b/doc/user/bgp.rst
@@ -2634,15 +2634,15 @@ the same behavior of using same next-hop and RMAC values.
Enables or disables advertise-pip feature, specifiy system-IP and/or system-MAC
parameters.
-EVPN advertise-svi
-^^^^^^^^^^^^^^^^^^
+EVPN advertise-svi-ip
+^^^^^^^^^^^^^^^^^^^^^
Typically, the SVI IP address is reused on VTEPs across multiple racks. However,
-if you have unique SVI IP addresses want those to be reachable you can enable the
+if you have unique SVI IP addresses that you want to be reachable you can use the
advertise-svi-ip option. This option advertises the SVI IP/MAC address as a type-2
route and eliminates the need for any flooding over VXLAN to reach the IP from a
remote VTEP.
-.. clicmd:: advertise-svi
+.. clicmd:: advertise-svi-ip
Note that you should not enable both the advertise-svi-ip and the advertise-default-gw
at the same time.
diff --git a/doc/user/isisd.rst b/doc/user/isisd.rst
index c1bdd9a694..595bae143e 100644
--- a/doc/user/isisd.rst
+++ b/doc/user/isisd.rst
@@ -77,7 +77,7 @@ writing, *isisd* does not support multiple ISIS processes.
- transition
Send and accept both styles of TLVs during transition
- wide
- Use new style of TLVs to carry wider metric
+ Use new style of TLVs to carry wider metric. FRR uses this as a default value
.. clicmd:: set-overload-bit
diff --git a/doc/user/kernel.rst b/doc/user/kernel.rst
index 4c2c7a5008..210ede7e91 100644
--- a/doc/user/kernel.rst
+++ b/doc/user/kernel.rst
@@ -6,6 +6,9 @@ Kernel Interface
There are several different methods for reading kernel routing table
information, updating kernel routing tables, and for looking up interfaces.
+FRR relies heavily on the Netlink (``man 7 netlink``) interface to
+communicate with the Kernel. However, other interfaces are still used
+in some parts of the code.
- ioctl
This method is a very traditional way for reading or writing kernel
@@ -27,16 +30,7 @@ information, updating kernel routing tables, and for looking up interfaces.
kernel information.
- routing socket / Netlink
- On recent Linux kernels (2.0.x and 2.2.x), there is a kernel/user
- communication support called `Netlink`. It makes asynchronous communication
- between kernel and FRR possible, similar to a routing socket on BSD systems.
-
- Before you use this feature, be sure to select (in kernel configuration) the
- kernel/Netlink support option 'Kernel/User network link driver' and 'Routing
- messages'.
-
- Today, the :file:`/dev/route` special device file is obsolete. Netlink
- communication is done by reading/writing over Netlink socket.
-
- After the kernel configuration, please reconfigure and rebuild FRR. You can
- use Netlink as a dynamic routing update channel between FRR and the kernel.
+ Netlink first appeard in Linux kernel 2.0. It makes asynchronous
+ communication between the kernel and FRR possible, similar to a routing
+ socket on BSD systems. Netlink communication is done by reading/writing
+ over Netlink socket.
diff --git a/lib/log_vty.c b/lib/log_vty.c
index c6788dd35a..9dbf216d31 100644
--- a/lib/log_vty.c
+++ b/lib/log_vty.c
@@ -647,6 +647,18 @@ DEFPY (show_log_filter,
return CMD_SUCCESS;
}
+/* Enable/disable 'immediate' mode, with no output buffering */
+DEFPY (log_immediate_mode,
+ log_immediate_mode_cmd,
+ "[no] log immediate-mode",
+ NO_STR
+ "Logging control"
+ "Output immediately, without buffering")
+{
+ zlog_set_immediate(!no);
+ return CMD_SUCCESS;
+}
+
void log_config_write(struct vty *vty)
{
bool show_cmdline_hint = false;
@@ -775,4 +787,5 @@ void log_cmd_init(void)
install_element(CONFIG_NODE, &log_filter_clear_cmd);
install_element(CONFIG_NODE, &config_log_filterfile_cmd);
install_element(CONFIG_NODE, &no_config_log_filterfile_cmd);
+ install_element(CONFIG_NODE, &log_immediate_mode_cmd);
}
diff --git a/lib/thread.c b/lib/thread.c
index 3d8b544678..7b5d2f3113 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -862,7 +862,10 @@ struct thread *_thread_add_read_write(const struct xref_threadsched *xref,
xref->funcname, xref->xref.file, xref->xref.line,
t_ptr, fd, 0, arg, 0);
- assert(fd >= 0 && fd < m->fd_limit);
+ assert(fd >= 0);
+ if (fd >= m->fd_limit)
+ assert(!"Number of FD's open is greater than FRR currently configured to handle, aborting");
+
frr_with_mutex(&m->mtx) {
if (t_ptr && *t_ptr)
// thread is already scheduled; don't reschedule
diff --git a/lib/zlog.c b/lib/zlog.c
index 24800c6e64..a99fd71f0d 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -81,6 +81,11 @@ static gid_t zlog_gid = -1;
DECLARE_ATOMLIST(zlog_targets, struct zlog_target, head);
static struct zlog_targets_head zlog_targets;
+/* Global setting for buffered vs immediate output. The default is
+ * per-pthread buffering.
+ */
+static bool default_immediate;
+
/* cf. zlog.h for additional comments on this struct.
*
* Note: you MUST NOT pass the format string + va_list to non-FRR format
@@ -395,7 +400,7 @@ static void vzlog_tls(struct zlog_tls *zlog_tls, const struct xref_logmsg *xref,
struct zlog_msg *msg;
char *buf;
bool ignoremsg = true;
- bool immediate = false;
+ bool immediate = default_immediate;
/* avoid further processing cost if no target wants this message */
rcu_read_lock();
@@ -714,6 +719,14 @@ struct zlog_target *zlog_target_replace(struct zlog_target *oldzt,
return oldzt;
}
+/*
+ * Enable or disable 'immediate' output - default is to buffer
+ * each pthread's messages.
+ */
+void zlog_set_immediate(bool set_p)
+{
+ default_immediate = set_p;
+}
/* common init */
diff --git a/lib/zlog.h b/lib/zlog.h
index 66d8f1e5d7..2ef4173605 100644
--- a/lib/zlog.h
+++ b/lib/zlog.h
@@ -249,6 +249,9 @@ extern void zlog_tls_buffer_init(void);
extern void zlog_tls_buffer_flush(void);
extern void zlog_tls_buffer_fini(void);
+/* Enable or disable 'immediate' output - default is to buffer messages. */
+extern void zlog_set_immediate(bool set_p);
+
#ifdef __cplusplus
}
#endif