linux/net/bridge/br_stp_if.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	Spanning tree protocol; interface code
 *	Linux ethernet bridge
 *
 *	Authors:
 *	Lennert Buytenhek		<[email protected]>
 */

#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
#include <net/switchdev.h>

#include "br_private.h"
#include "br_private_stp.h"


/* Port id is composed of priority and port number.
 * NB: some bits of priority are dropped to
 *     make room for more ports.
 */
static inline port_id br_make_port_id(__u8 priority, __u16 port_no)
{}

#define BR_MAX_PORT_PRIORITY

/* called under bridge lock */
void br_init_port(struct net_bridge_port *p)
{}

/* NO locks held */
void br_stp_enable_bridge(struct net_bridge *br)
{}

/* NO locks held */
void br_stp_disable_bridge(struct net_bridge *br)
{}

/* called under bridge lock */
void br_stp_enable_port(struct net_bridge_port *p)
{}

/* called under bridge lock */
void br_stp_disable_port(struct net_bridge_port *p)
{}

static int br_stp_call_user(struct net_bridge *br, char *arg)
{}

static void br_stp_start(struct net_bridge *br)
{}

static void br_stp_stop(struct net_bridge *br)
{}

int br_stp_set_enabled(struct net_bridge *br, unsigned long val,
		       struct netlink_ext_ack *extack)
{}

/* called under bridge lock */
void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *addr)
{}

/* should be aligned on 2 bytes for ether_addr_equal() */
static const unsigned short br_mac_zero_aligned[ETH_ALEN >> 1];

/* called under bridge lock */
bool br_stp_recalculate_bridge_id(struct net_bridge *br)
{}

/* Acquires and releases bridge lock */
void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio)
{}

/* called under bridge lock */
int br_stp_set_port_priority(struct net_bridge_port *p, unsigned long newprio)
{}

/* called under bridge lock */
int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost)
{}

ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id)
{}