import re


def check_eth_dest(eth_dests):
    """Check if --eth-dest option is valied

    Format of --eth-dest for port X should be 'X,MM:MM:MM:MM:MM:MM'.
    This options can be given for several ports and 'eth_dests' arg
    is passed as a double array as below.
        [['0,ca:a4:45:e7:6a:ee'], ['1,ca:a4:45:e7:6a:ee'], ...]
    """

    xx = '[0-9A-Fa-f][0-9A-Fa-f]'
    ptn = re.compile(
            r'(\d+),({0:s}:{0:s}:{0:s}:{0:s}:{0:s}:{0:s}\Z)'.format(xx))
    for eth_dest in eth_dests:
        m = re.match(ptn, eth_dest[0])
        if m is None:
            return False

    return True