Page MenuHomeFreeBSD

ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h
ClosedPublic

Authored by decui_microsoft.com on Jan 26 2017, 5:22 AM.
Tags
None
Referenced Files
F80199860: D9345.diff
Fri, Mar 29, 4:41 AM
Unknown Object (File)
Mon, Mar 18, 7:23 PM
Unknown Object (File)
Sun, Mar 3, 7:31 AM
Unknown Object (File)
Sun, Mar 3, 7:08 AM
Unknown Object (File)
Sun, Mar 3, 2:48 AM
Unknown Object (File)
Jan 15 2024, 12:22 PM
Unknown Object (File)
Jan 15 2024, 12:08 PM
Unknown Object (File)
Jan 12 2024, 4:29 AM

Details

Summary

This is to fix
svn commit: r312687 (ifnet: introduce event handlers for ifup/ifdown events)

Thank glebius for pointing this out:
"The network stuff shall not be added to sys/eventhandler.h"

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7030
Build 7210: arc lint + arc unit

Event Timeline

decui_microsoft.com retitled this revision from to ifnet: move the new ifnet_event EVENTHANDLER_DECLAREs to net/if_var.h.
decui_microsoft.com updated this object.
decui_microsoft.com edited the test plan for this revision. (Show Details)
decui_microsoft.com retitled this revision from ifnet: move the new ifnet_event EVENTHANDLER_DECLAREs to net/if_var.h to ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h.Jan 26 2017, 5:23 AM

Just a couple style nits.

sys/net/if_var.h
407

I would stick with the previous "ifup/ifdown" or go with "Interface up/down". I think "Interface up/ifdown" reads poorly.

408

It would be nice to have the 0/1 values for these two defines line up. In any case, it definitely seems like there is extraneous whitespace between "IFNET_EVENT_UP" and "0".

sys/net/if_var.h
407

I was trying to keep the consistency with Line 392, 395, 401 and 404.
I would tend to leave the patch as it is, if you won't strongly object to it. :-)

408

Actually the 2 lines do line up.
The visual confusion is due to the nasty Tab issue in the case of a patch. :-)

With "set list" in my Vim, the lines of the file net/if_var.h (rather than the patch with a leading + at the beginning of the lines) shows

#define IFNET_EVENT_UP^I^I0$
#define IFNET_EVENT_DOWN^I1$

^I means a Tab.
$ means a CR-LF.

dab added a reviewer: dab.
dab added inline comments.
sys/net/if_var.h
407

No objection to "Interface ..." but then I'd use "Interface up/down event" (the "if" in "ifdown" meaning "interface" is redundant).

But, then, this is a nit. I don't strongly object to the patch as-is.

408

Hmmm, you are right; Phabricator is deceiving me. They don't line up at all in the diff display it shows me, but you are right that they do in code. Sorry about that.

(Just a note that style(9) says to use just a single tab between name and value, which would mean they wouldn't line up. See similar situation at lines 185-186.)

This revision is now accepted and ready to land.Jan 26 2017, 2:31 PM
sys/net/if_var.h
407

Oh... Sorry, my bad! I failed to understand what you meant -- it's late at night here and obviously my eyes or brain didn't work very good :-)

decui_microsoft.com edited edge metadata.

fixed the comment typo pointed out by David.

This revision now requires review to proceed.Jan 26 2017, 4:04 PM
glebius edited edge metadata.
This revision is now accepted and ready to land.Jan 26 2017, 9:57 PM
dab edited edge metadata.
This revision was automatically updated to reflect the committed changes.