[openib-general] [PATCHv2][SDP] Allow SDP to compile on 2.6.12-rc3
Fab Tillier
ftillier at infiniconsys.com
Thu Apr 21 16:31:59 PDT 2005
> From: Tom Duffy [mailto:tduffy at sun.com]
> Sent: Thursday, April 21, 2005 4:27 PM
>
> Ok, this patch now builds without warning on 2.6.11 and 2.6.12-rc3.
>
> Libor, what do you think?
>
> Signed-off-by: Tom Duffy <tduffy at sun.com>
>
> Index: linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c
> ===================================================================
> --- linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c
> (revision 2207)
> +++ linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c
(working
> copy)
> @@ -356,13 +356,23 @@ static int sdp_cm_listen_lookup(struct s
> */
> sk->sk_lingertime = listen_sk->sk_lingertime;
> sk->sk_rcvlowat = listen_sk->sk_rcvlowat;
> +/* XXX Remove once 2.6.12 is released */
> +#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11) )
> sk->sk_debug = listen_sk->sk_debug;
> sk->sk_localroute = listen_sk->sk_localroute;
> + sk->sk_rcvtstamp = listen_sk->sk_rcvtstamp;
> +#else
> + if (sock_flag(sk, SOCK_DBG))
> + sock_set_flag(listen_sk, SOCK_DBG);
> + if (sock_flag(sk, SOCK_LOCALROUTE))
> + sock_set_flag(listen_sk, SOCK_LOCALROUTE);
> + if (sock_flag(sk, SOCK_RCVTSTAMP))
> + sock_set_flag(listen_sk, SOCK_RCVTSTAMP);
> +#endif
Isn't the above change backwards? The original code was copying settings
from listen_sk to sk, and the new code seems to be checking flags in sk to
determine whether to set them in listen_sk.
- Fab
More information about the general
mailing list