Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smartswitch] Add support for ENI Based Forwarding #3398

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ orchagent_SOURCES = \
response_publisher.cpp \
nvgreorch.cpp \
zmqorch.cpp \
dash/dashenifwdorch.cpp \
dash/dashenifwdinfo.cpp \
dash/dashorch.cpp \
dash/dashrouteorch.cpp \
dash/dashvnetorch.cpp \
Expand Down
12 changes: 12 additions & 0 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ extern string gMySwitchType;

const int TCP_PROTOCOL_NUM = 6; // TCP protocol number

#define MAC_EXACT_MATCH "ff:ff:ff:ff:ff:ff"

acl_rule_attr_lookup_t aclMatchLookup =
{
{ MATCH_IN_PORTS, SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS },
Expand Down Expand Up @@ -77,6 +79,8 @@ acl_rule_attr_lookup_t aclMatchLookup =
{ MATCH_TUNNEL_VNI, SAI_ACL_ENTRY_ATTR_FIELD_TUNNEL_VNI },
{ MATCH_INNER_ETHER_TYPE, SAI_ACL_ENTRY_ATTR_FIELD_INNER_ETHER_TYPE },
{ MATCH_INNER_IP_PROTOCOL, SAI_ACL_ENTRY_ATTR_FIELD_INNER_IP_PROTOCOL },
{ MATCH_INNER_SRC_MAC, SAI_ACL_ENTRY_ATTR_FIELD_INNER_SRC_MAC },
{ MATCH_INNER_DST_MAC, SAI_ACL_ENTRY_ATTR_FIELD_INNER_DST_MAC },
{ MATCH_INNER_L4_SRC_PORT, SAI_ACL_ENTRY_ATTR_FIELD_INNER_L4_SRC_PORT },
{ MATCH_INNER_L4_DST_PORT, SAI_ACL_ENTRY_ATTR_FIELD_INNER_L4_DST_PORT },
{ MATCH_BTH_OPCODE, SAI_ACL_ENTRY_ATTR_FIELD_BTH_OPCODE},
Expand Down Expand Up @@ -617,6 +621,7 @@ bool AclTableRangeMatch::validateAclRuleMatch(const AclRule& rule) const
return true;
}


string AclTableType::getName() const
{
return m_name;
Expand Down Expand Up @@ -877,6 +882,13 @@ bool AclRule::validateAddMatch(string attr_name, string attr_value)
{
matchData.data.booldata = (attr_name == "true");
}
else if (attr_name == MATCH_INNER_DST_MAC || attr_name == MATCH_INNER_SRC_MAC)
{
swss::MacAddress mac(attr_value);
swss::MacAddress mask(MAC_EXACT_MATCH);
memcpy(matchData.data.mac, mac.getMac(), sizeof(sai_mac_t));
memcpy(matchData.mask.mac, mask.getMac(), sizeof(sai_mac_t));
}
else if (attr_name == MATCH_IN_PORTS)
{
auto ports = tokenize(attr_value, ',');
Expand Down
2 changes: 2 additions & 0 deletions orchagent/aclorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#define MATCH_INNER_IP_PROTOCOL "INNER_IP_PROTOCOL"
#define MATCH_INNER_L4_SRC_PORT "INNER_L4_SRC_PORT"
#define MATCH_INNER_L4_DST_PORT "INNER_L4_DST_PORT"
#define MATCH_INNER_SRC_MAC "INNER_SRC_MAC"
#define MATCH_INNER_DST_MAC "INNER_DST_MAC"
#define MATCH_BTH_OPCODE "BTH_OPCODE"
#define MATCH_AETH_SYNDROME "AETH_SYNDROME"
#define MATCH_TUNNEL_TERM "TUNNEL_TERM"
Expand Down
Loading
Loading