-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tc: Fix DecodeError on sfq scheduler
When running `GetQueueDiscipline` against `sfq` scheduler, we will get DecodeError. This is because different scheduler has different layout of `TCA_OPTIONS`. For `fq_codel`, it is a list of netlink attribute. For kernel code, `fq_codel_dump()` has `nla_nest_start_noflag(skb, TCA_OPTIONS)` For `sfq`, it is a single netlink attribute, trying to decode it as `NlasIterator` will generate DecodeError as expected. For kernel code: `sfq_dump()` only has `nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt)`. This patch created `pub(crate) struct VecTcOpt` to handle this difference correctly. Signed-off-by: Gris Ge <[email protected]>
- Loading branch information
Showing
4 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters