]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitce411ef09c08b300d5f7a2475813ab0d013d60c8
tree767918907a8f75b3bc6ed6f2d6ca4159aab524fe
parenta5ebb0f1a5edf9eac130bccc8829ac23646ff59e
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