Bug 1315930 - tc filter with action simple can't be added
tc filter with action simple can't be added
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute (Show other bugs)
Unspecified Unspecified
low Severity low
: rc
: 7.3
Assigned To: Phil Sutter
Marek Marusic
Depends On:
  Show dependency treegraph
Reported: 2016-03-08 21:40 EST by Li Shuang
Modified: 2016-11-03 19:38 EDT (History)
3 users (show)

See Also:
Fixed In Version: iproute-3.10.0-62.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1477523 (view as bug list)
Last Closed: 2016-11-03 19:38:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Li Shuang 2016-03-08 21:40:57 EST
Description of problem:
tc filter with action simple can't be added.
# tc filter add dev eth0 protocol ip parent 1:0 basic match "meta(priority eq 0x1)" action simple "Priority is set"
bad action type simple
Usage: ... gact <ACTION> [RAND] [INDEX]
Where: 	ACTION := reclassify | drop | continue | pass 
	RANDTYPE := netrand | determ
	VAL : = value not exceeding 10000
	INDEX := index value used

bad action parsing
parse_action: bad value (2:simple)!
Illegal "action"

Version-Release number of selected component (if applicable):
I have done the test on these versions:
# rpm -q iproute
iproute-2.6.32-54.el6.x86_64 (with kernel:2.6.32-621.el6.x86_64)
# rpm -q iproute
iproute-2.6.32-130.el6ost.netns.3.x86_64 (with kernel:2.6.32-604.el6.x86_64)
# rpm -q iproute
iproute-3.10.0-54.el7.x86_64 (with kernel:3.10.0-327.el7.x86_64)

How reproducible:

Steps to Reproduce:
1. add tc qdisc
# tc qdisc add dev eth0 root handle 1: prio bands 4 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 3
2. add tc filter
# tc filter add dev eth0 protocol ip parent 1:0 basic match "meta(priority eq 0x1)" action simple "Priority is set"

Actual results:
tc filter command failed.

Expected results:
tc filter command succeed.

Additional info:
Comment 2 Phil Sutter 2016-03-09 06:36:40 EST
Hi Li Shuang,

It appears that the simple action is neither present in RHEL6 nor RHEL7. Sorry for suggesting to use it without having checked in beforehand.

Since this would be a new feature, I'm not comfortable with adding it to RHEL6. Luckily you found a workaround for your testing, so there seems no mandatory need for it (please correct me if I'm wrong).

We could add the simple action to RHEL7 instead, but since the xt action is supposed to work there, at least you should be fine without. What do you think?

Cheers, Phil
Comment 3 Li Shuang 2016-03-09 21:50:57 EST
Hi Phil,

I think it will be perfect if simple action is supported at least on RHEL7 because I'm not sure if someone else need to use it in the future. But now it's OK in my tests without simple action both on RHEL6 and RHEL7, so I'm fine without it.

Cheers, Shuang
Comment 4 Phil Sutter 2016-03-10 06:50:32 EST
Hi Shuang,

OK, I will move this ticket to RHEL7 to start the process of backporting simple action support.

Thanks, Phil
Comment 5 Phil Sutter 2016-03-10 06:52:08 EST
Backport requires the following commit (and follow-ups):

commit 087f46ee4ebd178a2a8562989fd9a4e02c93f406
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sun Sep 29 07:33:42 2013 -0400

    tc: introduce simple action
    Simple action is already in the kernel for years now as an
    example. This complements it with user space control.
    Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Comment 9 errata-xmlrpc 2016-11-03 19:38:56 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.