Re: [PATCH net-next v4] net: psample: Introduce stubs to remove NIC driver dependency
From: Chris Mi <hidden>
Date: 2021-01-29 06:09:31
From: Chris Mi <hidden>
Date: 2021-01-29 06:09:31
On 1/29/2021 1:14 PM, Cong Wang wrote:
On Wed, Jan 27, 2021 at 5:48 PM Chris Mi [off-list ref] wrote:quoted
In order to send sampled packets to userspace, NIC driver calls psample api directly. But it creates a hard dependency on module psample. Introduce psample_ops to remove the hard dependency. It is initialized when psample module is loaded and set to NULL when the module is unloaded.Is it too crazy to just make CONFIG_PSAMPLE a bool so that it won't be a module? Thanks.
That's a crazy and simple solution. But adding such a stub is a common method to remove the NIC driver dependency for modules. And comparing with other act_xxx modules, psample is not small now. Instead of discussing it several days, maybe it's better to review current patch, so that we can move forward :) Thanks.