net: deprecate library
The net library isn't needed - everything these RPCs do can be done externally to the SPDK application. This library will be removed in the 21.07 release. As part of the deprecation, mark the net RPCs as private. This will prevent an upcoming patch from complaining that these RPCs are not documented. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I61118820fd29e410dca763595c3d9fd01a57373d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7592 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: <dongx.yi@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
365db9ee48
commit
d80267cc17
@ -71,6 +71,10 @@ Two new accelerated crc32 functions 'spdk_accel_submit_crc32cv' and
|
||||
'spdk_accel_batch_prep_crc32cv' are added in order to provide the
|
||||
chained accelerated CRC32 computation support.
|
||||
|
||||
### net
|
||||
|
||||
The net library is deprecated and will be removed in the 21.07 release.
|
||||
|
||||
### nvme
|
||||
|
||||
Added new functions `spdk_nvme_ctrlr_get_pmrsz`, `spdk_nvme_ctrlr_enable_pmr`,
|
||||
|
@ -64,6 +64,8 @@ rpc_net_interface_add_ip_address(struct spdk_jsonrpc_request *request,
|
||||
struct rpc_ip_address req = {};
|
||||
int ret_val = 0;
|
||||
|
||||
SPDK_WARNLOG("net_interface_add_ip_address RPC is deprecated.\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_ip_address_decoders,
|
||||
SPDK_COUNTOF(rpc_ip_address_decoders),
|
||||
&req)) {
|
||||
@ -97,8 +99,8 @@ rpc_net_interface_add_ip_address(struct spdk_jsonrpc_request *request,
|
||||
invalid:
|
||||
free_rpc_ip_address(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("net_interface_add_ip_address", rpc_net_interface_add_ip_address,
|
||||
SPDK_RPC_RUNTIME)
|
||||
/* private */ SPDK_RPC_REGISTER("net_interface_add_ip_address", rpc_net_interface_add_ip_address,
|
||||
SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(net_interface_add_ip_address, add_ip_address)
|
||||
|
||||
static void
|
||||
@ -108,6 +110,8 @@ rpc_net_interface_delete_ip_address(struct spdk_jsonrpc_request *request,
|
||||
struct rpc_ip_address req = {};
|
||||
int ret_val = 0;
|
||||
|
||||
SPDK_WARNLOG("net_interface_delete_ip_address RPC is deprecated.\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_ip_address_decoders,
|
||||
SPDK_COUNTOF(rpc_ip_address_decoders),
|
||||
&req)) {
|
||||
@ -141,8 +145,9 @@ rpc_net_interface_delete_ip_address(struct spdk_jsonrpc_request *request,
|
||||
invalid:
|
||||
free_rpc_ip_address(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("net_interface_delete_ip_address", rpc_net_interface_delete_ip_address,
|
||||
SPDK_RPC_RUNTIME)
|
||||
/* private */ SPDK_RPC_REGISTER("net_interface_delete_ip_address",
|
||||
rpc_net_interface_delete_ip_address,
|
||||
SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(net_interface_delete_ip_address, delete_ip_address)
|
||||
|
||||
static void
|
||||
@ -156,6 +161,8 @@ rpc_net_get_interfaces(struct spdk_jsonrpc_request *request,
|
||||
struct in_addr inaddr;
|
||||
uint32_t i;
|
||||
|
||||
SPDK_WARNLOG("net_get_interfaces RPC is deprecated.\n");
|
||||
|
||||
if (params != NULL) {
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"net_get_interfaces requires no parameters");
|
||||
@ -186,7 +193,7 @@ rpc_net_get_interfaces(struct spdk_jsonrpc_request *request,
|
||||
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("net_get_interfaces", rpc_net_get_interfaces, SPDK_RPC_RUNTIME)
|
||||
/* private */ SPDK_RPC_REGISTER("net_get_interfaces", rpc_net_get_interfaces, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(net_get_interfaces, get_interfaces)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT(net)
|
||||
|
Loading…
Reference in New Issue
Block a user