@@ -45,20 +45,6 @@ class MRTest(PyverbsAPITestCase):
with MR(pd, u.get_mr_length(), f) as mr:
mr.close()
- @staticmethod
- def test_reg_mr_bad_flow():
- """
- Verify that trying to register a MR with None PD fails
- """
- try:
- # Use the simplest access flags necessary
- MR(None, random.randint(0, 10000), e.IBV_ACCESS_LOCAL_WRITE)
- except TypeError as te:
- assert 'expected pyverbs.pd.PD' in te.args[0]
- assert 'got NoneType' in te.args[0]
- else:
- raise PyverbsRDMAErrno('Created a MR with None PD')
-
def test_dereg_mr_twice(self):
"""
Verify that explicit call to MR's close() doesn't fail
@@ -40,18 +40,6 @@ class PDTest(PyverbsAPITestCase):
with PD(ctx) as pd:
pd.close()
- @staticmethod
- def test_create_pd_none_ctx():
- """
- Verify that PD can't be created with a None context
- """
- try:
- PD(None)
- except TypeError as te:
- assert 'must not be None' in te.args[0]
- else:
- raise PyverbsRDMAErrno('Created a PD with None context')
-
def test_destroy_pd_twice(self):
"""
Test bad flow cases in destruction of a PD object
@@ -154,8 +154,6 @@ class QPTest(PyverbsAPITestCase):
with PD(ctx) as pd:
with CQ(ctx, 100, None, None, 0) as cq:
for i in range(1, attr.phys_port_cnt + 1):
- qpts = [e.IBV_QPT_UD, e.IBV_QPT_RAW_PACKET] \
- if is_eth(ctx, i) else [e.IBV_QPT_UD]
qia = get_qp_init_attr_ex(cq, pd, attr, attr_ex,
e.IBV_QPT_UD)
with QP(ctx, qia, QPAttr()) as qp:
@@ -227,6 +227,9 @@ def random_qp_init_attr_ex(attr_ex, attr, qpt=None):
random.randint(16, int(attr_ex.tso_caps.max_tso / 400))
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:
+ # TSO increases send WQE size, let's be on the safe side
+ qia.cap.max_send_sge = 2
return qia