-
Notifications
You must be signed in to change notification settings - Fork 722
Specify queue id as a configuration parameter #2009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2009 +/- ##
==========================================
+ Coverage 83.41% 83.45% +0.03%
==========================================
Files 311 311
Lines 55019 54562 -457
Branches 11816 11814 -2
==========================================
- Hits 45892 45532 -360
+ Misses 7852 7792 -60
+ Partials 1275 1238 -37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Some minor notes.
XDP CI is failing tho. If you could look into that. 🤔
| XdpDeviceStats getStatistics(); | ||
|
|
||
| /// @return Return queue identifier for underlying socket | ||
| uint32_t getQueueId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think this method can be marked as const?
| uint32_t XdpDevice::getNumQueues(const std::string& iface, bool tx) | ||
| { | ||
| // returns number of hardware queues associated with the device | ||
| uint32_t rxtxqueues = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we rename this to numQueues?
| { | ||
| std::regex rxtx_regex("^" + prefix + "[0-9]+$"); | ||
|
|
||
| struct dirent* entry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Curious why the struct dirent*? Can't we just do dirent*?
|
@JasMetzger, please notice that clang-format fails in CI |
The queue id can be specified as an additional configuration parameter. It is checked against the maximum queues available by the device using a utility provided as a static function. In the open() function, the configured queue id is used in place of the hardwired zero value that was used before. Added a convenience function to obtain the queue id from device.
Community may consider renaming the XdpDevice to XdpSocketDevice as each instance of the XdpDevice class pertains to a single queue id / socket.