drivers/net/dsa/realtek/rtl8365mb_table.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/realtek/rtl8365mb_table.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/realtek/rtl8365mb_table.h- Extension
.h- Size
- 5740 bytes
- Lines
- 139
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/if_ether.hlinux/types.hrealtek.h
Detected Declarations
enum rtl8365mb_tableenum rtl8365mb_table_openum rtl8365mb_table_l2_method
Annotated Snippet
#ifndef _REALTEK_RTL8365MB_TABLE_H
#define _REALTEK_RTL8365MB_TABLE_H
#include <linux/if_ether.h>
#include <linux/types.h>
#include "realtek.h"
#define RTL8365MB_TABLE_ENTRY_MAX_SIZE 10
/*
* enum rtl8365mb_table - available switch tables
* @RTL8365MB_TABLE_ACL_RULE: ACL rules
* @RTL8365MB_TABLE_ACL_ACTION: ACL actions
* @RTL8365MB_TABLE_CVLAN: VLAN4k configurations
* @RTL8365MB_TABLE_L2: filtering database (2K hash table)
* @RTL8365MB_TABLE_IGMP_GROUP: IGMP group database (readonly)
*
* NOTE: Don't change the enum values. They must concur with the field
* described by @RTL8365MB_TABLE_CTRL_TABLE_MASK.
*/
enum rtl8365mb_table {
RTL8365MB_TABLE_ACL_RULE = 1,
RTL8365MB_TABLE_ACL_ACTION = 2,
RTL8365MB_TABLE_CVLAN = 3,
RTL8365MB_TABLE_L2 = 4,
RTL8365MB_TABLE_IGMP_GROUP = 5,
};
/*
* enum rtl8365mb_table_op - table query operation
* @RTL8365MB_TABLE_OP_READ: read an entry from the target table
* @RTL8365MB_TABLE_OP_WRITE: write an entry to the target table
*
* NOTE: Don't change the enum values. They must concur with the field
* described by @RTL8365MB_TABLE_CTRL_OP_MASK.
*/
enum rtl8365mb_table_op {
RTL8365MB_TABLE_OP_READ = 0,
RTL8365MB_TABLE_OP_WRITE = 1,
};
/*
* enum rtl8365mb_table_l2_method - look-up method for read queries of L2 table
* @RTL8365MB_TABLE_L2_METHOD_MAC: look-up by source MAC address and FID (or
* VID)
* @RTL8365MB_TABLE_L2_METHOD_ADDR: look-up by entry address
* @RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT: look-up next entry starting from the
* supplied address
* @RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_UC: same as ADDR_NEXT but search only
* unicast addresses
* @RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_MC: same as ADDR_NEXT but search only
* multicast addresses
* @RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_UC_PORT: same as ADDR_NEXT_UC but
* search only entries with matching source port
*
* NOTE: Don't change the enum values. They must concur with the field
* described by @RTL8365MB_TABLE_CTRL_METHOD_MASK
*/
enum rtl8365mb_table_l2_method {
RTL8365MB_TABLE_L2_METHOD_MAC = 0,
RTL8365MB_TABLE_L2_METHOD_ADDR = 1,
RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT = 2,
RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_UC = 3,
RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_MC = 4,
/*
* RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_MC_L3 = 5,
* RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_MC_L2L3 = 6,
*/
RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_UC_PORT = 7,
};
/*
* rtl8365mb_table_query() - read from or write to a switch table
* @priv: driver context
* @table: target table, see &enum rtl8365mb_table
* @op: read or write operation, see &enum rtl8365mb_table_op
* @addr: table address. For indexed tables, this selects the entry to access.
* For L2 read queries, it is ignored as input for MAC-based lookup
* methods and used as input for address-based lookup methods. On
* successful L2 queries, it is updated with the matched entry address.
* @method: L2 table lookup method, see &enum rtl8365mb_table_l2_method.
* Ignored for non-L2 tables.
* @port: for L2 read queries using method
* %RTL8365MB_TABLE_L2_METHOD_ADDR_NEXT_UC_PORT, restrict the search
* to entries associated with this source port. Ignored otherwise.
* @data: data buffer used to read from or write to the table. For L2 MAC
* lookups, this buffer provides the lookup key and receives the
* matched entry contents on success.
* @size: size of @data in 16-bit words. The caller must ensure that @size
Annotation
- Immediate include surface: `linux/if_ether.h`, `linux/types.h`, `realtek.h`.
- Detected declarations: `enum rtl8365mb_table`, `enum rtl8365mb_table_op`, `enum rtl8365mb_table_l2_method`.
- Atlas domain: Driver Families / drivers/net.
- 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.