mbox series

[nf-next,0/7] ipset: remove static inline functions

Message ID 20191003195607.13180-1-jeremy@azazel.net
Headers show
Series ipset: remove static inline functions | expand

Message

Jeremy Sowden Oct. 3, 2019, 7:56 p.m. UTC
In his feedback on an earlier patch series [0], Pablo suggested reducing
the number of ipset static inline functions.

0 - https://lore.kernel.org/netfilter-devel/20190808112355.w3ax3twuf6b7pwc7@salvia/

This series:

  * removes inline from static functions in .c files;
  * moves some static functions out of headers and removes inline from
    them if they are only called from one .c file,
  * moves some static functions out of headers, removes inline from them
    and makes them extern if they are too big.

The changes reduced the size of the ipset modules by c. 13kB, when
compiled with GCC 9 on x86-64.

Jeremy Sowden (7):
  netfilter: ipset: add a coding-style fix to ip_set_ext_destroy.
  netfilter: ipset: remove inline from static functions in .c files.
  netfilter: ipset: move ip_set_comment functions from ip_set.h to
    ip_set_core.c.
  netfilter: ipset: move functions to ip_set_core.c.
  netfilter: ipset: make ip_set_put_flags extern.
  netfilter: ipset: move function to ip_set_bitmap_ip.c.
  netfilter: ipset: move ip_set_get_ip_port() to ip_set_bitmap_port.c.

 include/linux/netfilter/ipset/ip_set.h        | 196 +---------------
 include/linux/netfilter/ipset/ip_set_bitmap.h |  14 --
 .../linux/netfilter/ipset/ip_set_getport.h    |   3 -
 net/netfilter/ipset/ip_set_bitmap_gen.h       |   2 +-
 net/netfilter/ipset/ip_set_bitmap_ip.c        |  26 ++-
 net/netfilter/ipset/ip_set_bitmap_ipmac.c     |  18 +-
 net/netfilter/ipset/ip_set_bitmap_port.c      |  41 +++-
 net/netfilter/ipset/ip_set_core.c             | 212 +++++++++++++++++-
 net/netfilter/ipset/ip_set_getport.c          |  28 ---
 net/netfilter/ipset/ip_set_hash_gen.h         |   4 +-
 net/netfilter/ipset/ip_set_hash_ip.c          |  10 +-
 net/netfilter/ipset/ip_set_hash_ipmac.c       |   8 +-
 net/netfilter/ipset/ip_set_hash_ipmark.c      |   8 +-
 net/netfilter/ipset/ip_set_hash_ipport.c      |   8 +-
 net/netfilter/ipset/ip_set_hash_ipportip.c    |   8 +-
 net/netfilter/ipset/ip_set_hash_ipportnet.c   |  24 +-
 net/netfilter/ipset/ip_set_hash_mac.c         |   6 +-
 net/netfilter/ipset/ip_set_hash_net.c         |  24 +-
 net/netfilter/ipset/ip_set_hash_netiface.c    |  24 +-
 net/netfilter/ipset/ip_set_hash_netnet.c      |  28 +--
 net/netfilter/ipset/ip_set_hash_netport.c     |  24 +-
 net/netfilter/ipset/ip_set_hash_netportnet.c  |  28 +--
 net/netfilter/ipset/ip_set_list_set.c         |   4 +-
 23 files changed, 376 insertions(+), 372 deletions(-)

Comments

Jozsef Kadlecsik Oct. 7, 2019, 8:08 p.m. UTC | #1
Hi Jeremy, Pablo,

On Thu, 3 Oct 2019, Jeremy Sowden wrote:

> In his feedback on an earlier patch series [0], Pablo suggested reducing
> the number of ipset static inline functions.
> 
> 0 - https://lore.kernel.org/netfilter-devel/20190808112355.w3ax3twuf6b7pwc7@salvia/
> 
> This series:
> 
>   * removes inline from static functions in .c files;
>   * moves some static functions out of headers and removes inline from
>     them if they are only called from one .c file,
>   * moves some static functions out of headers, removes inline from them
>     and makes them extern if they are too big.
> 
> The changes reduced the size of the ipset modules by c. 13kB, when
> compiled with GCC 9 on x86-64.

I have reviewed all of the patches and they are all right. Pablo, could 
you queue them for nf-next? I applied the patches in the ipset git tree.

Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
          H-1525 Budapest 114, POB. 49, Hungary
Pablo Neira Ayuso Oct. 7, 2019, 10 p.m. UTC | #2
On Mon, Oct 07, 2019 at 10:08:28PM +0200, Kadlecsik József wrote:
> Hi Jeremy, Pablo,
> 
> On Thu, 3 Oct 2019, Jeremy Sowden wrote:
> 
> > In his feedback on an earlier patch series [0], Pablo suggested reducing
> > the number of ipset static inline functions.
> > 
> > 0 - https://lore.kernel.org/netfilter-devel/20190808112355.w3ax3twuf6b7pwc7@salvia/
> > 
> > This series:
> > 
> >   * removes inline from static functions in .c files;
> >   * moves some static functions out of headers and removes inline from
> >     them if they are only called from one .c file,
> >   * moves some static functions out of headers, removes inline from them
> >     and makes them extern if they are too big.
> > 
> > The changes reduced the size of the ipset modules by c. 13kB, when
> > compiled with GCC 9 on x86-64.
> 
> I have reviewed all of the patches and they are all right. Pablo, could 
> you queue them for nf-next? I applied the patches in the ipset git tree.

Sure.

> Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>

Applied, thanks a lot Jozsef.