diff options
author | bz <bz@FreeBSD.org> | 2009-06-14 17:15:18 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-06-14 17:15:18 +0000 |
commit | 56983733aae4f7a2c06cbf59c81da67cde90790f (patch) | |
tree | 2692a18160e587aed5bdcbd2d8eac925ca8d7076 /sys/net/netisr.h | |
parent | ced07ef3b3639a83761cd0e5bb0df9418adc1d4d (diff) | |
download | FreeBSD-src-56983733aae4f7a2c06cbf59c81da67cde90790f.zip FreeBSD-src-56983733aae4f7a2c06cbf59c81da67cde90790f.tar.gz |
Add an optional callback function that will be invoked when a per-CPU
queue was drained. It will never fire for a directly dispatched packet.
You will most likely never want to use this for any ordinary netisr usage
and you will never blame netisr in case you try to use it and it does
not work as expected.
Reviewed by: rwatson
Diffstat (limited to 'sys/net/netisr.h')
-rw-r--r-- | sys/net/netisr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 5894d3d..ec7df3a 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -88,6 +88,7 @@ typedef void netisr_handler_t (struct mbuf *m); typedef struct mbuf *netisr_m2cpuid_t(struct mbuf *m, uintptr_t source, u_int *cpuid); typedef struct mbuf *netisr_m2flow_t(struct mbuf *m, uintptr_t source); +typedef void netisr_drainedcpu_t(u_int cpuid); #define NETISR_POLICY_SOURCE 1 /* Maintain source ordering. */ #define NETISR_POLICY_FLOW 2 /* Maintain flow ordering. */ @@ -101,6 +102,7 @@ struct netisr_handler { netisr_handler_t *nh_handler; /* Protocol handler. */ netisr_m2flow_t *nh_m2flow; /* Query flow for untagged packet. */ netisr_m2cpuid_t *nh_m2cpuid; /* Query CPU to process mbuf on. */ + netisr_drainedcpu_t *nh_drainedcpu; /* Callback when drained a queue. */ u_int nh_proto; /* Integer protocol ID. */ u_int nh_qlimit; /* Maximum per-CPU queue depth. */ u_int nh_policy; /* Work placement policy. */ |