netdev
[Top] [All Lists]

Re: PATCH: [SKBUFF] introduce skb_link_header_size(skb)

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: PATCH: [SKBUFF] introduce skb_link_header_size(skb)
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>
Date: Tue, 05 Oct 2004 16:45:33 -0300
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20041005193352.GA19714@xxxxxxxxxxxxxx>
Organization: Conectiva S.A.
References: <4162F28B.2050308@xxxxxxxxxxxxxxxx> <20041005193352.GA19714@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)


Thomas Graf wrote:
* Arnaldo Carvalho de Melo <4162F28B.2050308@xxxxxxxxxxxxxxxx> 2004-10-05 16:14

+static inline int skb_link_header_size(const struct sk_buff *skb)
+{
+       return skb->nh.raw - skb->mac.raw;
+}


The patch is valid and I think it is right to do so but this may lead to
wrong results when skb->mac.raw is set to 0x0 F.e in classifiers. Maybe
add a comment to warn about it?

I never looked at classifiers code, suggest a comment and I'll stick it
there.

Thanks for commenting on the patch.

Regards,

- Arnaldo

<Prev in Thread] Current Thread [Next in Thread>