Re: [PATCH net v7 3/3] net/smc: carry oversized SMC-Rv2 LLC messages in the queue entry

From: Yehyeong Lee

Date: Thu Nov 19 2026 - 05:53:36 EST


The byte order point is right, and it is not something this series
changed. num_rkeys in struct smc_llc_msg_add_link_v2_ext is a plain u16:
smc_llc_fill_ext_v2() stores lgr->conns_num into it and
smc_llc_save_add_link_rkeys() reads it back, both in host order, while
the rt[] entries next to it are __be32 and __be64. Between a big-endian
and a little-endian host a count N below 256 arrives as N * 256, and
min_t(u8, ...) turns that into 0, so no rkeys are saved for the new link.

I have not sent a fix because the right one depends on what the SMC-Rv2
format defines. If the field is big-endian on the wire, htons() and
ntohs() leave s390 as it is but change the bytes an x86 host sends, so a
patched x86 host and an unpatched one would stop agreeing. Could one of
you confirm the wire format, and whether that compatibility cost is
acceptable? I can send the patch for net-next once that is settled.

Best regards,
Yehyeong Lee