[ovs-dev] [RFC net-next 03/22] ipv4: support for fib route lwtunnel encap attributes

Thomas Graf tgraf at suug.ch
Fri Jul 10 16:54:36 UTC 2015


On 07/10/15 at 05:36pm, Eric Dumazet wrote:
> On Fri, 2015-07-10 at 16:19 +0200, Thomas Graf wrote:
> > From: Roopa Prabhu <roopa at cumulusnetworks.com>
> 
> 
> > +	if (oif)
> > +		dev = __dev_get_by_index(net, oif);
> > +	ret = lwtunnel_build_state(dev, encap_type,
> > +				   encap, &lwtstate);
> > +	if (!ret) {
> > +		lwtunnel_state_get(lwtstate);
> > +		ret = lwtunnel_cmp_encap(lwtstate, nh->nh_lwtstate);
> > +		lwtunnel_state_put(lwtstate);
> > +
> > +		return ret;
> 
> 
> These _get()/_put() calls do not seem necessary, or buggy.
> 
> If refcounting is needed the _get() should be done at the time lwstate
> is fetched.

I'll let Roopa comment but it seems like these can just be removed.



More information about the dev mailing list