From: "Christoph A." <casmls@gmail.com>
To: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Cc: Patrick McHardy <kaber@trash.net>,
"Christoph A." <casmls@gmail.com>,
Jan Engelhardt <jengelh@medozas.de>
Subject: Re: codesize: netfilter/iptables vs. nftables
Date: Wed, 12 Aug 2009 16:32:06 +0200 [thread overview]
Message-ID: <4A82D266.8040605@gmail.com> (raw)
In-Reply-To: <4A8177CF.6030708@trash.net>
[-- Attachment #1: Type: text/plain, Size: 2864 bytes --]
thanks your replies
On 11.08.2009 15:53, Patrick McHardy wrote:
> but some of that are just API changes touching other files. The
> real code size currently is roughly 7300 lines I would guess, the
> number of files is somewhere around 25.
at the end I would like to now how many loc has the netfilter/iptables
subsystem(*) (of a iptables-only kernel) and how many loc has the
netfilter/nftables(**) subsystem (of a nftables-only kernel) (rawly)
*includes: {ip,ip6,eb,x}tables
**includes: nftables
I hope this is reasonable.
On 11.08.2009 18:53, Jan Engelhardt wrote:
> Hence I counted by
>
> net/{bridge,ipv4,ipv6,}/netfilter/*tables.c
> net/{bridge,ipv4,ipv6}/netfilter/*table_{filter,raw,security,mangle}.c
is it ok to add net/netfilter/x_tables.c to this list?
>
> Something like that. iptables clocks in at some 9 kLOC IIRC (~5k
> after my large consolidation), and nftables somewhere at 2.5k, but
> that's only because I have not yet started trimming down ebtables.
ok, here my second attempt:
for the iptables part I used a vanilla 31rc4
http://git.kernel.org/?p=linux/kernel/git/kaber/nft-2.6.git;a=commit;h=4be3bd7849165e7efa6b0b35a23d6a3598d97465
cp
{bridge,ipv4,ipv6}/netfilter/*table{s,_filter,_raw,_security,_mangle}.c
netfilter/x_tables.c /tmp/31rc4/
ls /tmp/31rc4/|wc -l
15
sloccount /tmp/31rc4/
Creating filelist for 31rc4
Computing results.
SLOC
8834 <==
for nftables I used
http://git.kernel.org/?p=linux/kernel/git/kaber/nft-2.6.git;a=commit;h=a80c1f56e68fd0a7a57a82c85ff50a96a4e38267
find . -name 'nf_table*' -exec cp -i {} /tmp/nftables/ \;
find . -name 'nft_*' -exec cp -i {} /tmp/nftables/ \;
ls /tmp/nftables|wc -l
25 (conforming to the number mentioned by Patrick)
sloccount /tmp/nftables
Creating filelist for nftables
Computing results.
SLOC
4697 <==
at the end it comes to:
8834 LOC vs. 4697 LOC
for sure this is another flawed comparison but hopefully a better one
than the previous ;)
thanks
Christoph A.
just for the record:
ls /tmp/31rc4/
arptable_filter.c ebtable_filter.c ip6table_filter.c ip6table_raw.c
ip6table_security.c iptable_mangle.c ip_tables.c x_tables.c
arp_tables.c ebtables.c ip6table_mangle.c ip6_tables.c
iptable_filter.c iptable_raw.c iptable_security.c
ls /tmp/nftables
nf_table_nat_ipv4.c nf_tables_bridge.c nft_bitwise.c nft_ct.c
nft_immediate.c nft_meta.c nft_reject_ipv4.c
nf_table_route_ipv4.c nf_tables_core.c nft_byteorder.c
nft_expr_template.c nft_limit.c nft_meta_target.c
nf_table_route_ipv6.c nf_tables_ipv4.c nft_cmp.c nft_exthdr.c
nft_log.c nft_payload.c
nf_tables_api.c nf_tables_ipv6.c nft_counter.c nft_hash.c
nft_lookup.c nft_rbtree.c
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-08-12 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 10:24 codesize: netfilter/iptables vs. nftables Christoph A.
2009-08-11 13:53 ` Patrick McHardy
2009-08-12 14:32 ` Christoph A. [this message]
2009-08-11 16:53 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A82D266.8040605@gmail.com \
--to=casmls@gmail.com \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.