Feature #13763
closedWant rx-only DLPI promiscuous modes
100%
Description
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 about 2 years 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 about 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 115f9ea8610878d992d097ec5df5c7c244c0bc49
commit 115f9ea8610878d992d097ec5df5c7c244c0bc49 Author: Robert Mustacchi <rm@joyent.com> Date: 2021-05-25T20:58:28.000Z 13763 Want rx-only DLPI promiscuous modes Portions contributed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>