On 6/13/16 2:47 PM, Hannes Frederic Sowa wrote:
No functional changes.
Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org>
---
include/net/flow.h | 21 ---------------------
include/net/route.h | 33 +++++++++++++++++++++++++++------
net/ipv4/inet_connection_sock.c | 41 +++++++++++++++++++++++++++++------------
net/ipv4/ip_output.c | 21 ++++++++++++++-------
net/ipv4/ping.c | 16 +++++++++++++---
net/ipv4/raw.c | 20 ++++++++++++++------
net/ipv4/route.c | 38 +++++++++++++++++++++++++++++---------
net/ipv4/syncookies.c | 19 ++++++++++++++-----
net/ipv4/udp.c | 17 +++++++++++++----
9 files changed, 153 insertions(+), 73 deletions(-)
diff --git a/include/net/flow.h b/include/net/flow.h
index d47ef4bb5423a3..2c8e95b987c98c 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -90,27 +90,6 @@ struct flowi4 {
#define fl4_gre_key uli.gre_key
} __attribute__((__aligned__(BITS_PER_LONG/8)));
-static inline void flowi4_init_output(struct flowi4 *fl4, int oif,
- __u32 mark, __u8 tos, __u8 scope,
- __u8 proto, __u8 flags,
- __be32 daddr, __be32 saddr,
- __be16 dport, __be16 sport)
-{
- fl4->flowi4_oif = oif;
- fl4->flowi4_iif = LOOPBACK_IFINDEX;
- fl4->flowi4_mark = mark;
- fl4->flowi4_tos = tos;
- fl4->flowi4_scope = scope;
- fl4->flowi4_proto = proto;
- fl4->flowi4_flags = flags;
- fl4->flowi4_secid = 0;
- fl4->flowi4_tun_key.tun_id = 0;
- fl4->daddr = daddr;
- fl4->saddr = saddr;
- fl4->fl4_dport = dport;
- fl4->fl4_sport = sport;
-}
-
I found this helper to be unhelpful developing the VRF changes. Really
obfuscates the initialization of the flow struct. Happy to see it go.
I would like to see more initialization at declaration time as well to
fix the recurring problem of failing to add an init for new fields.
Doable for a lot of flow use cases with just some minor refactorings.
Anyways, change LGTM.
Reviewed-by: David Ahern <d...@cumulusnetworks.com>