Changeset 8af0d01


Ignore:
Timestamp:
07/04/14 14:07:34 (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:
50ce607
Parents:
0c866b0
Message:

Limit threads to number of queues detected on the card we are connected to rather than hardcoded at 8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r0c866b0 r8af0d01  
    10321032}
    10331033
     1034static inline size_t dpdk_get_max_rx_queues(uint8_t port_id) {
     1035    struct rte_eth_dev_info dev_info;
     1036    rte_eth_dev_info_get(0, &dev_info);
     1037    return dev_info.max_rx_queues;
     1038}
     1039
    10341040static int dpdk_pstart_input (libtrace_t *libtrace) {
    10351041    char err[500];
     
    10471053       
    10481054        tot = MIN(libtrace->perpkt_thread_count, enabled_lcore_count);
    1049         tot = MIN(tot, 8);
     1055        tot = MIN(tot, dpdk_get_max_rx_queues(FORMAT(libtrace)->port));
    10501056        fprintf(stderr, "Running pstart DPDK %d %d %d %d\n", tot, libtrace->perpkt_thread_count, enabled_lcore_count, rte_lcore_count());
    10511057       
Note: See TracChangeset for help on using the changeset viewer.