Repository navigation
Add flowtable counter support #47
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -496,6 +496,10 @@ type Flowtable struct { | |
| // that should be offloaded. | ||
| Devices []string | ||
|
|
||
| // Counter enables packet and byte accounting for offloaded flows. | ||
| // (Optional; requires kernel 5.13 or later) | ||
| Counter *bool | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do you read the counter?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The flowtable counter just indicates that conntrack metrics should continue to be updated based on the offloaded flows (whereas normally they are not) - so we read them from there. |
||
|
|
||
| // Handle is an identifier that can be used to uniquely identify an object when | ||
| // deleting it. When adding a new object, this must be nil | ||
| Handle *int | ||
|
|
||
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.
Is that true? The man page claims
devicesis required.Though, I guess, my
nftman page doesn't mention flowtable counters...Uh oh!
There was an error while loading. Please reload this page.
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.
Yep! At least in my local verification, I was able to create tables without
devicesbut withcounterset. Not sure why that would be useful, though.