Changeset 0c866b0 for lib/format_dpdk.c


Ignore:
Timestamp:
07/04/14 14:06:04 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
8af0d01
Parents:
09dc6dc
Message:

Change thresholds to work with e1000 series cards

  • Fix some typos
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r09dc6dc r0c866b0  
    695695static const struct rte_eth_txconf tx_conf = {
    696696        .tx_thresh = {
    697                 .pthresh = 36,/* TX_PTHRESH prefetch */
    698                 .hthresh = 0,/* TX_HTHRESH host */
    699                 .wthresh = 4,/* TX_WTHRESH writeback */
     697        /**
     698         * TX_PTHRESH prefetch
     699         * Set on the NIC, if the number of unprocessed descriptors to queued on
     700         * the card fall below this try grab at least hthresh more unprocessed
     701         * descriptors.
     702         */
     703                .pthresh = 36,
     704
     705        /* TX_HTHRESH host
     706         * Set on the NIC, the batch size to prefetch unprocessed tx descriptors.
     707         */
     708                .hthresh = 0,
     709       
     710        /* TX_WTHRESH writeback
     711         * Set on the NIC, the number of sent descriptors before writing back
     712         * status to confirm the transmission. This is done more efficiently as
     713         * a bulk DMA-transfer rather than writing one at a time.
     714         * Similar to tx_free_thresh however this is applied to the NIC, where
     715         * as tx_free_thresh is when DPDK will check these. This is extended
     716         * upon by tx_rs_thresh (10Gbit cards) which doesn't write all
     717         * descriptors rather only every n'th item, reducing DMA memory bandwidth.
     718         */
     719                .wthresh = 4,
    700720        },
    701         .tx_free_thresh = 0, /* Use PMD default values */
    702         .tx_rs_thresh = 0, /* Use PMD default values */
     721
     722    /* Used internally by DPDK rather than passed to the NIC. The number of
     723     * packet descriptors to send before checking for any responses written
     724     * back (to confirm the transmission). Default = 32 if set to 0)
     725     */
     726        .tx_free_thresh = 0,
     727
     728    /* This is the Report Status threshold, used by 10Gbit cards,
     729     * This signals the card to only write back status (such as
     730     * transmission successful) after this minimum number of transmit
     731     * descriptors are seen. The default is 32 (if set to 0) however if set
     732     * to greater than 1 TX wthresh must be set to zero, because this is kindof
     733     * a replacement. See the dpdk programmers guide for more restrictions.
     734     */
     735        .tx_rs_thresh = 1,
    703736};
    704737
     
    783816        return -1;
    784817    }
    785     /* Initilise the TX queue a minimum value if using this port for
     818    /* Initialise the TX queue a minimum value if using this port for
    786819     * receiving. Otherwise a larger size if writing packets.
    787820     */
     
    794827        return -1;
    795828    }
    796     /* Initilise the RX queue with some packets from memory */
     829    /* Initialise the RX queue with some packets from memory */
    797830    ret = rte_eth_rx_queue_setup(format_data->port, format_data->queue_id,
    798831                            format_data->nb_rx_buf, SOCKET_ID_ANY,
     
    829862#endif
    830863
    831     /* We have now successfully started/unpased */
     864    /* We have now successfully started/unpaused */
    832865    format_data->paused = DPDK_RUNNING;
    833866   
     
    846879
    847880    /* First time started we need to alloc our memory, doing this here
    848      * rather than in enviroment setup because we don't have snaplen then */
     881     * rather than in environment setup because we don't have snaplen then */
    849882    if (format_data->paused == DPDK_NEVER_STARTED) {
    850883        if (format_data->snaplen == 0) {
     
    915948    printf("Doing dev configure\n");
    916949#endif
    917     /* Initilise the TX queue a minimum value if using this port for
     950    /* Initialise the TX queue a minimum value if using this port for
    918951     * receiving. Otherwise a larger size if writing packets.
    919952     */
     
    931964    printf("Doing queue configure\n");
    932965#endif 
    933                 /* Initilise the RX queue with some packets from memory */
     966                /* Initialise the RX queue with some packets from memory */
    934967                ret = rte_eth_rx_queue_setup(format_data->port, i,
    935968                                                                format_data->nb_rx_buf, SOCKET_ID_ANY,
Note: See TracChangeset for help on using the changeset viewer.