Added Modify L2, send to ingress and MC (or UC)
egress count defaults to 2 + ingress port
Use egr_count parameter to set to 1 for single other port.
diff --git a/tests/pktact.py b/tests/pktact.py
index 11f267b..9230afd 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -986,6 +986,22 @@
action_list=acts, max_test=2, egr_count=0,
ing_port=True)
+class ModifyL2DstIngressMC(BaseMatchCase):
+ """
+ Modify the L2 dest and send to the ingress port
+ """
+ def runTest(self):
+ sup_acts = supported_actions_get(self)
+ if not (sup_acts & 1 << ofp.OFPAT_SET_DL_DST):
+ skip_message_emit(self, "ModifyL2dstMC test")
+ return
+
+ (pkt, exp_pkt, acts) = pkt_action_setup(self, mod_fields=['dl_dst'],
+ check_test_params=True)
+ flow_match_test(self, pa_port_map, pkt=pkt, exp_pkt=exp_pkt,
+ action_list=acts, max_test=2, egr_count=-1,
+ ing_port=True)
+
class ModifyL2SrcMC(BaseMatchCase):
"""
Modify the source MAC address (TP1) and send to multiple
diff --git a/tests/testutils.py b/tests/testutils.py
index a5214af..dfdeccc 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -264,16 +264,18 @@
# Expect a packet from each port on egr port list
for egr_port in egr_port_list:
+ check_port = egr_port
if egr_port == ofp.OFPP_IN_PORT:
- egr_port = ing_port
+ check_port = ing_port
(rcv_port, rcv_pkt, pkt_time) = parent.dataplane.poll(
- port_number=egr_port, timeout=1, exp_pkt=exp_pkt_arg)
+ port_number=check_port, timeout=1, exp_pkt=exp_pkt_arg)
if rcv_pkt is None:
- parent.logger.error("ERROR: No packet received from " + str(egr_port))
+ parent.logger.error("ERROR: No packet received from " +
+ str(check_port))
parent.assertTrue(rcv_pkt is not None,
- "Did not receive packet port " + str(egr_port))
+ "Did not receive packet port " + str(check_port))
parent.logger.debug("Packet len " + str(len(rcv_pkt)) + " in on " +
str(rcv_port))
@@ -284,7 +286,7 @@
parent.logger.debug("Received len " + str(len(rcv_pkt)) + ": "
+ str(rcv_pkt).encode('hex'))
parent.assertEqual(str(exp_pkt), str(rcv_pkt),
- "Packet match error on port " + str(egr_port))
+ "Packet match error on port " + str(check_port))
def match_verify(parent, req_match, res_match):
"""