ipsec: make pre-shared keys harder to misuse
[vpp.git] / src / vnet / interface_cli.c
index 452849e..627af6f 100644 (file)
@@ -77,7 +77,7 @@ show_or_clear_hw_interfaces (vlib_main_t * vm,
   int i, verbose = -1, show_bond = 0;
 
   if (!unformat_user (input, unformat_line_input, line_input))
-    return 0;
+    goto skip_unformat;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -117,6 +117,7 @@ show_or_clear_hw_interfaces (vlib_main_t * vm,
 
   unformat_free (line_input);
 
+skip_unformat:
   /* Gather interfaces. */
   if (vec_len (hw_if_indices) == 0)
     pool_foreach (hi, im->hw_interfaces)
@@ -415,7 +416,7 @@ show_sw_interfaces (vlib_main_t * vm,
       /* Gather interfaces. */
       sorted_sis =
        vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
-      _vec_len (sorted_sis) = 0;
+      vec_set_len (sorted_sis, 0);
       /* *INDENT-OFF* */
       pool_foreach (si, im->sw_interfaces)
        {
@@ -516,7 +517,8 @@ done:
 /* *INDENT-OFF* */
 VLIB_CLI_COMMAND (show_sw_interfaces_command, static) = {
   .path = "show interface",
-  .short_help = "show interface [address|addr|features|feat|vtr] [<interface> [<interface> [..]]] [verbose]",
+  .short_help = "show interface [address|addr|features|feat|vtr|tag] "
+               "[<interface> [<interface> [..]]] [verbose]",
   .function = show_sw_interfaces,
   .is_mp_safe = 1,
 };
@@ -1236,7 +1238,7 @@ show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input,
     {
       sorted_sis =
        vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
-      _vec_len (sorted_sis) = 0;
+      vec_set_len (sorted_sis, 0);
       /* *INDENT-OFF* */
       pool_foreach (si, im->sw_interfaces)
        {
@@ -1534,7 +1536,12 @@ set_hw_interface_change_rx_mode (vnet_main_t * vnm, u32 hw_if_index,
     {
       int rv = vnet_hw_if_set_rx_queue_mode (vnm, queue_indices[i], mode);
       if (rv)
-       goto done;
+       {
+         error = clib_error_return (
+           0, "unable to set rx-mode on interface %v queue-id %u.\n",
+           hw->name, queue_id);
+         goto done;
+       }
     }
 
 done:
@@ -2378,13 +2385,13 @@ pcap_trace_command_fn (vlib_main_t * vm,
  *   packet capture are preserved, so '<em>any</em>' can be used to reset
  *   the interface setting.
  *
- * - <b>filter</b> - Use the pcap rx / tx / drop trace filter, which
+ * - <b>filter</b> - Use the pcap trace rx / tx / drop filter, which
  *   must be configured. Use <b>classify filter pcap...</b> to configure the
  *   filter. The filter will only be executed if the per-interface or
  *   any-interface tests fail.
  *
  * - <b>error <node>.<error></b> - filter packets based on a specific error.
- *   For example: error {ip4-udp-lookup}.{No listener for dst port}
+ *   For example: error {ip4-udp-lookup}.{no_listener}
  *
  * - <b>file <name></b> - Used to specify the output filename. The file will
  *   be placed in the '<em>/tmp</em>' directory, so only the filename is