RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1543420 - Incorrect example in tc-vlan man-page
Summary: Incorrect example in tc-vlan man-page
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: man-pages-overrides
Version: 7.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Nikola Forró
QA Contact: Jan Houska
URL:
Whiteboard:
Depends On:
Blocks: 1593630 1609279
TreeView+ depends on / blocked
 
Reported: 2018-02-08 12:48 UTC by Jaroslav Aster
Modified: 2018-10-30 11:35 UTC (History)
6 users (show)

Fixed In Version: man-pages-overrides-7.6.0-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
: 1609279 (view as bug list)
Environment:
Last Closed: 2018-10-30 11:34:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3254 0 None None None 2018-10-30 11:35:39 UTC

Description Jaroslav Aster 2018-02-08 12:48:50 UTC
Description of problem:

There is incorrect example in tc-vlan man-page.

#tc filter add dev eth0 parent ffff: pref 11 protocol ip \
                   u32 match ip protocol 1 0xff flowid 1:1 \
                   u32 match ip src 10.0.0.2 flowid 1:1 \
                   action vlan push id 123

Correct example is (duplicit u32 word)

#tc filter add dev eth0 parent ffff: pref 11 protocol ip \
                   u32 match ip protocol 1 0xff flowid 1:1 \
                       match ip src 10.0.0.2 flowid 1:1 \
                   action vlan push id 123


Version-Release number of selected component (if applicable):

iproute-4.11.0-13.el7


How reproducible:

100%


Steps to Reproduce:

# tc filter add dev eth0 parent ffff: pref 11 protocol ip u32 match ip protocol 1 0xff flowid 1:1 u32 match ip src 10.0.0.2 flowid 1:1 action vlan push id 123
What is "u32"?
Usage: ... u32 [ match SELECTOR ... ] [ link HTID ] [ classid CLASSID ]
               [ action ACTION_SPEC ] [ offset OFFSET_SPEC ]
               [ ht HTID ] [ hashkey HASHKEY_SPEC ]
               [ sample SAMPLE ] [skip-hw | skip-sw]
or         u32 divisor DIVISOR

Where: SELECTOR := SAMPLE SAMPLE ...
       SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} | mark }
                 SAMPLE_ARGS [ divisor DIVISOR ]
       FILTERID := X:Y:Z

NOTE: CLASSID is parsed at hexadecimal input.

# tc filter show dev eth0 ingress

# tc filter add dev eth0 parent ffff: pref 11 protocol ip u32 match ip protocol 1 0xff flowid 1:1 match ip src 10.0.0.2 flowid 1:1 action vlan push id 123

# tc filter show dev eth0 ingress
filter parent ffff: protocol ip pref 11 u32 
filter parent ffff: protocol ip pref 11 u32 fh 800: ht divisor 1 
filter parent ffff: protocol ip pref 11 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw 
  match 00010000/00ff0000 at 8
  match 0a000002/ffffffff at 12
        action order 1:  vlan push id 123 protocol 802.1Q priority 0 pipe
         index 1 ref 1 bind 1
 

Actual results:


Expected results:


Additional info:

Comment 1 Phil Sutter 2018-03-23 20:24:02 UTC
Patch sent upstream: https://marc.info/?l=linux-netdev&m=152183635128000&w=2

Comment 2 Phil Sutter 2018-03-28 11:40:23 UTC
commit 8ee38d833ccb1863f06634e12c5236b0ef7c2d76
Author: Phil Sutter <phil>
Date:   Fri Mar 23 21:18:56 2018 +0100

    man: tc-vlan.8: Fix for incorrect example
    
    This has to be a second match statement to the same u32 filter, not a
    second one (which tc-filter doesn't support at all).
    
    Signed-off-by: Phil Sutter <phil>
    Signed-off-by: Stephen Hemminger <stephen>

Comment 9 Jan Houska 2018-08-15 13:13:14 UTC
VERIFIED


Old  FAIL:
man-pages-overrides-7.5.2-1.el7
"""
EXAMPLES
       The following example encapsulates incoming ICMP packets on eth0 from 10.0.0.2 into VLAN ID 123:

              #tc qdisc add dev eth0 handle ffff: ingress
              #tc filter add dev eth0 parent ffff: pref 11 protocol ip \
                   u32 match ip protocol 1 0xff flowid 1:1 \
                   u32 match ip src 10.0.0.2 flowid 1:1 \
                   action vlan push id 123

       Here  is  an  example  of  the pop function: Incoming VLAN packets on eth0 are decapsulated and the classification
       process then restarted for the plain packet:

              #tc qdisc add dev eth0 handle ffff: ingress
              #tc filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \
                   u32 match u32 0 0 flowid 1:1 \
                   action vlan pop reclassify
"""


New PASS
man-pages-overrides-7.6.1-3.el7
"""
EXAMPLES
       The following example encapsulates incoming ICMP packets on eth0 from 10.0.0.2 into VLAN ID 123:

              #tc qdisc add dev eth0 handle ffff: ingress
              #tc filter add dev eth0 parent ffff: pref 11 protocol ip \
                   u32 match ip protocol 1 0xff flowid 1:1 \
                       match ip src 10.0.0.2 flowid 1:1 \
                   action vlan push id 123

       Here is an example of the pop function: Incoming VLAN packets on eth0 are decapsulated and the classification process then restarted for the plain packet:

              #tc qdisc add dev eth0 handle ffff: ingress
              #tc filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \
                   u32 match u32 0 0 flowid 1:1 \
                   action vlan pop reclassify
"""

Comment 12 errata-xmlrpc 2018-10-30 11:34:51 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://access.redhat.com/errata/RHBA-2018:3254


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