Skip to content

Commit

Permalink
Support a new ACL table type called L3V4V6.
Browse files Browse the repository at this point in the history
This table supports both v4 and v6 Match types.

HLD: sonic-net/SONiC#1267

Signed-off-by: Ravi(Marvell) [email protected]
  • Loading branch information
rck-innovium committed Apr 22, 2023
1 parent 81a5578 commit e542a67
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/acl.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,8 @@
"ACL_RULE_WRONG_AETH_SYNDROME": {
"desc": "Configure invalid AETH_SYNDROME in decimal format.",
"eStrKey" : "Pattern"
},
"ACL_TABLE_L3V4V6_TABLE_TYPE": {
"desc": "ACL_TABLE Validate type L3V4V6."
}
}
64 changes: 64 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests_config/acl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1146,5 +1146,69 @@
]
}
}
},
"ACL_TABLE_L3V4V6_TABLE_TYPE": {
"sonic-acl:sonic-acl": {
"sonic-acl:ACL_RULE": {
"ACL_RULE_LIST": [
{
"ACL_TABLE_NAME": "DATA-ACL-V4V6",
"IP_TYPE": "IPV4",
"DST_IP": "10.186.72.64/26",
"PACKET_ACTION": "FORWARD",
"PRIORITY": 999960,
"RULE_NAME": "Rule_40",
"SRC_IP": "10.176.0.0/15"
},
{
"ACL_TABLE_NAME": "DATA-ACL-V4V6",
"DST_IPV6": "2a04:f547:43:320::/64",
"IP_TYPE": "IPV6",
"PACKET_ACTION": "FORWARD",
"PRIORITY": 999980,
"RULE_NAME": "Rule_20",
"SRC_IPV6": "2a04:f547:41::/48"
}
]
},
"sonic-acl:ACL_TABLE": {
"ACL_TABLE_LIST": [
{
"ACL_TABLE_NAME": "DATA-ACL-V4V6",
"policy_desc": "Filter IPv4 and IPv6",
"ports": [
"Ethernet0",
"Ethernet1"
],
"stage": "EGRESS",
"type": "L3V4V6"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"mtu": 9000,
"lanes": "0,1,2,3",
"name": "Ethernet0",
"speed": 25000
},
{
"admin_status": "up",
"alias": "eth1",
"description": "Ethernet1",
"mtu": 9000,
"lanes": "10,11,12,13",
"name": "Ethernet1",
"speed": 25000
}
]
}
}
}
}
1 change: 1 addition & 0 deletions src/sonic-yang-models/yang-templates/sonic-types.yang.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module sonic-types {
enum L2;
enum L3;
enum L3V6;
enum L3V4V6;
enum MIRROR;
enum MIRRORV6;
enum MIRROR_DSCP;
Expand Down

0 comments on commit e542a67

Please sign in to comment.