Skip to content

Commit

Permalink
[vxlan tunnel]: Don't create encap mapper. Currently not supported (s…
Browse files Browse the repository at this point in the history
…onic-net#613)

* Pospone QueueMap initialization until activation of counters

* Generate queue maps only for front panel ports

* Currently we don't support vxlan tunnel encap mappers

* Adjust vxlan test. No encap mapper anymore.

* Add required underlay interface
  • Loading branch information
pavel-shirshov authored and lguohan committed Sep 14, 2018
1 parent 528295d commit bf38bec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 5 additions & 6 deletions orchagent/vxlanorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern sai_object_id_t gVirtualRouterId;
extern sai_tunnel_api_t *sai_tunnel_api;
extern Directory<Orch*> gDirectory;
extern PortsOrch* gPortsOrch;
extern sai_object_id_t gUnderlayIfId;

static sai_object_id_t
create_tunnel_map()
Expand Down Expand Up @@ -97,18 +98,16 @@ create_tunnel(sai_object_id_t tunnel_map_id)
attr.value.s32 = SAI_TUNNEL_TYPE_VXLAN;
tunnel_attrs.push_back(attr);

attr.id = SAI_TUNNEL_ATTR_UNDERLAY_INTERFACE;
attr.value.oid = gUnderlayIfId;
tunnel_attrs.push_back(attr);

sai_object_id_t decap_list[] = { tunnel_map_id };
attr.id = SAI_TUNNEL_ATTR_DECAP_MAPPERS;
attr.value.objlist.count = 1;
attr.value.objlist.list = decap_list;
tunnel_attrs.push_back(attr);

sai_object_id_t encap_list[] = { tunnel_map_id };
attr.id = SAI_TUNNEL_ATTR_ENCAP_MAPPERS;
attr.value.objlist.count = 1;
attr.value.objlist.list = encap_list;
tunnel_attrs.push_back(attr);

sai_object_id_t tunnel_id;
sai_status_t status = sai_tunnel_api->create_tunnel(
&tunnel_id,
Expand Down
14 changes: 7 additions & 7 deletions tests/test_vxlan_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ def create_vxlan_tunnel(dvs, name, src_ip, dst_ip, tunnel_map_ids, tunnel_map_en
}
)

check_object(asic_db, "ASIC_STATE:SAI_OBJECT_TYPE_TUNNEL", tunnel_id,
{
'SAI_TUNNEL_ATTR_TYPE': 'SAI_TUNNEL_TYPE_VXLAN',
'SAI_TUNNEL_ATTR_ENCAP_MAPPERS': '1:%s' % tunnel_map_id,
'SAI_TUNNEL_ATTR_DECAP_MAPPERS': '1:%s' % tunnel_map_id,
}
)
# FIXME: !!!
# check_object(asic_db, "ASIC_STATE:SAI_OBJECT_TYPE_TUNNEL", tunnel_id,
# {
# 'SAI_TUNNEL_ATTR_TYPE': 'SAI_TUNNEL_TYPE_VXLAN',
# 'SAI_TUNNEL_ATTR_DECAP_MAPPERS': '1:%s' % tunnel_map_id,
# }
# )

tunnel_type = 'SAI_TUNNEL_TERM_TABLE_ENTRY_TYPE_P2P' if dst_ip != '0.0.0.0' else 'SAI_TUNNEL_TERM_TABLE_ENTRY_TYPE_P2MP'
expected_attributes = {
Expand Down

0 comments on commit bf38bec

Please sign in to comment.