Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8942acea authored by Artemy Kovalyov's avatar Artemy Kovalyov Committed by Jason Gunthorpe
Browse files

IB/uverbs: Pass IB_UVERBS_QPF_GRH_REQUIRED to user space



Userspace also needs to know if the port requires GRHs to properly form
the AVs it creates.

Signed-off-by: default avatarArtemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
parent b02289b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -294,6 +294,9 @@ ssize_t ib_uverbs_query_port(struct ib_uverbs_file *file,
	resp.qkey_viol_cntr  = attr.qkey_viol_cntr;
	resp.qkey_viol_cntr  = attr.qkey_viol_cntr;
	resp.pkey_tbl_len    = attr.pkey_tbl_len;
	resp.pkey_tbl_len    = attr.pkey_tbl_len;


	if (rdma_is_grh_required(ib_dev, cmd.port_num))
		resp.flags |= IB_UVERBS_QPF_GRH_REQUIRED;

	if (rdma_cap_opa_ah(ib_dev, cmd.port_num)) {
	if (rdma_cap_opa_ah(ib_dev, cmd.port_num)) {
		resp.lid     = OPA_TO_IB_UCAST_LID(attr.lid);
		resp.lid     = OPA_TO_IB_UCAST_LID(attr.lid);
		resp.sm_lid  = OPA_TO_IB_UCAST_LID(attr.sm_lid);
		resp.sm_lid  = OPA_TO_IB_UCAST_LID(attr.sm_lid);
+4 −0
Original line number Original line Diff line number Diff line
@@ -78,6 +78,10 @@ enum ib_uverbs_query_port_cap_flags {
	IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26,
	IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26,
};
};


enum ib_uverbs_query_port_flags {
	IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0,
};

enum ib_uverbs_flow_action_esp_keymat {
enum ib_uverbs_flow_action_esp_keymat {
	IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM,
	IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM,
};
};
+2 −1
Original line number Original line Diff line number Diff line
@@ -299,7 +299,8 @@ struct ib_uverbs_query_port_resp {
	__u8  active_speed;
	__u8  active_speed;
	__u8  phys_state;
	__u8  phys_state;
	__u8  link_layer;
	__u8  link_layer;
	__u8  reserved[2];
	__u8  flags;			/* see ib_uverbs_query_port_flags */
	__u8  reserved;
};
};


struct ib_uverbs_alloc_pd {
struct ib_uverbs_alloc_pd {