-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to timing and igmpproxy #72
Conversation
71c563e
to
9517ac5
Compare
Please, please, do not mix different things into one pull request and one commit. Fixes for timings should not contain coding style changes or "several variables and structs were moved to igmpproxy.h". Also "preparation for other changes" should be also in separate pull request. Simpler and smaller is better! |
It took a while but I have update the PR. I removed much of the unrelated changes. Though some still remain. The timing algorithm was also updated to be much, much more accurate than before:
As you can see, I also included a minor change to syslog.c, is now timestamping logs to stderr. Also switched to unsigned long for timer id instead of int. just a little but of future proofing. Now if somebody were to be able to fire off 1 billion timers per second it would still take about 600years to roll over. :) |
Over the past 2 weeks I have been adding a bunch of functionality, testing a lot and weeding out bugs. I am now confident the code of my rewritten version is solid. A lot of work, effort, blood, sweat and tears went into it. I do think it has come together real nice. My version now features:
I think I basically turned it into a 1.0 version. I have been testing with both Linux and FreeBSD, in a chained igmpproxy set up. Had to set this up, because Linux uses in_pktinfo for recvmsg and BSD sockaddr_dl. |
This commit contains a number of changes to the timing structure and main event loops. Includes minor changes to config.c and request.c to include add name for timers. callout.c is modified to a simpler and more stable algorithm. igmpproxy.h and igmpproxy.c are sanitized and adopted to the new callout queue. FIXES: pali#58 Fixed a few typos and comments Updated Timing Algorithm Timers are now kept with a struct timespec, so they are much mnore acurately scheduled. Added a name to the timeoutqueue struct, improves debugging timers by a bunch. Renamed timer functions to be more in line with style time_ageQueue() now returns ns until next timer if scheduled in less then 1s. this makes timer execuation really accurate. Timers are not missed by more than a few 1/100s Updated syslog.c to add timestamp when logging to stderr. void debugQeueu(VOID)
Hello! Could you split changes into smaller pieces? One commit = one logical change? As I said it is really hard to review & merge big pull request which mix lot of features into one commit. |
This commit contains a number of changes to the timing structure and
main event loops.
Also several variables and structs were moved to igmpproxy.h in preperation
to coming changes.
Includes minor changes to config.c and request.c to include new blacklists
for interfaces.
callout.c is modified to a simpler and more stable algorithm.
igmpproxy.h and igmpproxy.c are sanitized and adopted to the new callout queue.
FIXES: #58