drivers/net/ethernet/intel/libeth/tx.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/libeth/tx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/libeth/tx.c- Extension
.c- Size
- 1111 bytes
- Lines
- 42
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/libeth/xdp.hpriv.h
Detected Declarations
function libeth_tx_complete_anyfunction libeth_attach_xdpexport libeth_tx_complete_anyexport libeth_attach_xdp
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (C) 2025 Intel Corporation */
#define DEFAULT_SYMBOL_NAMESPACE "LIBETH"
#include <net/libeth/xdp.h>
#include "priv.h"
/* Tx buffer completion */
DEFINE_STATIC_CALL_NULL(bulk, libeth_xdp_return_buff_bulk);
DEFINE_STATIC_CALL_NULL(xsk, libeth_xsk_buff_free_slow);
/**
* libeth_tx_complete_any - perform Tx completion for one SQE of any type
* @sqe: Tx buffer to complete
* @cp: polling params
*
* Can be used to complete both regular and XDP SQEs, for example when
* destroying queues.
* When libeth_xdp is not loaded, XDPSQEs won't be handled.
*/
void libeth_tx_complete_any(struct libeth_sqe *sqe, struct libeth_cq_pp *cp)
{
if (sqe->type >= __LIBETH_SQE_XDP_START)
__libeth_xdp_complete_tx(sqe, cp, static_call(bulk),
static_call(xsk));
else
libeth_tx_complete(sqe, cp);
}
EXPORT_SYMBOL_GPL(libeth_tx_complete_any);
/* Module */
void libeth_attach_xdp(const struct libeth_xdp_ops *ops)
{
static_call_update(bulk, ops ? ops->bulk : NULL);
static_call_update(xsk, ops ? ops->xsk : NULL);
}
EXPORT_SYMBOL_GPL(libeth_attach_xdp);
Annotation
- Immediate include surface: `net/libeth/xdp.h`, `priv.h`.
- Detected declarations: `function libeth_tx_complete_any`, `function libeth_attach_xdp`, `export libeth_tx_complete_any`, `export libeth_attach_xdp`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.