br_private.h (50501936288d6a29d7ef78f25d00e33240fad45f) br_private.h (29cfb2aaa4425a608651a05b9b875bc445394443)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 */
8
9#ifndef _BR_PRIVATE_H
10#define _BR_PRIVATE_H
11
12#include <linux/netdevice.h>
13#include <linux/if_bridge.h>
14#include <linux/netpoll.h>
15#include <linux/u64_stats_sync.h>
16#include <net/route.h>
17#include <net/ip6_fib.h>
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 */
8
9#ifndef _BR_PRIVATE_H
10#define _BR_PRIVATE_H
11
12#include <linux/netdevice.h>
13#include <linux/if_bridge.h>
14#include <linux/netpoll.h>
15#include <linux/u64_stats_sync.h>
16#include <net/route.h>
17#include <net/ip6_fib.h>
18#include <net/pkt_cls.h>
18#include <linux/if_vlan.h>
19#include <linux/rhashtable.h>
20#include <linux/refcount.h>
21
22#define BR_HASH_BITS 8
23#define BR_HASH_SIZE (1 << BR_HASH_BITS)
24
25#define BR_HOLD_TIME (1*HZ)

--- 355 unchanged lines hidden (view full) ---

381 netdevice_tracker dev_tracker;
382 struct list_head list;
383
384 unsigned long flags;
385#ifdef CONFIG_BRIDGE_VLAN_FILTERING
386 struct net_bridge_vlan_group __rcu *vlgrp;
387#endif
388 struct net_bridge_port __rcu *backup_port;
19#include <linux/if_vlan.h>
20#include <linux/rhashtable.h>
21#include <linux/refcount.h>
22
23#define BR_HASH_BITS 8
24#define BR_HASH_SIZE (1 << BR_HASH_BITS)
25
26#define BR_HOLD_TIME (1*HZ)

--- 355 unchanged lines hidden (view full) ---

382 netdevice_tracker dev_tracker;
383 struct list_head list;
384
385 unsigned long flags;
386#ifdef CONFIG_BRIDGE_VLAN_FILTERING
387 struct net_bridge_vlan_group __rcu *vlgrp;
388#endif
389 struct net_bridge_port __rcu *backup_port;
390 u32 backup_nhid;
389
390 /* STP */
391 u8 priority;
392 u8 state;
393 u16 port_no;
394 unsigned char topology_change_ack;
395 unsigned char config_pending;
396 port_id port_id;

--- 202 unchanged lines hidden (view full) ---

599 * domain, otherwise it wasn't.
600 */
601 int src_hwdom;
602 /* Bit mask of hardware domains towards this packet has already been
603 * transmitted using the TX data plane offload.
604 */
605 unsigned long fwd_hwdoms;
606#endif
391
392 /* STP */
393 u8 priority;
394 u8 state;
395 u16 port_no;
396 unsigned char topology_change_ack;
397 unsigned char config_pending;
398 port_id port_id;

--- 202 unchanged lines hidden (view full) ---

601 * domain, otherwise it wasn't.
602 */
603 int src_hwdom;
604 /* Bit mask of hardware domains towards this packet has already been
605 * transmitted using the TX data plane offload.
606 */
607 unsigned long fwd_hwdoms;
608#endif
609
610 u32 backup_nhid;
607};
608
609#define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb)
610
611#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
612# define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (BR_INPUT_SKB_CB(__skb)->mrouters_only)
613#else
614# define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (0)

--- 134 unchanged lines hidden (view full) ---

749int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt);
750int br_boolopt_multi_toggle(struct net_bridge *br,
751 struct br_boolopt_multi *bm,
752 struct netlink_ext_ack *extack);
753void br_boolopt_multi_get(const struct net_bridge *br,
754 struct br_boolopt_multi *bm);
755void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on);
756
611};
612
613#define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb)
614
615#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
616# define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (BR_INPUT_SKB_CB(__skb)->mrouters_only)
617#else
618# define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb) (0)

--- 134 unchanged lines hidden (view full) ---

753int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt);
754int br_boolopt_multi_toggle(struct net_bridge *br,
755 struct br_boolopt_multi *bm,
756 struct netlink_ext_ack *extack);
757void br_boolopt_multi_get(const struct net_bridge *br,
758 struct br_boolopt_multi *bm);
759void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on);
760
761#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
762static inline void br_tc_skb_miss_set(struct sk_buff *skb, bool miss)
763{
764 struct tc_skb_ext *ext;
765
766 if (!tc_skb_ext_tc_enabled())
767 return;
768
769 ext = skb_ext_find(skb, TC_SKB_EXT);
770 if (ext) {
771 ext->l2_miss = miss;
772 return;
773 }
774 if (!miss)
775 return;
776 ext = tc_skb_ext_alloc(skb);
777 if (!ext)
778 return;
779 ext->l2_miss = true;
780}
781#else
782static inline void br_tc_skb_miss_set(struct sk_buff *skb, bool miss)
783{
784}
785#endif
786
757/* br_device.c */
758void br_dev_setup(struct net_device *dev);
759void br_dev_delete(struct net_device *dev, struct list_head *list);
760netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
761#ifdef CONFIG_NET_POLL_CONTROLLER
762static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
763 struct sk_buff *skb)
764{

--- 1460 unchanged lines hidden ---
787/* br_device.c */
788void br_dev_setup(struct net_device *dev);
789void br_dev_delete(struct net_device *dev, struct list_head *list);
790netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
791#ifdef CONFIG_NET_POLL_CONTROLLER
792static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
793 struct sk_buff *skb)
794{

--- 1460 unchanged lines hidden ---