include/soc/mscc/ocelot.h
Source file repositories/reference/linux-study-clean/include/soc/mscc/ocelot.h
File Facts
- System
- Linux kernel
- Corpus path
include/soc/mscc/ocelot.h- Extension
.h- Size
- 37635 bytes
- Lines
- 1231
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ptp_clock_kernel.hlinux/net_tstamp.hlinux/if_vlan.hlinux/regmap.hnet/dsa.h
Detected Declarations
struct tc_mqprio_qopt_offloadstruct ocelotstruct device_nodestruct ocelot_opsstruct ocelot_vcap_policerstruct ocelot_vcap_blockstruct ocelot_bridge_vlanstruct ocelot_psfp_liststruct ocelot_lag_fdbstruct ocelot_mirrorstruct ocelot_mm_statestruct ocelot_ts_statsstruct ocelot_portstruct ocelot_portstruct ocelotstruct ocelot_policerenum ocelot_targetenum ocelot_regenum ocelot_regfieldenum ocelot_ptp_pinsenum ocelot_tag_prefixenum ocelot_port_tag_configenum ocelot_sbenum ocelot_sb_poolenum macaccess_entry_typeenum ocelot_protofunction ocelot_mrp_addfunction ocelot_mrp_delfunction ocelot_mrp_add_ring_rolefunction ocelot_mrp_del_ring_role
Annotated Snippet
struct ocelot_ops {
struct net_device *(*port_to_netdev)(struct ocelot *ocelot, int port);
int (*netdev_to_port)(struct ocelot *ocelot, struct net_device *dev);
int (*reset)(struct ocelot *ocelot);
u16 (*wm_enc)(u16 value);
u16 (*wm_dec)(u16 value);
void (*wm_stat)(u32 val, u32 *inuse, u32 *maxuse);
void (*psfp_init)(struct ocelot *ocelot);
int (*psfp_filter_add)(struct ocelot *ocelot, int port,
struct flow_cls_offload *f);
int (*psfp_filter_del)(struct ocelot *ocelot, struct flow_cls_offload *f);
int (*psfp_stats_get)(struct ocelot *ocelot, struct flow_cls_offload *f,
struct flow_stats *stats);
void (*cut_through_fwd)(struct ocelot *ocelot);
void (*tas_clock_adjust)(struct ocelot *ocelot);
void (*tas_guard_bands_update)(struct ocelot *ocelot, int port);
void (*update_stats)(struct ocelot *ocelot);
};
struct ocelot_vcap_policer {
struct list_head pol_list;
u16 base;
u16 max;
u16 base2;
u16 max2;
};
struct ocelot_vcap_block {
struct list_head rules;
int count;
};
struct ocelot_bridge_vlan {
u16 vid;
unsigned long portmask;
unsigned long untagged;
struct list_head list;
};
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,
};
struct ocelot_psfp_list {
struct list_head stream_list;
struct list_head sfi_list;
struct list_head sgi_list;
/* Serialize access to the lists */
struct mutex lock;
};
enum ocelot_sb {
OCELOT_SB_BUF,
OCELOT_SB_REF,
OCELOT_SB_NUM,
};
enum ocelot_sb_pool {
OCELOT_SB_POOL_ING,
OCELOT_SB_POOL_EGR,
OCELOT_SB_POOL_NUM,
};
/* MAC table entry types.
* ENTRYTYPE_NORMAL is subject to aging.
* ENTRYTYPE_LOCKED is not subject to aging.
* ENTRYTYPE_MACv4 is not subject to aging. For IPv4 multicast.
* ENTRYTYPE_MACv6 is not subject to aging. For IPv6 multicast.
*/
enum macaccess_entry_type {
ENTRYTYPE_NORMAL = 0,
ENTRYTYPE_LOCKED,
ENTRYTYPE_MACv4,
ENTRYTYPE_MACv6,
};
enum ocelot_proto {
OCELOT_PROTO_PTP_L2 = BIT(0),
OCELOT_PROTO_PTP_L4 = BIT(1),
};
#define OCELOT_QUIRK_PCS_PERFORMS_RATE_ADAPTATION BIT(0)
#define OCELOT_QUIRK_QSGMII_PORTS_MUST_BE_UP BIT(1)
Annotation
- Immediate include surface: `linux/ptp_clock_kernel.h`, `linux/net_tstamp.h`, `linux/if_vlan.h`, `linux/regmap.h`, `net/dsa.h`.
- Detected declarations: `struct tc_mqprio_qopt_offload`, `struct ocelot`, `struct device_node`, `struct ocelot_ops`, `struct ocelot_vcap_policer`, `struct ocelot_vcap_block`, `struct ocelot_bridge_vlan`, `struct ocelot_psfp_list`, `struct ocelot_lag_fdb`, `struct ocelot_mirror`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.