netdev
[Top] [All Lists]

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

To: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>
Subject: Re: PATCH: [SKBUFF] introduce skb_link_header_size(skb)
From: Thomas Graf <tgraf@xxxxxxx>
Date: Tue, 5 Oct 2004 21:33:52 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <4162F28B.2050308@xxxxxxxxxxxxxxxx>
References: <4162F28B.2050308@xxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
* 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?

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