Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
The `tc-pedit` action now supports "offset" relative to Layer `2` and Layer `4`
The `tc-pedit` action allows modification of packet data. This update adds support for specifying the "offset" options relative to the Layer `2`, `3` and `4` headers to `tc-pedit`. This makes `pedit header` handling more robust and flexible. As a result, editing Ethernet header is more convenient and accessing the Layer `4` header works independently to the Layer `3` header size.
Preface:
The intention of this bug is to provide insight into a feature proposed by Netronome for inclusion in RHEL 7.5.
Description:
Pedit allows modification of packet data. Historically this has been done
relative to an offset from the start of the L3 header with a negative offset used to modify the L2 header. This is, however, not robust in the presence of variable length headers.
Status:
To alleviate this problem pedit has been updated to allow offsets relative to the start of L2 and L4 headers. This is provided by the following upstream patch which was included in v4.11.
7c71a40cbd31 ("tc/pedit: Extend pedit to specify offset relative to mac/transport headers")
The following patches build on the above to provide helper-type facilities to allow easier use by users. They are also included in v4.11.
3d2a7781ec0b ("tc/pedit: p_udp: introduce pedit udp support")
2c6eb12ab825 ("tc/pedit: p_tcp: introduce pedit tcp support")
3cd5149ecd78 ("tc/pedit: p_eth: ETH header editor")
fa4652ff3b5d ("tc/pedit: Support fields bigger than 32 bits")
8d193d96074b ("tc/pedit: p_ip: introduce editing ttl header")
The above patches relate to a new kernel feature introduced in v4.11 and described in BZ1468278. The kernel feature may be used independently of the user-space updates described here. And the user-space updates described here are expected to be independent of use of this feature in conjunction with OvS.
Hi Phil,
I suppose this bug was fixed by re-base, so I can't review patches and find out what has been changed :-).
Could you please send me some example, old and new way?
I read examples, but I'm not sure, how to test it. Thanks.
Hi Jaroslav,
(In reply to Jaroslav Aster from comment #5)
> I suppose this bug was fixed by re-base, so I can't review patches and find
> out what has been changed :-).
Yes, it was. Hence why it is TestOnly.
> Could you please send me some example, old and new way?
>
> I read examples, but I'm not sure, how to test it. Thanks.
It is all about 'ex' flag in pedit arguments. The example shown in tc-pedit.8 suits quite well - it performs destination port redirection.
Old style:
# tc filter add dev eth0 parent 1: u32 \
match ip dport 23 0xffff \
action pedit munge ip dport set 22
New style:
# tc filter add dev eth0 parent 1: u32 \
match ip dport 23 0xffff \
action pedit ex munge tcp dport set 22
Both of the above commands will redirect TCP packets with destination port 23
to destination port 22. The difference is that old style also matches UDP and
breaks if IP header options are present.
Cheers, Phil
Hi Phil,
thank you for your update. My original point was, I would like to be sure that without using ex param everything is the same for users as was before update, no broken scripts because start point of offset is different. I can't test every possibilities :-).
Hi Jaroslav,
(In reply to Jaroslav Aster from comment #7)
> thank you for your update. My original point was, I would like to be sure
> that without using ex param everything is the same for users as was before
> update, no broken scripts because start point of offset is different. I
> can't test every possibilities :-).
So does my answer help you with that or do you need any further information? I think the old syntax should continue to work just as before. If it doesn't, we have a bug. :)
Cheers, Phil
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/RHEA-2018:0815
Preface: The intention of this bug is to provide insight into a feature proposed by Netronome for inclusion in RHEL 7.5. Description: Pedit allows modification of packet data. Historically this has been done relative to an offset from the start of the L3 header with a negative offset used to modify the L2 header. This is, however, not robust in the presence of variable length headers. Status: To alleviate this problem pedit has been updated to allow offsets relative to the start of L2 and L4 headers. This is provided by the following upstream patch which was included in v4.11. 7c71a40cbd31 ("tc/pedit: Extend pedit to specify offset relative to mac/transport headers") The following patches build on the above to provide helper-type facilities to allow easier use by users. They are also included in v4.11. 3d2a7781ec0b ("tc/pedit: p_udp: introduce pedit udp support") 2c6eb12ab825 ("tc/pedit: p_tcp: introduce pedit tcp support") 3cd5149ecd78 ("tc/pedit: p_eth: ETH header editor") fa4652ff3b5d ("tc/pedit: Support fields bigger than 32 bits") 8d193d96074b ("tc/pedit: p_ip: introduce editing ttl header") The above patches relate to a new kernel feature introduced in v4.11 and described in BZ1468278. The kernel feature may be used independently of the user-space updates described here. And the user-space updates described here are expected to be independent of use of this feature in conjunction with OvS.