net/iucv/iucv.c
Source file repositories/reference/linux-study-clean/net/iucv/iucv.c
File Facts
- System
- Linux kernel
- Corpus path
net/iucv/iucv.c- Extension
.c- Size
- 50521 bytes
- Lines
- 1951
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/kernel_stat.hlinux/export.hlinux/module.hlinux/moduleparam.hlinux/spinlock.hlinux/kernel.hlinux/slab.hlinux/init.hlinux/interrupt.hlinux/list.hlinux/errno.hlinux/err.hlinux/device.hlinux/cpu.hlinux/reboot.hnet/iucv/iucv.hlinux/atomic.hasm/machine.hasm/ebcdic.hasm/io.hasm/irq.hasm/smp.h
Detected Declarations
struct iucv_irq_datastruct iucv_irq_liststruct iucv_cmd_controlstruct iucv_cmd_dplstruct iucv_cmd_dbstruct iucv_cmd_purgestruct iucv_cmd_set_maskstruct iucv_path_pendingstruct iucv_path_completestruct iucv_path_severedstruct iucv_path_quiescedstruct iucv_path_resumedstruct iucv_message_completestruct iucv_message_pendingenum iucv_command_codesfunction Authorfunction iucv_release_devicefunction __iucv_call_b2f0function iucv_call_b2f0function __iucv_query_maxconnfunction iucv_query_maxconnfunction iucv_allow_cpufunction iucv_block_cpufunction iucv_declare_cpufunction iucv_retrieve_cpufunction iucv_setmask_mpfunction iucv_setmask_upfunction iucv_enablefunction iucv_disablefunction iucv_cpu_deadfunction iucv_cpu_preparefunction iucv_cpu_onlinefunction iucv_cpu_down_prepfunction iucv_sever_pathidfunction __iucv_cleanup_queuefunction iucv_registerfunction iucv_unregisterfunction iucv_reboot_eventfunction iucv_path_acceptfunction iucv_path_connectfunction iucv_path_quiescefunction iucv_path_resumefunction iucv_path_severfunction iucv_message_purgefunction iucv_message_receive_iprmdatafunction __iucv_message_receivefunction iucv_message_receivefunction iucv_message_reject
Annotated Snippet
static int iucv_bus_match(struct device *dev, const struct device_driver *drv)
{
return 0;
}
const struct bus_type iucv_bus = {
.name = "iucv",
.match = iucv_bus_match,
};
EXPORT_SYMBOL(iucv_bus);
static struct device *iucv_root;
static void iucv_release_device(struct device *device)
{
kfree(device);
}
struct device *iucv_alloc_device(const struct attribute_group **attrs,
struct device_driver *driver,
void *priv, const char *fmt, ...)
{
struct device *dev;
va_list vargs;
char buf[20];
int rc;
dev = kzalloc_obj(*dev);
if (!dev)
goto out_error;
va_start(vargs, fmt);
vscnprintf(buf, sizeof(buf), fmt, vargs);
rc = dev_set_name(dev, "%s", buf);
va_end(vargs);
if (rc)
goto out_error;
dev->bus = &iucv_bus;
dev->parent = iucv_root;
dev->driver = driver;
dev->groups = attrs;
dev->release = iucv_release_device;
dev_set_drvdata(dev, priv);
return dev;
out_error:
kfree(dev);
return NULL;
}
EXPORT_SYMBOL(iucv_alloc_device);
static int iucv_available;
/* General IUCV interrupt structure */
struct iucv_irq_data {
u16 ippathid;
u8 ipflags1;
u8 iptype;
u32 res2[9];
};
struct iucv_irq_list {
struct list_head list;
struct iucv_irq_data data;
};
static struct iucv_irq_data *iucv_irq_data[NR_CPUS];
static cpumask_t iucv_buffer_cpumask = { CPU_BITS_NONE };
static cpumask_t iucv_irq_cpumask = { CPU_BITS_NONE };
/*
* Queue of interrupt buffers lock for delivery via the tasklet
* (fast but can't call smp_call_function).
*/
static LIST_HEAD(iucv_task_queue);
/*
* The tasklet for fast delivery of iucv interrupts.
*/
static void iucv_tasklet_fn(unsigned long);
static DECLARE_TASKLET_OLD(iucv_tasklet, iucv_tasklet_fn);
/*
* Queue of interrupt buffers for delivery via a work queue
* (slower but can call smp_call_function).
*/
static LIST_HEAD(iucv_work_queue);
/*
* The work element to deliver path pending interrupts.
*/
Annotation
- Immediate include surface: `linux/kernel_stat.h`, `linux/export.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/spinlock.h`, `linux/kernel.h`, `linux/slab.h`, `linux/init.h`.
- Detected declarations: `struct iucv_irq_data`, `struct iucv_irq_list`, `struct iucv_cmd_control`, `struct iucv_cmd_dpl`, `struct iucv_cmd_db`, `struct iucv_cmd_purge`, `struct iucv_cmd_set_mask`, `struct iucv_path_pending`, `struct iucv_path_complete`, `struct iucv_path_severed`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: pattern 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.