| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Bridge per vlan tunnels |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Authors: |
|---|
| 5 | 6 | * Roopa Prabhu <roopa@cumulusnetworks.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or |
|---|
| 8 | | - * modify it under the terms of the GNU General Public License |
|---|
| 9 | | - * as published by the Free Software Foundation; either version |
|---|
| 10 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #ifndef _BR_PRIVATE_TUNNEL_H |
|---|
| .. | .. |
|---|
| 22 | 18 | /* br_netlink_tunnel.c */ |
|---|
| 23 | 19 | int br_parse_vlan_tunnel_info(struct nlattr *attr, |
|---|
| 24 | 20 | struct vtunnel_info *tinfo); |
|---|
| 25 | | -int br_process_vlan_tunnel_info(struct net_bridge *br, |
|---|
| 26 | | - struct net_bridge_port *p, |
|---|
| 21 | +int br_process_vlan_tunnel_info(const struct net_bridge *br, |
|---|
| 22 | + const struct net_bridge_port *p, |
|---|
| 27 | 23 | int cmd, |
|---|
| 28 | 24 | struct vtunnel_info *tinfo_curr, |
|---|
| 29 | 25 | struct vtunnel_info *tinfo_last, |
|---|
| .. | .. |
|---|
| 31 | 27 | int br_get_vlan_tunnel_info_size(struct net_bridge_vlan_group *vg); |
|---|
| 32 | 28 | int br_fill_vlan_tunnel_info(struct sk_buff *skb, |
|---|
| 33 | 29 | struct net_bridge_vlan_group *vg); |
|---|
| 30 | +bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr, |
|---|
| 31 | + const struct net_bridge_vlan *v_last); |
|---|
| 32 | +int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd, |
|---|
| 33 | + u16 vid, u32 tun_id, bool *changed); |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | #ifdef CONFIG_BRIDGE_VLAN_FILTERING |
|---|
| 36 | 36 | /* br_vlan_tunnel.c */ |
|---|
| 37 | 37 | int vlan_tunnel_init(struct net_bridge_vlan_group *vg); |
|---|
| 38 | 38 | void vlan_tunnel_deinit(struct net_bridge_vlan_group *vg); |
|---|
| 39 | | -int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port, u16 vid); |
|---|
| 40 | | -int nbp_vlan_tunnel_info_add(struct net_bridge_port *port, u16 vid, u32 tun_id); |
|---|
| 39 | +int nbp_vlan_tunnel_info_delete(const struct net_bridge_port *port, u16 vid); |
|---|
| 40 | +int nbp_vlan_tunnel_info_add(const struct net_bridge_port *port, u16 vid, |
|---|
| 41 | + u32 tun_id); |
|---|
| 41 | 42 | void nbp_vlan_tunnel_info_flush(struct net_bridge_port *port); |
|---|
| 42 | 43 | void vlan_tunnel_info_del(struct net_bridge_vlan_group *vg, |
|---|
| 43 | 44 | struct net_bridge_vlan *vlan); |
|---|
| .. | .. |
|---|
| 52 | 53 | return 0; |
|---|
| 53 | 54 | } |
|---|
| 54 | 55 | |
|---|
| 55 | | -static inline int nbp_vlan_tunnel_info_delete(struct net_bridge_port *port, |
|---|
| 56 | +static inline int nbp_vlan_tunnel_info_delete(const struct net_bridge_port *port, |
|---|
| 56 | 57 | u16 vid) |
|---|
| 57 | 58 | { |
|---|
| 58 | 59 | return 0; |
|---|
| 59 | 60 | } |
|---|
| 60 | 61 | |
|---|
| 61 | | -static inline int nbp_vlan_tunnel_info_add(struct net_bridge_port *port, |
|---|
| 62 | +static inline int nbp_vlan_tunnel_info_add(const struct net_bridge_port *port, |
|---|
| 62 | 63 | u16 vid, u32 tun_id) |
|---|
| 63 | 64 | { |
|---|
| 64 | 65 | return 0; |
|---|