Changeset 678048a


Ignore:
Timestamp:
10/26/04 15:31:03 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
aa27e1e
Parents:
a22c979
Message:

much improved DAG read support. Benchmarked at 770kpps / ~380 MBps (64byte packets)

added 'capture' program for simple diskwriting

Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    ra22c979 r678048a  
    8282struct libtrace_packet_t {
    8383        struct libtrace_t *trace;
    84         void *buffer;
    85         //char buffer[LIBTRACE_PACKET_BUFSIZE];
     84        //void *buffer;
     85        char buffer[LIBTRACE_PACKET_BUFSIZE];
    8686        size_t size;
    8787        uint8_t status;
  • lib/trace.c

    ra22c979 r678048a  
    551551        assert(libtrace);
    552552        assert(packet);
    553         if(packet->buffer == 0) {
    554                 packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE);
    555         }
     553        //if(packet->buffer == 0) {
     554        //      packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE);
     555        //}
    556556
    557557        //bzero(buffer,len);
     
    617617                        assert( (size - sizeof(dag_record_t)) < LIBTRACE_PACKET_BUFSIZE);
    618618
    619                         packet->buffer = (void *)erfptr;
     619                        memcpy(packet->buffer, erfptr, size);
     620                        //packet->buffer = (void *)erfptr;
    620621                        packet->size = size;
    621622                        libtrace->dag.offset += size;
Note: See TracChangeset for help on using the changeset viewer.