Changeset babeb70


Ignore:
Timestamp:
08/31/15 13:50:39 (5 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:
87cba74
Parents:
f45ff19
Message:

Detect whether PACKET_FANOUT is available.

If not, int: and ring: will fallback to single-threaded input if
trace_pstart() is called on them.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    rbd2e4af rbabeb70  
    412412fi
    413413
     414# Check for PACKET_FANOUT (borrowed from Suricata)
     415AC_CHECK_DECL([PACKET_FANOUT_QM],
     416        AC_DEFINE([HAVE_PACKET_FANOUT],[1],
     417        [Recent packet fanout support is available]),
     418        [],
     419        [[#include <linux/if_packet.h>]])
     420
    414421# If we use DPDK we might be able to use libnuma
    415422AC_CHECK_LIB(numa, numa_node_to_cpus, have_numa=1, have_numa=0)
  • lib/format_linux_int.c

    rf2066fa rbabeb70  
    505505        linuxnative_help,               /* help */
    506506        NULL,                           /* next pointer */
     507#ifdef HAVE_PACKET_FANOUT
    507508        {true, -1},                     /* Live, no thread limit */
    508509        linuxnative_pstart_input,       /* pstart_input */
     
    513514        NULL,                           /* unregister thread */
    514515        NULL                            /* get thread stats */
     516#else
     517        NON_PARALLEL(true)
     518#endif
    515519};
    516520#else
  • lib/format_linux_ring.c

    rf2066fa rbabeb70  
    752752        linuxring_help,                 /* help */
    753753        NULL,                           /* next pointer */
     754#ifdef HAVE_PACKET_FANOUT
    754755        {true, -1},                     /* Live, no thread limit */
    755756        linuxring_pstart_input,         /* pstart_input */
     
    760761        NULL,                           /* unregister thread */
    761762        NULL                            /* get thread stats */
     763#else
     764        NON_PARALLEL(true)
     765#endif
    762766};
    763767#else /* HAVE_NETPACKET_PACKET_H */
Note: See TracChangeset for help on using the changeset viewer.