Messages in this thread | | | Subject | Re: [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper | From | Matthieu Baerts <> | Date | Thu, 6 Aug 2020 12:47:08 +0200 |
| |
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
| |