diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index 7ce2738..252726a 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -31,6 +31,19 @@
 ETH_P_ALL = 0x03
 RCV_TIMEOUT = 10000
 
+def match_exp_pkt(exp_pkt, pkt):
+    """
+    Compare the string value of pkt with the string value of exp_pkt,
+    and return True iff they are identical.  If the length of exp_pkt is
+    less than the minimum Ethernet frame size (60 bytes), then padding
+    bytes in pkt are ignored.
+    """
+    e = str(exp_pkt)
+    p = str(pkt)
+    if len(e) < 60:
+        p = p[:len(e)]
+    return e == p
+
 class DataPlanePort(Thread):
     """
     Class defining a port monitoring object.
@@ -140,7 +153,7 @@
                 if (not self.parent.want_pkt_port or
                         self.parent.want_pkt_port == self.port_number):
                     if self.parent.exp_pkt:
-                        if str(self.parent.exp_pkt) != str(rcvmsg):
+                        if not match_exp_pkt(self.parent.exp_pkt, rcvmsg):
                             drop_pkt = True
                     if not drop_pkt:
                         self.parent.got_pkt_port = self.port_number
@@ -331,7 +344,7 @@
                 pkt, time = self.port_list[port_number].dequeue(use_lock=False)
                 if not exp_pkt:
                     break
-                if str(pkt) == str(exp_pkt):
+                if match_exp_pkt(exp_pkt, pkt):
                     break
                 pkt = None # Discard silently
             if pkt:
diff --git a/tests/basic.py b/tests/basic.py
index 7bb3bbf..9f43fcd 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -252,7 +252,7 @@
                    (response, raw) = self.controller.poll(ofp.OFPT_PACKET_IN, 2)
                    if not response:  # Timeout
                        break
-                   if str(pkt) == response.data[:len(str(pkt))]:  # Got match
+                   if dataplane.match_exp_pkt(pkt, response.data): # Got match
                        break
                    if not basic_config["relax"]:  # Only one attempt to match
                        break
@@ -263,7 +263,7 @@
                self.assertTrue(response is not None, 
                                'Packet in message not received on port ' + 
                                str(of_port))
-               if str(pkt) != response.data[:len(str(pkt))]:
+               if not dataplane.match_exp_pkt(pkt, response.data):
                    basic_logger.debug("Sent %s" % format_packet(pkt))
                    basic_logger.debug("Resp %s" % format_packet(response.data))
                    self.assertTrue(False,
@@ -318,7 +318,7 @@
                basic_logger.info("PacketOut: got pkt from " + str(of_port))
                if of_port is not None:
                    self.assertEqual(of_port, dp_port, "Unexpected receive port")
-               if str(outpkt) != str(pkt)[:len(str(outpkt))]:
+               if not dataplane.match_exp_pkt(outpkt, pkt):
                    basic_logger.debug("Sent %s" % format_packet(outpkt))
                    basic_logger.debug("Resp %s" % format_packet(
                            str(pkt)[:len(str(outpkt))]))
