Changeset 704229c
- Timestamp:
- 09/04/14 16:38:39 (6 years ago)
- 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:
- 66baa54
- Parents:
- 354e54a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_dpdk.c
rc70f59f r704229c 377 377 struct rte_pci_addr use_addr; /* The only address that we don't blacklist */ 378 378 char cpu_number[10] = {0}; /* The CPU mask we want to bind to */ 379 char mem_map[20] = {0}; /* The memory name */ 379 380 long nb_cpu; /* The number of CPUs in the system */ 380 381 long my_cpu; /* The CPU number we want to bind to */ … … 385 386 rte_set_log_level(RTE_LOG_WARNING); 386 387 #endif 387 /* Using proc-type auto allows this to be either primary or secondary 388 * Secondary allows two intances of libtrace to be used on different 389 * ports. However current version of DPDK doesn't support this on the 390 * same card (My understanding is this should work with two seperate 391 * cards). 388 /* 389 * Using unique file prefixes mean separate memory is used, unlinking 390 * the two processes. However be careful we still cannot access a 391 * port that already in use. 392 392 */ 393 char* argv[] = {"libtrace", "-c", NULL, "-n", "1", "--proc-type", "auto", NULL}; 393 char* argv[] = {"libtrace", "-c", cpu_number, "-n", "1", "--proc-type", "auto", 394 "--file-prefix", mem_map, "-m", "256", NULL}; 394 395 int argc = sizeof(argv) / sizeof(argv[0]) - 1; 395 396 … … 438 439 /* Make our mask */ 439 440 snprintf(cpu_number, sizeof(cpu_number), "%x", 0x1 << (my_cpu - 1)); 440 argv[2] = cpu_number; 441 441 442 443 /* Give the memory map a unique name */ 444 snprintf(mem_map, sizeof(mem_map), "libtrace-%d", (int) getpid()); 442 445 /* rte_eal_init it makes a call to getopt so we need to reset the 443 446 * global optind variable of getopt otherwise this fails */
Note: See TracChangeset
for help on using the changeset viewer.