On Wed, Mar 24, 2021 at 3:53 AM Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > > On Sun, Mar 07, 2021 at 12:59:07AM +0800, Zhu Yanjun wrote: > > From: Zhu Yanjun <zyjzyj2000@xxxxxxxxx> > > > > 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 <yi.zhang@xxxxxxxxxx> > > Signed-off-by: Zhu Yanjun <zyjzyj2000@xxxxxxxxx> > > Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx> > > Tested-by: Yi Zhang <yi.zhang@xxxxxxxxxx> > > V1->V2: Modify the pr_info messages > > 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 > > +++ 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"); > > + return NULL; > > + } > > Why doesn't a similar touch of ipv6_stub in > drivers/infiniband/core/addr.c need a similar protection? Got it. This patch is for RXE. I will make a similar commit of ipv6_stub in drivers/infiniband/core/addr.c soon. > > Also do not print. I will remove print in the next patch. Zhu Yanjun > > Jason