'Finds the flow table entry that matches the given packet.
Returns the highest priority flow table entry that matches the given packet
on the given in_port, or None if no matching entry is found.'

def entry_for_packet(self, packet, in_port):

    packet_match = ofp_match.from_packet(packet, in_port, spec_frags=True)
    for entry in self._table:
        if entry.match.matches_with_wildcards(packet_match, consider_other_wildcards=False):
            return entry
    return None
