moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet)

Luigi Rizzo rizzo at iet.unipi.it
Mon Jan 4 22:15:30 UTC 2010


On Mon, Jan 04, 2010 at 08:24:21PM +0100, Michael Tuexen wrote:
> On Jan 4, 2010, at 8:00 PM, Luigi Rizzo wrote:
> 
> > taking a random commit to this tree -- would you guys consider moving
> > the sctp sources to its own directory, e.g. netinet/sctp/ or something
> > that suits better ?
> Why do you think that a place different from netinet/ does suit
> better for the sctp_*.[ch] files than netinet/ ? This is at least the
> place where TCP and UDP live...

TCP and UDP landed there 25 years ago, but overall the directory
has grown way too much, which makes it hard to browse through the
files, check the logs, etc. etc..

BTW the size of individual files is also worrysome.

Back in 2.2, the top 10 files in lines where
    2302    7272   55414 ip_mroute.c
    2226    9339   64746 tcp_input.c
    1564    5349   38710 ip_input.c
    1366    4768   33974 ip_output.c
    1298    4214   32400 ip_fw.c
     861    2927   20788 tcp_usrreq.c
     764    3273   21779 tcp_output.c
     762    2739   21695 in_pcb.c
     730    2441   19269 in.c
     712    2461   18672 ip_icmp.c

Now we have (excluding sctp)
    3648   12414   98354 /home/luigi/FreeBSD/head/sys/netinet/igmp.c
    3440   13962  102928 /home/luigi/FreeBSD/head/sys/netinet/tcp_input.c
    2909    9728   76470 /home/luigi/FreeBSD/head/sys/netinet/in_mcast.c
    2894    9269   74956 /home/luigi/FreeBSD/head/sys/netinet/ip_mroute.c
    2354    8521   66835 /home/luigi/FreeBSD/head/sys/netinet/tcp_subr.c
    2299    6173   56414 /home/luigi/FreeBSD/head/sys/netinet/ip_carp.c
    1950    6377   50717 /home/luigi/FreeBSD/head/sys/netinet/in_pcb.c
    1871    5740   46629 /home/luigi/FreeBSD/head/sys/netinet/tcp_usrreq.c
    1773    6692   51606 /home/luigi/FreeBSD/head/sys/netinet/tcp_syncache.c
    1770    6165   45932 /home/luigi/FreeBSD/head/sys/netinet/ip_input.c

(and sctp has some quite large files...)
   13808   45244  367610 /home/luigi/FreeBSD/head/sys/netinet/sctp_output.c
    8101   28015  253529 /home/luigi/FreeBSD/head/sys/netinet/sctp_indata.c
    6938   21122  190172 /home/luigi/FreeBSD/head/sys/netinet/sctputil.c
    6717   22130  195580 /home/luigi/FreeBSD/head/sys/netinet/sctp_pcb.c
    5924   20286  185239 /home/luigi/FreeBSD/head/sys/netinet/sctp_input.c
    4900   14271  140811 /home/luigi/FreeBSD/head/sys/netinet/sctp_usrreq.c

This was the reason why I moved ipfw-related stuff out of the way
and plan to do the same with tcp unless someone precedes me.

Just checked, in 2.2 (which was some 12 years ago) netinet/
had 46 files and 21k lines, of which tcp accounted for 13 files/6K lines.
Compare with 156 files/153k lines (tcp: 24 files, 16k lines) in HEAD now.

I also think that the name of the new directory or the exact percentage of
ipv4-ness or netinet-ness of the sctp* and tcp* and multicast* stuff
is irrelevant.  Moving directories with svn is so easy that we should not
worry even if we need a couple of attempts to find a good name.

	cheers
	luigi


More information about the svn-src-head mailing list