net/openvswitch/meter.h
Source file repositories/reference/linux-study-clean/net/openvswitch/meter.h
File Facts
- System
- Linux kernel
- Corpus path
net/openvswitch/meter.h- Extension
.h- Size
- 1337 bytes
- Lines
- 63
- 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/init.hlinux/module.hlinux/kernel.hlinux/netlink.hlinux/openvswitch.hlinux/skbuff.hlinux/bits.hflow.h
Detected Declarations
struct datapathstruct dp_meter_bandstruct dp_meterstruct dp_meter_instancestruct dp_meter_table
Annotated Snippet
struct dp_meter_band {
u32 type;
u32 rate;
u32 burst_size;
u64 bucket; /* 1/1000 packets, or in bits */
struct ovs_flow_stats stats;
};
struct dp_meter {
spinlock_t lock; /* Per meter lock */
struct rcu_head rcu;
u32 id;
u16 kbps:1, keep_stats:1;
u16 n_bands;
u32 max_delta_t;
u64 used;
struct ovs_flow_stats stats;
struct dp_meter_band bands[] __counted_by(n_bands);
};
struct dp_meter_instance {
struct rcu_head rcu;
u32 n_meters;
struct dp_meter __rcu *dp_meters[] __counted_by(n_meters);
};
struct dp_meter_table {
struct dp_meter_instance __rcu *ti;
u32 count;
u32 max_meters_allowed;
};
extern struct genl_family dp_meter_genl_family;
int ovs_meters_init(struct datapath *dp);
void ovs_meters_exit(struct datapath *dp);
bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
struct sw_flow_key *key, u32 meter_id);
#endif /* meter.h */
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/kernel.h`, `linux/netlink.h`, `linux/openvswitch.h`, `linux/skbuff.h`, `linux/bits.h`, `flow.h`.
- Detected declarations: `struct datapath`, `struct dp_meter_band`, `struct dp_meter`, `struct dp_meter_instance`, `struct dp_meter_table`.
- 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.