git: c7f73a1588dc - main - ofed: mask seq_num identifier to occupy only 3 bytes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Aug 2023 23:10:27 UTC
The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7f73a1588dc58db28100fcbc1d72a830b674b34 commit c7f73a1588dc58db28100fcbc1d72a830b674b34 Author: Bartosz Sobczak <bartosz.sobczak@intel.com> AuthorDate: 2023-08-22 23:07:11 +0000 Commit: Eric Joyner <erj@FreeBSD.org> CommitDate: 2023-08-22 23:09:13 +0000 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 --- sys/ofed/drivers/infiniband/core/ib_cma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/ofed/drivers/infiniband/core/ib_cma.c b/sys/ofed/drivers/infiniband/core/ib_cma.c index fe6e3282dbf9..44783cbf8362 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cma.c +++ b/sys/ofed/drivers/infiniband/core/ib_cma.c @@ -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;