Skip to content

[th/ifcfg-infiniband-p-key-rh2209164] Revert "infiniband: avoid normalizing the p-key when reading from ifcfg"

Thomas Haller requested to merge th/ifcfg-infiniband-p-key-rh2209164 into main

Historically, initscripts' ifup-ib would set the highest bit of PKEY_ID=. That changed and needs to be restored.

Note that it probably makes little sense to ever configure p-keys without the highest bit set, because that flag indicates full membership and kernel will automatically add it. At least, it will add the flag for the p-key, but not for the automatically chosen interface name.

As NetworkManager otherwise supports k-keys without the highest bit set, and since that high bit is honored for the interface name, we cannot just always add the high bit. That would then be a different kind of change in behavior.

With this revert, when a user configures a small p-key and the profile is stored in ifcfg-rh format, the settings backend will automatically mangle the profile and set 0x8000. That is different from when the profile is stored in keyfile format. Since using small p-keys is probably an odd case, we don't try to workaround that any other way (like when persisting a profile in ifcfg format to preserve actual value as keyfile does, or to perform such a normalization all throughout NetworkManager so that keyfile behaves the same).

This reverts commit a4fe16a4.

Affected versions were 1.42.2+ and 1.40.2+.

https://bugzilla.redhat.com/show_bug.cgi?id=2209164

Merge request reports