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.
Showing the changes to include/net/netdev_rx_queue.h (1 of 4 files). Show all
Unified · Split
| @@ -8,13 +8,14 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <net/xdp.h> |
| 9 | 9 | #include <net/page_pool/types.h> |
| 10 | 10 | #include <net/netdev_queues.h> |
| 11 | +#include <net/rps-types.h> | |
| 11 | 12 | |
| 12 | 13 | /* This structure contains an instance of an RX queue. */ |
| 13 | 14 | struct netdev_rx_queue { |
| 14 | 15 | struct xdp_rxq_info xdp_rxq; |
| 15 | 16 | #ifdef CONFIG_RPS |
| 16 | 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 | 19 | #endif |
| 19 | 20 | struct kobject kobj; |
| 20 | 21 | const struct attribute_group **groups; |