Commit a2dcc16
committed
af_xdp: Resize the XSPMAP to num of rxq in xdp_onload_prepare
xdp_tstamp.c currectly hardcodes the XSKMAP size to 4, but it
redirects to XSKs based on ctx->rx_queue_index. We can look up
the number of queues with an ethtool ioctl and resize the XSKMAP
before loading the map into the kernel.
The non-xdp_tstamp path works fine because xdp_map_create in
efhw/af_xdp.c creates max_entries = nic->vi_lim.
Signed-off-by: YiFei Zhu <zhuyifei@google.com>1 parent d4269ef commit a2dcc16
1 file changed
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
18 | 47 | | |
19 | 48 | | |
20 | 49 | | |
21 | 50 | | |
22 | 51 | | |
23 | 52 | | |
| 53 | + | |
24 | 54 | | |
25 | 55 | | |
26 | 56 | | |
27 | 57 | | |
28 | | - | |
| 58 | + | |
| 59 | + | |
29 | 60 | | |
30 | 61 | | |
31 | 62 | | |
| |||
37 | 68 | | |
38 | 69 | | |
39 | 70 | | |
| 71 | + | |
| 72 | + | |
40 | 73 | | |
41 | 74 | | |
42 | 75 | | |
| |||
0 commit comments