lkml.org 
[lkml]   [2006]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] [I/OAT] TCP recv offload to I/OAT
Hi!

> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -262,6 +262,9 @@
> #include <net/tcp.h>
> #include <net/xfrm.h>
> #include <net/ip.h>
> +#ifdef CONFIG_NET_DMA
> +#include <net/netdma.h>
> +#endif
>

Remove the ifdefs, move them inside .h if needed.

> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 7625eaf..9b6290d 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -71,6 +71,9 @@
> #include <net/inet_common.h>
> #include <linux/ipsec.h>
> #include <asm/unaligned.h>
> +#ifdef CONFIG_NET_DMA
> +#include <net/netdma.h>
> +#endif

Here, too.

> +#ifdef CONFIG_NET_DMA
> + if (copied_early)
> + __skb_queue_tail(&sk->sk_async_wait_queue, skb);
> + else
> +#endif
> if (eaten)
> __kfree_skb(skb);
> else

Could you #define copied_early to 0 and avoid ifdefs?

> @@ -1091,8 +1094,18 @@ process:
> bh_lock_sock(sk);
> ret = 0;
> if (!sock_owned_by_user(sk)) {
> - if (!tcp_prequeue(sk, skb))
> +#ifdef CONFIG_NET_DMA
> + struct tcp_sock *tp = tcp_sk(sk);
> + if (!tp->ucopy.dma_chan && tp->ucopy.locked_list)
> + tp->ucopy.dma_chan = get_softnet_dma();
> + if (tp->ucopy.dma_chan)
> + ret = tcp_v4_do_rcv(sk, skb);
> + else
> +#endif
> + {
> + if (!tcp_prequeue(sk, skb))
> ret = tcp_v4_do_rcv(sk, skb);
> + }
> } else

Wrong indentation...
Pavel
--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-06 13:10    [W:0.138 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site