netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Adrian Moreno <amorenoz@redhat.com>
Cc: netdev@vger.kernel.org, jiri@resnulli.us,
	xiyou.wangcong@gmail.com, cmi@nvidia.com, yotam.gi@gmail.com,
	i.maximets@ovn.org, aconole@redhat.com, echaudro@redhat.com,
	horms@kernel.org
Subject: Re: [RFC net-next v2 2/5] net: psample: add multicast filtering on group_id
Date: Wed, 10 Apr 2024 16:06:57 +0300	[thread overview]
Message-ID: <ZhaO8bOQ6Bm0Uh1H@shredder> (raw)
In-Reply-To: <20240408125753.470419-3-amorenoz@redhat.com>

On Mon, Apr 08, 2024 at 02:57:41PM +0200, Adrian Moreno wrote:
> Packet samples can come from several places (e.g: different tc sample
> actions), typically using the sample group (PSAMPLE_ATTR_SAMPLE_GROUP)
> to differentiate them.
> 
> Likewise, sample consumers that listen on the multicast group may only
> be interested on a single group. However, they are currently forced to
> receive all samples and discard the ones that are not relevant, causing
> unnecessary overhead.
> 
> Allow users to filter on the desired group_id by adding a new command
> SAMPLE_FILTER_SET that can be used to pass the desired group id.
> Store this filter on the per-socket private pointer and use it for
> filtering multicasted samples.

Did you consider using BPF for this type of filtering instead of new
uAPI?

See example here:
https://github.com/Mellanox/libpsample/blob/master/src/psample.c#L290

  parent reply	other threads:[~2024-04-10 13:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 12:57 [RFC net-next v2 0/5] net: openvswitch: Add sample multicasting Adrian Moreno
2024-04-08 12:57 ` [RFC net-next v2 1/5] net: netlink: export genl private pointer getters Adrian Moreno
2024-04-09 21:48   ` Jakub Kicinski
2024-04-08 12:57 ` [RFC net-next v2 2/5] net: psample: add multicast filtering on group_id Adrian Moreno
2024-04-08 13:18   ` Ilya Maximets
2024-04-08 19:24     ` Adrian Moreno
2024-04-09 14:43       ` Aaron Conole
2024-04-10 13:32         ` Adrian Moreno
2024-04-10 13:06   ` Ido Schimmel [this message]
2024-04-10 13:42     ` Adrian Moreno
2024-04-08 12:57 ` [RFC net-next v2 3/5] net: psample: add user cookie Adrian Moreno
2024-04-08 13:19   ` Ilya Maximets
2024-04-08 19:28     ` Adrian Moreno
2024-04-08 20:28       ` Ilya Maximets
2024-04-08 12:57 ` [RFC net-next v2 4/5] net:sched:act_sample: add action cookie to sample Adrian Moreno
2024-04-08 13:20   ` Ilya Maximets
2024-04-11  8:40     ` Adrian Moreno
2024-04-08 12:57 ` [RFC net-next v2 5/5] net:openvswitch: add psample support Adrian Moreno
2024-04-08 13:37   ` Ilya Maximets
2024-04-08 19:48     ` Adrian Moreno
2024-04-08 20:40       ` Ilya Maximets
2024-04-09  8:16         ` Adrian Moreno
2024-04-09  9:35           ` Ilya Maximets
2024-04-09 21:49             ` Jakub Kicinski
2024-04-10 13:44               ` Adrian Moreno
2024-04-08 13:16 ` [RFC net-next v2 0/5] net: openvswitch: Add sample multicasting Ilya Maximets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhaO8bOQ6Bm0Uh1H@shredder \
    --to=idosch@idosch.org \
    --cc=aconole@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=cmi@nvidia.com \
    --cc=echaudro@redhat.com \
    --cc=horms@kernel.org \
    --cc=i.maximets@ovn.org \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yotam.gi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).