Changeset fd1b63e for lib


Ignore:
Timestamp:
01/30/18 16:09:10 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
6445c52
Parents:
16bb26f
Message:

Updated format_dag25 to use 64 bit API

Allows us to support capture on DAG devices where >2G of
memory has been assigned to a stream.

However, this change means we're no longer compatible with
old versions of the DAG API. If this is a problem, we may need
to add some extra configure checks for the presence of
the 64 bit API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dag25.c

    rdb84bb2 rfd1b63e  
    626626
    627627        /* Attach and start the DAG stream */
    628         if (dag_attach_stream(FORMAT_DATA_OUT->device->fd,
     628        if (dag_attach_stream64(FORMAT_DATA_OUT->device->fd,
    629629                        FORMAT_DATA_OUT->dagstream, 0, 4 * 1024 * 1024) < 0) {
    630630                trace_set_err_out(libtrace, errno, "Cannot attach DAG stream");
     
    640640
    641641        /* We don't want the dag card to do any sleeping */
    642         dag_set_stream_poll(FORMAT_DATA_OUT->device->fd,
     642        dag_set_stream_poll64(FORMAT_DATA_OUT->device->fd,
    643643                        FORMAT_DATA_OUT->dagstream, 0, &zero,
    644644                        &nopoll);
     
    658658
    659659        /* Attach and start the DAG stream */
    660         if (dag_attach_stream(FORMAT_DATA->device->fd,
     660        if (dag_attach_stream64(FORMAT_DATA->device->fd,
    661661                              stream->dagstream, 0, 0) < 0) {
    662662                trace_set_err(libtrace, errno, "Cannot attach DAG stream #%u",
     
    674674
    675675        /* We don't want the dag card to do any sleeping */
    676         if (dag_set_stream_poll(FORMAT_DATA->device->fd,
     676        if (dag_set_stream_poll64(FORMAT_DATA->device->fd,
    677677                            stream->dagstream, 0, &zero,
    678678                            &nopoll) < 0) {
     
    866866        /* Wait until the buffer is nearly clear before exiting the program,
    867867         * as we will lose packets otherwise */
    868         dag_tx_get_stream_space
     868        dag_tx_get_stream_space64
    869869                (FORMAT_DATA_OUT->device->fd,
    870870                 FORMAT_DATA_OUT->dagstream,
    871                  dag_get_stream_buffer_size(FORMAT_DATA_OUT->device->fd,
     871                 dag_get_stream_buffer_size64(FORMAT_DATA_OUT->device->fd,
    872872                                            FORMAT_DATA_OUT->dagstream) - 8);
    873873
     
    11001100        if (FORMAT_DATA_OUT->waiting == 0) {
    11011101                FORMAT_DATA_OUT->txbuffer =
    1102                         dag_tx_get_stream_space(FORMAT_DATA_OUT->device->fd,
     1102                        dag_tx_get_stream_space64(FORMAT_DATA_OUT->device->fd,
    11031103                                                FORMAT_DATA_OUT->dagstream,
    11041104                                                16908288);
     
    12861286        }
    12871287
    1288         if (dag_set_stream_poll(FORMAT_DATA->device->fd, stream_data->dagstream,
     1288        if (dag_set_stream_poll64(FORMAT_DATA->device->fd, stream_data->dagstream,
    12891289                                sizeof(dag_record_t), &maxwait,
    12901290                                &pollwait) == -1) {
     
    13921392        }
    13931393       
    1394         if (dag_set_stream_poll(FORMAT_DATA->device->fd,
     1394        if (dag_set_stream_poll64(FORMAT_DATA->device->fd,
    13951395                                FORMAT_DATA_FIRST->dagstream, 0, &minwait,
    13961396                                &minwait) == -1) {
Note: See TracChangeset for help on using the changeset viewer.