public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* Setting RoCE to v2 automatically
@ 2017-03-22 23:30 Robert LeBlanc
       [not found] ` <CAANLjFqEeB6JM8pFDFcTRJCL9FPc4hUai45rNPf72rNb8g3NEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Robert LeBlanc @ 2017-03-22 23:30 UTC (permalink / raw)
  To: linux-rdma

How are people setting their adapters to use RoCEv2 automatically?
I've created a udev rule that creates the directory in configfs and
echos into default_roce_mode and it works fine if I run it with
'udevadm test', but on boot or module load it is not working (I do
have the udev rule in initrd and it is creating the VFs, and renaming
the adapters from my other rules). I was trying to get it all done
through udev so that it happens when the module is loaded or at boot.
We are not using OFED and the 4.9.14 kernel on CentOS 7.2.

My current rule is:
ACTION=="add", SUBSYSTEM=="net", ATTR{type}=="1",
ATTRS{subsystem_vendor}=="0x15b3", \
ATTRS{device}=="0x101?", WAIT_FOR="/sys/kernel/config/rdma_cm", \
   PROGRAM=="/bin/sh -ec 'D=$(ls /sys$DEVPATH/device/infiniband); \
       C=/sys/kernel/config/rdma_cm; if [ ! -d $C/$D ]; \
       then mkdir $C/$D; fi; \
       echo RoCE v2 > $C/$D/ports/1/default_roce_mode'"

I've tried a variation using the infiniband subsystem, but it had the
same result.

Any ideas?

Thanks,
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Setting RoCE to v2 automatically
       [not found] ` <CAANLjFqEeB6JM8pFDFcTRJCL9FPc4hUai45rNPf72rNb8g3NEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-03-23 19:14   ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2017-03-23 19:14 UTC (permalink / raw)
  To: Robert LeBlanc; +Cc: linux-rdma

[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]

On Wed, Mar 22, 2017 at 05:30:11PM -0600, Robert LeBlanc wrote:
> How are people setting their adapters to use RoCEv2 automatically?
> I've created a udev rule that creates the directory in configfs and
> echos into default_roce_mode and it works fine if I run it with
> 'udevadm test', but on boot or module load it is not working (I do
> have the udev rule in initrd and it is creating the VFs, and renaming
> the adapters from my other rules). I was trying to get it all done
> through udev so that it happens when the module is loaded or at boot.
> We are not using OFED and the 4.9.14 kernel on CentOS 7.2.
>
> My current rule is:
> ACTION=="add", SUBSYSTEM=="net", ATTR{type}=="1",
> ATTRS{subsystem_vendor}=="0x15b3", \
> ATTRS{device}=="0x101?", WAIT_FOR="/sys/kernel/config/rdma_cm", \
>    PROGRAM=="/bin/sh -ec 'D=$(ls /sys$DEVPATH/device/infiniband); \
>        C=/sys/kernel/config/rdma_cm; if [ ! -d $C/$D ]; \
>        then mkdir $C/$D; fi; \
>        echo RoCE v2 > $C/$D/ports/1/default_roce_mode'"
>
> I've tried a variation using the infiniband subsystem, but it had the
> same result.
>
> Any ideas?

Maybe, the best way for the ecosystem in 2017 will be to set
RoCE v2 as a default in future kernels.

>
> Thanks,
> ----------------
> Robert LeBlanc
> PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-23 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22 23:30 Setting RoCE to v2 automatically Robert LeBlanc
     [not found] ` <CAANLjFqEeB6JM8pFDFcTRJCL9FPc4hUai45rNPf72rNb8g3NEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-23 19:14   ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox