Hello!
> Alexey, please remove the backout of this from future softnet
> patchlets, thanks.
In progress.
BTW I see real logical problem here, which I've already tried to explain
earlier advocating separate functions for reallocating head room
and head/tail room.
Function skb_realloc_headroom() (and skb_cow()) copies only data,
because it was used only in places, when we were about to modify
this header and preserving it was useless. Essentially, "cow" here
apply only to packet header.
skb_copy() copied _all_ because it was called from obscure contexts,
when we wanted to make full exact mirror of skb. Mostly it was useless
work, certainly. But net/* still gets MAC header stripped, and we
want to preserve it sometimes. Paul tried to generalize it.
I guess to have MAC header for checking and printing in netfilter,
does not it? 8)
skb_realloc_tailroom() is different. Essentially, it is fully
orthogonal to skb_realloc_headroom(), because it prepares skb to modify
data part. One day (really soon, I hope) we will hold data separately
(f.e. in page cache), so that the difference will be really drastic.
Well, all this is blather, for now the only practical question
is to audit code and check that skb_copy() is not used before all
the information from MAC header is extracted.
Alexey
|