include/linux/sunrpc/svc_rdma_pcl.h
Source file repositories/reference/linux-study-clean/include/linux/sunrpc/svc_rdma_pcl.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sunrpc/svc_rdma_pcl.h- Extension
.h- Size
- 3208 bytes
- Lines
- 129
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.h
Detected Declarations
struct svc_rdma_segmentstruct svc_rdma_chunkstruct svc_rdma_pclstruct svc_rdma_recv_ctxtfunction pcl_initfunction pcl_is_emptyfunction pcl_first_chunkfunction pcl_next_chunkfunction pcl_chunk_end_offset
Annotated Snippet
struct svc_rdma_segment {
u32 rs_handle;
u32 rs_length;
u64 rs_offset;
};
struct svc_rdma_chunk {
struct list_head ch_list;
u32 ch_position;
u32 ch_length;
u32 ch_payload_length;
u32 ch_segcount;
struct svc_rdma_segment ch_segments[];
};
struct svc_rdma_pcl {
unsigned int cl_count;
struct list_head cl_chunks;
};
/**
* pcl_init - Initialize a parsed chunk list
* @pcl: parsed chunk list to initialize
*
*/
static inline void pcl_init(struct svc_rdma_pcl *pcl)
{
INIT_LIST_HEAD(&pcl->cl_chunks);
}
/**
* pcl_is_empty - Return true if parsed chunk list is empty
* @pcl: parsed chunk list
*
*/
static inline bool pcl_is_empty(const struct svc_rdma_pcl *pcl)
{
return list_empty(&pcl->cl_chunks);
}
/**
* pcl_first_chunk - Return first chunk in a parsed chunk list
* @pcl: parsed chunk list
*
* Returns the first chunk in the list, or NULL if the list is empty.
*/
static inline struct svc_rdma_chunk *
pcl_first_chunk(const struct svc_rdma_pcl *pcl)
{
if (pcl_is_empty(pcl))
return NULL;
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
ch_list);
}
/**
* pcl_next_chunk - Return next chunk in a parsed chunk list
* @pcl: a parsed chunk list
* @chunk: chunk in @pcl
*
* Returns the next chunk in the list, or NULL if @chunk is already last.
*/
static inline struct svc_rdma_chunk *
pcl_next_chunk(const struct svc_rdma_pcl *pcl, struct svc_rdma_chunk *chunk)
{
if (list_is_last(&chunk->ch_list, &pcl->cl_chunks))
return NULL;
return list_next_entry(chunk, ch_list);
}
/**
* pcl_for_each_chunk - Iterate over chunks in a parsed chunk list
* @pos: the loop cursor
* @pcl: a parsed chunk list
*/
#define pcl_for_each_chunk(pos, pcl) \
for (pos = list_first_entry(&(pcl)->cl_chunks, struct svc_rdma_chunk, ch_list); \
&pos->ch_list != &(pcl)->cl_chunks; \
pos = list_next_entry(pos, ch_list))
/**
* pcl_for_each_segment - Iterate over segments in a parsed chunk
* @pos: the loop cursor
* @chunk: a parsed chunk
*/
#define pcl_for_each_segment(pos, chunk) \
for (pos = &(chunk)->ch_segments[0]; \
pos <= &(chunk)->ch_segments[(chunk)->ch_segcount - 1]; \
Annotation
- Immediate include surface: `linux/list.h`.
- Detected declarations: `struct svc_rdma_segment`, `struct svc_rdma_chunk`, `struct svc_rdma_pcl`, `struct svc_rdma_recv_ctxt`, `function pcl_init`, `function pcl_is_empty`, `function pcl_first_chunk`, `function pcl_next_chunk`, `function pcl_chunk_end_offset`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.