Subject: Re: [PATCH 2/5] soreuseport: TCP/IPv4 implementation

From: Steffen Klassert <[email-masked]>
Date: Fri, 25 Jan 2013 09:08:11 +0100

On Tue, Jan 22, 2013 at 11:50:24AM -0800, Tom Herbert wrote:
> -	} else if (tb->fastreuse &&
> -		   (!sk->sk_reuse || sk->sk_state == TCP_LISTEN))
> -		tb->fastreuse = 0;
> +		if (sk->sk_reuseport) {
> +			tb->fastreuseport = 1;
> +			tb->fastuid = uid;
> +		} else {
> +			tb->fastreuseport = 0;
> +			tb->fastuid = 0;
> +		}
> +	} else {
> +		if (tb->fastreuse &&
> +		    (!sk->sk_reuse || sk->sk_state == TCP_LISTEN))
> +			tb->fastreuse = 0;
> +		if (tb->fastreuseport &&
> +		    (!sk->sk_reuseport || !uid_eq(tb->fastuid, uid))) {
> +			tb->fastreuseport = 0;
> +			tb->fastuid = 0;
> +		}

I'm getting the following compile error due to the 0 assignment
to tb->fastuid:

net/ipv4/inet_connection_sock.c: In function ‘inet_csk_get_port’:
net/ipv4/inet_connection_sock.c:232:16: error: incompatible types when assigning to type ‘kuid_t’ from type ‘int’
net/ipv4/inet_connection_sock.c:241:16: error: incompatible types when assigning to type ‘kuid_t’ from type ‘int’
  CC      lib/show_mem.o
  CC      net/ipv6/ipv6_sockglue.o
make[3]: *** [net/ipv4/inet_connection_sock.o] Error 1
make[2]: *** [net/ipv4] Error 2

I have not seen this reported so far what surprises me a bit.
This is net-next from today complied with
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3