From: Martin Varghese <martinvarghesenokia@gmail.com>
To: Taehee Yoo <ap420073@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_create()
Date: Mon, 9 Mar 2020 11:33:04 +0530 [thread overview]
Message-ID: <20200309060304.GA16103@martin-VirtualBox> (raw)
In-Reply-To: <20200308011930.6923-1-ap420073@gmail.com>
On Sun, Mar 08, 2020 at 01:19:30AM +0000, Taehee Yoo wrote:
> In the current code, udp_encap_enable() is called in
> bareudp_socket_create().
> But, setup_udp_tunnel_sock() internally calls udp_encap_enable().
> So, udp_encap_enable() is unnecessary.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> ---
> drivers/net/bareudp.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
> index c9d0d68467f7..71a2f480f70e 100644
> --- a/drivers/net/bareudp.c
> +++ b/drivers/net/bareudp.c
> @@ -250,9 +250,6 @@ static int bareudp_socket_create(struct bareudp_dev *bareudp, __be16 port)
> tunnel_cfg.encap_destroy = NULL;
> setup_udp_tunnel_sock(bareudp->net, sock, &tunnel_cfg);
>
> - if (sock->sk->sk_family == AF_INET6)
> - udp_encap_enable();
> -
udp_encap_enable is not called for V6 sockets so we need to have the above lines of code
> rcu_assign_pointer(bareudp->sock, sock);
> return 0;
> }
> --
> 2.17.1
>
next prev parent reply other threads:[~2020-03-09 6:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-08 1:19 [PATCH net-next 3/3] bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_create() Taehee Yoo
2020-03-09 6:03 ` Martin Varghese [this message]
2020-03-10 1:17 ` Taehee Yoo
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=20200309060304.GA16103@martin-VirtualBox \
--to=martinvarghesenokia@gmail.com \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.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).