Thread: [Netnice-commitlog] netnice : Linux/include/linux tailq.h,NONE,1.1.4.2 sched.h,1.1.1.2,1.1.1.2.2.1 s
Status: Alpha
Brought to you by:
taost6
From: enferex <en...@us...> - 2005-11-11 04:25:31
|
Update of /cvsroot/netnice/Linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20624/include/linux Modified Files: Tag: netnice2612 sched.h skbuff.h Added Files: Tag: netnice2612 tailq.h Log Message: Updated nnfs_ops.c with the FreeBSD fix, to hopefully stop drainage of packets to deleted vif nodes Index: sched.h =================================================================== RCS file: /cvsroot/netnice/Linux/include/linux/sched.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.2.2.1 diff -u -d -r1.1.1.2 -r1.1.1.2.2.1 --- sched.h 5 Nov 2005 21:17:20 -0000 1.1.1.2 +++ sched.h 11 Nov 2005 04:25:15 -0000 1.1.1.2.2.1 @@ -570,6 +570,7 @@ struct audit_context; /* See audit.c */ struct mempolicy; +struct pvifnet; struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ @@ -707,6 +708,10 @@ /* journalling filesystem info */ void *journal_info; +#ifdef CONFIG_NETNICE + struct pvifnet* p_vifnet; +#endif + /* VM state */ struct reclaim_state *reclaim_state; --- NEW FILE: tailq.h --- /* Code copied verbatim from FreeBSD for use by netnice for linux. */ #ifndef _TAILQ_H #define _TAILQ_H /* * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. */ /* * Tail queue declarations. */ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ } #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } /* * Tail queue functions. */ #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_FOREACH(var, head, field) \ for ((var) = TAILQ_FIRST((head)); \ (var); \ (var) = TAILQ_NEXT((var), field)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = TAILQ_LAST((head), headname); \ (var); \ (var) = TAILQ_PREV((var), headname, field)) #define TAILQ_INIT(head) do { \ TAILQ_FIRST((head)) = NULL; \ (head)->tqh_last = &TAILQ_FIRST((head)); \ } while (0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ TAILQ_NEXT((elm), field)->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ TAILQ_NEXT((elm), field) = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ TAILQ_FIRST((head))->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ TAILQ_FIRST((head)) = (elm); \ (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ } while (0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ TAILQ_NEXT((elm), field) = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ } while (0) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_REMOVE(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field)) != NULL) \ TAILQ_NEXT((elm), field)->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ } while (0) #endif Index: skbuff.h =================================================================== RCS file: /cvsroot/netnice/Linux/include/linux/skbuff.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.2.2.1 diff -u -d -r1.1.1.2 -r1.1.1.2.2.1 --- skbuff.h 5 Nov 2005 21:17:33 -0000 1.1.1.2 +++ skbuff.h 11 Nov 2005 04:25:15 -0000 1.1.1.2.2.1 @@ -29,6 +29,10 @@ #include <linux/net.h> #include <net/checksum.h> +#ifdef CONFIG_NETNICE +#include <net/vif.h> +#endif + #define HAVE_ALLOC_SKB /* For the drivers to know */ #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ #define SLAB_SKB /* Slabified skbuffs */ @@ -285,6 +289,11 @@ #endif +#ifdef CONFIG_NETNICE + struct pvifnet *skb_pvif; /*vif pointer list*/ + u_int skb_stamp; + struct vif_pkt skb_pkt; +#endif /* These elements must be at the end, see alloc_skb() for details. */ unsigned int truesize; |