flow_dissector: change port array into src, dst tuple
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h
index 5eac987..bac9c14 100644
--- a/include/net/flow_dissector.h
+++ b/include/net/flow_dissector.h
@@ -34,13 +34,16 @@
/**
* flow_dissector_key_tp_ports:
* @ports: port numbers of Transport header
- * port16[0]: src port number
- * port16[1]: dst port number
+ * src: source port number
+ * dst: destination port number
*/
struct flow_dissector_key_ports {
union {
__be32 ports;
- __be16 port16[2];
+ struct {
+ __be16 src;
+ __be16 dst;
+ };
};
};
diff --git a/include/net/ip.h b/include/net/ip.h
index b0443d4..0ed6d76 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -362,8 +362,8 @@
keys.addrs.src = inet->inet_saddr;
keys.addrs.dst = inet->inet_daddr;
- keys.ports.port16[0] = inet->inet_sport;
- keys.ports.port16[1] = inet->inet_dport;
+ keys.ports.src = inet->inet_sport;
+ keys.ports.dst = inet->inet_dport;
sk->sk_txhash = flow_hash_from_keys(&keys);
}
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 9eed976..aab8190 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -700,8 +700,8 @@
keys.addrs.src = (__force __be32)ipv6_addr_hash(&np->saddr);
keys.addrs.dst = (__force __be32)ipv6_addr_hash(&sk->sk_v6_daddr);
- keys.ports.port16[0] = inet->inet_sport;
- keys.ports.port16[1] = inet->inet_dport;
+ keys.ports.src = inet->inet_sport;
+ keys.ports.dst = inet->inet_dport;
sk->sk_txhash = flow_hash_from_keys(&keys);
}