Changeset 389dd77


Ignore:
Timestamp:
09/23/15 13:47:24 (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:
6fac5db
Parents:
ff12906
Message:

Added 'sender' thread to user message callback

Update parallel skeleton to match this API change.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • README

    rbd2e4af r389dd77  
    1 This fork of Libtrace aims to support parallel packet processing.
    2 
    3 This is still work in progress and is full of bugs, some of the original
    4 Libtrace functions might not function correctly breaking the supplied tools.
    5 
    61libtrace 4.0.0
    72
     
    2419and has been since extended to a range of other trace and interface formats.
    2520
    26 Further information about libtrace see
     21In version 4.0, we have introduced an API for processing packets in parallel
     22using multiple threads. See libtrace_parallel.h for a detailed description
     23of the API.
     24
     25Further information about libtrace, see
    2726http://research.wand.net.nz/software/libtrace.php
    2827
     
    3332see the included file GPL for details of this license.
    3433
    35 A detailed ChangeLog can be found on the libtrace wiki: 
     34A detailed ChangeLog can be found on the libtrace wiki:
    3635https://github.com/wanduow/libtrace/wiki/ChangeLog
    3736
     
    3938on the libtrace wiki.
    4039
    41 For further information, please contact the WAND group. See 
    42 http://www.wand.net.nz/ for details. 
     40For further information, please contact the WAND group. See
     41http://www.wand.net.nz/ for details.
  • examples/skeleton/parallel.c

    rc42a2d6 r389dd77  
    200200
    201201static void custom_msg(libtrace_t *trace, libtrace_thread_t *t, void *global,
    202                 void *tls, int mesg, libtrace_generic_t data) {
     202                void *tls, int mesg, libtrace_generic_t data,
     203                libtrace_thread_t *sender) {
    203204
    204205        struct pstorage *ps = (struct pstorage *)tls;
     
    210211        assert(mesg >= MESSAGE_USER);
    211212        assert(sizeof(data) == 8);
     213
     214        assert(sender || sender == NULL);
    212215}
    213216
  • lib/libtrace_parallel.h

    r1101175 r389dd77  
    551551 */
    552552typedef void (*fn_cb_usermessage) (libtrace_t *libtrace, libtrace_thread_t *t,
    553                 void *global, void *tls, int mesg, libtrace_generic_t data);
     553                void *global, void *tls, int mesg, libtrace_generic_t data,
     554                libtrace_thread_t *sender);
    554555
    555556
  • lib/trace_parallel.c

    r1101175 r389dd77  
    231231                if (cbs->message_user)
    232232                        (*cbs->message_user)(trace, thread, trace->global_blob,
    233                                         thread->user_data, type, data);
     233                                        thread->user_data, type, data, sender);
    234234                return;
    235235        case MESSAGE_RESULT:
Note: See TracChangeset for help on using the changeset viewer.