mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
inet: frags: add a pointer to struct netns_frags
In order to simplify the API, add a pointer to struct inet_frags. This will allow us to make things less complex. These functions no longer have a struct inet_frags parameter : inet_frag_destroy(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_put(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_kill(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frags_exit_net(struct netns_frags *nf /*, struct inet_frags *f */) ip6_expire_frag_queue(struct net *net, struct frag_queue *fq) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
787bea7748
commit
093ba72914
7 changed files with 48 additions and 41 deletions
|
@ -10,6 +10,7 @@ struct netns_frags {
|
|||
int high_thresh;
|
||||
int low_thresh;
|
||||
int max_dist;
|
||||
struct inet_frags *f;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -109,20 +110,20 @@ static inline int inet_frags_init_net(struct netns_frags *nf)
|
|||
atomic_set(&nf->mem, 0);
|
||||
return 0;
|
||||
}
|
||||
void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f);
|
||||
void inet_frags_exit_net(struct netns_frags *nf);
|
||||
|
||||
void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f);
|
||||
void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f);
|
||||
void inet_frag_kill(struct inet_frag_queue *q);
|
||||
void inet_frag_destroy(struct inet_frag_queue *q);
|
||||
struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
|
||||
struct inet_frags *f, void *key, unsigned int hash);
|
||||
|
||||
void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
|
||||
const char *prefix);
|
||||
|
||||
static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f)
|
||||
static inline void inet_frag_put(struct inet_frag_queue *q)
|
||||
{
|
||||
if (refcount_dec_and_test(&q->refcnt))
|
||||
inet_frag_destroy(q, f);
|
||||
inet_frag_destroy(q);
|
||||
}
|
||||
|
||||
static inline bool inet_frag_evicting(struct inet_frag_queue *q)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue