netdev
[Top] [All Lists]

Re: [PATCH] more const in skbuff

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] more const in skbuff
From: Mitchell Blank Jr <mitch@xxxxxxxxxx>
Date: Thu, 18 Sep 2003 13:42:53 -0700
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20030918102709.34211ee5.shemminger@osdl.org>
References: <20030918102709.34211ee5.shemminger@osdl.org>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
Stephen Hemminger wrote:
> -static inline int skb_cloned(struct sk_buff *skb)
> +static inline int skb_cloned(const struct sk_buff *skb)
>  {
>       return skb->cloned && atomic_read(&skb_shinfo(skb)->dataref) != 1;
>  }

Are you sure that atomic_read() is garaunteed to take a const pointer?
My understanding is that an arch could in theory take a spinlock (although
none do currently)

If it is garaunteed to take a const pointer then please fix the inline in
include/asm-parisc/atomic.h or your patch will create a lot of warnings on
that architecture.

Other than that this patch is a strict subset of the "small skbuff.[ch]
tweaks" patch I posted here 2 weeks ago:
  http://oss.sgi.com/projects/netdev/archive/2003-09/msg00036.html
Never heard from davem one way or the other on that one.

-Mitch

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