IPSEC: remove byte swap operations in DP during SPD classify
[vpp.git] / src / vnet / fib / fib_table.c
index 47f2011..56c8f03 100644 (file)
@@ -886,8 +886,8 @@ fib_table_entry_delete_index (fib_node_index_t fib_entry_index,
 }
 
 u32
-fib_table_entry_get_stats_index(u32 fib_index,
-                                const fib_prefix_t *prefix)
+fib_table_entry_get_stats_index (u32 fib_index,
+                                 const fib_prefix_t *prefix)
 {
     return (fib_entry_get_stats_index(
                 fib_table_lookup_exact_match(fib_index, prefix)));
@@ -1148,7 +1148,6 @@ fib_table_create_and_lock (fib_protocol_t proto,
     fib_node_index_t fi;
     va_list ap;
 
-    va_start(ap, fmt);
 
     switch (proto)
     {
@@ -1167,6 +1166,8 @@ fib_table_create_and_lock (fib_protocol_t proto,
 
     fib_table = fib_table_get(fi, proto);
 
+    va_start(ap, fmt);
+
     fib_table->ft_desc = va_format(fib_table->ft_desc, fmt, &ap);
 
     va_end(ap);
@@ -1243,15 +1244,6 @@ fib_table_unlock (u32 fib_index,
     fib_table->ft_locks[source]--;
     fib_table->ft_locks[FIB_TABLE_TOTAL_LOCKS]--;
 
-    if (0 == fib_table->ft_locks[source])
-    {
-        /*
-         * The source no longer needs the table. flush any routes
-         * from it just in case
-         */
-        fib_table_flush(fib_index, proto, source);
-    }
-
     if (0 == fib_table->ft_locks[FIB_TABLE_TOTAL_LOCKS])
     {
         /*