Bug 385681

Summary: Backport upstream sk_buff and ip/tcp header functions to rhel5
Product: Red Hat Enterprise Linux 5 Reporter: Andy Gospodarek <agospoda>
Component: kernelAssignee: Andy Gospodarek <agospoda>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: acme, dzickus, peterm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0314 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:01:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rhel5-test0.patch none

Description Andy Gospodarek 2007-11-15 21:14:02 UTC
Description of problem:

New drivers use the updated references to sk_buffs, ipv4/ipv6/tcp headers and
all the associated functions.  It's a real PITA to keep using the old ones in
newer drivers, so I'd like to backport the upstream functions.

I want to make it clear that I'm not looking to backport the sk_buff structure
changes, just add the new functions.

Here is a quick list of useful commits (there may be a few more):

commit 0660e03f6b18f19b6bbafe7583265a51b90daf36
Author: Arnaldo Carvalho de Melo <acme>
Date:   Wed Apr 25 17:54:47 2007 -0700

    [SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h

    Now the skb->nh union has just one member, .raw, i.e. it is just like the
    skb->mac union, strange, no? I'm just leaving it like that till the transport
    layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or
    ->mac_header_offset?), ditto for ->{h,nh}.

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit d0a92be05ed4aea7d35c2b257e3f9173565fe4eb
Author: Arnaldo Carvalho de Melo <acme>
Date:   Mon Mar 12 20:56:31 2007 -0300

    [SK_BUFF]: Introduce arp_hdr(), remove skb->nh.arph

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0
Author: Arnaldo Carvalho de Melo <acme>
Date:   Fri Apr 20 22:47:35 2007 -0700

    [SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit d56f90a7c96da5187f0cdf07ee7434fe6aa78bbc
Author: Arnaldo Carvalho de Melo <acme>
Date:   Tue Apr 10 20:50:43 2007 -0700

    [SK_BUFF]: Introduce skb_network_header()

    For the places where we need a pointer to the network header, it is still legal
    to touch skb->nh.raw directly if just adding to, subtracting from or setting it
    to another layer header.

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit e7dd65dafda5737a983c04d652a69ab8da78ee3f
Author: Arnaldo Carvalho de Melo <acme>
Date:   Sat Mar 10 20:09:45 2007 -0300

    [SK_BUFF] bonding: Set skb->nh.raw relative to skb->mac.raw

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit a16aeb36239ce612699ed64a75a03c88cbc657e8
Author: Arnaldo Carvalho de Melo <acme>
Date:   Sat Mar 10 16:07:19 2007 -0300

    [BONDING]: Introduce arp_pkt()
    For consistency with all the other skb->nh.raw accessors.

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

commit 459a98ed881802dee55897441bc7f77af614368e
Author: Arnaldo Carvalho de Melo <acme>
Date:   Mon Mar 19 15:30:44 2007 -0700

    [SK_BUFF]: Introduce skb_reset_mac_header(skb)

    For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can
    later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in
    64bit land while possibly keeping it as a pointer on 32bit.

    This one touches just the most simple case, next will handle the slightly more
    "complex" cases.

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>


****I do not want to include this one (for obvious reasons).****

commit b0e380b1d8a8e0aca215df97702f99815f05c094
Author: Arnaldo Carvalho de Melo <acme>
Date:   Tue Apr 10 21:21:55 2007 -0700

    [SK_BUFF]: unions of just one member don't get anything done, kill them

    Renaming skb->h to skb->transport_header, skb->nh to skb->network_header and
    skb->mac to skb->mac_header, to match the names of the associated helpers
    (skb[_[re]set]_{transport,network,mac}_header).

    Signed-off-by: Arnaldo Carvalho de Melo <acme>
    Signed-off-by: David S. Miller <davem>

Comment 2 Andy Gospodarek 2007-11-15 22:43:33 UTC
Upon further review there are quite a few more patches -- still working on an exhaustive list.

Comment 5 Andy Gospodarek 2007-11-16 21:34:33 UTC
Created attachment 261831 [details]
rhel5-test0.patch

First pass at a patch for this issue.

The design here was to make those APIs available without actually modifying too
much other code.  Since we are keeping the old sk_buff structure around there
isn't much need to change many of the references -- that can be left upto RHEL
driver maintainers.

Comment 6 Arnaldo Carvalho de Melo 2007-11-17 12:18:43 UTC
Looks ok, old drivers work because the unions are still there, new drivers work
because the header functions are present.

Comment 7 Andy Gospodarek 2007-11-20 14:06:33 UTC
My test kernels have been updated to include a patch for this bugzilla.

http://people.redhat.com/agospoda/#rhel5

Please test them and report back your results.

Comment 10 RHEL Program Management 2007-12-12 15:25:39 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 12 Don Zickus 2007-12-17 19:37:31 UTC
in 2.6.18-61.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 15 errata-xmlrpc 2008-05-21 15:01:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0314.html