diff options
| author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-15 05:39:14 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 15:26:42 -0400 |
| commit | 1e4b82873af0f21002e37a81ef063d2e5410deb3 (patch) | |
| tree | 9c4054c8393f03bae9565f98a109cc5721cf490f /include | |
| parent | 321a3a99e4717b960e21c62fc6a140d21453df7f (diff) | |
[INET]: Consolidate the xxx_frag_destroy
To make in possible we need to know the exact frag queue
size for inet_frags->mem management and two callbacks:
* to destoy the skb (optional, used in conntracks only)
* to free the queue itself (mandatory, but later I plan to
move the allocation and the destruction of frag_queues
into the common place, so this callback will most likely
be optional too).
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/inet_frag.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index e374412ff42b..2dd1cd4e7f44 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
| @@ -33,16 +33,21 @@ struct inet_frags { | |||
| 33 | rwlock_t lock; | 33 | rwlock_t lock; |
| 34 | u32 rnd; | 34 | u32 rnd; |
| 35 | int nqueues; | 35 | int nqueues; |
| 36 | int qsize; | ||
| 36 | atomic_t mem; | 37 | atomic_t mem; |
| 37 | struct timer_list secret_timer; | 38 | struct timer_list secret_timer; |
| 38 | struct inet_frags_ctl *ctl; | 39 | struct inet_frags_ctl *ctl; |
| 39 | 40 | ||
| 40 | unsigned int (*hashfn)(struct inet_frag_queue *); | 41 | unsigned int (*hashfn)(struct inet_frag_queue *); |
| 42 | void (*destructor)(struct inet_frag_queue *); | ||
| 43 | void (*skb_free)(struct sk_buff *); | ||
| 41 | }; | 44 | }; |
| 42 | 45 | ||
| 43 | void inet_frags_init(struct inet_frags *); | 46 | void inet_frags_init(struct inet_frags *); |
| 44 | void inet_frags_fini(struct inet_frags *); | 47 | void inet_frags_fini(struct inet_frags *); |
| 45 | 48 | ||
| 46 | void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f); | 49 | void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f); |
| 50 | void inet_frag_destroy(struct inet_frag_queue *q, | ||
| 51 | struct inet_frags *f, int *work); | ||
| 47 | 52 | ||
| 48 | #endif | 53 | #endif |
