diff mbox series

[rdma-core,3/8] tests: Decrease maximal TSO header size

Message ID 20191231091915.23874-4-noaos@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series pyverbs: Add support for the new post send API | expand

Commit Message

Noa Osherovich Dec. 31, 2019, 9:19 a.m. UTC
When creating a Raw Packet QP with a TSO header, send WQE size
increases to accommodate it. If both max_tso_header and max_send_wr
are too large, the requested WQE size can become too large for the
device to support.
Decrease max_tso_header's max value to avoid that.

Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Edward Srouji <edwards@mellanox.com>
---
 tests/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/utils.py b/tests/utils.py
index c45170dbd329..d4d0d1ef49ef 100755
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -224,7 +224,7 @@  def random_qp_init_attr_ex(attr_ex, attr, qpt=None):
             mask -= e.IBV_QP_INIT_ATTR_MAX_TSO_HEADER
         else:
             max_tso = \
-                random.randint(16, int(attr_ex.tso_caps.max_tso / 400))
+                random.randint(16, int(attr_ex.tso_caps.max_tso / 800))
     qia = QPInitAttrEx(qp_type=qpt, cap=qp_cap, sq_sig_all=sig, comp_mask=mask,
                        create_flags=cflags, max_tso_header=max_tso)
     if mask & e.IBV_QP_INIT_ATTR_MAX_TSO_HEADER: