ip_gre: Add support to collect tunnel metadata.
Following patch create new tunnel flag which enable tunnel metadata collection on given device. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a9020fde67
commit
2e15ea390e
@@ -82,6 +82,8 @@ struct ip_tunnel_dst {
|
||||
__be32 saddr;
|
||||
};
|
||||
|
||||
struct metadata_dst;
|
||||
|
||||
struct ip_tunnel {
|
||||
struct ip_tunnel __rcu *next;
|
||||
struct hlist_node hash_node;
|
||||
@@ -115,6 +117,7 @@ struct ip_tunnel {
|
||||
unsigned int prl_count; /* # of entries in PRL */
|
||||
int ip_tnl_net_id;
|
||||
struct gro_cells gro_cells;
|
||||
bool collect_md;
|
||||
};
|
||||
|
||||
#define TUNNEL_CSUM __cpu_to_be16(0x01)
|
||||
@@ -149,6 +152,7 @@ struct tnl_ptk_info {
|
||||
struct ip_tunnel_net {
|
||||
struct net_device *fb_tunnel_dev;
|
||||
struct hlist_head tunnels[IP_TNL_HASH_SIZE];
|
||||
struct ip_tunnel __rcu *collect_md_tun;
|
||||
};
|
||||
|
||||
struct ip_tunnel_encap_ops {
|
||||
@@ -235,7 +239,8 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
|
||||
__be32 key);
|
||||
|
||||
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
||||
const struct tnl_ptk_info *tpi, bool log_ecn_error);
|
||||
const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst,
|
||||
bool log_ecn_error);
|
||||
int ip_tunnel_changelink(struct net_device *dev, struct nlattr *tb[],
|
||||
struct ip_tunnel_parm *p);
|
||||
int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
|
||||
|
||||
Reference in New Issue
Block a user