Thread (4 messages) 4 messages, 2 authors, 2020-08-06

Re: [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper

From: Matthieu Baerts <hidden>
Date: 2020-08-06 17:06:02
Also in: lkml

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.
(...)
quoted hunk ↗ jump to hunk
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.
quoted hunk ↗ jump to hunk
  
  	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help