]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc: add skip_hw and skip_sw to control action offload
authorBaowen Zheng <baowen.zheng@corigine.com>
Wed, 26 Jan 2022 06:54:39 +0000 (14:54 +0800)
committerDavid Ahern <dsahern@kernel.org>
Tue, 1 Feb 2022 03:41:05 +0000 (20:41 -0700)
commitf4cd4f127047cb78760677eafbc38f047efeb0a3
treea37d780f11ad08c4053e6fd99395564bd285e1ca
parentf050cde9113502102f3857d374504746f25ef85e
tc: add skip_hw and skip_sw to control action offload

Add skip_hw and skip_sw flags for user to control whether
offload action to hardware.

Also we add hw_count to show how many hardwares accept to offload
the action.

Change man page to describe the usage of skip_sw and skip_hw flag.

An example to add and query action as below.

$ tc actions add action police rate 1mbit burst 100k index 100 skip_sw

$ tc -s -d actions list action police
total acts 1
    action order 0:  police 0x64 rate 1Mbit burst 100Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet
    ref 1 bind 0  installed 2 sec used 2 sec
    Action statistics:
    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
    backlog 0b 0p requeues 0
    skip_sw in_hw in_hw_count 1
    used_hw_stats delayed

Signed-off-by: baowen zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
man/man8/tc-actions.8
tc/m_action.c