diff --git a/ansible/roles/test/files/acstests/everflow_policer_test.py b/ansible/roles/test/files/acstests/everflow_policer_test.py index a834dd2e9f3..8c5a99210a8 100644 --- a/ansible/roles/test/files/acstests/everflow_policer_test.py +++ b/ansible/roles/test/files/acstests/everflow_policer_test.py @@ -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, @@ -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 diff --git a/ansible/roles/test/tasks/everflow_testbed/get_session_info.yml b/ansible/roles/test/tasks/everflow_testbed/get_session_info.yml index a1fcd77c058..692909f2db0 100644 --- a/ansible/roles/test/tasks/everflow_testbed/get_session_info.yml +++ b/ansible/roles/test/tasks/everflow_testbed/get_session_info.yml @@ -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" diff --git a/ansible/roles/test/tasks/everflow_testbed/testcase_5.yml b/ansible/roles/test/tasks/everflow_testbed/testcase_5.yml index aa153084713..2af4ea0678d 100644 --- a/ansible/roles/test/tasks/everflow_testbed/testcase_5.yml +++ b/ansible/roles/test/tasks/everflow_testbed/testcase_5.yml @@ -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