- Timestamp:
- 02/10/15 14:56:24 (7 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:
- 4d0fdbd
- Parents:
- 47321fd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_dpdk.c
r47321fd rb585975 1 1 2 /* 2 3 * This file is part of libtrace … … 69 70 * code (that we still attempt to support). 70 71 * 71 * Currently 1.5 to 1.7 is supported. 72 * DPDK v1.7.1 is recommended. 73 * However 1.5 to 1.8 are likely supported. 72 74 */ 73 75 #include <rte_eal.h> … … 111 113 #else 112 114 # define DPDK_USE_PMD_INIT 0 115 #endif 116 117 /* 1.7.0-rc3 : 118 * 119 * Since 1.7.0-rc3 rte_eal_pci_probe is called as part of rte_eal_init. 120 * Somewhere between 1.7 and 1.8 calling it twice broke so we should not call 121 * it twice. 122 */ 123 #if RTE_VERSION < RTE_VERSION_NUM(1, 7, 0, 3) 124 # define DPDK_USE_PCI_PROBE 1 125 #else 126 # define DPDK_USE_PCI_PROBE 0 127 #endif 128 129 /* 1.8.0-rc1 : 130 * LOG LEVEL is a command line option which overrides what 131 * we previously set it to. 132 */ 133 #if RTE_VERSION >= RTE_VERSION_NUM(1, 8, 0, 1) 134 # define DPDK_USE_LOG_LEVEL 1 135 #else 136 # define DPDK_USE_LOG_LEVEL 0 113 137 #endif 114 138 … … 460 484 #if DEBUG 461 485 rte_set_log_level(RTE_LOG_DEBUG); 462 #else 486 #else 463 487 rte_set_log_level(RTE_LOG_WARNING); 464 488 #endif … … 468 492 * port that already in use. 469 493 */ 470 char* argv[] = {"libtrace", "-c", cpu_number, "-n", "1", "--proc-type", "auto", 471 "--file-prefix", mem_map, "-m", "256", NULL}; 494 char* argv[] = {"libtrace", 495 "-c", cpu_number, 496 "-n", "1", 497 "--proc-type", "auto", 498 "--file-prefix", mem_map, 499 "-m", "256", 500 #if DPDK_USE_LOG_LEVEL 501 # if DEBUG 502 "--log-level", "8", /* RTE_LOG_DEBUG */ 503 # else 504 "--log-level", "5", /* RTE_LOG_WARNING */ 505 # endif 506 #endif 507 NULL}; 472 508 int argc = sizeof(argv) / sizeof(argv[0]) - 1; 473 509 … … 563 599 #endif 564 600 601 #if DPDK_USE_PCI_PROBE 565 602 /* This loads DPDK drivers against all ports that are not blacklisted */ 566 603 if ((ret = rte_eal_pci_probe()) < 0) { … … 569 606 return -1; 570 607 } 608 #endif 571 609 572 610 format_data->nb_ports = rte_eth_dev_count(); … … 1135 1173 #if GET_MAC_CRC_CHECKSUM 1136 1174 /* Add back in the CRC sum */ 1137 pkt->pkt.pkt_len+= ETHER_CRC_LEN;1138 pkt->pkt.data_len+= ETHER_CRC_LEN;1175 rte_pktmbuf_pkt_len(pkt) += ETHER_CRC_LEN; 1176 rte_pktmbuf_data_len(pkt) += ETHER_CRC_LEN; 1139 1177 hdr->flags |= INCLUDES_CHECKSUM; 1140 1178 #endif
Note: See TracChangeset
for help on using the changeset viewer.