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>
Upon further review there are quite a few more patches -- still working on an exhaustive list.
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.
Looks ok, old drivers work because the unions are still there, new drivers work because the header functions are present.
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.
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.
in 2.6.18-61.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
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