IB/core: Add DEVICE object and root tree structure

This adds the DEVICE object. This object supports creating the context
that all objects are created from. Moreover, it supports executing
methods which are related to the device itself, such as QUERY_DEVICE.
This is a singleton object (per file instance).

All standard objects are put in the root structure. This root will later
on be used in drivers as the source for their whole parsing tree.
Later on, when new features are added, these drivers could mix this root
with other customized objects.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Matan Barak
2017-08-03 16:06:59 +03:00
committed by Doug Ledford
parent 5009010fbf
commit 09e3ebf8c1
3 changed files with 70 additions and 0 deletions

View File

@@ -257,3 +257,20 @@ DECLARE_UVERBS_OBJECT(uverbs_object_xrcd, UVERBS_OBJECT_XRCD,
DECLARE_UVERBS_OBJECT(uverbs_object_pd, UVERBS_OBJECT_PD,
/* 2 is used in order to free the PD after MRs */
&UVERBS_TYPE_ALLOC_IDR(2, uverbs_free_pd));
DECLARE_UVERBS_OBJECT(uverbs_object_device, UVERBS_OBJECT_DEVICE, NULL);
DECLARE_UVERBS_OBJECT_TREE(uverbs_default_objects,
&uverbs_object_device,
&uverbs_object_pd,
&uverbs_object_mr,
&uverbs_object_comp_channel,
&uverbs_object_cq,
&uverbs_object_qp,
&uverbs_object_ah,
&uverbs_object_mw,
&uverbs_object_srq,
&uverbs_object_flow,
&uverbs_object_wq,
&uverbs_object_rwq_ind_table,
&uverbs_object_xrcd);