Re: [PATCH v8.1 net-next 01/23] net/tcp: Prepare tcp_md5sig_pool for TCP-AO
From: Dmitry Safonov <hidden>
Date: 2023-07-24 16:06:40
Also in:
lkml
Hi Simon, On 7/24/23 14:11, Simon Horman wrote:
On Fri, Jul 21, 2023 at 05:18:52PM +0100, Dmitry Safonov wrote: Hi Dmitry, some minor nits from my side. ...quoted
+/** + * 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_sigpoolnit: as this is a kernel doc, please document @c here.
Thanks, yeah, I also noticed that on netdev/kdoc and there are some other nits on the patchwork that Intel's build bot didn't report to my surprise. Will address them in v9.
quoted
+ */ +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);...quoted
@@ -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.
Yeah, fail enough, I usually keep it Xmas-like, but sometimes they slip
in unnoticed. I'll take a look over the patches.
Thanks,
Dmitry