https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209427

Roman Bogorodskiy <no...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #170183|0                           |1
        is obsolete|                            |

--- Comment #2 from Roman Bogorodskiy <no...@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.
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to