Re: [PATCH RFC 2/3] NFQUEUE: coalesce IPv4 and IPv6 hashing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 19, 2013 at 10:27:49AM -0400, David S. Miller wrote:
> From: holger@xxxxxxxxxxxxxxxx
> Date: Tue, 19 Mar 2013 15:14:44 +0100
> 
> > +	if (par->family == NFPROTO_IPV4)
> > +		queue = (((u64) hash_v4(skb) * info->queues_total) >>
> > +			 32) + queue;
> >  #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
> > -		else if (par->family == NFPROTO_IPV6)
> > -			queue = (((u64) hash_v6(skb) * info->queues_total) >>
> > -				 32) + queue;
> > +	else if (par->family == NFPROTO_IPV6)
> > +		queue = (((u64) hash_v6(skb) * info->queues_total) >>
> > +			 32) + queue;
> >  #endif
> 
> Similarly, add a helper function.
> 
> Since there are so many similar call sites, perhaps put it into a
> common header file.

Look at patch #2! :)

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux