Manual loading of mlx4_en
Subsystems (2)
Hi all,
I have a usability concern with the mlx4_en ethernet network driver. The module aliases for all the supported devices are on the mlx4_core module, so mlx4_core gets loaded automatically, but mlx4_en does not. I must load mlx4_en manually (kernel 3.12.)
May I ask why the mlx4 driver was split into mlx4_core and mlx4_en in the first place?
I have worked around the problem with the following modprobe directive:
install mlx4_core /sbin/modprobe --ignore-install mlx4_core && /sbin/modprobe mlx4_en
But this is kind of a hack and I would expect the right driver to load automatically without magic.
Shouldn't the module aliases be attached to mlx4_en instead of mlx4_core?
Thanks,
Signature · 2 lines
Jean Delvare SUSE L3 Support
Hi,
Quoted 9 lines · Jean Delvare
Hi all,
I have a usability concern with the
mlx4_enethernet network driver. The module aliases for all the supported devices are on themlx4_coremodule, somlx4_coregets loaded automatically, butmlx4_endoes not. I must loadmlx4_enmanually (kernel 3.12.)May I ask why the mlx4 driver was split into
mlx4_coreandmlx4_enin the first place?
Connect-X card can support both Ethernet and Infiniband link layer - you can switch between link layers without replacing the hardware.
To prevent code duplication, there is a single lower layer driver - mlx4_core and two separate upper layer drivers - mlx4_en and mlx4_ib.
Since kernel 3.13 mlx4_core is loading automatically the upper layer driver using request_module():
b046ffe net/mlx4_core: Load higher level modules according to ports type
Quoted 5 lines
I have worked around the problem with the following modprobe directive:
install
mlx4_core/sbin/modprobe--ignore-installmlx4_core&&/sbin/modprobemlx4_en
Quoted 8 lines
But this is kind of a hack and I would expect the right driver to load automatically without magic.
Shouldn't the module aliases be attached to
mlx4_eninstead ofmlx4_core?Thanks,
Amir
Hi Amir,
Quoted 11 lines · Amir Vadai
Quoted 7 lines · Jean Delvare
I have a usability concern with the
mlx4_enethernet network driver. The module aliases for all the supported devices are on themlx4_coremodule, somlx4_coregets loaded automatically, butmlx4_endoes not. I must loadmlx4_enmanually (kernel 3.12.)May I ask why the mlx4 driver was split into
mlx4_coreandmlx4_enin the first place?Connect-X card can support both Ethernet and Infiniband link layer - you can switch between link layers without replacing the hardware.
Quoted 6 lines
To prevent code duplication, there is a single lower layer driver -
mlx4_coreand two separate upper layer drivers -mlx4_enandmlx4_ib.Since kernel 3.13
mlx4_coreis loading automatically the upper layer driver usingrequest_module():
b046ffenet/mlx4_core: Load higher level modules according to ports type
Many thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
Signature · 2 lines
Jean Delvare SUSE L3 Support
Quoted 17 lines · Jean Delvare
Hi Amir,
Quoted 14 lines · Amir Vadai
Quoted 7 lines · Jean Delvare
I have a usability concern with the
mlx4_enethernet network driver. The module aliases for all the supported devices are on themlx4_coremodule, somlx4_coregets loaded automatically, butmlx4_endoes not. I must loadmlx4_enmanually (kernel 3.12.)May I ask why the mlx4 driver was split into
mlx4_coreandmlx4_enin the first place?Connect-X card can support both Ethernet and Infiniband link layer - you can switch between link layers without replacing the hardware.
To prevent code duplication, there is a single lower layer driver -
mlx4_coreand two separate upper layer drivers -mlx4_enandmlx4_ib.
Quoted 8 lines
Quoted 3 lines
Since kernel 3.13
mlx4_coreis loading automatically the upper layer driver usingrequest_module():
b046ffenet/mlx4_core: Load higher level modules according to ports typeMany thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
I don't think there is any dependency for that commit. If you're backporting it, also take a small fix to it:
f24f790 net/mlx4_core: Load the Eth driver first
Amir
Quoted 8 lines · Amir Vadai
Quoted 3 lines · Jean Delvare
Many thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
I don't think there is any dependency for that commit. If you're backporting it, also take a small fix to it:
f24f790net/mlx4_core: Load the Eth driver first
Thanks for the hint. I suppose I should pick 7855bff4 "net/mlx4_core:
Load the IB driver when the device supports IBoE" as well?
Signature · 2 lines
Jean Delvare SUSE L3 Support
Quoted 6 lines · Jean Delvare
Quoted 5 lines · Amir Vadai
Quoted 3 lines · Jean Delvare
Many thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
Quoted 7 lines
Quoted 3 lines
I don't think there is any dependency for that commit. If you're backporting it, also take a small fix to it:
f24f790net/mlx4_core: Load the Eth driver firstThanks for the hint. I suppose I should pick
7855bff4"net/mlx4_core:
Load the IB driver when the device supports IBoE" as well?
Right - missed it.
Amir
Quoted 7 lines · Amir Vadai
Quoted 6 lines · Jean Delvare
Quoted 5 lines · Amir Vadai
Quoted 3 lines · Jean Delvare
Many thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
I don't think there is any dependency for that commit. If you're backporting it, also take a small fix to it:
f24f790net/mlx4_core: Load the Eth driver firstThanks for the hint. I suppose I should pick
7855bff4"net/mlx4_core:
Load the IB driver when the device supports IBoE" as well?Right - missed it.
Thanks for the pointers.
Looking at f24f790f, I'm wondering if request_module(EN_DRV_NAME) ought to be used instead of _nowait to guarantee the desired effect. Suppose for example that the process is migrated to a different cpu between the two request_module calls, the second one could complete before the first one no?
Quoted 15 lines · Benjamin Poirier
Quoted 14 lines · Amir Vadai
Quoted 13 lines · Jean Delvare
Quoted 8 lines · Amir Vadai
Quoted 3 lines · Jean Delvare
Many thanks for the fast and detailed answer! I'll go backport this commit to kernel 3.12 (and 3.0, hopefully it doesn't have too many dependencies?)
I don't think there is any dependency for that commit. If you're backporting it, also take a small fix to it:
f24f790net/mlx4_core: Load the Eth driver firstThanks for the hint. I suppose I should pick
7855bff4"net/mlx4_core:
Load the IB driver when the device supports IBoE" as well?
Quoted 9 lines
Quoted 1 line
Right - missed it.
Thanks for the pointers.
Looking atf24f790f, I'm wondering ifrequest_module(EN_DRV_NAME)ought to be used instead of_nowaitto guarantee the desired effect. Suppose for example that the process is migrated to a different cpu between the tworequest_modulecalls, the second one could complete before the first one no?
The issue was addressed after the commit above, through these two commits in a proper and robust way:
9433c18 IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes ce8d9e0 net/mlx4_core: Add UPDATE_QP SRIOV wrapper support
Thanks,
Amir