Commit c3c16f2
bpf: Add rx_queue_mapping to bpf_sock
Add "rx_queue_mapping" to bpf_sock. This gives read access for the
existing field (sk_rx_queue_mapping) of struct sock from bpf_sock.
Semantics for the bpf_sock rx_queue_mapping access are similar to
sk_rx_queue_get(), i.e the value NO_QUEUE_MAPPING is not allowed
and -1 is returned in that case. This is useful for transmit queue
selection based on the received queue index which is cached in the
socket in the receive path.
v3: Addressed review comments to add usecase in patch description,
and fixed default value for rx_queue_mapping.
v2: fixed build error for CONFIG_XPS wrapping, reported by
kbuild test robot <[email protected]>
Signed-off-by: Amritha Nambiar <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent e255d32 commit c3c16f2
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3612 | 3612 | | |
3613 | 3613 | | |
3614 | 3614 | | |
| 3615 | + | |
3615 | 3616 | | |
3616 | 3617 | | |
3617 | 3618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6849 | 6849 | | |
6850 | 6850 | | |
6851 | 6851 | | |
| 6852 | + | |
6852 | 6853 | | |
6853 | 6854 | | |
6854 | 6855 | | |
| |||
7897 | 7898 | | |
7898 | 7899 | | |
7899 | 7900 | | |
| 7901 | + | |
| 7902 | + | |
| 7903 | + | |
| 7904 | + | |
| 7905 | + | |
| 7906 | + | |
| 7907 | + | |
| 7908 | + | |
| 7909 | + | |
| 7910 | + | |
| 7911 | + | |
| 7912 | + | |
| 7913 | + | |
| 7914 | + | |
| 7915 | + | |
| 7916 | + | |
| 7917 | + | |
7900 | 7918 | | |
7901 | 7919 | | |
7902 | 7920 | | |
| |||
0 commit comments