Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/uverbs: Return link layer type to userspace for query port operation

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Eli Cohen and committed by
Roland Dreier
2420b60b ff7f5aab

+4 -1
+2
drivers/infiniband/core/uverbs_cmd.c
··· 460 460 resp.active_width = attr.active_width; 461 461 resp.active_speed = attr.active_speed; 462 462 resp.phys_state = attr.phys_state; 463 + resp.link_layer = rdma_port_get_link_layer(file->device->ib_dev, 464 + cmd.port_num); 463 465 464 466 if (copy_to_user((void __user *) (unsigned long) cmd.response, 465 467 &resp, sizeof resp))
+2 -1
include/rdma/ib_user_verbs.h
··· 205 205 __u8 active_width; 206 206 __u8 active_speed; 207 207 __u8 phys_state; 208 - __u8 reserved[3]; 208 + __u8 link_layer; 209 + __u8 reserved[2]; 209 210 }; 210 211 211 212 struct ib_uverbs_alloc_pd {