Changeset 2badac9 for lib/format_dpdk.c


Ignore:
Timestamp:
11/14/14 14:40:40 (7 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:
59e8400, fe11d12
Parents:
cf05223
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

    rcf05223 r2badac9  
    8989/* 1.6.0r2 :
    9090 *      rte_eal_pci_set_blacklist() is removed
    91  *      device_list is renamed ot pci_device_list
     91 *      device_list is renamed to pci_device_list
     92 *      In the 1.7.0 release rte_eal_pci_probe is called by rte_eal_init
     93 *      as such we do apply the whitelist before rte_eal_init.
     94 *      This also works correctly with DPDK 1.6.0r2.
    9295 *
    9396 * Replaced by:
     
    348351#else /* DPDK_USE_BLACKLIST */
    349352#include <rte_devargs.h>
    350 static int blacklist_devices(struct dpdk_format_data_t *format_data UNUSED, struct rte_pci_addr *whitelist)
     353static int whitelist_device(struct dpdk_format_data_t *format_data UNUSED, struct rte_pci_addr *whitelist)
    351354{
    352355        char pci_str[20] = {0};
     
    619622    //snprintf(cpu_number, sizeof(cpu_number), "%x", 0x1 << (my_cpu - 1));
    620623
     624#if !DPDK_USE_BLACKLIST
     625    /* Black list all ports besides the one that we want to use */
     626        if ((ret = whitelist_devices(format_data, &use_addr)) < 0) {
     627                snprintf(err, errlen, "Intel DPDK - Whitelisting PCI device failed,"
     628                         " are you sure the address is correct?: %s", strerror(-ret));
     629                return -1;
     630        }
     631#endif
    621632
    622633        /* Give the memory map a unique name */
     
    660671#endif
    661672
     673#if DPDK_USE_BLACKLIST
    662674    /* Black list all ports besides the one that we want to use */
    663675        if ((ret = blacklist_devices(format_data, &use_addr)) < 0) {
     
    666678                return -1;
    667679        }
     680#endif
    668681
    669682    /* This loads DPDK drivers against all ports that are not blacklisted */
Note: See TracChangeset for help on using the changeset viewer.