drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c- Extension
.c- Size
- 22678 bytes
- Lines
- 874
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hlinux/if_vlan.hlinux/netdevice.hnet/vxlan.hhinic3_hwif.hhinic3_nic_cfg.hhinic3_nic_dev.hhinic3_nic_io.hhinic3_rss.hhinic3_rx.hhinic3_tx.h
Detected Declarations
function hinic3_qp_irq_changefunction hinic3_config_num_qpsfunction hinic3_setup_num_qpsfunction hinic3_destroy_num_qpsfunction hinic3_alloc_txrxq_resourcesfunction hinic3_free_txrxq_resourcesfunction hinic3_configure_txrxqsfunction hinic3_configurefunction hinic3_remove_configurefunction hinic3_alloc_channel_resourcesfunction hinic3_free_channel_resourcesfunction hinic3_open_channelfunction hinic3_close_channelfunction hinic3_maybe_set_port_statefunction hinic3_print_link_messagefunction hinic3_vport_upfunction hinic3_vport_downfunction hinic3_openfunction hinic3_closefunction hinic3_set_feature_rx_csumfunction hinic3_set_feature_tsofunction hinic3_set_feature_lrofunction hinic3_set_feature_rx_cvlanfunction hinic3_set_feature_vlan_filterfunction hinic3_set_featuresfunction hinic3_ndo_set_featuresfunction hinic3_fix_featuresfunction hinic3_features_checkfunction hinic3_set_hw_featuresfunction hinic3_change_mtufunction hinic3_set_mac_addrfunction hinic3_vlan_rx_add_vidfunction hinic3_vlan_rx_kill_vidfunction hinic3_tx_timeoutfunction hinic3_get_stats64function hinic3_nic_set_rx_modefunction hinic3_set_netdev_ops
Annotated Snippet
static const struct net_device_ops hinic3_netdev_ops = {
.ndo_open = hinic3_open,
.ndo_stop = hinic3_close,
.ndo_set_features = hinic3_ndo_set_features,
.ndo_fix_features = hinic3_fix_features,
.ndo_features_check = hinic3_features_check,
.ndo_change_mtu = hinic3_change_mtu,
.ndo_set_mac_address = hinic3_set_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_vlan_rx_add_vid = hinic3_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = hinic3_vlan_rx_kill_vid,
.ndo_tx_timeout = hinic3_tx_timeout,
.ndo_get_stats64 = hinic3_get_stats64,
.ndo_set_rx_mode = hinic3_nic_set_rx_mode,
.ndo_start_xmit = hinic3_xmit_frame,
};
void hinic3_set_netdev_ops(struct net_device *netdev)
{
netdev->netdev_ops = &hinic3_netdev_ops;
}
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/if_vlan.h`, `linux/netdevice.h`, `net/vxlan.h`, `hinic3_hwif.h`, `hinic3_nic_cfg.h`, `hinic3_nic_dev.h`, `hinic3_nic_io.h`.
- Detected declarations: `function hinic3_qp_irq_change`, `function hinic3_config_num_qps`, `function hinic3_setup_num_qps`, `function hinic3_destroy_num_qps`, `function hinic3_alloc_txrxq_resources`, `function hinic3_free_txrxq_resources`, `function hinic3_configure_txrxqs`, `function hinic3_configure`, `function hinic3_remove_configure`, `function hinic3_alloc_channel_resources`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.