Messages in this thread | | | Date | Sat, 31 Aug 2019 21:35:56 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity. |
| |
> Also, what happens when I'm running these application without putting > the interface in promisc mode? On an offloaded interface I would not be > able to even capture packets addressed to my interface's MAC address.
Sorry for rejoining the discussion late. I've been travelling and i'm now 3/4 of the way to Lisbon.
That statement i don't get. If the frame has the MAC address of the interface, it has to be delivered to the CPU. And so pcap will see it when running on the interface. I can pretty much guarantee every DSA driver does that.
But to address the bigger picture. My understanding is that we want to model offloading as a mechanism to accelerate what Linux can already do. The user should not have to care about these accelerators. The interface should work like a normal Linux interface. I can put an IP address on it and ping a peer. I can run a dhcp client and get an IP address from a dhcp server. I can add the interface to a bridge, and packets will get bridged. I as a user should not need to care if this is done in software, or accelerated by offloading it. I can add a route, and if the accelerate knows about L3, it can accelerate that as well. If not, the kernel will route it.
So if i run wireshark on an interface, i expect the interface will be put into promisc mode and i see all packets ingressing the interface. What the accelerator needs to do to achieve this, i as a user don't care.
I can follow the argument that i won't necessarily see every packet. But that is always true. For many embedded systems, the CPU is too slow to receive at line rate, even when we are talking about 1G links. Packets do get dropped. And i hope tcpdump users understand that.
For me, having tcpdump use tc trap is just wrong. It breaks the model that the user should not care about the accelerator. If anything, i think the driver needs to translate cBPF which pcap passes to the kernel to whatever internal format the accelerator can process. That is just another example of using hardware acceleration.
Andrew
| |