Re: Skbuff Trimming

Bendi Vinaya Kumar (vbendi@cs.clemson.edu)
Fri, 28 Jun 2002 15:06:42 -0400 (EDT)


On 28 Jun 2002, Andi Kleen wrote:

> Bendi Vinaya Kumar <vbendi@cs.clemson.edu> writes:
>
> > But, it does not do the same on
> > "frag_list". Why?
>
> frag_list is not a general purpose skbuff facility and is not used by
> most protocols and not directly supported by most of skbuff.c It is just
> supported by some specific paths to enable lazy defragmenting. It is not
> an attempt to turn skbuffs into mbufs.
>
> -Andi

I agree with you. I couldn't find a
case when it (frag_list) is used.

Function

ip_rcv
(http://lxr.linux.no/source/net/ipv4/ip_input.c#L383)

uses two functions, namely,

1) pskb_may_pull, which might
result in a call to __pskb_pull_tail

and 2) __pskb_trim, which might
result in a call to ___pskb_trim.

Function __pskb_pull_tail
operates on data in both frags
array and frag_list. As mentioned
earlier, ___pskb_trim doesn't operate
on frag_list. Since these two functions
are called from ip_rcv, they must be
operating on the same sk buff. One function
handles frag_list, the other doesn't.

Isn't there an inconsistency in treatment here,
even though frag_list is not commonly used
in practice?

Thank you.

Regards,
Vinaya Kumar Bendi
P.S.: Kindly CC any answers/comments
to vbendi@cs.clemson.edu.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/