Red Hat Bugzilla – Bug 1468280
TestOnly: TC pedit action: Support offset relative to L2 and L4
Last modified: 2018-04-10 10:30:43 EDT
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
Hi Phil, it helped. I just needed information that old syntax has not been changed. Thanks.
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