Commit fbef0a40 authored by David S. Miller's avatar David S. Miller

net: Remove unnecessary padding in struct flowi

Move tos, scope, proto, and flags to the beginning of
the structure.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78fbfd8a
...@@ -14,13 +14,19 @@ struct flowi { ...@@ -14,13 +14,19 @@ struct flowi {
int oif; int oif;
int iif; int iif;
__u32 mark; __u32 mark;
__u8 tos;
__u8 scope;
__u8 proto;
__u8 flags;
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_PRECOW_METRICS 0x02
#define FLOWI_FLAG_CAN_SLEEP 0x04
__u32 secid;
union { union {
struct { struct {
__be32 daddr; __be32 daddr;
__be32 saddr; __be32 saddr;
__u8 tos;
__u8 scope;
} ip4_u; } ip4_u;
struct { struct {
...@@ -43,14 +49,9 @@ struct flowi { ...@@ -43,14 +49,9 @@ struct flowi {
#define fl6_flowlabel nl_u.ip6_u.flowlabel #define fl6_flowlabel nl_u.ip6_u.flowlabel
#define fl4_dst nl_u.ip4_u.daddr #define fl4_dst nl_u.ip4_u.daddr
#define fl4_src nl_u.ip4_u.saddr #define fl4_src nl_u.ip4_u.saddr
#define fl4_tos nl_u.ip4_u.tos #define fl4_tos tos
#define fl4_scope nl_u.ip4_u.scope #define fl4_scope scope
__u8 proto;
__u8 flags;
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_PRECOW_METRICS 0x02
#define FLOWI_FLAG_CAN_SLEEP 0x04
union { union {
struct { struct {
__be16 sport; __be16 sport;
...@@ -81,7 +82,6 @@ struct flowi { ...@@ -81,7 +82,6 @@ struct flowi {
#define fl_ipsec_spi uli_u.spi #define fl_ipsec_spi uli_u.spi
#define fl_mh_type uli_u.mht.type #define fl_mh_type uli_u.mht.type
#define fl_gre_key uli_u.gre_key #define fl_gre_key uli_u.gre_key
__u32 secid; /* used by xfrm; see secid.txt */
} __attribute__((__aligned__(BITS_PER_LONG/8))); } __attribute__((__aligned__(BITS_PER_LONG/8)));
#define FLOW_DIR_IN 0 #define FLOW_DIR_IN 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment