scripts/rpc: addd RPC support to enable idxd

The new RPC also includes and option for which
idxd config is to be used. Config options will be
explained in detail in a later patch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1322bab4d6ca9cc45ec3a56d7267dc7dc09dbea3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1726
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
paul luse 2020-04-07 12:42:02 -04:00 committed by Ben Walker
parent 5b03dd938c
commit 42eb233e48
3 changed files with 18 additions and 0 deletions

View File

@ -2155,6 +2155,15 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
domain:bus:device.function format or domain.bus.device.function format""")
p.set_defaults(func=ioat_scan_accel_engine)
# idxd
def idxd_scan_accel_engine(args):
rpc.idxd.idxd_scan_accel_engine(args.client, config_number=args.config_number)
p = subparsers.add_parser('idxd_scan_accel_engine',
help='Set config and enable idxd accel engine offload.')
p.add_argument('-c', '--config-number', help="""Pre-defined configuration number to use. See docs.""", type=int)
p.set_defaults(func=idxd_scan_accel_engine)
# opal
def bdev_nvme_opal_init(args):
rpc.nvme.bdev_nvme_opal_init(args.client,

View File

@ -6,6 +6,7 @@ from . import app
from . import bdev
from . import blobfs
from . import env_dpdk
from . import idxd
from . import ioat
from . import iscsi
from . import log

8
scripts/rpc/idxd.py Normal file
View File

@ -0,0 +1,8 @@
def idxd_scan_accel_engine(client, config_number):
"""Scan and enable IDXD accel engine.
Args:
config_number: Pre-defined configuration number, see docs.
"""
params = {'config_number': config_number}
return client.call('idxd_scan_accel_engine', params)