Re: crypto API and IBM z990 hardware support

Werner Almesberger (wa@almesberger.net)
Wed, 9 Jul 2003 23:06:37 -0300


David S. Miller wrote:
> Bad example, I'd say that %65 of that file is used in net/ipv6/*.c
> files too.

Considering only inline functions, 64 of the 89 functions my script
below finds in my 2.5.72 tree are only used in net/ipv4 (or tcp.h
itself). That's almost 72%. Only 22 of the functions (25%) are used
in net/ipv6.

A lot of the code there is basically an extension of net/ipv4/tcp*.c,
so it seems odd to put it at a completely different location, only
because it happens to be inlined.

#!/bin/sh
SRC=include/net/tcp.h
for n in `sed '/^.*inline.* \([a-zA-Z_0-9]*\)([^;]*$/s//\1/p;d' <$SRC`; do
echo -n "$n: "
echo `find . -name '*.[ch]' | fgrep -vx ./$SRC | xargs grep -lrw $n`
done

File is "out":
wc -l out
89 out
sed 's|\./net/ipv4/[^/]*\>||g' <out | fgrep -v . | wc -l
64
sed 's|\./net/ipv4/[^/]*\>||g' <out | grep -c net/ipv6
22

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/