drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c- Extension
.c- Size
- 2384 bytes
- Lines
- 98
- 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
mlxfw_mfa2_tlv_multi.huapi/linux/netlink.h
Detected Declarations
function mlxfw_mfa2_tlv_multi_childfunction mlxfw_mfa2_tlv_nextfunction mlxfw_mfa2_tlv_advancefunction mlxfw_mfa2_tlv_multi_child_findfunction mlxfw_mfa2_tlv_multi_foreachfunction mlxfw_mfa2_tlv_multi_child_countfunction mlxfw_mfa2_tlv_multi_foreach
Annotated Snippet
if (!tlv) {
pr_err("TLV parsing error\n");
return NULL;
}
if (tlv->type == type)
if (skip++ == index)
return tlv;
}
return NULL;
}
int mlxfw_mfa2_tlv_multi_child_count(const struct mlxfw_mfa2_file *mfa2_file,
const struct mlxfw_mfa2_tlv_multi *multi,
enum mlxfw_mfa2_tlv_type type,
u16 *p_count)
{
const struct mlxfw_mfa2_tlv *tlv;
u16 count = 0;
u16 idx;
mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) {
if (!tlv) {
pr_err("TLV parsing error\n");
return -EINVAL;
}
if (tlv->type == type)
count++;
}
*p_count = count;
return 0;
}
Annotation
- Immediate include surface: `mlxfw_mfa2_tlv_multi.h`, `uapi/linux/netlink.h`.
- Detected declarations: `function mlxfw_mfa2_tlv_multi_child`, `function mlxfw_mfa2_tlv_next`, `function mlxfw_mfa2_tlv_advance`, `function mlxfw_mfa2_tlv_multi_child_find`, `function mlxfw_mfa2_tlv_multi_foreach`, `function mlxfw_mfa2_tlv_multi_child_count`, `function mlxfw_mfa2_tlv_multi_foreach`.
- 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.