Skip to content

Commit ca96e5b

Browse files
committed
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
1 parent 432741e commit ca96e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/qat_plugin/kerneldrv/kerneldrv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
)
3838

3939
var (
40-
adfCtlRegex = regexp.MustCompile(`type: (?P<devtype>[[:alnum:]]+), .* inst_id: (?P<instid>[0-9]+), .* bsf: ([0-9a-f]{4}:)?(?P<bsf>[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]), .* state: (?P<state>[[:alpha:]]+)$`)
40+
adfCtlRegex = regexp.MustCompile(`type: (?P<devtype>[[:print:]]+), .* inst_id: (?P<instid>[0-9]+), .* bsf: ([0-9a-f]{4}:)?(?P<bsf>[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]), .* state: (?P<state>[[:alpha:]]+)$`)
4141
)
4242

4343
type endpoint struct {

0 commit comments

Comments
 (0)