ofed: mask seq_num identifier to occupy only 3 bytes

The seq_num among other things is used to assign rq_psn value, which is
a 24-bit identifier.  When the seq_num is full 4-byte value, we are
usually receiving: '_ib_modify_qp rq_psn overflow, masking to 24 bits'
warning.

This is burdensome for running rdma traffic with large number of
connections, because the number of logs is growing fast.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	kib@, erj@
MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41531
This commit is contained in:
Bartosz Sobczak 2023-08-22 16:07:11 -07:00 committed by Eric Joyner
parent 80e9ea426c
commit c7f73a1588
No known key found for this signature in database
GPG key ID: 96F0C6FD61E05DE3

View file

@ -787,6 +787,7 @@ struct rdma_cm_id *rdma_create_id(struct vnet *net,
INIT_LIST_HEAD(&id_priv->listen_list);
INIT_LIST_HEAD(&id_priv->mc_list);
get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num);
id_priv->seq_num &= 0x00ffffff;
id_priv->id.route.addr.dev_addr.net = net;
return &id_priv->id;