From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbbAKU7j (ORCPT ); Sun, 11 Jan 2015 15:59:39 -0500 Received: from smtprelay0022.hostedemail.com ([216.40.44.22]:50515 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751573AbbAKU7g (ORCPT ); Sun, 11 Jan 2015 15:59:36 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3867:3868:3871:3872:4321:5007:6261:6742:6743:10004:10400:10848:11026:11658:11914:12043:12296:12438:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: drop64_8d72c52b8b005 X-Filterd-Recvd-Size: 2039 Message-ID: <1421009969.9233.5.camel@perches.com> Subject: Re: [PATCH 3/3] x_tables: Factor out 16bit aligment ifname_compare() From: Joe Perches To: Richard Weinberger Cc: davem@davemloft.net, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bhutchings@solarflare.com, john.fastabend@gmail.com, herbert@gondor.apana.org.au, vyasevic@redhat.com, jiri@resnulli.us, vfalico@gmail.com, therbert@google.com, edumazet@google.com, yoshfuji@linux-ipv6.org, jmorris@namei.org, kuznet@ms2.inr.ac.ru, kadlec@blackhole.kfki.hu, kaber@trash.net, pablo@netfilter.org, kay@vrfy.org, stephen@networkplumber.org Date: Sun, 11 Jan 2015 12:59:29 -0800 In-Reply-To: <1421009571-5279-4-git-send-email-richard@nod.at> References: <1421009571-5279-1-git-send-email-richard@nod.at> <1421009571-5279-4-git-send-email-richard@nod.at> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2015-01-11 at 21:52 +0100, Richard Weinberger wrote: > arp_tables.c has a 16bit aligment ifname_compare(), factor > it out to use it for all tables. [] > diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h [] > @@ -331,14 +331,15 @@ static inline void xt_write_recseq_end(unsigned int addend) > /* > * This helper is performance critical and must be inlined > */ > -static inline unsigned long ifname_compare_aligned(const char *_a, > - const char *_b, > - const char *_mask) > +static inline unsigned long ifname_compare(const char *_a, > + const char *_b, > + const char *_mask) Perhaps this would be better as bool ifname_compare