hotdata.c 840 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. #include <linux/cache.h>
  3. #include <linux/jiffies.h>
  4. #include <linux/list.h>
  5. #include <net/aligned_data.h>
  6. #include <net/hotdata.h>
  7. #include <net/ip.h>
  8. #include <net/proto_memory.h>
  9. struct net_hotdata net_hotdata __cacheline_aligned = {
  10. .offload_base = LIST_HEAD_INIT(net_hotdata.offload_base),
  11. .gro_normal_batch = 8,
  12. .netdev_budget = 300,
  13. /* Must be at least 2 jiffes to guarantee 1 jiffy timeout */
  14. .netdev_budget_usecs = 2 * USEC_PER_SEC / HZ,
  15. .tstamp_prequeue = 1,
  16. .max_backlog = 1000,
  17. .qdisc_max_burst = 1000,
  18. .dev_tx_weight = 64,
  19. .dev_rx_weight = 64,
  20. .sysctl_max_skb_frags = MAX_SKB_FRAGS,
  21. .sysctl_skb_defer_max = 128,
  22. .sysctl_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE
  23. };
  24. EXPORT_SYMBOL(net_hotdata);
  25. struct net_aligned_data net_aligned_data;
  26. EXPORT_IPV6_MOD(net_aligned_data);