Commit bf15f51c authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Jim Harris
Browse files

rpc: Rename set_vhost_controller_coalescing to vhost_controller_set_coalescing

parent edb18971
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4339,7 +4339,7 @@ directory path needs to be valid UNIX socket name.
@ref cpu_mask parameter is used to choose CPU on which pollers will be launched when new initiator is connecting.
It must be a subset of application CPU mask. Default value is CPU mask of the application.

## set_vhost_controller_coalescing {#rpc_set_vhost_controller_coalescing}
## vhost_controller_set_coalescing {#rpc_vhost_controller_set_coalescing}

Controls interrupt coalescing for specific target. Because `delay_base_us` is used to calculate delay in CPU ticks
there is no hardcoded limit for this parameter. Only limitation is that final delay in CPU ticks might not overflow
@@ -4366,7 +4366,7 @@ Example request:
    "delay_base_us": 80
  },
  "jsonrpc": "2.0",
  "method": "set_vhost_controller_coalescing",
  "method": "vhost_controller_set_coalescing",
  "id": 1
}
~~~
+1 −1
Original line number Diff line number Diff line
@@ -1613,7 +1613,7 @@ spdk_vhost_config_json(struct spdk_json_write_ctx *w)
		spdk_vhost_get_coalescing(vdev, &delay_base_us, &iops_threshold);
		if (delay_base_us) {
			spdk_json_write_object_begin(w);
			spdk_json_write_named_string(w, "method", "set_vhost_controller_coalescing");
			spdk_json_write_named_string(w, "method", "vhost_controller_set_coalescing");

			spdk_json_write_named_object_begin(w, "params");
			spdk_json_write_named_string(w, "ctrlr", vdev->name);
+3 −2
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ free_rpc_set_vhost_controllers_event_coalescing(struct rpc_vhost_ctrlr_coalescin
}

static void
spdk_rpc_set_vhost_controller_coalescing(struct spdk_jsonrpc_request *request,
spdk_rpc_vhost_controller_set_coalescing(struct spdk_jsonrpc_request *request,
		const struct spdk_json_val *params)
{
	struct rpc_vhost_ctrlr_coalescing req = {0};
@@ -511,8 +511,9 @@ invalid:
	spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
					 spdk_strerror(-rc));
}
SPDK_RPC_REGISTER("set_vhost_controller_coalescing", spdk_rpc_set_vhost_controller_coalescing,
SPDK_RPC_REGISTER("vhost_controller_set_coalescing", spdk_rpc_vhost_controller_set_coalescing,
		  SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(vhost_controller_set_coalescing, set_vhost_controller_coalescing)

#ifdef SPDK_CONFIG_VHOST_INTERNAL_LIB

+5 −4
Original line number Diff line number Diff line
@@ -1848,17 +1848,18 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
    p.set_defaults(func=framework_get_config)

    # vhost
    def set_vhost_controller_coalescing(args):
        rpc.vhost.set_vhost_controller_coalescing(args.client,
    def vhost_controller_set_coalescing(args):
        rpc.vhost.vhost_controller_set_coalescing(args.client,
                                                  ctrlr=args.ctrlr,
                                                  delay_base_us=args.delay_base_us,
                                                  iops_threshold=args.iops_threshold)

    p = subparsers.add_parser('set_vhost_controller_coalescing', help='Set vhost controller coalescing')
    p = subparsers.add_parser('vhost_controller_set_coalescing', aliases=['set_vhost_controller_coalescing'],
                              help='Set vhost controller coalescing')
    p.add_argument('ctrlr', help='controller name')
    p.add_argument('delay_base_us', help='Base delay time', type=int)
    p.add_argument('iops_threshold', help='IOPS threshold when coalescing is enabled', type=int)
    p.set_defaults(func=set_vhost_controller_coalescing)
    p.set_defaults(func=vhost_controller_set_coalescing)

    def construct_vhost_scsi_controller(args):
        rpc.vhost.construct_vhost_scsi_controller(args.client,
+3 −2
Original line number Diff line number Diff line
from .helpers import deprecated_alias


def set_vhost_controller_coalescing(client, ctrlr, delay_base_us, iops_threshold):
@deprecated_alias('set_vhost_controller_coalescing')
def vhost_controller_set_coalescing(client, ctrlr, delay_base_us, iops_threshold):
    """Set coalescing for vhost controller.
    Args:
        ctrlr: controller name
@@ -13,7 +14,7 @@ def set_vhost_controller_coalescing(client, ctrlr, delay_base_us, iops_threshold
        'delay_base_us': delay_base_us,
        'iops_threshold': iops_threshold,
    }
    return client.call('set_vhost_controller_coalescing', params)
    return client.call('vhost_controller_set_coalescing', params)


def construct_vhost_scsi_controller(client, ctrlr, cpumask=None):
Loading