Bug 1315930

Summary: tc filter with action simple can't be added
Product: Red Hat Enterprise Linux 7 Reporter: Li Shuang <shuali>
Component: iprouteAssignee: Phil Sutter <psutter>
Status: CLOSED ERRATA QA Contact: Marek Marusic <mmarusic>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: atragler, jaster, mmarusic
Target Milestone: rc   
Target Release: 7.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-3.10.0-62.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1477523 (view as bug list) Environment:
Last Closed: 2016-11-03 23:38:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Li Shuang 2016-03-09 02:40:57 UTC
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 
	RAND := random <RANDTYPE> <ACTION> <VAL>
	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:
always


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 11:36:40 UTC
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-10 02:50:57 UTC
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 11:50:32 UTC
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 11:52:08 UTC
Backport requires the following commit (and follow-ups):

commit 087f46ee4ebd178a2a8562989fd9a4e02c93f406
Author: Jamal Hadi Salim <jhs>
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>

Comment 9 errata-xmlrpc 2016-11-03 23:38:56 UTC
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.

https://rhn.redhat.com/errata/RHEA-2016-2162.html