Skip to content
Commit 5eecd85c authored by Adrian Moreno's avatar Adrian Moreno Committed by Jakub Kicinski
Browse files

psample: adjust size if rate_as_probability is set



If PSAMPLE_ATTR_SAMPLE_PROBABILITY flag is to be sent, the available
size for the packet data has to be adjusted accordingly.

Also, check the error code returned by nla_put_flag.

Fixes: 7b1b2b60 ("net: psample: allow using rate as probability")
Signed-off-by: default avatarAdrian Moreno <amorenoz@redhat.com>
Reviewed-by: default avatarAaron Conole <aconole@redhat.com>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20241217113739.3929300-1-amorenoz@redhat.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5eb70dbe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment