netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Martin Varghese <martinvarghesenokia@gmail.com>,
	netdev@vger.kernel.org, davem@davemloft.net,
	martin.varghese@nokia.com, Taehee Yoo <ap420073@gmail.com>
Subject: Re: [PATCH net-next] bareudp: Fixed bareudp receive handling
Date: Tue, 10 Mar 2020 10:28:40 -0700	[thread overview]
Message-ID: <89faace0-7c11-b338-282b-b9e409677ba4@gmail.com> (raw)
In-Reply-To: <1583859760-18364-1-git-send-email-martinvarghesenokia@gmail.com>



On 3/10/20 10:02 AM, Martin Varghese wrote:
> From: Martin Varghese <martin.varghese@nokia.com>
> 
> Reverted commit "2baecda bareudp: remove unnecessary udp_encap_enable() in
> bareudp_socket_create()"
> 
> An explicit call to udp_encap_enable is needed as the setup_udp_tunnel_sock
> does not call udp_encap_enable if the if the socket is of type v6.
> 
> Bareudp device uses v6 socket to receive v4 & v6 traffic
> 
> Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
> Fixes: 2baecda37f4e ("bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_create()")

Please CC the author of recent patches, do not hide,
and to be clear, it is not about blaming, just information.

> ---
>  drivers/net/bareudp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
> index 71a2f48..c9d0d68 100644
> --- a/drivers/net/bareudp.c
> +++ b/drivers/net/bareudp.c
> @@ -250,6 +250,9 @@ 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);
>  

This might need a comment. 

Can this condition be false ?

According to your changelog, it seems not.

Give to reviewers more chance to avoid future mistakes.

Thanks.

> +	if (sock->sk->sk_family == AF_INET6)
> +		udp_encap_enable();
> +
>  	rcu_assign_pointer(bareudp->sock, sock);
>  	return 0;
>  }
> 

  reply	other threads:[~2020-03-10 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 17:02 [PATCH net-next] bareudp: Fixed bareudp receive handling Martin Varghese
2020-03-10 17:28 ` Eric Dumazet [this message]
2020-03-11  0:56   ` Martin Varghese

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=89faace0-7c11-b338-282b-b9e409677ba4@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=martin.varghese@nokia.com \
    --cc=martinvarghesenokia@gmail.com \
    --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).