Changeset 2138553


Ignore:
Timestamp:
02/13/14 15:00:10 (7 years ago)
Author:
Richard Sanger <rjs51@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, 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:
accdd5b
Parents:
bcb2402
Message:

Updates the dpdk build system to support the lastest DPDK libraries v1.5 and above
This drops support for anything before v1.5 due to the requirment to patch the build system.
Hopefully this new way will continue to work with newer releases

This removes the need to patch the DPDK library
Instead the only requirement is that DPDK is built as a static library with the following options
CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC added to the make command

-This line, and those below, will be ignored--

M configure.in
D Intel DPDK Patches/DPDKLibtracePatch.patch
M Intel DPDK Patches/README
M lib/format_dpdk.c
A lib/dpdk_libtrace.mk
M lib/Makefile.am

Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • Intel DPDK Patches/README

    rc04929c r2138553  
    99~patch -p0 < name.patch
    1010
    11 dpdk_libtrace.patch - REQUIRED to build libtrace! Fixes some make settings.
    12 
    1311larger_ring.patch - Allow the number of buffers in the RX ring to be increased
    1412                  past the 4K limit. Once patched update #define NB_RX_MBUF to the
  • configure.in

    rc04929c r2138553  
    394394    # Add to our libpath location
    395395    LDFLAGS="$LDFLAGS -L$RTE_SDK/$RTE_TARGET/lib/"
    396     AC_CHECK_LIB(rte_eal, rte_eal_init, dpdk_found=1, dpdk_found=0, -lpthread -lrte_malloc -lethdev -lrte_mempool -lrte_ring)
     396    # Test that the library exists, we cannot be sure of what extra library flags need to be added
     397    # this could change in the next version which would make the test fail
     398    #AC_CHECK_LIB(intel_dpdk, rte_eal_init, dpdk_found=1, dpdk_found=0, -lpthread -lm -lrt)
     399
     400    # So instead simply check for existence
     401    AC_CHECK_FILE("$RTE_SDK/$RTE_TARGET/lib/libintel_dpdk.a", dpdk_found=1, dpdk_found=0)
    397402    # Revert back
    398403    LDFLAGS="$saved_ldflags"
     
    401406                AC_SUBST([RTE_TARGET])
    402407        AC_SUBST([RTE_SDK])
    403         LIBTRACE_LIBS="$LIBTRACE_LIBS -lrte_eal -lrte_pmd_e1000 -lrte_pmd_ixgbe"
    404         LIBTRACE_LIBS="$LIBTRACE_LIBS -lethdev -lrte_mempool -lrte_ring -lrte_malloc"
    405         LIBTRACE_LIBS="$LIBTRACE_LIBS -lrte_mbuf"
     408        # Force dpdk library to be statically linked to allow compiler optimisations
     409        LIBTRACE_LIBS="$LIBTRACE_LIBS -l:libintel_dpdk.a"
    406410                AC_DEFINE(HAVE_DPDK,1,[conditional for building with DPDK live capture support])
    407411                libtrace_dpdk=true
     
    457461fi
    458462
    459 if test "$have_get_clocktime" = 1; then
     463
     464if test "$have_clock_gettime" = 1; then
    460465    LIBTRACE_LIBS="$LIBTRACE_LIBS -lrt"
    461466fi
     
    679684    AC_MSG_NOTICE([Compiled with DPDK live capture support: Yes])
    680685else
    681     AC_MSG_NOTICE([Compiled with DPDK live capture support: No])
     686    AC_MSG_NOTICE([Compiled with DPDK live capture support: No (Requires DPDK v1.5 or newer)])
    682687fi
    683688reportopt "Compiled with LLVM BPF JIT support" $JIT
  • lib/Makefile.am

    r8b49230 r2138553  
    3535include $(RTE_SDK)/mk/rte.vars.mk
    3636# We need to add -Wl before the linker otherwise this breaks our build
    37 # This is added in with our make script patch to the DPDK library
    38 include $(RTE_SDK)/mk/libtrace.mk
     37# And include any libraries that DPDK might depend upon
     38export DPDK_LIBTRACE_MK=dpdk_libtrace.mk
     39include $(DPDK_LIBTRACE_MK)
    3940endif
    4041
     
    5859
    5960INCLUDES= @ADD_INCLS@ -I../libwandio
    60 libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@
     61libtrace_la_LIBADD = @LIBTRACE_LIBS@ @LTLIBOBJS@ $(DPDKLIBS)
    6162libtrace_la_LDFLAGS=-version-info @LIBTRACE_MAJOR@:@LIBTRACE_MINOR@:@LIBTRACE_MID@ @ADD_LDFLAGS@
    62 
    6363dagapi.c:
    6464        cp @DAG_TOOLS_DIR@/dagapi.c .
  • lib/format_dpdk.c

    rc04929c r2138553  
    138138 */
    139139#ifdef HAVE_LIBRT
    140 /* DONT CHANGE THIS !!! */
     140/* You can turn this on (set to 1) to prefer clock_gettime */
    141141#define USE_CLOCK_GETTIME 0
    142142#else
    143 /* You can turn this on (set to 1) to prefer clock_gettime */
     143/* DONT CHANGE THIS !!! */
    144144#define USE_CLOCK_GETTIME 0
    145145#endif
     
    853853
    854854    /* Revert to the original PCI drivers */
    855     rte_eal_pci_exit();
     855    /* No longer in DPDK
     856    rte_eal_pci_exit(); */
    856857    return 0;
    857858}
     
    869870
    870871    /* Revert to the original PCI drivers */
    871     rte_eal_pci_exit();
     872    /* No longer in DPDK
     873    rte_eal_pci_exit(); */
    872874    return 0;
    873875}
Note: See TracChangeset for help on using the changeset viewer.