Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions ansible/roles/test/files/acstests/everflow_policer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def checkMirroredFlow(self):
import binascii
payload = binascii.unhexlify("0"*44) + str(payload) # Add the padding

if self.asic_type in ["barefoot"]:
import binascii
payload = binascii.unhexlify("0"*24) + str(payload) # Add the padding

exp_pkt = testutils.simple_gre_packet(
eth_src = self.router_mac,
ip_src = self.session_src_ip,
Expand All @@ -132,6 +136,8 @@ def checkMirroredFlow(self):

if self.asic_type in ["mellanox"]:
exp_pkt['GRE'].proto = 0x8949 # Mellanox specific
elif self.asic_type in ["barefoot"]:
exp_pkt['GRE'].proto = 0x22eb # Barefoot specific
else:
exp_pkt['GRE'].proto = 0x88be

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
session_gre: "0x6558"
session_queue: "0"

- name: Set Barefoot GRE protocol type
set_fact:
session_gre: "0x22EB"
when: sonic_hwsku in barefoot_hwskus

- name: Set Mellanox GRE protocol type
set_fact:
session_gre: "0x8949"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/test/tasks/everflow_testbed/testcase_5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: Create a policer enforced mirror session
shell: |
config mirror_session add {{policer_session_name}} {{session_src_ip}} {{session_dst_ip}} {{session_dscp}} {{session_ttl}} --policer {{policer_name}}
config mirror_session add {{policer_session_name}} {{session_src_ip}} {{session_dst_ip}} {{session_dscp}} {{session_ttl}} {{session_gre}} --policer {{policer_name}}
become: yes

- name: Create an ACL table with MIRROR_DSCP type
Expand Down