RDMA/rxe: Fix small problem in network_type patch
Subsystems (2)
PATCH 1/1 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 RC traffic because they use AVs that use RDMA_NETWORK_XXX enums instead of RXE_NETWORK_TYPE_XXX enums. Fis this by making the encodings the same between these different types.
uAPI")
--- drivers/infiniband/sw/rxe/rxe_net.c | 2 +- include/uapi/rdma/rdma_user_rxe.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/infiniband/sw/rxe/rxe_net.c +1 -1
@@ -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
include/uapi/rdma/rdma_user_rxe.h +3 -2
@@ -40,8 +40,9 @@#include <linux/in6.h> enum { -RXE_NETWORK_TYPE_IPV4 =1 , -RXE_NETWORK_TYPE_IPV6 =2 , +/* good reasons to make same as RDMA_NETWORK_XXX */ +RXE_NETWORK_TYPE_IPV4 =2 , +RXE_NETWORK_TYPE_IPV6 =3 , };union rxe_gid {
Signature · 1 line
2.25.1
Jason Gunthorpe
maintainerQuoted 9 lines · Bob Pearson
The patch referenced below has a typo that results in using the wrong L2 header size for outbound traffic. (V4 <-> V6).
It also breaks RC traffic because they use AVs that use
RDMA_NETWORK_XXXenums instead ofRXE_NETWORK_TYPE_XXXenums. Fis this by making the encodings the same between these different types.Fixes e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type touAPI")
Don't word wrap these
Quoted 21 lines
Signed-off-by Bob Pearson <[email protected]>drivers/infiniband/sw/rxe/rxe_net.c | 2 +- include/uapi/rdma/rdma_user_rxe.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)drivers/infiniband/sw/rxe/rxe_net.c +2
-1+++ 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 include/uapi/rdma/rdma_user_rxe.h +1
-0+++ b/include/uapi/rdma/rdma_user_rxe.h
include/uapi/rdma/rdma_user_rxe.h line 46
Quoted 9 lines
include/uapi/rdma/rdma_user_rxe.h +3
-2@@ -40,8 +40,9 @@#include <linux/in6.h> enum { -RXE_NETWORK_TYPE_IPV4 =1 , -RXE_NETWORK_TYPE_IPV6 =2 , +/* good reasons to make same as RDMA_NETWORK_XXX */ +RXE_NETWORK_TYPE_IPV4 =2 , +RXE_NETWORK_TYPE_IPV6 =3 , };
No just transcode them in the only place that matters, we still can't break userspace
Jason
Quoted 47 lines · Jason Gunthorpe
Quoted 9 lines · Bob Pearson
The patch referenced below has a typo that results in using the wrong L2 header size for outbound traffic. (V4 <-> V6).
It also breaks RC traffic because they use AVs that use
RDMA_NETWORK_XXXenums instead ofRXE_NETWORK_TYPE_XXXenums. Fis this by making the encodings the same between these different types.Fixes e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type touAPI")Don't word wrap these
Quoted 21 lines
Signed-off-by Bob Pearson <[email protected]>drivers/infiniband/sw/rxe/rxe_net.c | 2 +- include/uapi/rdma/rdma_user_rxe.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)drivers/infiniband/sw/rxe/rxe_net.c +2
-1+++ 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 include/uapi/rdma/rdma_user_rxe.h +1
-0+++ b/include/uapi/rdma/rdma_user_rxe.hinclude/uapi/rdma/rdma_user_rxe.h line 46
Quoted 9 lines
include/uapi/rdma/rdma_user_rxe.h +3
-2@@ -40,8 +40,9 @@#include <linux/in6.h> enum { -RXE_NETWORK_TYPE_IPV4 =1 , -RXE_NETWORK_TYPE_IPV6 =2 , +/* good reasons to make same as RDMA_NETWORK_XXX */ +RXE_NETWORK_TYPE_IPV4 =2 , +RXE_NETWORK_TYPE_IPV6 =3 , };No just transcode them in the only place that matters, we still can't break userspace
Quoted 2 lines
Jason
done. You should have it.