Skip to content

Commit

Permalink
dev: Move received_rps counter next to RPS members in softnet data
Browse files Browse the repository at this point in the history
Move the received_rps counter value next to the other RPS-related members
in softnet_data. This closes two four-byte holes in the structure, making
room for another pointer in the first two cache lines without bumping the
xmit struct to its own line.

Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20221108140601.149971-2-toke@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Toke Høiland-Jørgensen authored and Alexei Starovoitov committed Nov 15, 2022
1 parent 26a9b43 commit 14d898f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -3128,7 +3128,6 @@ struct softnet_data {
/* stats */
unsigned int processed;
unsigned int time_squeeze;
unsigned int received_rps;
#ifdef CONFIG_RPS
struct softnet_data *rps_ipi_list;
#endif
Expand Down Expand Up @@ -3161,6 +3160,7 @@ struct softnet_data {
unsigned int cpu;
unsigned int input_queue_tail;
#endif
unsigned int received_rps;
unsigned int dropped;
struct sk_buff_head input_pkt_queue;
struct napi_struct backlog;
Expand Down

0 comments on commit 14d898f

Please sign in to comment.