drivers/net/dsa/mv88e6xxx/tcam.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/mv88e6xxx/tcam.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/mv88e6xxx/tcam.h- Extension
.h- Size
- 1305 bytes
- Lines
- 42
- 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
- No C-style include directives detected by the generator.
Detected Declarations
function __mv88e6xxx_tcam_match_set
Annotated Snippet
#ifndef _MV88E6XXX_TCAM_H_
#define _MV88E6XXX_TCAM_H_
#define PAGE0_MATCH_SIZE 22
#define PAGE1_MATCH_SIZE 26
#define DPV_MODE_NOP 0x0
#define DPV_MODE_AND 0x1
#define DPV_MODE_OR 0x2
#define DPV_MODE_REPLACE 0x3
int mv88e6xxx_tcam_entry_add(struct mv88e6xxx_chip *chip,
struct mv88e6xxx_tcam_entry *entry);
int mv88e6xxx_tcam_entry_del(struct mv88e6xxx_chip *chip,
struct mv88e6xxx_tcam_entry *entry);
struct mv88e6xxx_tcam_entry *
mv88e6xxx_tcam_entry_find(struct mv88e6xxx_chip *chip, unsigned long cookie);
#define mv88e6xxx_tcam_match_set(key, _offset, data, mask) \
do { \
typeof(_offset) (offset) = (_offset); \
BUILD_BUG_ON((offset) + sizeof((data)) > TCAM_MATCH_SIZE); \
__mv88e6xxx_tcam_match_set(key, offset, sizeof(data), \
(u8 *)&(data), (u8 *)&(mask)); \
} while (0)
static inline void __mv88e6xxx_tcam_match_set(struct mv88e6xxx_tcam_key *key,
unsigned int offset, size_t size,
u8 *data, u8 *mask)
{
memcpy(&key->frame_data[offset], data, size);
memcpy(&key->frame_mask[offset], mask, size);
}
extern const struct mv88e6xxx_tcam_ops mv88e6390_tcam_ops;
extern const struct mv88e6xxx_tcam_ops mv88e6393_tcam_ops;
#endif
Annotation
- Detected declarations: `function __mv88e6xxx_tcam_match_set`.
- 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.