mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 09:01:34 +00:00
A mirror of the official Linux kernel repository just in case
434ed21389
Simon Horman says:
====================
allow user to offload tc action to net device
Baowen Zheng says:
Allow use of flow_indr_dev_register/flow_indr_dev_setup_offload to offload
tc actions independent of flows.
The motivation for this work is to prepare for using TC police action
instances to provide hardware offload of OVS metering feature - which calls
for policers that may be used by multiple flows and whose lifecycle is
independent of any flows that use them.
This patch includes basic changes to offload drivers to return EOPNOTSUPP
if this feature is used - it is not yet supported by any driver.
Tc cli command to offload and quote an action:
# tc qdisc del dev $DEV ingress && sleep 1 || true
# tc actions delete action police index 200 || true
# tc qdisc add dev $DEV ingress
# tc qdisc show dev $DEV ingress
# tc actions add action police rate 100mbit burst 10000k index 200 skip_sw
# tc -s -d actions list action police
total acts 1
action order 0: police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action reclassify
overhead 0b linklayer ethernet
ref 1 bind 0 installed 142 sec used 0 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
# tc filter add dev $DEV protocol ip parent ffff: \
flower skip_sw ip_proto tcp action police index 200
# tc -s -d filter show dev $DEV protocol ip parent ffff:
filter pref 49152 flower chain 0
filter pref 49152 flower chain 0 handle 0x1
eth_type ipv4
ip_proto tcp
skip_sw
in_hw in_hw_count 1
action order 1: police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action
reclassify overhead 0b linklayer ethernet
ref 2 bind 1 installed 300 sec used 0 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
# tc filter add dev $DEV protocol ipv6 parent ffff: \
flower skip_sw ip_proto tcp action police index 200
# tc -s -d filter show dev $DEV protocol ipv6 parent ffff:
filter pref 49151 flower chain 0
filter pref 49151 flower chain 0 handle 0x1
eth_type ipv6
ip_proto tcp
skip_sw
in_hw in_hw_count 1
action order 1: police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action
reclassify overhead 0b linklayer ethernet
ref 3 bind 2 installed 761 sec used 0 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
# tc -s -d actions list action police
total acts 1
action order 0: police 0xc8 rate 100Mbit burst 10000Kb mtu 2Kb action reclassify overhead 0b linklayer ethernet
ref 3 bind 2 installed 917 sec used 0 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
Changes between v7 and v8:
* Rename enum offload_act_command as enum flow_offload_act_command
* Add a single patch to rename exts stats update function for readability.
* Fix the kernel test robot issue reported by Oliver Sang.
Changes between v6 and v7:
* Add a single patch to rename offload functions with offload for readability.
* Post
|
||
---|---|---|
arch | ||
block | ||
certs | ||
crypto | ||
Documentation | ||
drivers | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
LICENSES | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.