Date: Fri, 5 Mar 2021 09:25:15 +0100 From: Hans Petter Selasky <hps@selasky.org> To: "Pokala, Ravi" <rpokala@panasas.com>, "Foster, Greg" <gfoster@panasas.com>, "freebsd-infiniband@freebsd.org" <freebsd-infiniband@freebsd.org> Subject: Re: Changing Between Infiniband Connected Mode and Datagram Mode at Runtime on FreeBSD 12.2 Message-ID: <f70f2ac0-1019-185d-ee55-8143db888449@selasky.org> In-Reply-To: <55947DF3-4697-4F44-BAAD-5A70136036D7@panasas.com> References: <BYAPR08MB60387BEF8DB1F72ADEAF480FB4979@BYAPR08MB6038.namprd08.prod.outlook.com> <fff5885b-468e-7bef-d9d7-fc6e43d5b246@selasky.org> <08557FD0-003C-4802-A588-92298A54D4CD@panasas.com> <71b1d84d-917e-3f6a-cad6-794f06fefaee@selasky.org> <55947DF3-4697-4F44-BAAD-5A70136036D7@panasas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/4/21 8:37 PM, Pokala, Ravi wrote: > -----Original Message----- > From: Hans Petter Selasky <hps@selasky.org> > Date: 2021-03-04, Thursday at 11:11 > To: Ravi Pokala <rpokala@panasas.com>, "Foster, Greg" <gfoster@panasas.com>, "freebsd-infiniband@freebsd.org" <freebsd-infiniband@freebsd.org> > Subject: Re: Changing Between Infiniband Connected Mode and Datagram Mode at Runtime on FreeBSD 12.2 > > On 3/4/21 8:00 PM, Pokala, Ravi wrote: > > -----Original Message----- > > From: Hans Petter Selasky <hps@selasky.org> > > Date: 2021-03-04, Thursday at 02:13 > > To: "Foster, Greg" <gfoster@panasas.com>, "freebsd-infiniband@freebsd.org" <freebsd-infiniband@freebsd.org> > > Cc: Ravi Pokala <rpokala@panasas.com> > > Subject: Re: Changing Between Infiniband Connected Mode and Datagram Mode at Runtime on FreeBSD 12.2 > > > > On 3/4/21 3:49 AM, Foster, Greg wrote: > > > Hello FreeBSD IB, > > > > > > What is the procedure to change between Infiniband Connected Mode and Datagram Mode > > > at runtime on FreeBSD 12.2? > > > > > > I've seen different references on the WEB, but the procedure still seems unclear. > > > > > > In one reference https://lists.freebsd.org/pipermail/freebsd-infiniband/2013-May/000032.html > > > refers to the Linux procedure, which is not applicable on FreeBSD. > > > > > > Another reference, https://wiki.freebsd.org/InfiniBand, implies the driver must be recompiled > > > to change modes. > > > > > > Yet another, https://lists.freebsd.org/pipermail/freebsd-infiniband/2013-June/000047.html > > > Suggests it can be done at runtime to add a tuneable/sysctl but doesn't specify any details... > > > > > > Is the solution to maybe compile the drivers twice, once for CM and once for DM, keeping both around > > > and loading the desired one? > > > > Hi, > > > > For IPoIB there is an option you need to set at compile time for this > > feature to be activated: > > > > sys/conf/options:IPOIB_CM opt_ofed.h > > > > --HPS > > > > Hi Hans, > > > > It looks like IPOIB_CM causes CONFIG_INFINIBAND_IPOIB_CM to be defined. I see that CONFIG_INFINIBAND_IPOIB_CM adds fields to structures, which is why it can't be a run-time or boot-time tunable. :-( > > > > But it looks like the changes associated with CONFIG_INFINIBAND_IPOIB_CM are all additions, not replacing datagram code with connected-mode code. Other than having unnecessary fields in structures, would there be any harm in building with IPOIB_CM, but running in datagram mode? Or are you saying that we first need to build with IPOIB_CM, and then we can use a tunable to switch modes? > > > > Hi, > > At the moment there is no tunable for this feature, as I'm aware of. The > easiest would be to build ipoib two times, one time with CM enabled and > one time without CM enabled. > > --HPS > > Hi Hans, > > Couldn't we do the following: > > (a) Get rid of IPOIB_CM as a compile-time option > (b) Remove CONFIG_INFINIBAND_IPOIB_CM guards when defining structures > (c) Change CONFIG_INFINIBAND_IPOIB_CM guards on the code, to being conditional on a new tunable. > > It seems like that would do what Greg and I are looking for. Hi, Sounds good to me. If you want to work on it, please go ahead and make a review. --HPS > > Alternatively, we could *not* do (a) or (b), just add the check for the tunable described in (c), and then build with IPOIB_CM. That would minimize the change, and still give us control of the code via the tunable. > > If either of those sound okay, I'm happy to make the change myself and put you down at the reviewer in Phabricator. > > Thanks, > > Ravi >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f70f2ac0-1019-185d-ee55-8143db888449>