Changeset 34dafcc


Ignore:
Timestamp:
02/09/15 13:17:58 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
136c19e
Parents:
6a1d288
Message:

Fixes whitelisting DPDK ports cards with DPDK 1.7, allowing more than one port to have the igb_uio driver loaded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r6a1d288 r34dafcc  
    8686/* 1.6.0r2 :
    8787 *      rte_eal_pci_set_blacklist() is removed
    88  *      device_list is renamed ot pci_device_list
     88 *      device_list is renamed to pci_device_list
     89 *      In the 1.7.0 release rte_eal_pci_probe is called by rte_eal_init
     90 *      as such we do apply the whitelist before rte_eal_init.
     91 *      This also works correctly with DPDK 1.6.0r2.
    8992 *
    9093 * Replaced by:
     
    329332#else /* DPDK_USE_BLACKLIST */
    330333#include <rte_devargs.h>
    331 static int blacklist_devices(struct dpdk_format_data_t *format_data UNUSED, struct rte_pci_addr *whitelist)
     334static int whitelist_device(struct dpdk_format_data_t *format_data UNUSED, struct rte_pci_addr *whitelist)
    332335{
    333336        char pci_str[20] = {0};
     
    542545    snprintf(cpu_number, sizeof(cpu_number), "%x", 0x1 << (my_cpu - 1));
    543546
     547#if !DPDK_USE_BLACKLIST
     548    /* Black list all ports besides the one that we want to use */
     549    if ((ret = whitelist_device(format_data, &use_addr)) < 0) {
     550        snprintf(err, errlen, "Intel DPDK - Whitelisting PCI device failed,"
     551                 " are you sure the address is correct?: %s", strerror(-ret));
     552        return -1;
     553    }
     554#endif
    544555
    545556        /* Give the memory map a unique name */
     
    571582#endif
    572583
     584#if DPDK_USE_BLACKLIST
    573585    /* Blacklist all ports besides the one that we want to use */
    574586        if ((ret = blacklist_devices(format_data, &use_addr)) < 0) {
     
    577589                return -1;
    578590        }
     591#endif
    579592
    580593    /* This loads DPDK drivers against all ports that are not blacklisted */
Note: See TracChangeset for help on using the changeset viewer.