[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210127154934.2afbadda@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 27 Jan 2021 15:49:34 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Chris Mi <cmi@...dia.com>
Cc: netdev@...r.kernel.org, jiri@...dia.com, saeedm@...dia.com,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net-next v3] net: psample: Introduce stubs to remove NIC
driver dependency
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, u32 trunc_size,
> + int in_ifindex, int out_ifindex,
> + u32 sample_rate)
> +{
> + const struct psample_ops *ops;
> +
> + rcu_read_lock();
> + ops = rcu_dereference(psample_ops);
> + if (ops)
> + ops->sample_packet(group, skb, trunc_size,
> + in_ifindex, out_ifindex,
> + sample_rate);
> + rcu_read_unlock();
> +}
Powered by blists - more mailing lists