]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/drivers/net/sfc/sfc_tweak.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / drivers / net / sfc / sfc_tweak.h
CommitLineData
9f95a23c 1/* SPDX-License-Identifier: BSD-3-Clause
11fdf7f2 2 *
9f95a23c 3 * Copyright (c) 2016-2018 Solarflare Communications Inc.
11fdf7f2
TL
4 * All rights reserved.
5 *
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
11fdf7f2
TL
8 */
9
10#ifndef _SFC_TWEAK_H_
11#define _SFC_TWEAK_H_
12
13/*
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).
17 */
18
19/**
20 * Number of Rx descriptors in the bulk submitted on Rx ring refill.
21 */
22#define SFC_RX_REFILL_BULK (RTE_CACHE_LINE_SIZE / sizeof(efx_qword_t))
23
24/**
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
28 */
29#define SFC_TX_XMIT_PKTS_REAP_AT_LEAST_ONCE 0
30
31/** Default free threshold follows recommendations from DPDK documentation */
32#define SFC_TX_DEFAULT_FREE_THRESH 32
33
9f95a23c
TL
34/** Number of mbufs to be freed in bulk in a single call */
35#define SFC_TX_REAP_BULK_SIZE 32
36
37/**
38 * Default head-of-line block timeout to wait for Rx descriptor before
39 * packet drop because of no descriptors available.
40 *
41 * DPDK FW variant only with equal stride super-buffer Rx mode.
42 */
43#define SFC_RXD_WAIT_TIMEOUT_NS_DEF (200U * 1000)
44
11fdf7f2 45#endif /* _SFC_TWEAK_H_ */