mlx4: Unicast Loopback support
Subsystems (2)
Quoted 7 lines · On Sunday -10,January,-28163 09:59 PM, Or Gerlitz [[email protected]] wrote:
Quoted 5 lines · Yevgeny Petrilin
Quoted 1 line · Or Gerlitz [[email protected]] wrote:
I wasn't sure what is the use case here, isn't loopback handled by higher levels at the network stack?
The use case is two VMs using the same physical adapter.
Quoted 7 lines
I am still not with you: are you referring to the case where each VM is being served by a different VF? in that case, the VF driver (
mlx4_en) has no way to know its a "loopback" packet, and switching between VFs can be programmed to the PF by the PF driver (modifiedmlx4_core).If you are talking to the case both VMs are being served by the same PCI function --> same NIC then again, loopback is handled in higher level.
Is there a 3rd use case?
Or.
There is no third case. I am referring to the case where two VMs are served by two different VFs. The mlx4_en driver doesn't know whether a packet is loopback or not, it assumes that all packets can be loopbacks and writes the dmac to the control segment.
The HW checks this field and decides whether the packet is loopback or not (by checking whether the written mac matches one of the registered macs on this device).
Quoted 2 lines · Yevgeny Petrilin
I am referring to the case where two VMs are served by two different VFs. The HW checks this field and decides whether the packet is loopback or not (by checking whether the written mac matches one of the registered macs on this device).
okay good. I'd be glad to understand what setting/instrumentation has to be made to the PF driver code to allow for VF/VF traffic to be either internally switched by the PF HW or be forwarded to the PF uplink for external switch doing the job (VEPA mode).
I don't think you have to explicitly allow this in the initial patchset, just try to make it easy to patch.
Or.