drivers/net/ethernet/meta/fbnic/fbnic_rpc.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_rpc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_rpc.h- Extension
.h- Size
- 7736 bytes
- Lines
- 233
- 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
uapi/linux/in6.hlinux/bitfield.h
Detected Declarations
struct in_addrstruct fbnic_mac_addrstruct fbnic_ip_addrstruct fbnic_act_tcamstruct fbnic_devstruct fbnic_netfunction __fbnic_uc_unsyncfunction __fbnic_mc_unsync
Annotated Snippet
struct fbnic_mac_addr {
union {
unsigned char addr8[ETH_ALEN];
__be16 addr16[FBNIC_RPC_TCAM_MACDA_WORD_LEN];
} mask, value;
unsigned char state;
DECLARE_BITMAP(act_tcam, FBNIC_RPC_TCAM_ACT_NUM_ENTRIES);
};
struct fbnic_ip_addr {
struct in6_addr mask, value;
unsigned char version;
unsigned char state;
DECLARE_BITMAP(act_tcam, FBNIC_RPC_TCAM_ACT_NUM_ENTRIES);
};
struct fbnic_act_tcam {
struct {
u16 tcam[FBNIC_RPC_TCAM_ACT_WORD_LEN];
} mask, value;
unsigned char state;
u16 rss_en_mask;
u32 dest;
};
enum {
FBNIC_RSS_EN_HOST_UDP6,
FBNIC_RSS_EN_HOST_UDP4,
FBNIC_RSS_EN_HOST_TCP6,
FBNIC_RSS_EN_HOST_TCP4,
FBNIC_RSS_EN_HOST_IP6,
FBNIC_RSS_EN_HOST_IP4,
FBNIC_RSS_EN_HOST_ETHER,
FBNIC_RSS_EN_XCAST_UDP6,
#define FBNIC_RSS_EN_NUM_UNICAST FBNIC_RSS_EN_XCAST_UDP6
FBNIC_RSS_EN_XCAST_UDP4,
FBNIC_RSS_EN_XCAST_TCP6,
FBNIC_RSS_EN_XCAST_TCP4,
FBNIC_RSS_EN_XCAST_IP6,
FBNIC_RSS_EN_XCAST_IP4,
FBNIC_RSS_EN_XCAST_ETHER,
FBNIC_RSS_EN_NUM_ENTRIES
};
/* Reserve the first 2 entries for the use by the BMC so that we can
* avoid allowing rules to get in the way of BMC unicast traffic.
*/
#define FBNIC_RPC_ACT_TBL_BMC_OFFSET 0
#define FBNIC_RPC_ACT_TBL_BMC_ALL_MULTI_OFFSET 1
/* This should leave us with 48 total entries in the TCAM that can be used
* for NFC after also deducting the 14 needed for RSS table programming.
*/
#define FBNIC_RPC_ACT_TBL_NFC_OFFSET 2
/* We reserve the last 14 entries for RSS rules on the host. The BMC
* unicast rule will need to be populated above these and is expected to
* use MACDA TCAM entry 23 to store the BMC MAC address.
*/
#define FBNIC_RPC_ACT_TBL_RSS_OFFSET \
(FBNIC_RPC_ACT_TBL_NUM_ENTRIES - FBNIC_RSS_EN_NUM_ENTRIES)
#define FBNIC_RPC_ACT_TBL_NFC_ENTRIES \
(FBNIC_RPC_ACT_TBL_RSS_OFFSET - FBNIC_RPC_ACT_TBL_NFC_OFFSET)
/* Flags used to identify the owner for this MAC filter. Note that any
* flags set for Broadcast thru Promisc indicate that the rule belongs
* to the RSS filters for the host.
*/
enum {
FBNIC_MAC_ADDR_T_BMC = 0,
FBNIC_MAC_ADDR_T_BROADCAST = FBNIC_RPC_ACT_TBL_RSS_OFFSET,
#define FBNIC_MAC_ADDR_T_HOST_START FBNIC_MAC_ADDR_T_BROADCAST
FBNIC_MAC_ADDR_T_MULTICAST,
FBNIC_MAC_ADDR_T_UNICAST,
FBNIC_MAC_ADDR_T_ALLMULTI, /* BROADCAST ... MULTICAST*/
FBNIC_MAC_ADDR_T_PROMISC, /* BROADCAST ... UNICAST */
FBNIC_MAC_ADDR_T_HOST_LAST
};
#define FBNIC_MAC_ADDR_T_HOST_LEN \
(FBNIC_MAC_ADDR_T_HOST_LAST - FBNIC_MAC_ADDR_T_HOST_START)
#define FBNIC_RPC_TCAM_ACT0_IPSRC_IDX CSR_GENMASK(2, 0)
#define FBNIC_RPC_TCAM_ACT0_IPSRC_VALID CSR_BIT(3)
#define FBNIC_RPC_TCAM_ACT0_IPDST_IDX CSR_GENMASK(6, 4)
#define FBNIC_RPC_TCAM_ACT0_IPDST_VALID CSR_BIT(7)
#define FBNIC_RPC_TCAM_ACT0_OUTER_IPSRC_IDX CSR_GENMASK(10, 8)
#define FBNIC_RPC_TCAM_ACT0_OUTER_IPSRC_VALID CSR_BIT(11)
#define FBNIC_RPC_TCAM_ACT0_OUTER_IPDST_IDX CSR_GENMASK(14, 12)
Annotation
- Immediate include surface: `uapi/linux/in6.h`, `linux/bitfield.h`.
- Detected declarations: `struct in_addr`, `struct fbnic_mac_addr`, `struct fbnic_ip_addr`, `struct fbnic_act_tcam`, `struct fbnic_dev`, `struct fbnic_net`, `function __fbnic_uc_unsync`, `function __fbnic_mc_unsync`.
- 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.