[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZL54mOdTzX5Z9Fji@corigine.com>
Date: Mon, 24 Jul 2023 15:11:52 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Dmitry Safonov <dima@...sta.com>
Cc: David Ahern <dsahern@...nel.org>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Ard Biesheuvel <ardb@...nel.org>,
Bob Gilligan <gilligan@...sta.com>,
Dan Carpenter <error27@...il.com>,
David Laight <David.Laight@...lab.com>,
Dmitry Safonov <0x7f454c46@...il.com>,
Donald Cassidy <dcassidy@...hat.com>,
Eric Biggers <ebiggers@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Francesco Ruggeri <fruggeri05@...il.com>,
"Gaillardetz, Dominik" <dgaillar@...na.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Ivan Delalande <colona@...sta.com>,
Leonard Crestez <cdleonard@...il.com>,
Salam Noureddine <noureddine@...sta.com>,
"Tetreault, Francois" <ftetreau@...na.com>, netdev@...r.kernel.org,
Steen Hegelund <Steen.Hegelund@...rochip.com>
Subject: Re: [PATCH v8.1 net-next 01/23] net/tcp: Prepare tcp_md5sig_pool for
TCP-AO
On Fri, Jul 21, 2023 at 05:18:52PM +0100, Dmitry Safonov wrote:
Hi Dmitry,
some minor nits from my side.
...
> +/**
> + * tcp_sigpool_start - disable bh and start using tcp_sigpool_ahash
> + * @id: tcp_sigpool that was previously allocated by tcp_sigpool_alloc_ahash()
> + * @c: returned tcp_sigpool for usage (uninitialized on failure)
> + */
> +int tcp_sigpool_start(unsigned int id, struct tcp_sigpool *c);
> +/**
> + * tcp_sigpool_end - enable bh and stop using tcp_sigpool
nit: as this is a kernel doc, please document @c here.
> + */
> +void tcp_sigpool_end(struct tcp_sigpool *c);
> +size_t tcp_sigpool_algo(unsigned int id, char *buf, size_t buf_len);
> /* - functions */
> int tcp_v4_md5_hash_skb(char *md5_hash, const struct tcp_md5sig_key *key,
> const struct sock *sk, const struct sk_buff *skb);
...
> @@ -1439,8 +1443,7 @@ int tcp_v4_md5_hash_skb(char *md5_hash, const struct tcp_md5sig_key *key,
> const struct sock *sk,
> const struct sk_buff *skb)
> {
> - struct tcp_md5sig_pool *hp;
> - struct ahash_request *req;
> + struct tcp_sigpool hp;
> const struct tcphdr *th = tcp_hdr(skb);
> __be32 saddr, daddr;
nit: please consider using reverse xmas tree - longest line to shortest -
for these local variable declarations.
const struct tcphdr *th = tcp_hdr(skb);
struct tcp_sigpool hp;
__be32 saddr, daddr;
Likewise, elsewhere, when it can be done without excess churn.
...
Powered by blists - more mailing lists