Commit 87201f17 authored by wuzhouhui's avatar wuzhouhui Committed by Changpeng Liu
Browse files

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: default avatarwuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453150


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 0acc20ab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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.

+2 −2
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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;