* modprobe rdma_rxe failed when ipv6 disabled [not found] <1688338252.14107275.1614354083739.JavaMail.zimbra@redhat.com> @ 2021-02-26 15:47 ` Yi Zhang 2021-02-27 9:05 ` Zhu Yanjun 0 siblings, 1 reply; 7+ messages in thread From: Yi Zhang @ 2021-02-26 15:47 UTC (permalink / raw) To: linux-rdma Hello I found this failure after ipv6 disabled, is that expected? # modprobe rdma_rxe modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted # dmesg [ 596.783484] rdma_rxe: failed to create udp socket. err = -97 [ 596.789144] rdma_rxe: Failed to create IPv6 UDP tunnel # uname -r 5.11.0 Best Regards, Yi Zhang ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-26 15:47 ` modprobe rdma_rxe failed when ipv6 disabled Yi Zhang @ 2021-02-27 9:05 ` Zhu Yanjun 2021-02-27 10:18 ` Yi Zhang 0 siblings, 1 reply; 7+ messages in thread From: Zhu Yanjun @ 2021-02-27 9:05 UTC (permalink / raw) To: Yi Zhang; +Cc: RDMA mailing list On Fri, Feb 26, 2021 at 11:50 PM Yi Zhang <yi.zhang@redhat.com> wrote: > > Hello > > I found this failure after ipv6 disabled, is that expected? > > # modprobe rdma_rxe > modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted > > # dmesg > [ 596.783484] rdma_rxe: failed to create udp socket. err = -97 > [ 596.789144] rdma_rxe: Failed to create IPv6 UDP tunnel ipv6 in RXE is based on config_ipv6. If config_ipv6 is disabled. rxe will not implement ipv6 features. How do you disable ipv6 in your hosts? Zhu Yanjun > > # uname -r > 5.11.0 > > > > Best Regards, > Yi Zhang > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-27 9:05 ` Zhu Yanjun @ 2021-02-27 10:18 ` Yi Zhang 2021-02-27 15:32 ` Zhu Yanjun 0 siblings, 1 reply; 7+ messages in thread From: Yi Zhang @ 2021-02-27 10:18 UTC (permalink / raw) To: Zhu Yanjun; +Cc: RDMA mailing list On 2/27/21 5:05 PM, Zhu Yanjun wrote: > On Fri, Feb 26, 2021 at 11:50 PM Yi Zhang <yi.zhang@redhat.com> wrote: >> Hello >> >> I found this failure after ipv6 disabled, is that expected? >> >> # modprobe rdma_rxe >> modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted >> >> # dmesg >> [ 596.783484] rdma_rxe: failed to create udp socket. err = -97 >> [ 596.789144] rdma_rxe: Failed to create IPv6 UDP tunnel > ipv6 in RXE is based on config_ipv6. If config_ipv6 is disabled. rxe > will not implement ipv6 features. > How do you disable ipv6 in your hosts? Sorry, I should give the detailed info, I disabled it by kernel parameter: # cat /proc/cmdline | grep -o ipv6.disable=1 ipv6.disable=1 > Zhu Yanjun > >> # uname -r >> 5.11.0 >> >> >> >> Best Regards, >> Yi Zhang >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-27 10:18 ` Yi Zhang @ 2021-02-27 15:32 ` Zhu Yanjun 2021-02-27 15:35 ` Zhu Yanjun 2021-02-28 9:23 ` Leon Romanovsky 0 siblings, 2 replies; 7+ messages in thread From: Zhu Yanjun @ 2021-02-27 15:32 UTC (permalink / raw) To: Yi Zhang; +Cc: RDMA mailing list From 9dcdd09f3ca3cf222b563866acd91d18bc4b93d4 Mon Sep 17 00:00:00 2001 From: Zhu Yanjun <zyjzyj2000@gmail.com> Date: Sat, 27 Feb 2021 23:01:15 +0000 Subject: [PATCH 1/1] RDMA/rxe: Disable ipv6 features when ipv6.disable set in cmdline 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. Reported-by: Yi Zhang <yi.zhang@redhat.com> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> --- drivers/infiniband/sw/rxe/rxe_net.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index 0701bd1ffd1a..6ef092cb575e 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -72,6 +72,11 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev, struct dst_entry *ndst; struct flowi6 fl6 = { { 0 } }; + if (!ipv6_mod_enabled()) { + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); + return NULL; + } + memset(&fl6, 0, sizeof(fl6)); fl6.flowi6_oif = ndev->ifindex; memcpy(&fl6.saddr, saddr, sizeof(*saddr)); @@ -608,6 +613,10 @@ static int rxe_net_ipv4_init(void) static int rxe_net_ipv6_init(void) { #if IS_ENABLED(CONFIG_IPV6) + if (!ipv6_mod_enabled()) { + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); + return 0; + } recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net, htons(ROCE_V2_UDP_DPORT), true); -- 2.25.1 On Sat, Feb 27, 2021 at 6:18 PM Yi Zhang <yi.zhang@redhat.com> wrote: > > > > On 2/27/21 5:05 PM, Zhu Yanjun wrote: > > On Fri, Feb 26, 2021 at 11:50 PM Yi Zhang <yi.zhang@redhat.com> wrote: > >> Hello > >> > >> I found this failure after ipv6 disabled, is that expected? > >> > >> # modprobe rdma_rxe > >> modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted > >> > >> # dmesg > >> [ 596.783484] rdma_rxe: failed to create udp socket. err = -97 > >> [ 596.789144] rdma_rxe: Failed to create IPv6 UDP tunnel > > ipv6 in RXE is based on config_ipv6. If config_ipv6 is disabled. rxe > > will not implement ipv6 features. > > How do you disable ipv6 in your hosts? > Sorry, I should give the detailed info, I disabled it by kernel parameter: > # cat /proc/cmdline | grep -o ipv6.disable=1 > ipv6.disable=1 > > > > > Zhu Yanjun > > > >> # uname -r > >> 5.11.0 > >> > >> > >> > >> Best Regards, > >> Yi Zhang > >> > >> > ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-27 15:32 ` Zhu Yanjun @ 2021-02-27 15:35 ` Zhu Yanjun 2021-02-28 9:23 ` Leon Romanovsky 1 sibling, 0 replies; 7+ messages in thread From: Zhu Yanjun @ 2021-02-27 15:35 UTC (permalink / raw) To: Yi Zhang, Leon Romanovsky, Jason Gunthorpe; +Cc: RDMA mailing list Hi, Yi, Leon and Jason I made a patch to try to fix this problem. Please comment. Thanks a lot. Zhu Yanjun On Sat, Feb 27, 2021 at 11:32 PM Zhu Yanjun <zyjzyj2000@gmail.com> wrote: > > From 9dcdd09f3ca3cf222b563866acd91d18bc4b93d4 Mon Sep 17 00:00:00 2001 > From: Zhu Yanjun <zyjzyj2000@gmail.com> > Date: Sat, 27 Feb 2021 23:01:15 +0000 > Subject: [PATCH 1/1] RDMA/rxe: Disable ipv6 features when ipv6.disable set in > cmdline > > 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. > > Reported-by: Yi Zhang <yi.zhang@redhat.com> > Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> > --- > drivers/infiniband/sw/rxe/rxe_net.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/infiniband/sw/rxe/rxe_net.c > b/drivers/infiniband/sw/rxe/rxe_net.c > index 0701bd1ffd1a..6ef092cb575e 100644 > --- a/drivers/infiniband/sw/rxe/rxe_net.c > +++ b/drivers/infiniband/sw/rxe/rxe_net.c > @@ -72,6 +72,11 @@ static struct dst_entry *rxe_find_route6(struct > net_device *ndev, > struct dst_entry *ndst; > struct flowi6 fl6 = { { 0 } }; > > + if (!ipv6_mod_enabled()) { > + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); > + return NULL; > + } > + > memset(&fl6, 0, sizeof(fl6)); > fl6.flowi6_oif = ndev->ifindex; > memcpy(&fl6.saddr, saddr, sizeof(*saddr)); > @@ -608,6 +613,10 @@ static int rxe_net_ipv4_init(void) > static int rxe_net_ipv6_init(void) > { > #if IS_ENABLED(CONFIG_IPV6) > + if (!ipv6_mod_enabled()) { > + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); > + return 0; > + } > > recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net, > htons(ROCE_V2_UDP_DPORT), true); > -- > 2.25.1 > > On Sat, Feb 27, 2021 at 6:18 PM Yi Zhang <yi.zhang@redhat.com> wrote: > > > > > > > > On 2/27/21 5:05 PM, Zhu Yanjun wrote: > > > On Fri, Feb 26, 2021 at 11:50 PM Yi Zhang <yi.zhang@redhat.com> wrote: > > >> Hello > > >> > > >> I found this failure after ipv6 disabled, is that expected? > > >> > > >> # modprobe rdma_rxe > > >> modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted > > >> > > >> # dmesg > > >> [ 596.783484] rdma_rxe: failed to create udp socket. err = -97 > > >> [ 596.789144] rdma_rxe: Failed to create IPv6 UDP tunnel > > > ipv6 in RXE is based on config_ipv6. If config_ipv6 is disabled. rxe > > > will not implement ipv6 features. > > > How do you disable ipv6 in your hosts? > > Sorry, I should give the detailed info, I disabled it by kernel parameter: > > # cat /proc/cmdline | grep -o ipv6.disable=1 > > ipv6.disable=1 > > > > > > > > > Zhu Yanjun > > > > > >> # uname -r > > >> 5.11.0 > > >> > > >> > > >> > > >> Best Regards, > > >> Yi Zhang > > >> > > >> > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-27 15:32 ` Zhu Yanjun 2021-02-27 15:35 ` Zhu Yanjun @ 2021-02-28 9:23 ` Leon Romanovsky 2021-02-28 10:24 ` Yi Zhang 1 sibling, 1 reply; 7+ messages in thread From: Leon Romanovsky @ 2021-02-28 9:23 UTC (permalink / raw) To: Zhu Yanjun; +Cc: Yi Zhang, RDMA mailing list On Sat, Feb 27, 2021 at 11:32:35PM +0800, Zhu Yanjun wrote: > From 9dcdd09f3ca3cf222b563866acd91d18bc4b93d4 Mon Sep 17 00:00:00 2001 > From: Zhu Yanjun <zyjzyj2000@gmail.com> > Date: Sat, 27 Feb 2021 23:01:15 +0000 > Subject: [PATCH 1/1] RDMA/rxe: Disable ipv6 features when ipv6.disable set in > cmdline > > 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. > > Reported-by: Yi Zhang <yi.zhang@redhat.com> > Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> > --- > drivers/infiniband/sw/rxe/rxe_net.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/infiniband/sw/rxe/rxe_net.c > b/drivers/infiniband/sw/rxe/rxe_net.c > index 0701bd1ffd1a..6ef092cb575e 100644 > --- a/drivers/infiniband/sw/rxe/rxe_net.c > +++ b/drivers/infiniband/sw/rxe/rxe_net.c > @@ -72,6 +72,11 @@ static struct dst_entry *rxe_find_route6(struct > net_device *ndev, > struct dst_entry *ndst; > struct flowi6 fl6 = { { 0 } }; > > + if (!ipv6_mod_enabled()) { > + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); > + return NULL; > + } > + Except the info message, the change looks valid. pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); -> pr_info("IPv6 is disabled"); Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: modprobe rdma_rxe failed when ipv6 disabled 2021-02-28 9:23 ` Leon Romanovsky @ 2021-02-28 10:24 ` Yi Zhang 0 siblings, 0 replies; 7+ messages in thread From: Yi Zhang @ 2021-02-28 10:24 UTC (permalink / raw) To: Leon Romanovsky, Zhu Yanjun; +Cc: RDMA mailing list Tested-by: Yi Zhang <yi.zhang@redhat.com> # modprobe rdma_rxe # dmesg [ 598.134022] rdma_rxe: IPv6 is disabled by ipv6.disable=1 in cmdline [ 598.134026] rdma_rxe: loaded On 2/28/21 5:23 PM, Leon Romanovsky wrote: > On Sat, Feb 27, 2021 at 11:32:35PM +0800, Zhu Yanjun wrote: >> From 9dcdd09f3ca3cf222b563866acd91d18bc4b93d4 Mon Sep 17 00:00:00 2001 >> From: Zhu Yanjun <zyjzyj2000@gmail.com> >> Date: Sat, 27 Feb 2021 23:01:15 +0000 >> Subject: [PATCH 1/1] RDMA/rxe: Disable ipv6 features when ipv6.disable set in >> cmdline >> >> 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. >> >> Reported-by: Yi Zhang <yi.zhang@redhat.com> >> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> >> --- >> drivers/infiniband/sw/rxe/rxe_net.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c >> b/drivers/infiniband/sw/rxe/rxe_net.c >> index 0701bd1ffd1a..6ef092cb575e 100644 >> --- a/drivers/infiniband/sw/rxe/rxe_net.c >> +++ b/drivers/infiniband/sw/rxe/rxe_net.c >> @@ -72,6 +72,11 @@ static struct dst_entry *rxe_find_route6(struct >> net_device *ndev, >> struct dst_entry *ndst; >> struct flowi6 fl6 = { { 0 } }; >> >> + if (!ipv6_mod_enabled()) { >> + pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); >> + return NULL; >> + } >> + > > Except the info message, the change looks valid. > > pr_info("IPv6 is disabled by ipv6.disable=1 in cmdline"); > -> > pr_info("IPv6 is disabled"); > > Thanks, > Reviewed-by: Leon Romanovsky <leonro@nvidia.com> > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-02-28 10:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1688338252.14107275.1614354083739.JavaMail.zimbra@redhat.com>
2021-02-26 15:47 ` modprobe rdma_rxe failed when ipv6 disabled Yi Zhang
2021-02-27 9:05 ` Zhu Yanjun
2021-02-27 10:18 ` Yi Zhang
2021-02-27 15:32 ` Zhu Yanjun
2021-02-27 15:35 ` Zhu Yanjun
2021-02-28 9:23 ` Leon Romanovsky
2021-02-28 10:24 ` Yi Zhang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox