Netchannel: default, find, add to socket
Subsystems (3)
Implement finding of correct netchannel for buffer, default netchannel and attach a netchannel to a socket
Signed-off-by Kelly Daly <[email protected]>
---
include/linux/netchannel.h +8 -0
@@ -19,6 +19,7 @@ struct netchannel {void (*netchan_callb)(struct netchannel *);void *netchan_callb_data;unsigned long netchan_head; +wait_queue_head_t wq; }; extern void netchannel_init(struct netchannel *,
@@ -56,6 +57,11 @@ static inline unsigned char *netchan_bufreturn netchan_buf_base (bp) + bp->netchan_buf_offset; } +static inline int netchan_data_len (const struct netchannel_buftrailer *bp) +{ +return bp->netchan_buf_len - bp->netchan_buf_offset; +} +extern int netchannel_enqueue (struct netchannel *,struct netchannel_buftrailer *);extern struct netchannel_buftrailer *__netchannel_dequeue (struct netchannel *);static inline struct netchannel_buftrailer *netchannel_dequeue (struct netchannel *np)
@@ -65,6 +71,10 @@ static inline struct netchannel_buftrail return __netchannel_dequeue(np); } +extern struct netchannel *find_netchannel (const struct netchannel_buftrailer *bp); +extern int sock_add_netchannel (struct sock *sk);extern struct sk_buff *skb_netchan_graft (struct netchannel_buftrailer *,gfp_t );#endif /* _LINUX_NETCHANNEL_H */
include/net/inet_hashtables.h +3 -0
@@ -418,4 +418,7 @@ static inline struct sock *inet_lookup(sextern int inet_hash_connect (struct inet_timewait_death_row *death_row,struct sock *sk); +extern void inet_hash_register (u8 proto,struct inet_hashinfo *hashinfo); +extern struct sock *inet_lookup_proto (u8 protocol,u32 saddr,u16 sport,u32 daddr,u16 dport,int ifindex); +#endif /* _INET_HASHTABLES_H */
include/net/sock.h +1 -0
@@ -196,6 +196,7 @@ struct sock {unsigned short sk_type;int sk_rcvbuf;socket_lock_t sk_lock; +struct netchannel *sk_channel;wait_queue_head_t *sk_sleep;struct dst_entry *sk_dst_cache;struct xfrm_policy *sk_policy[2 ];
net/core/dev.c +88 -0
126 lines not on this page · raw message
David Miller
maintainerFrom: Kelly Daly <[email protected]>
Date: Thu, 27 Jul 2006 10:50:00 +1000
Quoted 3 lines
Implement finding of correct netchannel for buffer, default netchannel and attach a netchannel to a socket
Signed-off-by Kelly Daly <[email protected]>
Patch is still corrupted. My tolerance on this matter is growing
extremely thin. Send these patches to yourself and try to apply
them, it will save me a lot of time.
Quoted 10 lines
include/linux/netchannel.h +2
-0@@ -65,6 +71,10 @@ static inline struct netchannel_buftrail return __netchannel_dequeue(np); } +extern struct netchannel *find_netchannel (const struct netchannel_buftrailer *bp); +extern int sock_add_netchannel (struct sock *sk);extern struct sk_buff *skb_netchan_graft (struct netchannel_buftrailer *,gfp_t );#endif /* _LINUX_NETCHANNEL_H */ diff -urp
davem/include/net/inet_hashtables.hkelly_new/include/net/inet_hashtables.h
This patch hunk states there are 10 lines in the new section of the file, yet the hunk is truncated at 8 lines.