]> www.infradead.org Git - users/willy/xarray.git/commit
net: psample: skip packet copy if no listeners
authorAdrian Moreno <amorenoz@redhat.com>
Thu, 4 Jul 2024 08:56:54 +0000 (10:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Jul 2024 00:45:47 +0000 (17:45 -0700)
commitc35d86a23029f1186e3c7a65df7c38b762fb0434
treee1b217cd535dab72f65bfc23711c691da36abf76
parent03448444ae5c6e1de1ae7ff9fa19dc320eeb2d49
net: psample: skip packet copy if no listeners

If nobody is listening on the multicast group, generating the sample,
which involves copying packet data, seems completely unnecessary.

Return fast in this case.

Reviewed-by: Aaron Conole <aconole@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Link: https://patch.msgid.link/20240704085710.353845-4-amorenoz@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/psample/psample.c