1
- From ab65c38369aec72cbaac3e1c9d6731804edfc5b4 Mon Sep 17 00:00:00 2001
1
+ From a03e99d39f1943ec88f6fd3b0b9f34c20663d401 Mon Sep 17 00:00:00 2001
2
2
From: Ido Schimmel <idosch@nvidia.com>
3
3
Date: Sun, 14 Mar 2021 14:19:30 +0200
4
-
5
- [backport of upstream commit a03e99d39f1943ec88f6fd3b0b9f34c20663d401]
6
-
7
- Subject: [PATCH 1/3] psample: Encapsulate packet metadata in a struct
4
+ Subject: [PATCH] psample: Encapsulate packet metadata in a struct
8
5
9
6
Currently, callers of psample_sample_packet() pass three metadata
10
7
attributes: Ingress port, egress port and truncated size. Subsequent
@@ -25,10 +22,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
25
22
4 files changed, 23 insertions(+), 21 deletions(-)
26
23
27
24
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
28
- index 1a9978f50..323857943 100644
25
+ index 93b15b8c007e6d..3b15f8d728a37e 100644
29
26
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
30
27
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
31
- @@ -2167 ,7 +2167 ,7 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
28
+ @@ -2217 ,7 +2217 ,7 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
32
29
{
33
30
struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port];
34
31
struct mlxsw_sp_port_sample *sample;
@@ -37,7 +34,7 @@ index 1a9978f50..323857943 100644
37
34
38
35
if (unlikely(!mlxsw_sp_port)) {
39
36
dev_warn_ratelimited(mlxsw_sp->bus_info->dev, "Port %d: sample skb received for non-existent port\n",
40
- @@ -2179 ,9 +2179 ,9 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
37
+ @@ -2229 ,9 +2229 ,9 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
41
38
sample = rcu_dereference(mlxsw_sp_port->sample);
42
39
if (!sample)
43
40
goto out_unlock;
@@ -51,7 +48,7 @@ index 1a9978f50..323857943 100644
51
48
rcu_read_unlock();
52
49
out:
53
50
diff --git a/include/net/psample.h b/include/net/psample.h
54
- index 68ae16bb0..ac6dbfb38 100644
51
+ index 68ae16bb0a4a85..ac6dbfb3870d94 100644
55
52
--- a/include/net/psample.h
56
53
+++ b/include/net/psample.h
57
54
@@ -14,6 +14,12 @@ struct psample_group {
@@ -87,7 +84,7 @@ index 68ae16bb0..ac6dbfb38 100644
87
84
}
88
85
89
86
diff --git a/net/psample/psample.c b/net/psample/psample.c
90
- index 482c07f27..065bc887d 100644
87
+ index 482c07f2766b18..065bc887d23936 100644
91
88
--- a/net/psample/psample.c
92
89
+++ b/net/psample/psample.c
93
90
@@ -356,9 +356,11 @@ static int psample_tunnel_meta_len(struct ip_tunnel_info *tun_info)
@@ -105,7 +102,7 @@ index 482c07f27..065bc887d 100644
105
102
struct ip_tunnel_info *tun_info;
106
103
#endif
107
104
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
108
- index 3ebf9ede3..2fece01f2 100644
105
+ index db8ee9e5c8c229..6a0c16e4351d71 100644
109
106
--- a/net/sched/act_sample.c
110
107
+++ b/net/sched/act_sample.c
111
108
@@ -158,10 +158,8 @@ static int tcf_sample_act(struct sk_buff *skb, const struct tc_action *a,
@@ -146,6 +143,3 @@ index 3ebf9ede3..2fece01f2 100644
146
143
147
144
if (skb_at_tc_ingress(skb) && tcf_sample_dev_ok_push(skb->dev))
148
145
skb_pull(skb, skb->mac_len);
149
- - -
150
- 2.17.1
151
-
0 commit comments