1IBACM_PROV(7)                IB ACM Provider Guide               IBACM_PROV(7)
2
3
4

NAME

6       ibacm_prov  -  InfiniBand  communication  management assistant provider
7       interface
8

SYNOPSIS

10       #include <infiniband/acm_prov.h>
11

DESCRIPTION

13       The ibacm provider interface provides a plugin interface that allows  a
14       vendor  to  implement proprietary solutions to support scalable address
15       and route resolution services over InfiniBand.
16
17       To add a provider to the ibacm core service, the provider must
18
19       1. be implemented as a shared library;
20
21       2. be installed under a configured directory, eg., /usr/lib64/ibacm;
22
23       3  export a function provider_query() that returns  a  pointer  to  its
24       provider info
25              and version info.
26
27       The prototype of provider_query function is defined below:
28
29       int provider_query(struct acm_provider **info, uint32_t *version);
30
31       This function should return a pointer to its provider structure:
32
33       struct acm_provider {
34            size_t    size;
35            uint32_t  version;
36            char      *name;
37            int  (*open_device)(const struct acm_device *device,
38                      void **dev_context);
39            void (*close_device)(void *dev_context);
40            int  (*open_port)(const struct acm_port *port,
41                      void *dev_context, void **port_context);
42            void (*close_port)(void *port_context);
43            int  (*open_endpoint)(const struct acm_endpoint *endpoint,
44                      void *port_context, void **ep_context);
45            void (*close_endpoint)(void *ep_context);
46            int  (*add_address)(const struct acm_address *addr, void *ep_context,
47                      void **addr_context);
48            void (*remove_address)(void *addr_context);
49            int  (*resolve)(void *addr_context, struct acm_msg *msg, uint64_t id);
50            int  (*query)(void *addr_context, struct acm_msg *msg, uint64_t id);
51            int  (*handle_event)(void *port_context, enum ibv_event_type type);
52            void (*query_perf)(void *ep_context, uint64_t *values, uint8_t *cnt);
53       };
54
55       The size and version fields provide a way to detect version compatibil‐
56       ity.  When a port is assigned to the provider, the ibacm core will call
57       the  open/add_address functions;  Similarly, when a port is down or re-
58       assigned to another provider, the close/remove_address  functions  will
59       be  invoked  to  release resources.  The ibacm core will centralize the
60       management of events for each device and  events  not  handled  by  the
61       ibacm  core  will  be  forwarded  to the relevant port through the han‐
62       dle_event() function.  The resolve() function will be called to resolve
63       a destination name into a path record.  The performance of the provider
64       for each endpoint can be queried by calling perf_query().
65
66       To share a configuration file, the path  for  the  ibacm  configuration
67       file  is  exported through the variable opts_file. Each loaded provider
68       can open this configuration file and parse the contents related to  its
69       own operation.  Non-related sections should be ignored.
70
71       Some helper functions are also exported by the ibacm core. For example,
72       the acm_log define (or the acm_write() function) can  be  used  to  log
73       messages  into  ibacm's  log  file  (default  /var/log/ibacm.log).  For
74       details, refer to the acm_prov.h file.
75

NOTES

77       A provider should always set the version in its provider info structure
78       as the value of the define ACM_PROV_VERSION at the time the provider is
79       implemented.  Never set the version to ACM_PROV_VERSION itself  as  the
80       define may be changed over time when the provider interface is changed,
81       unless the provider itself is placed in ibacm source tree.  This is  to
82       avoid the version problem when the old provider implementation is built
83       against a new acm_prov.h file.  The ibacm will always check the version
84       of the provider at loading time.
85

SEE ALSO

87       ib_acme(1), ibacm(1), ibacm(7)
88
89
90
91IBACM_PROV                        2014-06-16                     IBACM_PROV(7)
Impressum