Robert> The command size passed to ibv_cmd_create_cq is the size Robert> of the mthca command wrapper which is larger than what is Robert> most likely expected. No, that is the whole point of passing the size into that function: it lets low-level drivers pass extra device-specific data in. - R.