Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fba3679d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

fib_rules: reorder struct fib_rules fields



Move refcnt, pref, suppress_ifgroup, suppress_prefixlen out of first
cache line, as they are not used in fast path.

Make sure ctarget & fr_net are in first cache line.

(Assuming 64 bit arches and 64 bytes cache lines)

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73f5698e
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -10,23 +10,25 @@


struct fib_rule {
struct fib_rule {
	struct list_head	list;
	struct list_head	list;
	atomic_t		refcnt;
	int			iifindex;
	int			iifindex;
	int			oifindex;
	int			oifindex;
	u32			mark;
	u32			mark;
	u32			mark_mask;
	u32			mark_mask;
	u32			pref;
	u32			flags;
	u32			flags;
	u32			table;
	u32			table;
	int			suppress_ifgroup;
	int			suppress_prefixlen;
	u8			action;
	u8			action;
	/* 3 bytes hole, try to use */
	u32			target;
	u32			target;
	struct fib_rule __rcu	*ctarget;
	struct fib_rule __rcu	*ctarget;
	struct net		*fr_net;

	atomic_t		refcnt;
	u32			pref;
	int			suppress_ifgroup;
	int			suppress_prefixlen;
	char			iifname[IFNAMSIZ];
	char			iifname[IFNAMSIZ];
	char			oifname[IFNAMSIZ];
	char			oifname[IFNAMSIZ];
	struct rcu_head		rcu;
	struct rcu_head		rcu;
	struct net *		fr_net;
};
};


struct fib_lookup_arg {
struct fib_lookup_arg {