-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDP-hints: API change for RX-hash kfunc bpf_xdp_metadata_rx_hash #4840
Conversation
Upstream branch: a6f6a95 Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=734748
conflict:
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=734748 expired. Closing PR. |
Upstream branch: a6f6a95 Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=735092
conflict:
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=735092 expired. Closing PR. |
Upstream branch: a6f6a95 |
3c4edd0
to
654f959
Compare
Upstream branch: a6f6a95 |
654f959
to
ff421cd
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=735513 expired. Closing PR. |
Upstream branch: a6f6a95 |
ff421cd
to
20a8680
Compare
Upstream branch: a6f6a95 |
20a8680
to
741cc7a
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=735957 expired. Closing PR. |
The RSS hash type specifies what portion of packet data NIC hardware used when calculating RSS hash value. The RSS types are focused on Internet traffic protocols at OSI layers L3 and L4. L2 (e.g. ARP) often get hash value zero and no RSS type. For L3 focused on IPv4 vs. IPv6, and L4 primarily TCP vs UDP, but some hardware supports SCTP. Hardware RSS types are differently encoded for each hardware NIC. Most hardware represent RSS hash type as a number. Determining L3 vs L4 often requires a mapping table as there often isn't a pattern or sorting according to ISO layer. The patch introduce a XDP RSS hash type (enum xdp_rss_hash_type) that contain combinations to be used by drivers, which gets build up with bits from enum xdp_rss_type_bits. Both enum xdp_rss_type_bits and xdp_rss_hash_type get exposed to BPF via BTF, and it is up to the BPF-programmer to match using these defines. This proposal change the kfunc API bpf_xdp_metadata_rx_hash() adding a pointer value argument for provide the RSS hash type. Change function signature for all xmo_rx_hash calls in drivers to make it compile. The RSS type implementations for each driver comes as separate patches. Fixes: 3d76a4d ("bpf: XDP metadata RX kfuncs") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com>
Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type via mapping table. The mlx5 hardware can also identify and RSS hash IPSEC. This indicate hash includes SPI (Security Parameters Index) as part of IPSEC hash. Extend xdp core enum xdp_rss_hash_type with IPSEC hash type. Fixes: bc8d405 ("net/mlx5e: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com>
Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type. The veth driver currently only support XDP-hints based on SKB code path. The SKB have lost information about the RSS hash type, by compressing the information down to a single bitfield skb->l4_hash, that only knows if this was a L4 hash value. In preparation for veth, the xdp_rss_hash_type have an L4 indication bit that allow us to return a meaningful L4 indication when working with SKB based packets. Fixes: 306531f ("veth: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com>
Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type via matching indiviual Completion Queue Entry (CQE) status bits. Fixes: ab46182 ("net/mlx4_en: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com>
Update BPF selftests to use the new RSS type argument for kfunc bpf_xdp_metadata_rx_hash. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Stanislav Fomichev <sdf@google.com>
Upstream branch: 738a96c |
741cc7a
to
f66d09d
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=736141 expired. Closing PR. |
Pull request for series with
subject: XDP-hints: API change for RX-hash kfunc bpf_xdp_metadata_rx_hash
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=734748