Skip to content

Conversation

mythi
Copy link
Contributor

@mythi mythi commented Dec 16, 2020

Closes: #451

@mythi mythi force-pushed the qat-gen4-v2 branch 3 times, most recently from 62ac3be to 7c504b5 Compare December 16, 2020 20:50
The plugin now detects/accepts 4xxx and c4xxx devices too
and defaults to those drivers that are part of Linux mainline.

Signed-off-by: Mikko Ylinen <[email protected]>
@codecov-io
Copy link

codecov-io commented Dec 17, 2020

Codecov Report

Merging #529 (ef0c0bb) into master (eacbf24) will increase coverage by 0.20%.
The diff coverage is 78.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
+ Coverage   56.60%   56.81%   +0.20%     
==========================================
  Files          31       31              
  Lines        2097     2121      +24     
==========================================
+ Hits         1187     1205      +18     
- Misses        838      843       +5     
- Partials       72       73       +1     
Impacted Files Coverage Δ
cmd/qat_plugin/dpdkdrv/dpdkdrv.go 84.41% <78.43%> (-1.74%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eacbf24...ef0c0bb. Read the comment docs.

@mythi mythi marked this pull request as ready for review December 18, 2020 12:08
@mythi mythi requested review from bart0sh and rojkov as code owners December 18, 2020 12:08
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of the drivers important here? I guess

for _, vfDriver := range append(dp.kernelVfDrivers, dp.dpdkDriver) {

would be more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer devices that are already bound to the targeted driver. See: #146

The updated dp.scan() changes the way how VF devices are detected. The
main reason for the change is to take into account cases where the QAT VF
driver is not present in the system at all but only the PF driver is
loaded (and the SR-IOV devices are are enabled).

The rework also takes into account bare metal and VM deployments and
adds a test case for checking the virtualized environment.

Signed-off-by: Mikko Ylinen <[email protected]>
vfdevID, err := dp.getDeviceID(vfBdf)
if err != nil {
klog.Warningf("Can't read sysfs for driver as Driver %s is not available: Skipping", driver)
return nil, errors.Wrapf(err, "Cannot obtain device ID for %s", vfBdf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no need to embed one more stack trace into the error. Can be fixed in a followup PR though as the existing code in the master branch does the same.

@rojkov rojkov merged commit e92602f into intel:master Dec 18, 2020
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 Gen4 devices

3 participants