[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200505181634.sd2m63wu7lf22z3x@kafai-mbp>
Date: Tue, 5 May 2020 11:16:34 -0700
From: Martin KaFai Lau <kafai@...com>
To: Stanislav Fomichev <sdf@...gle.com>
CC: <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
<davem@...emloft.net>, <ast@...nel.org>, <daniel@...earbox.net>,
Andrey Ignatov <rdna@...com>
Subject: Re: [PATCH bpf-next 3/4] net: refactor arguments of inet{,6}_bind
On Mon, May 04, 2020 at 10:34:29AM -0700, Stanislav Fomichev wrote:
> The intent is to add an additional bind parameter in the next commit.
> Instead of adding another argument, let's convert all existing
> flag arguments into an extendable bit field.
>
> No functional changes.
>
> Cc: Andrey Ignatov <rdna@...com>
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>
> ---
> include/net/inet_common.h | 6 +++++-
> include/net/ipv6_stubs.h | 2 +-
> net/core/filter.c | 6 ++++--
> net/ipv4/af_inet.c | 10 +++++-----
> net/ipv6/af_inet6.c | 10 +++++-----
> 5 files changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/include/net/inet_common.h b/include/net/inet_common.h
> index ae2ba897675c..a0fb68f5bf59 100644
> --- a/include/net/inet_common.h
> +++ b/include/net/inet_common.h
> @@ -35,8 +35,12 @@ int inet_shutdown(struct socket *sock, int how);
> int inet_listen(struct socket *sock, int backlog);
> void inet_sock_destruct(struct sock *sk);
> int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
> +// Don't allocate port at this moment, defer to connect.
nit. stay with /* ... */
> +#define BIND_FORCE_ADDRESS_NO_PORT (1 << 0)
> +// Grab and release socket lock.
> +#define BIND_WITH_LOCK (1 << 1)
Powered by blists - more mailing lists