mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
c6baf7eeb0
commit
a03e99d39f
4 changed files with 23 additions and 21 deletions
|
@ -356,9 +356,11 @@ static int psample_tunnel_meta_len(struct ip_tunnel_info *tun_info)
|
|||
#endif
|
||||
|
||||
void psample_sample_packet(struct psample_group *group, struct sk_buff *skb,
|
||||
u32 trunc_size, int in_ifindex, int out_ifindex,
|
||||
u32 sample_rate)
|
||||
u32 sample_rate, const struct psample_metadata *md)
|
||||
{
|
||||
int out_ifindex = md->out_ifindex;
|
||||
int in_ifindex = md->in_ifindex;
|
||||
u32 trunc_size = md->trunc_size;
|
||||
#ifdef CONFIG_INET
|
||||
struct ip_tunnel_info *tun_info;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue