def clear_all(dpath):
    """
    Clear all flow tables.
    """
    # return {"table_id": dpath.ofproto.OFPTT_ALL}
    ofp = dpath.ofproto
    return dpath.ofproto_parser.OFPFlowMod(
        dpath, table_id=ofp.OFPTT_ALL, command=ofp.OFPFC_DELETE)