[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201112182745.18f29304@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 12 Nov 2020 18:27:45 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Saeed Mahameed <saeedm@...dia.com>,
Moshe Shemesh <moshe@...dia.com>,
Tariq Toukan <ttoukan.linux@...il.com>,
Boris Pismenny <borisp@...dia.com>
Subject: Re: [PATCH net] net/tls: Fix wrong record sn in async mode of
device resync
On Wed, 11 Nov 2020 14:55:56 +0200 Tariq Toukan wrote:
> +static inline bool tls_bigint_subtract(unsigned char *seq, int len, u16 n)
Please make n something more natural than u16. Helper should be
general, not just serving the current use case.
> + if (WARN_ON_ONCE(len != 8))
You can do a BUILD_BUG_ON on TLS_MAX_REC_SEQ_SIZE instead, please.
> + /* shouldn't get to wraparound, too long in async stage, something bad happened */
Umpf. Please wrap this comment.
In general for networking code prefer the 80 char wrapping.
Powered by blists - more mailing lists