diff mbox

[1/8] verbs: Fix typo in copying IBV_FLOW_SPEC_UDP/TCP 'val'

Message ID 20171205231721.19410-2-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Dec. 5, 2017, 11:17 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

The 'val' is a struct ibv_flow_tcp_udp_filter, not a ipv4_filter.

ipv4_filter is 8 bytes while tcp_udp_filter is only 4 bytes. So this
does not result in any bug, it is just a mistake.

Fixes: 389de6a6ef4e ("Add receive flow steering support")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 62fcd0e4e2f400..b957550ed6fbdb 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1844,7 +1844,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;