net/sctp/stream_sched.c
Source file repositories/reference/linux-study-clean/net/sctp/stream_sched.c
File Facts
- System
- Linux kernel
- Corpus path
net/sctp/stream_sched.c- Extension
.c- Size
- 6440 bytes
- Lines
- 281
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hnet/sctp/sctp.hnet/sctp/sm.hnet/sctp/stream_sched.h
Detected Declarations
function addreschedfunction sctp_sched_fcfs_getfunction sctp_sched_fcfs_initfunction sctp_sched_fcfs_init_sidfunction sctp_sched_fcfs_free_sidfunction sctp_sched_fcfs_dequeue_donefunction sctp_sched_ops_fcfs_initfunction sctp_sched_ops_registerfunction sctp_sched_ops_initfunction sctp_sched_free_schedfunction sctp_sched_set_schedfunction sctp_sched_get_schedfunction sctp_sched_set_valuefunction sctp_sched_get_valuefunction sctp_sched_dequeue_donefunction sctp_sched_dequeue_commonfunction sctp_sched_init_sid
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/* SCTP kernel implementation
* (C) Copyright Red Hat Inc. 2017
*
* This file is part of the SCTP kernel implementation
*
* These functions manipulate sctp stream queue/scheduling.
*
* Please send any bug reports or fixes you make to the
* email addresched(es):
* lksctp developers <linux-sctp@vger.kernel.org>
*
* Written or modified by:
* Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
*/
#include <linux/list.h>
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>
#include <net/sctp/stream_sched.h>
/* First Come First Serve (a.k.a. FIFO)
* RFC DRAFT ndata Section 3.1
*/
static int sctp_sched_fcfs_set(struct sctp_stream *stream, __u16 sid,
__u16 value, gfp_t gfp)
{
return 0;
}
static int sctp_sched_fcfs_get(struct sctp_stream *stream, __u16 sid,
__u16 *value)
{
*value = 0;
return 0;
}
static int sctp_sched_fcfs_init(struct sctp_stream *stream)
{
return 0;
}
static int sctp_sched_fcfs_init_sid(struct sctp_stream *stream, __u16 sid,
gfp_t gfp)
{
return 0;
}
static void sctp_sched_fcfs_free_sid(struct sctp_stream *stream, __u16 sid)
{
}
static void sctp_sched_fcfs_enqueue(struct sctp_outq *q,
struct sctp_datamsg *msg)
{
}
static struct sctp_chunk *sctp_sched_fcfs_dequeue(struct sctp_outq *q)
{
struct sctp_stream *stream = &q->asoc->stream;
struct sctp_chunk *ch = NULL;
struct list_head *entry;
if (list_empty(&q->out_chunk_list))
goto out;
if (stream->out_curr) {
ch = list_entry(stream->out_curr->ext->outq.next,
struct sctp_chunk, stream_list);
} else {
entry = q->out_chunk_list.next;
ch = list_entry(entry, struct sctp_chunk, list);
}
sctp_sched_dequeue_common(q, ch);
out:
return ch;
}
static void sctp_sched_fcfs_dequeue_done(struct sctp_outq *q,
struct sctp_chunk *chunk)
{
}
static void sctp_sched_fcfs_sched_all(struct sctp_stream *stream)
{
}
static void sctp_sched_fcfs_unsched_all(struct sctp_stream *stream)
Annotation
- Immediate include surface: `linux/list.h`, `net/sctp/sctp.h`, `net/sctp/sm.h`, `net/sctp/stream_sched.h`.
- Detected declarations: `function addresched`, `function sctp_sched_fcfs_get`, `function sctp_sched_fcfs_init`, `function sctp_sched_fcfs_init_sid`, `function sctp_sched_fcfs_free_sid`, `function sctp_sched_fcfs_dequeue_done`, `function sctp_sched_ops_fcfs_init`, `function sctp_sched_ops_register`, `function sctp_sched_ops_init`, `function sctp_sched_free_sched`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.