psample: Encapsulate packet metadata in a struct
authorIdo Schimmel <idosch@nvidia.com>
Sun, 14 Mar 2021 12:19:30 +0000 (14:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Mar 2021 22:00:43 +0000 (15:00 -0700)
commita03e99d39f1943ec88f6fd3b0b9f34c20663d401
tree767918907a8f75b3bc6ed6f2d6ca4159aab524fe
parentc6baf7eeb0cf82f6a90a703f6548250fc85cfdcc
psample: Encapsulate packet metadata in a struct

Currently, callers of psample_sample_packet() pass three metadata
attributes: Ingress port, egress port and truncated size. Subsequent
patches are going to add more attributes (e.g., egress queue occupancy),
which also need an indication whether they are valid or not.

Encapsulate packet metadata in a struct in order to keep the number of
arguments reasonable.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
include/net/psample.h
net/psample/psample.c
net/sched/act_sample.c