Exemple #1
0
 def test_mr_rereg_addr(self):
     self.create_players(MRRes)
     s_recv_wr = u.get_recv_wr(self.server)
     self.server.qp.post_recv(s_recv_wr)
     server_addr = posix_memalign(self.server.msg_size)
     self.server.rereg_mr(flags=e.IBV_REREG_MR_CHANGE_TRANSLATION,
                          addr=server_addr,
                          length=self.server.msg_size)
     with self.assertRaisesRegex(PyverbsRDMAError, 'Remote operation error'):
         # The server QP receive queue has WR with the old MR address,
         # therefore traffic should fail.
         u.traffic(**self.traffic_args)
     self.restate_qps()
     u.traffic(**self.traffic_args)
     free(server_addr)
Exemple #2
0
def free_func(pd, context, ptr, resource_type):
    mem.free(ptr)