On Mon, 2016-05-09 at 10:39 -0700, Eric Dumazet wrote: > On Mon, 2016-05-09 at 10:22 -0700, Alexander Duyck wrote: > > > One thought that just occurred to me based on this would be to > > configure inner headers on the way up, and to configure the outer > > headers on the way down. Then that way we could go through and be > > guaranteed that the inner headers represent the inner most set of > > header offsets, and the outer ones represent the outer-most set > > regardless of the total number of headers present and there would be > > no need to call into the reset_headers function since all the headers > > would already be set. > > > > I was also looking at possibly dropping the inner transport offset as > > from what I can tell it and the csum_offset should always be the same > > value since csum_offset will always point to the inner transport > > header when any kind of offload is enabled which is the criteria for > > skb->encapsulation being set anyway. > > Ideally nothing should be changed in the source skb while doing > gso_segment() calls. > > As we did in gro_complete() when adding nhoff argument, we probably > could pass the current offset and not touch skb->data and various header > offsets.
Ugly things like skb_gso_error_unwind() would then disappear. What a mess it is.