RDMA/rxe: Disable ipv6 features when ipv6.disable in cmdline
Subsystems (2)
PATCH v4 1/1 RDMA/rxe: Disable ipv6 features when ipv6.disable in cmdline
From: Zhu Yanjun <[email protected]>
When ipv6.disable=1 is set in cmdline, ipv6 is actually disabled in the stack. As such, the operations of ipv6 in RXE will fail. So ipv6 features in RXE should also be disabled in RXE.
---V3->V4: I do not know how to reproduce Jason's problem. So I just ignore
the -EAFNOSUPPORT error. Hope this can fix Jason's problem.V2->V3: Remove print messageV1->V2: Modify the pr_info messages
--- drivers/infiniband/sw/rxe/rxe_net.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/infiniband/sw/rxe/rxe_net.c +5 -0
@@ -620,6 +620,11 @@ static int rxe_net_ipv6_init(void) recv_sockets.sk6 =rxe_setup_udp_tunnel (&init_net,htons (ROCE_V2_UDP_DPORT ), true);if (IS_ERR (recv_sockets.sk6)) { +/* Though IPv6 is not supported, IPv4 still needs to continue +*/ +if (PTR_ERR (recv_sockets.sk6) == -EAFNOSUPPORT ) +return 0 ; + recv_sockets.sk6 =NULL ;pr_err ("Failed to create IPv6 UDP tunnel\n" );return -1 ;
Signature · 1 line
2.27.0
Jason Gunthorpe
maintainerQuoted 6 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
When ipv6.disable=1 is set in cmdline, ipv6 is actually disabled in the stack. As such, the operations of ipv6 in RXE will fail. So ipv6 features in RXE should also be disabled in RXE.
Quoted 6 lines
Fixes 8700e3e7c4857 ("Soft RoCE driver")Reported-by Yi Zhang <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>Tested-by Yi Zhang <[email protected]>
Is this signature block accurate? I'm pretty sure Leon didn't look at this version of the patch.
Did Yi test this version, or is this leftover from a prior version?
Quoted 3 lines
---
V3->V4: I do not know how to reproduce Jason's problem. So I just ignore
the-EAFNOSUPPORTerror. Hope this can fix Jason's problem.
Who is Jason?
drivers/infiniband/sw/rxe/rxe_net.c static int rxe_net_ipv6_init(void) · line 626
Quoted 12 lines
drivers/infiniband/sw/rxe/rxe_net.c +4
-0@@ -620,6 +620,11 @@ static int rxe_net_ipv6_init(void) recv_sockets.sk6 =rxe_setup_udp_tunnel (&init_net,htons (ROCE_V2_UDP_DPORT ), true);if (IS_ERR (recv_sockets.sk6)) { +/* Though IPv6 is not supported, IPv4 still needs to continue +*/ +if (PTR_ERR (recv_sockets.sk6) == -EAFNOSUPPORT ) +return 0 ;
At least this looks OK to me and the original report certainly said the error was EAFNOSUPPORT
Please clarify what is going on with the signature block
Jason
Leon Romanovsky
maintainerQuoted 14 lines · Jason Gunthorpe
Quoted 6 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
When ipv6.disable=1 is set in cmdline, ipv6 is actually disabled in the stack. As such, the operations of ipv6 in RXE will fail. So ipv6 features in RXE should also be disabled in RXE.
Quoted 6 lines
Fixes 8700e3e7c4857 ("Soft RoCE driver")Reported-by Yi Zhang <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>Tested-by Yi Zhang <[email protected]>
Quoted 2 lines
Is this signature block accurate? I'm pretty sure Leon didn't look at this version of the patch.
Yes, I didn't look.
Quoted 9 lines
Did Yi test this version, or is this leftover from a prior version?
Quoted 3 lines
---
V3->V4: I do not know how to reproduce Jason's problem. So I just ignore
the-EAFNOSUPPORTerror. Hope this can fix Jason's problem.Who is Jason?
Quoted 15 lines
drivers/infiniband/sw/rxe/rxe_net.c static int rxe_net_ipv6_init(void) · line 626
Quoted 12 lines
drivers/infiniband/sw/rxe/rxe_net.c +4
-0@@ -620,6 +620,11 @@ static int rxe_net_ipv6_init(void) recv_sockets.sk6 =rxe_setup_udp_tunnel (&init_net,htons (ROCE_V2_UDP_DPORT ), true);if (IS_ERR (recv_sockets.sk6)) { +/* Though IPv6 is not supported, IPv4 still needs to continue +*/ +if (PTR_ERR (recv_sockets.sk6) == -EAFNOSUPPORT ) +return 0 ;At least this looks OK to me and the original report certainly said the error was EAFNOSUPPORT
The failure can be received only if udp_sock_create() fails in the rxe_setup_udp_tunnel(). It will print an error despite us not want this.
Quoted 2 lines
Please clarify what is going on with the signature block
And fix error print.
Thanks
Quoted 2 lines
Jason
Zhu Yanjun
maintainerQuoted 16 lines · Leon Romanovsky
Quoted 14 lines · Jason Gunthorpe
Quoted 12 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
When ipv6.disable=1 is set in cmdline, ipv6 is actually disabled in the stack. As such, the operations of ipv6 in RXE will fail. So ipv6 features in RXE should also be disabled in RXE.
Fixes 8700e3e7c4857 ("Soft RoCE driver")Reported-by Yi Zhang <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>Tested-by Yi Zhang <[email protected]>
Quoted 4 lines
Quoted 2 lines
Is this signature block accurate? I'm pretty sure Leon didn't look at this version of the patch.
Yes, I didn't look.
Sorry. This signature block is from the prior version. I will fix it.
Quoted 26 lines
Quoted 10 lines
Did Yi test this version, or is this leftover from a prior version?
Quoted 3 lines
---
V3->V4: I do not know how to reproduce Jason's problem. So I just ignore
the-EAFNOSUPPORTerror. Hope this can fix Jason's problem.Who is Jason?
Quoted 15 lines
drivers/infiniband/sw/rxe/rxe_net.c static int rxe_net_ipv6_init(void) · line 626
Quoted 12 lines
drivers/infiniband/sw/rxe/rxe_net.c +4
-0@@ -620,6 +620,11 @@ static int rxe_net_ipv6_init(void) recv_sockets.sk6 =rxe_setup_udp_tunnel (&init_net,htons (ROCE_V2_UDP_DPORT ), true);if (IS_ERR (recv_sockets.sk6)) { +/* Though IPv6 is not supported, IPv4 still needs to continue +*/ +if (PTR_ERR (recv_sockets.sk6) == -EAFNOSUPPORT ) +return 0 ;At least this looks OK to me and the original report certainly said the error was EAFNOSUPPORT
Quoted 7 lines
The failure can be received only if
udp_sock_create()fails in therxe_setup_udp_tunnel(). It will print an error despite us not want this.Quoted 2 lines
Please clarify what is going on with the signature block
And fix error print.
Got it. I will fix the signature block and error print.
Zhu Yanjun
Quoted 5 lines
Thanks
Quoted 2 lines
Jason