ethernet: fix coverity 218549
[vpp.git] / src / vnet / ethernet / node.c
index f470c1c..21346a8 100644 (file)
@@ -225,7 +225,7 @@ identify_subint (ethernet_main_t * em,
       // A unicast packet arriving on an L3 interface must have a dmac
       // matching the interface mac. If interface has STATUS_L3 bit set
       // mac filter is already done.
-      if (!(*is_l2 || (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3)))
+      if (!(*is_l2 || (ei && (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3))))
        {
          u64 dmacs[2];
          u8 dmacs_bad[2];
@@ -1505,7 +1505,7 @@ ethernet_input_inline (vlib_main_t * vm,
          if (n_left_from > 1)
            {
              vlib_prefetch_buffer_header (b[1], STORE);
-             CLIB_PREFETCH (b[1]->data, CLIB_CACHE_LINE_BYTES, LOAD);
+             clib_prefetch_load (b[1]->data);
            }
 
          bi0 = from[0];
@@ -1897,7 +1897,7 @@ ethernet_sw_interface_get_config (vnet_main_t * vnm,
            }
          else
            {
-             // a specific outer + specifc innner vlan id, a common case
+             // a specific outer + specific innner vlan id, a common case
 
              // get the qinq table
              if (vlan_table->vlans[si->sub.eth.outer_vlan_id].qinqs == 0)