History

net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table

Instead of storing the @log at the beginning of rps_dev_flow_table use 5 low order bits of the rps_tag_ptr to store the log of the size. This removes a potential cache line miss (for light traffic). This allows us to switch to one high-order allocation instead of vmalloc() when CONFIG_RFS_ACCEL is not set.

Eric Dumazet committed 8 months ago

Commit a4351631 parent b2cc6184 files · +67 −69Browse files

Showing the changes to include/net/netdev_rx_queue.h (1 of 4 files). Show all

Unified · Split

include/net/netdev_rx_queue.h+2−1
@@ -8,13 +8,14 @@ · 7 unmodified lines
8#include <net/xdp.h>8#include <net/xdp.h>
9#include <net/page_pool/types.h>9#include <net/page_pool/types.h>
10#include <net/netdev_queues.h>10#include <net/netdev_queues.h>
11#include <net/rps-types.h>
11 12
12/* This structure contains an instance of an RX queue. */13/* This structure contains an instance of an RX queue. */
13struct netdev_rx_queue {14struct netdev_rx_queue {
14 struct xdp_rxq_info xdp_rxq;15 struct xdp_rxq_info xdp_rxq;
15#ifdef CONFIG_RPS16#ifdef CONFIG_RPS
16 struct rps_map __rcu *rps_map;17 struct rps_map __rcu *rps_map;
17 struct rps_dev_flow_table __rcu *rps_flow_table;18 rps_tag_ptr rps_flow_table;
18#endif19#endif
19 struct kobject kobj;20 struct kobject kobj;
20 const struct attribute_group **groups;21 const struct attribute_group **groups;