From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Tim Froidcoeur <tim.froidcoeur@tessares.net>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
KOVACS Krisztian <hidden@balabit.hu>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper
Date: Thu, 6 Aug 2020 12:47:08 +0200 [thread overview]
Message-ID: <a4143368-bfe8-a3f1-c6e0-753359388191@tessares.net> (raw)
In-Reply-To: <20200806064109.183059-2-tim.froidcoeur@tessares.net>
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
next prev parent reply other threads:[~2020-08-06 17:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 6:41 [PATCH net 0/2] net: initialize fastreuse on inet_inherit_port Tim Froidcoeur
2020-08-06 6:41 ` [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper Tim Froidcoeur
2020-08-06 10:47 ` Matthieu Baerts [this message]
2020-08-06 6:41 ` [PATCH net 2/2] net: initialize fastreuse on inet_inherit_port Tim Froidcoeur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4143368-bfe8-a3f1-c6e0-753359388191@tessares.net \
--to=matthieu.baerts@tessares.net \
--cc=davem@davemloft.net \
--cc=hidden@balabit.hu \
--cc=kaber@trash.net \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tim.froidcoeur@tessares.net \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).