1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2019-2020 Xilinx, Inc.
4 * Copyright(c) 2016-2019 Solarflare Communications Inc.
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
14 * The header is intended to collect defines/constants which could be
15 * tweaked to improve the PMD performance characteristics depending on
16 * the usecase or requirements (CPU load, packet rate, latency).
20 * Number of Rx descriptors in the bulk submitted on Rx ring refill.
22 #define SFC_RX_REFILL_BULK (RTE_CACHE_LINE_SIZE / sizeof(efx_qword_t))
25 * Make the transmit path reap at least one time per a burst;
26 * this improves cache locality because the same mbufs may be used to send
27 * subsequent bursts in certain cases because of well-timed reap
29 #define SFC_TX_XMIT_PKTS_REAP_AT_LEAST_ONCE 1
31 /** Default free threshold follows recommendations from DPDK documentation */
32 #define SFC_TX_DEFAULT_FREE_THRESH 32
34 /** Number of mbufs to be freed in bulk in a single call */
35 #define SFC_TX_REAP_BULK_SIZE 32
38 * Default head-of-line block timeout to wait for Rx descriptor before
39 * packet drop because of no descriptors available.
41 * DPDK FW variant only with equal stride super-buffer Rx mode.
43 #define SFC_RXD_WAIT_TIMEOUT_NS_DEF (200U * 1000)
45 #endif /* _SFC_TWEAK_H_ */