lkml.org 
[lkml]   [2020]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper
From
Date
Hi Tim,

Thank you for having sent the patch!

On 06/08/2020 08:41, Tim Froidcoeur wrote:
> Refactor the fastreuse update code in inet_csk_get_port into a small
> helper function that can be called from other places.

(...)

> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index afaf582a5aa9..3b46b1f6086e 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -266,7 +266,7 @@ inet_csk_find_open_port(struct sock *sk, struct inet_bind_bucket **tb_ret, int *
> static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
> struct sock *sk)
> {
> - kuid_t uid = sock_i_uid(sk);
> + kuid_t uid = sock_i_uid((struct sock *)sk);

It seems there is a left over from a previous version. This modification
is no longer needed.

>
> if (tb->fastreuseport <= 0)
> return 0;
> @@ -296,6 +296,57 @@ static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
> ipv6_only_sock(sk), true, false);
> }
>
> +void inet_csk_update_fastreuse(struct inet_bind_bucket *tb,
> + struct sock *sk)
> +{
> + kuid_t uid = sock_i_uid((struct sock *)sk);

Same here.

May you send a v2 without these two casts please?

Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

\
 
 \ /
  Last update: 2020-08-06 19:07    [W:0.036 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site