mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
fixup! verbs/mlx5: Add GRE and MPLS flow specification filter
Import rdma-core upstream commit ff01da2c5ac2 ("verbs: Fix typo in copying
IBV_FLOW_SPEC_UDP/TCP 'val'").
The TCP/UDP filter value was copied using the size of the IPv4 filter,
overrunning the destination subobject.
Also accept inner MPLS flow specs, matching 6d6f29721eea ("verbs: Allow
creation of inner MPLS flow spec"). Upstream deliberately has no inner
case for GRE - it is a tunnel header, matched only in the outer stack - so
that part of the review comment is not applied.
Sponsored by: NVidia networking
MFC after: 1 month
This commit is contained in:
1 parent
644f8990e2
commit
6ff2d2d5d4
1 file changed
+2
-1
@@ -1910,7 +1910,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
|
||||
case IBV_FLOW_SPEC_UDP | IBV_FLOW_SPEC_INNER:
|
||||
kern_spec->tcp_udp.size = sizeof(struct ibv_kern_spec_tcp_udp);
|
||||
memcpy(&kern_spec->tcp_udp.val, &ib_spec->tcp_udp.val,
|
||||
sizeof(struct ibv_flow_ipv4_filter));
|
||||
sizeof(struct ibv_flow_tcp_udp_filter));
|
||||
memcpy(&kern_spec->tcp_udp.mask, &ib_spec->tcp_udp.mask,
|
||||
sizeof(struct ibv_flow_tcp_udp_filter));
|
||||
break;
|
||||
@@ -1922,6 +1922,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
|
||||
sizeof(struct ibv_flow_gre_filter));
|
||||
break;
|
||||
case IBV_FLOW_SPEC_MPLS:
|
||||
case IBV_FLOW_SPEC_MPLS | IBV_FLOW_SPEC_INNER:
|
||||
kern_spec->mpls.size = sizeof(struct ib_uverbs_flow_spec_mpls);
|
||||
memcpy(&kern_spec->mpls.val, &ib_spec->mpls.val,
|
||||
sizeof(struct ibv_flow_mpls_filter));
|
||||
|
||||
Reference in new issue
Block a user