bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] route


From: Alfred M. Szmidt
Subject: [bug-inetutils] route
Date: Fri, 26 Sep 2008 13:29:27 -0400

rishi, how goes it? I am still waiting for a reply concerning your
route patch.  I have explained to you why the current one was
rejected, but I will make a summary again:

 * "3000+ lines in a file is a monolith" vs.  "multiple small files"

Navigating a >3000 file is not a problem, it is quite easy.  Having
multiple small files makes it hard to navigate though, but that is not
the major issue here.  It is very hard to merge things back; splitting
things up when things do get large (100k bytes for a single file for
example) is much easier.  It also makes tracking history if you merge
things back harder, we still use CVS (and there is no really good
reason to switch yet), which is terrible when it comes to moving
around files.

 * inetutils/ifconfig/system/*.c

The code here is for argument parsing, and output generation; very
little of this code can be shared.  If route had different argument
handling and output for different platforms, then this would make
sense.  But the question is supporting different protocols (IPv4,
IPv6), and different ways of setting the route tables (PF_ROUTE,
PF_NETLINK, etc).  There is no good reason why all of this must be in
seperate files, alot of the code can be shared, and it would be easier
to maintain it; ping for example suffers from a "many small files"
problem (we have two seperate versions one for IPv6 and one for IPv4),
where one might forget to update one file, but not the other when
changing an interfaces.  Many bugs have been introduced in that
manner.

 * parted does something similar

It is not important what parted does, parted is also a single, large
program.  Our closest cousine is coreutils; the largest file there is
some 150k bytes; but this is not what is the issue.  It is what _we_
do; and we prefer few files.  That you might find examples of the
contrary is also not important, inetutils is a old project and has had
multiple maintainers.

The suggestion I gave (route.c, route_COMMAND.c) was a compromise, it
would even be better to have just a single file for route.c in my
opinion.  If you can suggest a scheme that minimises the amount of
files that are introduced, I'd be happy to hear it.  We can always
split things up if things get to large.

Have I missed any points you raised?

My intention right now is to commit the last patch you sent (the one
with only IPv4 support, which only uses PF_NETLINK) sometime next week
as a single file (without the hook framework).  Would you like to have
anything included in it? Opinions? I can do the merging of any patch
that you currently have if you want.  If the code base grows alot, we
can split it into route_{show,add,del}.c very easily.  And if it still
grows after that, it would make more sense to introduce a library.

I do no wish to spend more time on this issue, it is not a good way to
spend our time and it is such a easy issue to solve; all I want is to
see your continued contribution to inetutils, and have a good
relationship again.  Whatever happened before is water under the
bridge, so can we get back to hacking and having fun?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]