From ca96e5b31274926e5ef8fa26d68c4c3367a1dccf Mon Sep 17 00:00:00 2001 From: ZhangLi Date: Mon, 17 Jul 2023 16:32:29 +0800 Subject: [PATCH] Change the regular expression string of the device type to support sIOV device of QAT The string of the sIOV device type exceeds the range of [[alnum]], such as: # adf_ctl status Checking status of all devices. There is 2 QAT acceleration device(s) in the system: qat_dev0 - type: vqat-adi, inst_id: 0, node_id: 0, bsf: 0000:00:08.0, #accel: 1 #engines: 1 state: up qat_dev1 - type: vqat-adi, inst_id: 1, node_id: 0, bsf: 0000:00:09.0, #accel: 1 #engines: 1 state: up --- cmd/qat_plugin/kerneldrv/kerneldrv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/qat_plugin/kerneldrv/kerneldrv.go b/cmd/qat_plugin/kerneldrv/kerneldrv.go index 44e88de0..61792862 100644 --- a/cmd/qat_plugin/kerneldrv/kerneldrv.go +++ b/cmd/qat_plugin/kerneldrv/kerneldrv.go @@ -37,7 +37,7 @@ import ( ) var ( - adfCtlRegex = regexp.MustCompile(`type: (?P[[:alnum:]]+), .* inst_id: (?P[0-9]+), .* bsf: ([0-9a-f]{4}:)?(?P[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]), .* state: (?P[[:alpha:]]+)$`) + adfCtlRegex = regexp.MustCompile(`type: (?P[[:print:]]+), .* inst_id: (?P[0-9]+), .* bsf: ([0-9a-f]{4}:)?(?P[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]), .* state: (?P[[:alpha:]]+)$`) ) type endpoint struct {