[Bug 209427] if_vtnet(4) is not sending LINK_(UP|DOWN) events
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue May 17 15:14:49 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209427
Roman Bogorodskiy <novel at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #170183|0 |1
is obsolete| |
--- Comment #2 from Roman Bogorodskiy <novel at FreeBSD.org> ---
Created attachment 170409
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=170409&action=edit
proposed fix, v2
Attaching a new patch that's slightly less dirty than the previous one.
Specifically, it does not change vtnet_is_link_up() behavior, but extends
vtnet_update_link_status() event triggering.
Specifically, if link is here and IFF_DRV_RUNNING is set, but interface was not
active, we mark it active and trigger notification. If there is no link or
IFF_DRV_RUNNING, then we consider interface down.
Also, add a call to vtnet_update_link_status() on mtu change to trigger events
as well like other if drivers usually do.
So, a pair of ifconfig vtnet0 down/up followed by ifconfig vtnet0 mtu 1496 look
like this in devd:
!system=IFNET subsystem=vtnet0 type=LINK_DOWN
!system=IFNET subsystem=vtnet0 type=LINK_UP
!system=IFNET subsystem=vtnet0 type=LINK_DOWN
!system=IFNET subsystem=vtnet0 type=LINK_UP
!system=IFNET subsystem=vtnet0 type=LINK_DOWN
!system=IFNET subsystem=vtnet0 type=LINK_UP
I'm yet to figure out how I can test link status change in bhyve so
vtnet_is_link_up() returned something other that 1.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-virtualization
mailing list