[Netnice-commitlog] netnice : linux-netnice/net/ipv6 ip6_output.c,1.1.1.1,1.1.1.1.2.1 raw.c,1.1.1.1,
Status: Alpha
Brought to you by:
taost6
From: bhatt k. m. <rou...@us...> - 2006-02-16 13:12:15
|
Update of /cvsroot/netnice/linux-netnice/net/ipv6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19888/net/ipv6 Modified Files: Tag: patch1 ip6_output.c raw.c tcp_ipv6.c udp.c Log Message: patch1 initial netnice patch applied to linux kernel version 2.6.15. developers please do not commit to the main branch directly. keep it clean. create separate branches for experimental patches. the procedure is cvs co linux-netnice [hack hack & hack till you are satisfied] //create a tag cvs tag -b "tag-name" cvs update -r "tag-name" cvs commit this way you won't end up commiting to the main tree thanks --Kartikey BHATT Index: udp.c =================================================================== RCS file: /cvsroot/netnice/linux-netnice/net/ipv6/udp.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- udp.c 16 Feb 2006 11:07:51 -0000 1.1.1.1 +++ udp.c 16 Feb 2006 13:11:50 -0000 1.1.1.1.2.1 @@ -322,6 +322,22 @@ goto try_again; } +#ifdef CONFIG_NETNICE +int vif_process_udp_ipv6(struct sk_buff *skb, struct sock *sk) +{ + int ret; + + if ((ret = sock_queue_rcv_skb(sk, skb)) < 0) { + UDP6_INC_STATS_BH(UDP_MIB_INERRORS); + kfree_skb(skb); + } + UDP6_INC_STATS_BH(UDP_MIB_INDATAGRAMS); + sock_put(sk); + + return ret; +} +#endif + static void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, int type, int code, int offset, __u32 info) { @@ -369,6 +385,10 @@ return 0; } +#ifdef CONFIG_NETNICE + return vif_input_incoming(skb, sk, vif_process_udp_ipv6); +#endif + if (sock_queue_rcv_skb(sk,skb)<0) { UDP6_INC_STATS_BH(UDP_MIB_INERRORS); kfree_skb(skb); @@ -528,8 +548,12 @@ /* deliver */ udpv6_queue_rcv_skb(sk, skb); +#ifdef CONFIG_NETNICE + do {} while (0); +#else sock_put(sk); return(0); +#endif short_packet: if (net_ratelimit()) Index: tcp_ipv6.c =================================================================== RCS file: /cvsroot/netnice/linux-netnice/net/ipv6/tcp_ipv6.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- tcp_ipv6.c 16 Feb 2006 11:07:52 -0000 1.1.1.1 +++ tcp_ipv6.c 16 Feb 2006 13:11:50 -0000 1.1.1.1.2.1 @@ -1546,6 +1546,27 @@ return 0; } +#ifdef CONFIG_NETNICE +int vif_process_tcp_ipv6(struct sk_buff *skb, struct sock *sk) +{ + int ret = 0; + + skb->dev = NULL; + + bh_lock_sock(sk); + if (!sock_owned_by_user(sk)) { + if (!tcp_prequeue(sk, skb)) + ret = tcp_v6_do_rcv(sk, skb); + } else + sk_add_backlog(sk, skb); + bh_unlock_sock(sk); + + sock_put(sk); + + return ret; +} +#endif + static int tcp_v6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) { struct sk_buff *skb = *pskb; @@ -1601,6 +1622,10 @@ if (sk_filter(sk, skb, 0)) goto discard_and_relse; +#ifdef CONFIG_NETNICE + return vif_input_incoming(skb, sk, vif_process_tcp_ipv6); +#endif + skb->dev = NULL; bh_lock_sock(sk); Index: ip6_output.c =================================================================== RCS file: /cvsroot/netnice/linux-netnice/net/ipv6/ip6_output.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- ip6_output.c 16 Feb 2006 11:07:59 -0000 1.1.1.1 +++ ip6_output.c 16 Feb 2006 13:11:50 -0000 1.1.1.1.2.1 @@ -84,9 +84,17 @@ memcpy(skb->data - hh_alen, hh->hh_data, hh_alen); read_unlock_bh(&hh->hh_lock); skb_push(skb, hh->hh_len); +#ifdef CONFIG_NETNICE + return vif_input_outgoing(skb, hh->hh_output); +#else return hh->hh_output(skb); +#endif } else if (dst->neighbour) +#ifdef CONFIG_NETNICE + return vif_input_outgoing(skb, dst->neighbour->output); +#else return dst->neighbour->output(skb); +#endif IP6_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); kfree_skb(skb); Index: raw.c =================================================================== RCS file: /cvsroot/netnice/linux-netnice/net/ipv6/raw.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- raw.c 16 Feb 2006 11:07:49 -0000 1.1.1.1 +++ raw.c 16 Feb 2006 13:11:50 -0000 1.1.1.1.2.1 @@ -314,6 +314,14 @@ return 0; } +#ifdef CONFIG_NETNICE +int vif_process_raw_ipv6(struct sk_buff *skb, struct sock *sk) +{ + rawv6_rcv_skb(sk, skb); + return 0; +} +#endif + /* * This is next to useless... * if we demultiplex in network layer we don't need the extra call @@ -355,6 +363,10 @@ } } +#ifdef CONFIG_NETNICE + return vif_input_incoming(skb, sk, vif_process_raw_ipv6); +#endif + rawv6_rcv_skb(sk, skb); return 0; } |