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

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

inet: move ir_mark to fill a hole



On 64bit arches, we can save 8 bytes in inet_request_sock
by moving ir_mark to fill a hole.

While we are at it, inet_request_mark() can get a const qualifier
for listener socket.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9407000
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -94,11 +94,11 @@ struct inet_request_sock {
				acked	   : 1,
				acked	   : 1,
				no_srccheck: 1;
				no_srccheck: 1;
	kmemcheck_bitfield_end(flags);
	kmemcheck_bitfield_end(flags);
	u32                     ir_mark;
	union {
	union {
		struct ip_options_rcu	*opt;
		struct ip_options_rcu	*opt;
		struct sk_buff		*pktopts;
		struct sk_buff		*pktopts;
	};
	};
	u32                     ir_mark;
};
};


static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
@@ -106,14 +106,13 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
	return (struct inet_request_sock *)sk;
	return (struct inet_request_sock *)sk;
}
}


static inline u32 inet_request_mark(struct sock *sk, struct sk_buff *skb)
static inline u32 inet_request_mark(const struct sock *sk, struct sk_buff *skb)
{
{
	if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept) {
	if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept)
		return skb->mark;
		return skb->mark;
	} else {

	return sk->sk_mark;
	return sk->sk_mark;
}
}
}


struct inet_cork {
struct inet_cork {
	unsigned int		flags;
	unsigned int		flags;