drivers/net/ethernet/netronome/nfp/nfdk/ipsec.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/nfdk/ipsec.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/nfdk/ipsec.c- Extension
.c- Size
- 486 bytes
- Lines
- 22
- 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
net/xfrm.h../nfp_net.hnfdk.h
Detected Declarations
function nfp_nfdk_ipsec_tx
Annotated Snippet
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/* Copyright (C) 2023 Corigine, Inc */
#include <net/xfrm.h>
#include "../nfp_net.h"
#include "nfdk.h"
u64 nfp_nfdk_ipsec_tx(u64 flags, struct sk_buff *skb)
{
struct xfrm_state *x = xfrm_input_state(skb);
struct iphdr *iph = ip_hdr(skb);
if (x->xso.dev && (x->xso.dev->features & NETIF_F_HW_ESP_TX_CSUM)) {
if (iph->version == 4)
flags |= NFDK_DESC_TX_L3_CSUM;
flags |= NFDK_DESC_TX_L4_CSUM;
}
return flags;
}
Annotation
- Immediate include surface: `net/xfrm.h`, `../nfp_net.h`, `nfdk.h`.
- Detected declarations: `function nfp_nfdk_ipsec_tx`.
- 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.