lib/notify: rename spdk_notify_get_types to spdk_notify_foreach_type
And change type name of callback as well. The new name is more accurate. Change-Id: I3c9cef591faa077a5a034c6f31c44c6f7aefc1fa Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453150 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
0acc20ab10
commit
87201f17d6
@ -8,6 +8,11 @@ Shared receive queue can now be disabled even for NICs that support it using the
|
||||
`nvmf_create_transport` RPC method parameter `no_srq`. The actual use of a shared
|
||||
receive queue is predicated on hardware support when this flag is not used.
|
||||
|
||||
### notify
|
||||
|
||||
The function `spdk_notify_get_types()` was renamed to `spdk_notify_foreach_type()`.
|
||||
And update type name of callback accordingly.
|
||||
|
||||
## v19.04:
|
||||
|
||||
### nvme
|
||||
|
@ -17,7 +17,7 @@ notification type.
|
||||
# Get info about events {#notify_get_info}
|
||||
|
||||
A consumer can get information about the available event types during runtime using
|
||||
`spdk_notify_get_types`, which iterates over registered notification types and
|
||||
`spdk_notify_foreach_type`, which iterates over registered notification types and
|
||||
calls a callback on each of them, so that user can produce detailed information
|
||||
about notification.
|
||||
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
struct spdk_notify_type;
|
||||
|
||||
typedef int (*spdk_notify_get_type_cb)(const struct spdk_notify_type *type, void *ctx);
|
||||
typedef int (*spdk_notify_foreach_type_cb)(const struct spdk_notify_type *type, void *ctx);
|
||||
|
||||
#define SPDK_NOTIFY_MAX_NAME_SIZE 128
|
||||
#define SPDK_NOTIFY_MAX_CTX_SIZE 128
|
||||
@ -93,7 +93,7 @@ const char *spdk_notify_type_get_name(const struct spdk_notify_type *type);
|
||||
* \param cb_fn
|
||||
* \param ctx
|
||||
*/
|
||||
void spdk_notify_get_types(spdk_notify_get_type_cb cb_fn, void *ctx);
|
||||
void spdk_notify_foreach_type(spdk_notify_foreach_type_cb cb_fn, void *ctx);
|
||||
|
||||
/**
|
||||
* Send given notification.
|
||||
|
@ -65,7 +65,7 @@ spdk_rpc_get_notification_types(struct spdk_jsonrpc_request *request,
|
||||
}
|
||||
|
||||
spdk_json_write_array_begin(w);
|
||||
spdk_notify_get_types(get_notification_types_cb, w);
|
||||
spdk_notify_foreach_type(get_notification_types_cb, w);
|
||||
spdk_json_write_array_end(w);
|
||||
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
|
@ -96,7 +96,7 @@ spdk_notify_type_get_name(const struct spdk_notify_type *type)
|
||||
|
||||
|
||||
void
|
||||
spdk_notify_get_types(spdk_notify_get_type_cb cb, void *ctx)
|
||||
spdk_notify_foreach_type(spdk_notify_foreach_type_cb cb, void *ctx)
|
||||
{
|
||||
struct spdk_notify_type *it;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user