summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/vxlan.h
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2018-10-02 12:23:06 +0300
committerJohn Lo <loj@cisco.com>2018-10-05 03:25:39 +0000
commitefd9cf302ff6cbaf3c51e69bb9ea6c29e2325a10 (patch)
treeef945cf9c7a19f46720b3a1aa9d9619743ca698e /src/vnet/vxlan/vxlan.h
parentdc7b1aa1e3c451b0ffc18543f06aa03eae56a087 (diff)
vxlan:ip4 decap:remove access to tunnel object
store local/remote addresses + vrf + vni in hash key store complete decap info in hash value (sw_if_index + next_index + error) this removes the need to access the tunnel object when matching both unicast and mcast. however for mcast handling it requires 3 hash lookups: * one failed unicast lookup (by src+dst addrs) * lookup by mcast(dst) addr . * unicast lookup (tunnel local ip as dst + pkt's src addr) where previously it needed 2: * lookup by src to find unicast tunnel + compare dst to local addr (failing for mcast) * lookup by mcast to find the mcast tunnel Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/vxlan/vxlan.h')
-rw-r--r--src/vnet/vxlan/vxlan.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/vxlan/vxlan.h b/src/vnet/vxlan/vxlan.h
index 7399b19e387..73052278a48 100644
--- a/src/vnet/vxlan/vxlan.h
+++ b/src/vnet/vxlan/vxlan.h
@@ -59,6 +59,24 @@ typedef clib_bihash_kv_16_8_t vxlan4_tunnel_key_t;
*/
typedef clib_bihash_kv_24_8_t vxlan6_tunnel_key_t;
+typedef union
+{
+ struct
+ {
+ u32 sw_if_index; /* unicast - input interface / mcast - stats interface */
+ union
+ {
+ struct /* unicast action */
+ {
+ u16 next_index;
+ u8 error;
+ };
+ ip4_address_t local_ip; /* used as dst ip for mcast pkts to assign them to unicast tunnel */
+ };
+ };
+ u64 as_u64;
+} vxlan_decap_info_t;
+
typedef struct
{
/* Required for pool_get_aligned */