vcl: RX event may lost when accept session repeatedly
[vpp.git] / src / vnet / ip / ip_neighbor.c
index ad89d3f..ef61dde 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * src/vnet/ip/ip_neighboor.c: ip neighbor generic handling
+ * src/vnet/ip/ip_neighbor.c: ip neighbor generic handling
  *
  * Copyright (c) 2018 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,7 @@
  *   - Max processing allowed per run      : 20 usec
  *   - Max probe/delete operations per run : 10
  *   - Scan interrupt delay to resume scan : 1 msec
- *   - Neighbor stale threashold           : 4 x scan-interval
+ *   - Neighbor stale threshold            : 4 x scan-interval
  */
 #define IP_NEIGHBOR_DEF_SCAN_INTERVAL (60.0)
 #define IP_NEIGHBOR_DEF_MAX_PROC_TIME (20e-6)
@@ -47,6 +47,23 @@ typedef struct
 
 static ip_neighbor_scan_config_t ip_neighbor_scan_conf;
 
+u8 *
+format_ip_neighbor_flags (u8 * s, va_list * args)
+{
+  const ip_neighbor_flags_t flags = va_arg (*args, int);
+
+  if (flags & IP_NEIGHBOR_FLAG_STATIC)
+    s = format (s, "S");
+
+  if (flags & IP_NEIGHBOR_FLAG_DYNAMIC)
+    s = format (s, "D");
+
+  if (flags & IP_NEIGHBOR_FLAG_NO_FIB_ENTRY)
+    s = format (s, "N");
+
+  return s;
+}
+
 int
 ip_neighbor_add (const ip46_address_t * ip,
                 ip46_type_t type,
@@ -390,11 +407,11 @@ done:
 
 /*?
  * The '<em>ip scan-neighbor</em>' command can be used to enable and disable
- * periodic IP neighbor scan and change various scan parameneters.
+ * periodic IP neighbor scan and change various scan parameters.
  *
  * @note The default parameters used for IP neighbor scan should work fine
  * under normal conditions. They should not be changed from the default unless
- * properly tested to work as desied.
+ * properly tested to work as desired.
  *
  * @cliexpar
  * Example of enabling IP neighbor scan: