Merge tag 'icc-5.4-rc1' of https://git.linaro.org/people/georgi.djakov/linux into...
[linux/fpc-iii.git] / net / bridge / br_private_tunnel.h
blob2bdef2ea34205ae80ef7afa1853f89d8012c04df
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Bridge per vlan tunnels
5 * Authors:
6 * Roopa Prabhu <roopa@cumulusnetworks.com>
7 */
9 #ifndef _BR_PRIVATE_TUNNEL_H
10 #define _BR_PRIVATE_TUNNEL_H
12 struct vtunnel_info {
13 u32 tunid;
14 u16 vid;
15 u16 flags;
18 /* br_netlink_tunnel.c */
19 int br_parse_vlan_tunnel_info(struct nlattr *attr,
20 struct vtunnel_info *tinfo);
21 int br_process_vlan_tunnel_info(struct net_bridge *br,
22 struct net_bridge_port *p,
23 int cmd,
24 struct vtunnel_info *tinfo_curr,
25 struct vtunnel_info *tinfo_last,
26 bool *changed);
27 int br_get_vlan_tunnel_info_size(struct net_bridge_vlan_group *vg);
28 int br_fill_vlan_tunnel_info(struct sk_buff *skb,
29 struct net_bridge_vlan_group *vg);
31 #ifdef CONFIG_BRIDGE_VLAN_FILTERING
32 /* br_vlan_tunnel.c */
33 int vlan_tunnel_init(struct net_bridge_vlan_group *vg);
34 void vlan_tunnel_deinit(struct net_bridge_vlan_group *vg);
35 int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port, u16 vid);
36 int nbp_vlan_tunnel_info_add(struct net_bridge_port *port, u16 vid, u32 tun_id);
37 void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port);
38 void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
39 struct net_bridge_vlan *vlan);
40 int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
41 struct net_bridge_port *p,
42 struct net_bridge_vlan_group *vg);
43 int br_handle_egress_vlan_tunnel(struct sk_buff *skb,
44 struct net_bridge_vlan *vlan);
45 #else
46 static inline int vlan_tunnel_init(struct net_bridge_vlan_group *vg)
48 return 0;
51 static inline int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port,
52 u16 vid)
54 return 0;
57 static inline int nbp_vlan_tunnel_info_add(struct net_bridge_port *port,
58 u16 vid, u32 tun_id)
60 return 0;
63 static inline void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port)
67 static inline void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg,
68 struct net_bridge_vlan *vlan)
72 static inline int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
73 struct net_bridge_port *p,
74 struct net_bridge_vlan_group *vg)
76 return 0;
78 #endif
80 #endif