Pablo Neira Ayuso
2016-Jun-23 17:36 UTC
[Bridge] [PATCH] bridge: netfilter: spanning tree: Add masked_ether_addr_equal and neatening
On Wed, Jun 15, 2016 at 01:58:45PM -0700, Joe Perches wrote:> There is code duplication of a masked ethernet address comparison here > so make it a separate function instead. > > Miscellanea: > > o Neaten alignment of FWINV macro uses to make it clearer for the readerApplied, thanks.> Signed-off-by: Joe Perches <joe at perches.com> > --- > > This masked_ether_addr_equal function could go into etherdevice.h, > but I don't see another use like it in kernel code. Is there one?This is specific of iptables, not even nftables would use this. So I would keep this in the iptables tree.
Joe Perches
2016-Jun-23 19:00 UTC
[Bridge] [PATCH] bridge: netfilter: spanning tree: Add masked_ether_addr_equal and neatening
On Thu, 2016-06-23 at 19:36 +0200, Pablo Neira Ayuso wrote:> On Wed, Jun 15, 2016 at 01:58:45PM -0700, Joe Perches wrote: > > > > There is code duplication of a masked ethernet address comparison here > > so make it a separate function instead. > > > > Miscellanea: > > > > o Neaten alignment of FWINV macro uses to make it clearer for the reader > Applied, thanks. > > > > > Signed-off-by: Joe Perches <joe at perches.com> > > --- > > > > This masked_ether_addr_equal function could go into etherdevice.h, > > but I don't see another use like it in kernel code.??Is there one? > This is specific of iptables, not even nftables would use this. So I > would keep this in the iptables tree.Did you see the other patch that adds a generic ether_addr_equal_masked() and uses it in a few more files?
Pablo Neira Ayuso
2016-Jun-24 08:51 UTC
[Bridge] [PATCH] bridge: netfilter: spanning tree: Add masked_ether_addr_equal and neatening
On Thu, Jun 23, 2016 at 12:00:00PM -0700, Joe Perches wrote:> On Thu, 2016-06-23 at 19:36 +0200, Pablo Neira Ayuso wrote: > > On Wed, Jun 15, 2016 at 01:58:45PM -0700, Joe Perches wrote: > > > > > > There is code duplication of a masked ethernet address comparison here > > > so make it a separate function instead. > > > > > > Miscellanea: > > > > > > o Neaten alignment of FWINV macro uses to make it clearer for the reader > > Applied, thanks. > > > > > > > > Signed-off-by: Joe Perches <joe at perches.com> > > > --- > > > > > > This masked_ether_addr_equal function could go into etherdevice.h, > > > but I don't see another use like it in kernel code.??Is there one? > > > > This is specific of iptables, not even nftables would use this. So I > > would keep this in the iptables tree. > > Did you see the other patch that adds a generic > ether_addr_equal_masked() and uses it in a few > more files?You mean this one: http://patchwork.ozlabs.org/patch/636208/ OK, so I'll toss the previous and will take this one instead. As I said my opinion is that ether_addr_equal_masked() is only required by netfilter, but thinking it well I don't really mind in what header this function is placed given that these are our internal headers. Thanks.