Want rx-only DLPI promiscuous modes
The MAC layer already has a notion of a given mac callback only being promiscuous when receiving traffic. We should plumb this through to the DLPI layer.
This is an upstream of Joyent's OS-2781 - https://smartos.org/bugview/OS-2781
This will help with #13738 that is restoring a functioning virtual e1000 network interface for bhyve.
Updated by Andy Fiddaman 8 months ago
This has been mostly tested in conjunction with #13738 on with SmartOS and OmniOS using bhyve guests and emulated e1000 and legacy (non-viona) virtio interfaces. See the comments in https://code.illumos.org/c/illumos-gate/+/1432 for details of the combinations tested and what was seen.
I've also done some explicit testing using a small program that opens a DLPI link, binds to DLPI_ANY_SAP and then sets and unsets combinations of the dlpi promisc flags. I was able to confirm that the new
DL_PROMISC_RX_ONLY flag suppresses transmitted packets from being reflected back. I also tested with the CDP service to check that it operated correctly and that my test program could see the multicast CDP packets in both directions normally, but just inbound with this flag set.
A variation of this has been in SmartOS and OmniOS for some time and the mac layer flag for receive-only is pre-existing.
Updated by Electric Monk 8 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 115f9ea8610878d992d097ec5df5c7c244c0bc49 Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2021-05-25T20:58:28.000Z 13763 Want rx-only DLPI promiscuous modes Portions contributed by: Andy Fiddaman <email@example.com> Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>