Skip to content

qat_init: fix check_driver() multi-module Live state comparison#150

Closed
aleksandrov-denis wants to merge 1 commit into
intel:mainfrom
aleksandrov-denis:fix-qat-init
Closed

qat_init: fix check_driver() multi-module Live state comparison#150
aleksandrov-denis wants to merge 1 commit into
intel:mainfrom
aleksandrov-denis:fix-qat-init

Conversation

@aleksandrov-denis
Copy link
Copy Markdown

When both qat_4xxx and qat_420xx modules are loaded (which happens on 420xx hardware even though qat_4xxx has no devices bound), get_module_state()
returns two lines of output. The previous string equality check

while [ "$CURRENT_STATE" != "Live" ]

never matched because "Live\nLive" != "Live", causing the service to spin for the full 20-second timeout and exit with:

QAT driver is still not present after 20s. Aborting qat_init

Replace the equality check with a grep that succeeds as soon as any driver in the output reaches the Live state, which is the correct signal that the relevant hardware driver is ready to proceed.

This PR resolves #149

When both qat_4xxx and qat_420xx modules are loaded (which happens on
420xx hardware even though qat_4xxx has no devices bound),
get_module_state()
returns two lines of output. The previous string equality check

   while [ "$CURRENT_STATE" != "Live" ]

never matched because "Live\nLive" != "Live", causing the service to spin
for the full 20-second timeout and exit with:

   QAT driver is still not present after 20s. Aborting qat_init

Replace the equality check with a grep that succeeds as soon as any
driver in the output reaches the Live state, which is the correct
signal that the relevant hardware driver is ready to proceed.

Signed-off-by: Denis Aleksandrov <daleksan@redhat.com>
@aleksandrov-denis
Copy link
Copy Markdown
Author

A better alternative was introduced in #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qat_init.sh: check_driver() times out on 420xx hardware when both qat_4xxx and qat_420xx are loaded

1 participant