[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080716.204615.94767359.davem@davemloft.net>
Date: Wed, 16 Jul 2008 20:46:15 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: agl@...erialviolet.org
Cc: netdev@...r.kernel.org
Subject: Re: [Resend PATCH 2/3] TCP: options clean up
From: "Adam Langley" <agl@...erialviolet.org>
Date: Tue, 15 Jul 2008 09:30:40 -0700
> +struct tcp_out_options {
> + unsigned options; /* bit field of OPTION_* */
> + unsigned mss; /* 0 to disable */
> + unsigned ws; /* window scale, 0 to disable */
> + __u32 tsval, tsecr; /* need to include OPTION_TS */
> + unsigned num_sack_blocks; /* number of SACK blocks to include */
> +};
Please specify the type fully, f.e. 'unsigned int', but most of
the time fixed sized types are more appriate, and that is the case
here.
'mss' is a "u16"
You only have a tiny number of option bits, a 'u8' would suffice.
Window scale has a very small possible value range as well, it
also would fit in a 'u8'.
Those changes should make this structure 8 bytes.
--
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