Commit dc2b7ec
committed
Simplify the xdp_stats_record_action function
The xdp_stats_record_action function doesn't use the packet data so we don't
need to do perform any pointer arithmetic and instead use the data and data_end
fields to compute packet length directly.
Besides, in some cases the verifier can reject a program with the old version
of the xdp_stats_record_action function saying that "pointer arithmetic with
<<= operator prohibited".
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>1 parent 94f594e commit dc2b7ec
1 file changed
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
45 | | - | |
| 39 | + | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
| |||
0 commit comments