NewMadeleine

Documentation

« back to PM2 home.
nm_drv.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2006-2025 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef NM_DRV_H
17#define NM_DRV_H
18
19#ifndef NM_PRIVATE_H
20# error "Cannot include this file directly. Please include <nm_private.h>"
21#endif
22
30
35{
38
40 const char*driver_id;
42 puk_component_t assembly;
44 puk_context_t minidriver_context;
47
50
53
55 const char*url;
56
57#ifdef PIOMAN
58 piom_topo_obj_t ltask_binding;
59 piom_ltask_group_t ltask_group;
60 piom_ltask_group_t ltask_group_send;
61 piom_ltask_group_t ltask_group_recv;
62#endif /* PIOMAN */
63 /* NM core object. */
65
66#ifdef NMAD_PROFILE
67 struct
68 {
69 unsigned long long n_recv_packets;
70 unsigned long long n_recv_bytes;
71 unsigned long long n_send_packets;
72 unsigned long long n_send_bytes;
74 unsigned long long n_send_prefetch;
75 unsigned long long n_failed_send_prefetch_too_many_blocks;
76 unsigned long long n_failed_send_prefetch_bad_shape;
77 unsigned long long n_failed_send_prefetch_data_copy;
78 unsigned long long n_failed_send_prefetch_too_big;
79 unsigned long long n_recv_prefetch;
80 unsigned long long send_prefetch_bytes;
81 unsigned long long recv_prefetch_bytes;
82 unsigned long long n_send_unfetch;
83 unsigned long long n_recv_unfetch;
84
85 double total_send_post_usecs;
86 double total_send_poll_usecs;
87 double total_send_completion_usecs;
88 double total_recv_post_usecs;
89 double total_recv_poll_usecs;
90 double total_send_prefetch_usecs;
91 double total_recv_prefetch_usecs;
92 double total_time_usecs;
93 double average_send_bw_Mbps;
94 double average_send_prefetch_bw_Mbps;
95 double average_recv_prefetch_bw_Mbps;
96 } profiling;
97#endif /* NMAD_PROFILE */
98};
99
101
102#define NM_FOR_EACH_DRIVER(p_drv, p_core) \
103 puk_list_foreach(nm_drv, p_drv, &(p_core)->driver_list)
104
105
106#endif /* NM_DRV_H */
PUK_LIST_DECLARE_TYPE(nm_drv)
PUK_LIST_CREATE_FUNCS(nm_drv)
Core NewMadeleine structure.
Definition nm_core.h:43
a driver.
Definition nm_drv.h:35
struct nm_minidriver_properties_s props
driver properties (profile & capabilities)
Definition nm_drv.h:52
struct nm_pkt_wrap_s * p_pw_recv_any
global recv request if driver supports recv_probe_any
Definition nm_drv.h:49
const char * driver_id
unique ID for the driver, in the form component/network_id
Definition nm_drv.h:40
struct nm_core * p_core
Definition nm_drv.h:64
puk_context_t minidriver_context
driver contexts for given component
Definition nm_drv.h:44
PUK_LIST_LINK(nm_drv)
link to insert this driver into the driver_list in core
puk_component_t assembly
Component assembly associated to the driver.
Definition nm_drv.h:42
const char * url
driver url, as string
Definition nm_drv.h:55
const struct nm_minidriver_iface_s * driver
Driver interface, for use when no instance is needed.
Definition nm_drv.h:46
Interface driver for the 'NewMad_minidriver' component interface.
Internal packet wrapper.