def sock_files(dev_uids_list, is_spp_pri=False):
    """Return list of socket files on host and containers.

    The name of socket files is defined with a conventional ones described
    in DPDK doc, though you can use any name actually.

    For spp_primary, path of sock file is just bit different because it is
    shared among other SPP processes.

    Here is an example of two vhost devices.
        [vhost:0, vhost:1]
        => [
              {'host': '/tmp/sock0, 'guest': '/var/run/usvhost0'},
              {'host': '/tmp/sock1, 'guest': '/var/run/usvhost1'}
            ]
    """

    socks = {
            'vhost': {
                'host': '/tmp/sock{:s}',
                'guest': '/var/run/usvhost{:s}'},
            'memif': {
                'host': '/tmp/spp-memif.sock',
                'guest': '/var/run/spp-memif.sock'}}

    res = []
    is_memif_added = False
    for dev_uid in dev_uids_list:
        dev_uid = dev_uid.split(':')

        if (dev_uid[0] == 'memif') and (not is_memif_added):
            # Single sock file is enough for memif because it is just used for
            # negotiation between master and slaves processes.
            if is_spp_pri:
                res.append({
                    'host': socks['memif']['host'],
                    'guest': socks['memif']['host']})
            else:
                res.append({
                    'host': socks['memif']['host'],
                    'guest': socks['memif']['guest']})
            is_memif_added = True

        elif dev_uid[0] == 'vhost':
            if is_spp_pri:
                res.append({
                    'host': socks['vhost']['host'].format(dev_uid[1]),
                    'guest': socks['vhost']['host'].format(dev_uid[1])})
            else:
                res.append({
                    'host': socks['vhost']['host'].format(dev_uid[1]),
                    'guest': socks['vhost']['guest'].format(dev_uid[1])})

    return res