diff mbox series

[PATCHv3,net-next,2/2] Revert "bareudp: Fixed bareudp receive handling"

Message ID ef2fdd7f2f102663461e8630ad1aad74bb1219a0.1610771509.git.lucien.xin@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: enable udp v6 sockets receiving v4 packets with UDP GRO | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 3 of 3 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Xin Long Jan. 16, 2021, 4:32 a.m. UTC
As udp_encap_enable() is already called in udp_tunnel_encap_enable()
since the last patch, and we don't need it any more. So remove it by
reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d.

v1->v2:
 - no change.
v2->v3:
 - add the missing signoff.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 drivers/net/bareudp.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Alexander Duyck Jan. 19, 2021, 10:21 p.m. UTC | #1
On Fri, Jan 15, 2021 at 8:35 PM Xin Long <lucien.xin@gmail.com> wrote:
>
> As udp_encap_enable() is already called in udp_tunnel_encap_enable()
> since the last patch, and we don't need it any more. So remove it by
> reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d.
>
> v1->v2:
>  - no change.
> v2->v3:
>  - add the missing signoff.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

It might make more sense to just roll this into the first patch since
what this is effectively doing is removing a spot that was invoking
the enable without adding the disable.

> ---
>  drivers/net/bareudp.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
> index 0965d13..57dfaf4 100644
> --- a/drivers/net/bareudp.c
> +++ b/drivers/net/bareudp.c
> @@ -240,12 +240,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);
>
> -       /* As the setup_udp_tunnel_sock does not call udp_encap_enable if the
> -        * socket type is v6 an explicit call to udp_encap_enable is needed.
> -        */
> -       if (sock->sk->sk_family == AF_INET6)
> -               udp_encap_enable();
> -
>         rcu_assign_pointer(bareudp->sock, sock);
>         return 0;
>  }
> --
> 2.1.0
>
diff mbox series

Patch

diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index 0965d13..57dfaf4 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -240,12 +240,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);
 
-	/* As the setup_udp_tunnel_sock does not call udp_encap_enable if the
-	 * socket type is v6 an explicit call to udp_encap_enable is needed.
-	 */
-	if (sock->sk->sk_family == AF_INET6)
-		udp_encap_enable();
-
 	rcu_assign_pointer(bareudp->sock, sock);
 	return 0;
 }