Changeset 9b69b49 for lib/format_dpdk.c
- Timestamp:
- 07/01/14 19:17:25 (8 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:
- 09dc6dc
- Parents:
- dafe86a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_dpdk.c
rb13b939 r9b69b49 392 392 struct rte_pci_addr use_addr; /* The only address that we don't blacklist */ 393 393 char cpu_number[10] = {0}; /* The CPU mask we want to bind to */ 394 char mem_map[20] = {0}; /* The memory name */ 394 395 long nb_cpu; /* The number of CPUs in the system */ 395 396 long my_cpu; /* The CPU number we want to bind to */ … … 405 406 * same card (My understanding is this should work with two seperate 406 407 * cards). 408 * 409 * Using unique file prefixes mean separate memory is used, unlinking 410 * the two processes. However be careful we still cannot access a 411 * port that already in use. 407 412 */ 408 char* argv[] = {"libtrace", "-c", NULL, "-n", "1", "--proc-type", "auto", NULL}; 413 char* argv[] = {"libtrace", "-c", cpu_number, "-n", "1", "--proc-type", "auto", 414 "--file-prefix", mem_map, "-m", "256", NULL}; 409 415 int argc = sizeof(argv) / sizeof(argv[0]) - 1; 410 416 … … 453 459 /* Make our mask */ // 0x1 << (my_cpu - 1) 454 460 snprintf(cpu_number, sizeof(cpu_number), "%x", 0x3); 455 argv[2] = cpu_number; 456 461 462 /* Give this a name */ 463 snprintf(mem_map, sizeof(mem_map), "libtrace-%d", (int) getpid()); 457 464 /* rte_eal_init it makes a call to getopt so we need to reset the 458 465 * global optind variable of getopt otherwise this fails */
Note: See TracChangeset
for help on using the changeset viewer.