summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rxe/rxe_net.c
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2020-10-16 16:13:44 -0500
committerJason Gunthorpe <jgg@nvidia.com>2020-10-26 19:12:17 -0300
commitedebc8407b8891ec0ea9ca4089f3d3343a5e50dd (patch)
tree3484a623dd3eecb24716bf0d9181daff942a033c /drivers/infiniband/sw/rxe/rxe_net.c
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
RDMA/rxe: Fix small problem in network_type patch
The patch referenced below has a typo that results in using the wrong L2 header size for outbound traffic. (V4 <-> V6). It also breaks kernel-side RC traffic because they use AVs that use RDMA_NETWORK_XXX enums instead of RXE_NETWORK_TYPE_XXX enums. Fix this by transcoding between these enum types. Fixes: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI") Link: https://lore.kernel.org/r/20201016211343.22906-1-rpearson@hpe.com Signed-off-by: Bob Pearson <rpearson@hpe.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_net.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 575e1a4ec821..34bef7d8e6b4 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -442,7 +442,7 @@ struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
if (IS_ERR(attr))
return NULL;
- if (av->network_type == RXE_NETWORK_TYPE_IPV6)
+ if (av->network_type == RXE_NETWORK_TYPE_IPV4)
hdr_len = ETH_HLEN + sizeof(struct udphdr) +
sizeof(struct iphdr);
else