drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c- Extension
.c- Size
- 42470 bytes
- Lines
- 1564
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/inetdevice.hnet/netevent.hlinux/idr.hnet/dst_metadata.hnet/arp.hcmsg.hmain.h../nfp_net_repr.h../nfp_net.h
Detected Declarations
struct nfp_tun_pre_tun_rulestruct nfp_tun_active_tunsstruct route_ip_infostruct nfp_tun_active_tuns_v6struct route_ip_info_v6struct nfp_tun_req_route_ipv4struct nfp_tun_req_route_ipv6struct nfp_offloaded_routestruct nfp_tun_ipv4_addrstruct nfp_ipv4_addr_entrystruct nfp_tun_ipv6_addrstruct nfp_tun_mac_addr_offloadstruct nfp_neigh_update_workstruct nfp_tun_offloaded_macenum nfp_flower_mac_offload_cmdfunction nfp_tunnel_keep_alivefunction nfp_tunnel_keep_alive_v6function nfp_flower_xmit_tun_conffunction nfp_tun_mutual_linkfunction nfp_tun_link_predt_entriesfunction list_for_each_entry_safefunction nfp_tun_link_and_update_nn_entriesfunction nfp_tun_cleanup_nn_entriesfunction nfp_tun_unlink_and_update_nn_entriesfunction list_for_each_entry_safefunction nfp_tun_write_neighfunction nfp_tun_release_neigh_update_workfunction nfp_tun_neigh_updatefunction nfp_tun_alloc_neigh_update_workfunction nfp_tun_neigh_event_handlerfunction nfp_tunnel_request_route_v4function nfp_tunnel_request_route_v6function nfp_tun_write_ipv4_listfunction nfp_tunnel_add_ipv4_offfunction nfp_tunnel_del_ipv4_offfunction nfp_tun_write_ipv6_listfunction nfp_tunnel_add_ipv6_offfunction nfp_tunnel_put_ipv6_offfunction __nfp_tunnel_offload_macfunction nfp_tunnel_port_is_phy_reprfunction nfp_tunnel_get_mac_idx_from_phy_port_idfunction nfp_tunnel_get_global_mac_idx_from_idafunction nfp_tunnel_get_ida_from_global_mac_idxfunction nfp_tunnel_is_mac_idx_globalfunction nfp_tunnel_lookup_offloaded_macsfunction nfp_tunnel_offloaded_macs_inc_ref_and_linkfunction nfp_tunnel_add_shared_macfunction nfp_tunnel_del_shared_mac
Annotated Snippet
struct nfp_tun_pre_tun_rule {
__be32 flags;
__be16 port_idx;
__be16 vlan_tci;
__be32 host_ctx_id;
};
/**
* struct nfp_tun_active_tuns - periodic message of active tunnels
* @seq: sequence number of the message
* @count: number of tunnels report in message
* @flags: options part of the request
* @tun_info.ipv4: dest IPv4 address of active route
* @tun_info.egress_port: port the encapsulated packet egressed
* @tun_info.extra: reserved for future use
* @tun_info: tunnels that have sent traffic in reported period
*/
struct nfp_tun_active_tuns {
__be32 seq;
__be32 count;
__be32 flags;
struct route_ip_info {
__be32 ipv4;
__be32 egress_port;
__be32 extra[2];
} tun_info[];
};
/**
* struct nfp_tun_active_tuns_v6 - periodic message of active IPv6 tunnels
* @seq: sequence number of the message
* @count: number of tunnels report in message
* @flags: options part of the request
* @tun_info.ipv6: dest IPv6 address of active route
* @tun_info.egress_port: port the encapsulated packet egressed
* @tun_info.extra: reserved for future use
* @tun_info: tunnels that have sent traffic in reported period
*/
struct nfp_tun_active_tuns_v6 {
__be32 seq;
__be32 count;
__be32 flags;
struct route_ip_info_v6 {
struct in6_addr ipv6;
__be32 egress_port;
__be32 extra[2];
} tun_info[];
};
/**
* struct nfp_tun_req_route_ipv4 - NFP requests a route/neighbour lookup
* @ingress_port: ingress port of packet that signalled request
* @ipv4_addr: destination ipv4 address for route
* @reserved: reserved for future use
*/
struct nfp_tun_req_route_ipv4 {
__be32 ingress_port;
__be32 ipv4_addr;
__be32 reserved[2];
};
/**
* struct nfp_tun_req_route_ipv6 - NFP requests an IPv6 route/neighbour lookup
* @ingress_port: ingress port of packet that signalled request
* @ipv6_addr: destination ipv6 address for route
*/
struct nfp_tun_req_route_ipv6 {
__be32 ingress_port;
struct in6_addr ipv6_addr;
};
/**
* struct nfp_offloaded_route - routes that are offloaded to the NFP
* @list: list pointer
* @ip_add: destination of route - can be IPv4 or IPv6
*/
struct nfp_offloaded_route {
struct list_head list;
u8 ip_add[];
};
#define NFP_FL_IPV4_ADDRS_MAX 32
/**
* struct nfp_tun_ipv4_addr - set the IP address list on the NFP
* @count: number of IPs populated in the array
* @ipv4_addr: array of IPV4_ADDRS_MAX 32 bit IPv4 addresses
*/
struct nfp_tun_ipv4_addr {
__be32 count;
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/inetdevice.h`, `net/netevent.h`, `linux/idr.h`, `net/dst_metadata.h`, `net/arp.h`, `cmsg.h`, `main.h`.
- Detected declarations: `struct nfp_tun_pre_tun_rule`, `struct nfp_tun_active_tuns`, `struct route_ip_info`, `struct nfp_tun_active_tuns_v6`, `struct route_ip_info_v6`, `struct nfp_tun_req_route_ipv4`, `struct nfp_tun_req_route_ipv6`, `struct nfp_offloaded_route`, `struct nfp_tun_ipv4_addr`, `struct nfp_ipv4_addr_entry`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.