2024-03-07 00:00:14 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include <linux/cache.h>
|
2024-03-07 00:00:15 +08:00
|
|
|
#include <linux/jiffies.h>
|
2024-03-07 00:00:14 +08:00
|
|
|
#include <linux/list.h>
|
2024-04-29 21:40:25 +08:00
|
|
|
#include <net/hotdata.h>
|
|
|
|
#include <net/proto_memory.h>
|
2024-03-07 00:00:15 +08:00
|
|
|
|
2024-03-07 00:00:14 +08:00
|
|
|
struct net_hotdata net_hotdata __cacheline_aligned = {
|
|
|
|
.offload_base = LIST_HEAD_INIT(net_hotdata.offload_base),
|
2024-03-07 00:00:17 +08:00
|
|
|
.ptype_all = LIST_HEAD_INIT(net_hotdata.ptype_all),
|
2024-03-07 00:00:14 +08:00
|
|
|
.gro_normal_batch = 8,
|
2024-03-07 00:00:15 +08:00
|
|
|
|
|
|
|
.netdev_budget = 300,
|
|
|
|
/* Must be at least 2 jiffes to guarantee 1 jiffy timeout */
|
|
|
|
.netdev_budget_usecs = 2 * USEC_PER_SEC / HZ,
|
2024-03-07 00:00:16 +08:00
|
|
|
|
|
|
|
.tstamp_prequeue = 1,
|
2024-03-07 00:00:18 +08:00
|
|
|
.max_backlog = 1000,
|
2024-03-07 00:00:21 +08:00
|
|
|
.dev_tx_weight = 64,
|
2024-03-07 00:00:22 +08:00
|
|
|
.dev_rx_weight = 64,
|
2024-04-29 21:40:21 +08:00
|
|
|
.sysctl_max_skb_frags = MAX_SKB_FRAGS,
|
2024-04-29 21:40:22 +08:00
|
|
|
.sysctl_skb_defer_max = 64,
|
2024-04-29 21:40:25 +08:00
|
|
|
.sysctl_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE
|
2024-03-07 00:00:14 +08:00
|
|
|
};
|
2024-03-07 00:00:18 +08:00
|
|
|
EXPORT_SYMBOL(net_hotdata);
|