dpdk: Add support for Mellanox ConnectX-4 devices
[vpp.git] / vnet / vnet / l2 / l2_fib.h
index 8e7a52e..4a2da59 100644 (file)
@@ -48,6 +48,8 @@ typedef struct
   };
 } l2fib_entry_key_t;
 
+STATIC_ASSERT_SIZEOF (l2fib_entry_key_t, 8);
+
 /*
  * The l2fib entry results
  */
@@ -62,8 +64,7 @@ typedef struct
       u8 static_mac:1;         /* static mac, no dataplane learning */
       u8 bvi:1;                        /* mac is for a bridged virtual interface */
       u8 filter:1;             /* drop packets to/from this mac */
-      u8 refresh:1;            /* refresh flag for aging */
-      u8 unused1:4;
+      u8 unused1:5;
       u8 timestamp;            /* timestamp for aging */
       u16 unused2;
     } fields;
@@ -71,6 +72,7 @@ typedef struct
   };
 } l2fib_entry_result_t;
 
+STATIC_ASSERT_SIZEOF (l2fib_entry_result_t, 8);
 
 /**
  * Compute the hash for the given key and return
@@ -105,7 +107,7 @@ l2fib_make_key (u8 * mac_address, u16 bd_index)
    * Create the in-register key as F:E:D:C:B:A:H:L
    * In memory the key is L:H:A:B:C:D:E:F
    */
-  temp = *((u64 *) (mac_address - 2));
+  temp = *((u64 *) (mac_address)) << 16;
   temp = (temp & ~0xffff) | (u64) (bd_index);
 #else
   /*