[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6D8AF1C@saturn3.aculab.com>
Date: Tue, 20 Dec 2011 10:27:21 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Vijay Subramanian" <subramanian.vijay@...il.com>,
<netdev@...r.kernel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
"Eric Dumazet" <eric.dumazet@...il.com>,
<ilpo.jarvinen@...sinki.fi>, "H.K. Jerry Chu" <hkchu@...gle.com>
Subject: RE: [PATCH 1/1] tcp: Replace constants with #define macros
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 7f59ee9..874b043 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -238,6 +238,11 @@ struct tcp_sack_block {
> u32 end_seq;
> };
>
> +/*These are used to set the sack_ok field in struct
> tcp_options_received */
> +#define SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */
> +#define FACK_ENABLED (1 << 1) /*1 = FACK is enabled locally*/
> +#define DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
> +
Since that is a fairly public header, some namespace protection
might be sensible.
> - tcp_opt->sack_ok = (options >> 4) & 0x1;
> + tcp_opt->sack_ok = (options >> 4) & SACK_SEEN;
Looks to me like that 0x1 isn't SAC_SEEK! So this is now misleading.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists