Re: [PATCH net-next v3] net: psample: Introduce stubs to remove NIC driver dependency

2021-01-27 Thread Chris Mi
On 1/28/2021 7:49 AM, Jakub Kicinski wrote: On Wed, 27 Jan 2021 18:16:48 +0800 Chris Mi wrote: @@ -35,4 +45,21 @@ static inline void psample_sample_packet(struct psample_group *group, #endif +static void static inline Done. +psample_nic_sample_packet(struct psample_group *group, +

Re: [PATCH net-next v3] net: psample: Introduce stubs to remove NIC driver dependency

2021-01-27 Thread Jakub Kicinski
On Wed, 27 Jan 2021 18:16:48 +0800 Chris Mi wrote: > @@ -35,4 +45,21 @@ static inline void psample_sample_packet(struct > psample_group *group, > > #endif > > +static void static inline > +psample_nic_sample_packet(struct psample_group *group, > + struct sk_buff *skb,

[PATCH net-next v3] net: psample: Introduce stubs to remove NIC driver dependency

2021-01-27 Thread Chris Mi
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. Reported-by: k