summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWen Liang <liangwen12year@gmail.com>2022-09-02 13:44:30 -0400
committerWen Liang <liangwen12year@gmail.com>2022-09-07 10:47:35 -0400
commita4fe16a426097eee263cb3ef831dcea468b1ca26 (patch)
tree5bf09bcbef112b58ea7be03cb6f7e304ab282e70
parent72144946c90386cd6fea63d774e6628b93ca0dea (diff)
downloadNetworkManager-a4fe16a426097eee263cb3ef831dcea468b1ca26.tar.gz
infiniband: avoid normalizing the p-key when reading from ifcfg
When writing the p-key setting to the ifcfg file and reading the setting back, the value has to be consistent. This is not limited to p-key only, any setting value during the ifcfg write and read also has to be consistent. This was probably added in commit cb5606cf1c7a ('ifcfg-rh: add support for Infiniband partitions') as this is also what ifup-ib does ([1]). For NetworkManager profiles however, the p-key is also valid without the high bit set, so the ifcfg-rh reader must honor that. [1] https://github.com/alaahl/rdma/blob/0c9fb6ca7bcb4f24a6134e68338a88a84c4ab56c/rdma.ifup-ib#L75
-rw-r--r--src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index 46df18b777..67c3228b7c 100644
--- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -5383,7 +5383,6 @@ parse_infiniband_p_key(shvarFile *ifcfg, int *out_p_key, char **out_parent, GErr
PARSE_WARNING("invalid InfiniBand PKEY_ID '%s'", pkey_id);
goto done;
}
- id = (id | 0x8000);
ifname = g_strdup_printf("%s.%04x", physdev, (unsigned) id);
if (strcmp(device, ifname) != 0) {