enum ocelot_port_tag_config { /* all VLANs are egress-untagged */
OCELOT_PORT_TAG_DISABLED = 0, /* all VLANs except the native VLAN and VID 0 are egress-tagged */
OCELOT_PORT_TAG_NATIVE = 1, /* all VLANs except VID 0 are egress-tagged */
OCELOT_PORT_TAG_TRUNK_NO_VID0 = 2, /* all VLANs are egress-tagged */
OCELOT_PORT_TAG_TRUNK = 3,
};
/* Workqueue to check statistics for overflow */ struct delayed_work stats_work; struct workqueue_struct *stats_queue; /* Lock for serializing access to the statistics array */
spinlock_t stats_lock;
u64 *stats;
/* Lock for serializing indirect access to STAT_VIEW registers */ struct mutex stat_view_lock; /* Lock for serializing access to the MAC table */ struct mutex mact_lock; /* Lock for serializing forwarding domain changes, including the *configurationoftheTime-AwareShaper,MACMergelayerand *cut-throughforwarding,onwhichitdepends
*/ struct mutex fwd_domain_lock;
/* DSA callbacks */ void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data); void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data); int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset); void ocelot_port_get_stats64(struct ocelot *ocelot, int port, struct rtnl_link_stats64 *stats); void ocelot_port_get_pause_stats(struct ocelot *ocelot, int port, struct ethtool_pause_stats *pause_stats); void ocelot_port_get_mm_stats(struct ocelot *ocelot, int port, struct ethtool_mm_stats *stats); void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port, struct ethtool_rmon_stats *rmon_stats, conststruct ethtool_rmon_hist_range **ranges); void ocelot_port_get_eth_ctrl_stats(struct ocelot *ocelot, int port, struct ethtool_eth_ctrl_stats *ctrl_stats); void ocelot_port_get_eth_mac_stats(struct ocelot *ocelot, int port, struct ethtool_eth_mac_stats *mac_stats); void ocelot_port_get_eth_phy_stats(struct ocelot *ocelot, int port, struct ethtool_eth_phy_stats *phy_stats); void ocelot_port_get_ts_stats(struct ocelot *ocelot, int port, struct ethtool_ts_stats *ts_stats); int ocelot_get_ts_info(struct ocelot *ocelot, int port, struct kernel_ethtool_ts_info *info); void ocelot_set_ageing_time(struct ocelot *ocelot, unsignedint msecs); int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled, struct netlink_ext_ack *extack); void ocelot_bridge_stp_state_set(struct ocelot *ocelot, int port, u8 state);
u32 ocelot_get_bridge_fwd_mask(struct ocelot *ocelot, int src_port); int ocelot_port_pre_bridge_flags(struct ocelot *ocelot, int port, struct switchdev_brport_flags val); void ocelot_port_bridge_flags(struct ocelot *ocelot, int port, struct switchdev_brport_flags val); int ocelot_port_get_default_prio(struct ocelot *ocelot, int port); int ocelot_port_set_default_prio(struct ocelot *ocelot, int port, u8 prio); int ocelot_port_get_dscp_prio(struct ocelot *ocelot, int port, u8 dscp); int ocelot_port_add_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio); int ocelot_port_del_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio); int ocelot_port_bridge_join(struct ocelot *ocelot, int port, struct net_device *bridge, int bridge_num, struct netlink_ext_ack *extack); void ocelot_port_bridge_leave(struct ocelot *ocelot, int port, struct net_device *bridge); int ocelot_mact_flush(struct ocelot *ocelot, int port); int ocelot_fdb_dump(struct ocelot *ocelot, int port,
dsa_fdb_dump_cb_t *cb, void *data); int ocelot_fdb_add(struct ocelot *ocelot, int port, constunsignedchar *addr,
u16 vid, conststruct net_device *bridge); int ocelot_fdb_del(struct ocelot *ocelot, int port, constunsignedchar *addr,
u16 vid, conststruct net_device *bridge); int ocelot_lag_fdb_add(struct ocelot *ocelot, struct net_device *bond, constunsignedchar *addr, u16 vid, conststruct net_device *bridge); int ocelot_lag_fdb_del(struct ocelot *ocelot, struct net_device *bond, constunsignedchar *addr, u16 vid, conststruct net_device *bridge); int ocelot_vlan_prepare(struct ocelot *ocelot, int port, u16 vid, bool pvid, bool untagged, struct netlink_ext_ack *extack); int ocelot_vlan_add(struct ocelot *ocelot, int port, u16 vid, bool pvid, bool untagged); int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid); void ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct kernel_hwtstamp_config *cfg); int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct kernel_hwtstamp_config *cfg, struct netlink_ext_ack *extack); int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port, struct sk_buff *skb, struct sk_buff **clone); void ocelot_get_txtstamp(struct ocelot *ocelot); void ocelot_port_set_maxlen(struct ocelot *ocelot, int port, size_t sdu); int ocelot_get_max_mtu(struct ocelot *ocelot, int port); int ocelot_port_policer_add(struct ocelot *ocelot, int port, struct ocelot_policer *pol); int ocelot_port_policer_del(struct ocelot *ocelot, int port); int ocelot_port_mirror_add(struct ocelot *ocelot, int from, int to, bool ingress, struct netlink_ext_ack *extack); void ocelot_port_mirror_del(struct ocelot *ocelot, int from, bool ingress); int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, struct flow_cls_offload *f, bool ingress); int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, struct flow_cls_offload *f, bool ingress); int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, struct flow_cls_offload *f, bool ingress); int ocelot_port_mdb_add(struct ocelot *ocelot, int port, conststruct switchdev_obj_port_mdb *mdb, conststruct net_device *bridge); int ocelot_port_mdb_del(struct ocelot *ocelot, int port, conststruct switchdev_obj_port_mdb *mdb, conststruct net_device *bridge); int ocelot_port_lag_join(struct ocelot *ocelot, int port, struct net_device *bond, struct netdev_lag_upper_info *info, struct netlink_ext_ack *extack); void ocelot_port_lag_leave(struct ocelot *ocelot, int port, struct net_device *bond); void ocelot_port_lag_change(struct ocelot *ocelot, int port, bool lag_tx_active); int ocelot_bond_get_id(struct ocelot *ocelot, struct net_device *bond);
int ocelot_devlink_sb_register(struct ocelot *ocelot); void ocelot_devlink_sb_unregister(struct ocelot *ocelot); int ocelot_sb_pool_get(struct ocelot *ocelot, unsignedint sb_index,
u16 pool_index, struct devlink_sb_pool_info *pool_info); int ocelot_sb_pool_set(struct ocelot *ocelot, unsignedint sb_index,
u16 pool_index, u32 size, enum devlink_sb_threshold_type threshold_type, struct netlink_ext_ack *extack); int ocelot_sb_port_pool_get(struct ocelot *ocelot, int port, unsignedint sb_index, u16 pool_index,
u32 *p_threshold); int ocelot_sb_port_pool_set(struct ocelot *ocelot, int port, unsignedint sb_index, u16 pool_index,
u32 threshold, struct netlink_ext_ack *extack); int ocelot_sb_tc_pool_bind_get(struct ocelot *ocelot, int port, unsignedint sb_index, u16 tc_index, enum devlink_sb_pool_type pool_type,
u16 *p_pool_index, u32 *p_threshold); int ocelot_sb_tc_pool_bind_set(struct ocelot *ocelot, int port, unsignedint sb_index, u16 tc_index, enum devlink_sb_pool_type pool_type,
u16 pool_index, u32 threshold, struct netlink_ext_ack *extack); int ocelot_sb_occ_snapshot(struct ocelot *ocelot, unsignedint sb_index); int ocelot_sb_occ_max_clear(struct ocelot *ocelot, unsignedint sb_index); int ocelot_sb_occ_port_pool_get(struct ocelot *ocelot, int port, unsignedint sb_index, u16 pool_index,
u32 *p_cur, u32 *p_max); int ocelot_sb_occ_tc_port_bind_get(struct ocelot *ocelot, int port, unsignedint sb_index, u16 tc_index, enum devlink_sb_pool_type pool_type,
u32 *p_cur, u32 *p_max);
int ocelot_port_configure_serdes(struct ocelot *ocelot, int port, struct device_node *portnp);
void ocelot_phylink_mac_config(struct ocelot *ocelot, int port, unsignedint link_an_mode, conststruct phylink_link_state *state); void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port, unsignedint link_an_mode,
phy_interface_t interface, unsignedlong quirks); void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port, struct phy_device *phydev, unsignedint link_an_mode,
phy_interface_t interface, int speed, int duplex, bool tx_pause, bool rx_pause, unsignedlong quirks);
int ocelot_mact_lookup(struct ocelot *ocelot, int *dst_idx, constunsignedchar mac[ETH_ALEN], unsignedint vid, enum macaccess_entry_type *type); int ocelot_mact_learn_streamdata(struct ocelot *ocelot, int dst_idx, constunsignedchar mac[ETH_ALEN], unsignedint vid, enum macaccess_entry_type type, int sfid, int ssid);
int ocelot_migrate_mdbs(struct ocelot *ocelot, unsignedlong from_mask, unsignedlong to_mask);
int ocelot_vcap_policer_add(struct ocelot *ocelot, u32 pol_ix, struct ocelot_policer *pol); int ocelot_vcap_policer_del(struct ocelot *ocelot, u32 pol_ix);
void ocelot_mm_irq(struct ocelot *ocelot); int ocelot_port_set_mm(struct ocelot *ocelot, int port, struct ethtool_mm_cfg *cfg, struct netlink_ext_ack *extack); int ocelot_port_get_mm(struct ocelot *ocelot, int port, struct ethtool_mm_state *state); int ocelot_port_mqprio(struct ocelot *ocelot, int port, struct tc_mqprio_qopt_offload *mqprio);
#if IS_ENABLED(CONFIG_BRIDGE_MRP) int ocelot_mrp_add(struct ocelot *ocelot, int port, conststruct switchdev_obj_mrp *mrp); int ocelot_mrp_del(struct ocelot *ocelot, int port, conststruct switchdev_obj_mrp *mrp); int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port, conststruct switchdev_obj_ring_role_mrp *mrp); int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port, conststruct switchdev_obj_ring_role_mrp *mrp); #else staticinlineint ocelot_mrp_add(struct ocelot *ocelot, int port, conststruct switchdev_obj_mrp *mrp)
{ return -EOPNOTSUPP;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.