Add QP creation flags, support blocking self multicast loopback

Add QP creation flags, specifically add a flag to indicate that
the QP will not receive self multicast loopback traffic.

To pass the QP creation flags to the kernel need to add
ibv_cmd_create_qp_ex2 API which follows the extended scheme
and uses the CREATE_QP_EX command.
ibv_cmd_create_qp_ex API doesn't follow the extended scheme,
it uses the CREATE_QP command and can't be used.

To prevent code duplication common code of above 2
functions was shared.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
5 files changed