Commit 5f23d426 authored by Noa Osherovich's avatar Noa Osherovich Committed by Doug Ledford

IB/uverbs: Expose vlan offloads capabilities

Expose raw packet capabilities to user space as part of query device.
Signed-off-by: default avatarNoa Osherovich <noaos@mellanox.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 27b0df11
...@@ -4354,6 +4354,12 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, ...@@ -4354,6 +4354,12 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
resp.max_wq_type_rq = attr.max_wq_type_rq; resp.max_wq_type_rq = attr.max_wq_type_rq;
resp.response_length += sizeof(resp.max_wq_type_rq); resp.response_length += sizeof(resp.max_wq_type_rq);
if (ucore->outlen < resp.response_length + sizeof(resp.raw_packet_caps))
goto end;
resp.raw_packet_caps = attr.raw_packet_caps;
resp.response_length += sizeof(resp.raw_packet_caps);
end: end:
err = ib_copy_to_udata(ucore, &resp, resp.response_length); err = ib_copy_to_udata(ucore, &resp, resp.response_length);
return err; return err;
......
...@@ -247,7 +247,7 @@ struct ib_uverbs_ex_query_device_resp { ...@@ -247,7 +247,7 @@ struct ib_uverbs_ex_query_device_resp {
__u64 device_cap_flags_ex; __u64 device_cap_flags_ex;
struct ib_uverbs_rss_caps rss_caps; struct ib_uverbs_rss_caps rss_caps;
__u32 max_wq_type_rq; __u32 max_wq_type_rq;
__u32 reserved; __u32 raw_packet_caps;
}; };
struct ib_uverbs_query_port { struct ib_uverbs_query_port {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment