Changeset 4d0fdbd


Ignore:
Timestamp:
02/10/15 15:12:03 (6 years ago)
Author:
Shane Alcock <salcock@…>
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:
3e5518a
Parents:
a194aaf (diff), b585975 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/develop' into develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r47321fd rb585975  
     1
    12/*
    23 * This file is part of libtrace
     
    6970 * code (that we still attempt to support).
    7071 *
    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.
    7274 */
    7375#include <rte_eal.h>
     
    111113#else
    112114#       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
    113137#endif
    114138
     
    460484#if DEBUG
    461485    rte_set_log_level(RTE_LOG_DEBUG);
    462 #else 
     486#else
    463487    rte_set_log_level(RTE_LOG_WARNING);
    464488#endif
     
    468492     * port that already in use.
    469493     */
    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};
    472508    int argc = sizeof(argv) / sizeof(argv[0]) - 1;
    473509
     
    563599#endif
    564600
     601#if DPDK_USE_PCI_PROBE
    565602    /* This loads DPDK drivers against all ports that are not blacklisted */
    566603        if ((ret = rte_eal_pci_probe()) < 0) {
     
    569606        return -1;
    570607    }
     608#endif
    571609
    572610    format_data->nb_ports = rte_eth_dev_count();
     
    11351173#if GET_MAC_CRC_CHECKSUM
    11361174    /* 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;
    11391177    hdr->flags |= INCLUDES_CHECKSUM;
    11401178#endif
Note: See TracChangeset for help on using the changeset viewer.