LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCHv2 net-next 01/15] net: add skb_dst_set_unref

To: ja@xxxxxx
Subject: Re: [PATCHv2 net-next 01/15] net: add skb_dst_set_unref
Cc: horms@xxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx
From: David Miller <davem@xxxxxxxxxxxxx>
Date: Sun, 10 Mar 2013 05:17:35 -0400 (EDT)
From: Julian Anastasov <ja@xxxxxx>
Date: Sat,  9 Mar 2013 23:16:41 +0200

>       skb_dst_set_unref will use noref version even for
> DST_NOCACHE entries because DST_NOCACHE means dst is not
> cached in routing structures, still dst could be cached
> by routing users and used to produce noref instances.
> 
> Signed-off-by: Julian Anastasov <ja@xxxxxx>

I'm fine with this approach, but I think the name of this
interface could be better.

In fact you could do something like:

1) Rename skb_dst_set_noref() to __skb_dst_set_noref() and add
   a new "bool force" parameter.  DST_NOCACHE check is overriden
   when 'force' is true.

2) skb_dst_set_noref() is an inline that passes 'force' as false.

3) New interface skb_dst_set_noref_force() passes 'force' as true
   and will be used by your IPVS changes.

Then all of the RCU checks etc. happen in one shared function.
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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