Re: [PATCH 4/4] IB/rxe: exchange the 2 udp ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2018/5/13 19:49, Tom Talpey wrote:
On 5/12/2018 9:00 PM, Yanjun Zhu wrote:


On 2018/5/12 22:24, Tom Talpey wrote:
On 5/12/2018 9:54 AM, Zhu Yanjun wrote:
When udp port 4791 is blocked, the udp port 4891 is used and vice versa.

Port 4891 is currently unassigned in the IANA registry. Do you intend
to request this?
Yes. If this patch is merged, I will request it.

That is improper - the standards assignment must come first. In my
opinion the firewall reasoning will be rejected by the IANA, and
there's no guarantee what number will be assigned in any case. The
process is defined here: https://tools.ietf.org/html/rfc6335

Do the hard stuff first; develop a solid justification why this is
a good and proper approach, before deploying it on the IP Internet
by making it part of Linux.
Thanks a lot for your suggestions. I will request the udp port now.

Zhu Yanjun

Tom.


Zhu Yanjun
Strongly suggest that this not merge without such a
standard.

https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt



CC: Srinivas Eeda <srinivas.eeda@xxxxxxxxxx>
CC: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
Reviewed-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>
---
  drivers/infiniband/sw/rxe/rxe_net.c | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 29f6937..d61f2c5 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -276,6 +276,16 @@ static inline void prepare_udp_ports_spin(__be16 dport, __be16 sport)
      src_port = sport;
      spin_unlock(&port_lock);
  }
+
+static inline void exchange_udp_port(void)
+{
+    if (dst_port == htons(ROCE_V2_UDP_DPORT))
+ prepare_udp_ports_spin(htons(ROCE_V2_UDP_DUAL_DPORT),
+                       htons(RXE_ROCE_V2_DUAL_SPORT));
+    else
+        prepare_udp_ports_spin(htons(ROCE_V2_UDP_DPORT),
+                       htons(RXE_ROCE_V2_SPORT));
+}
  #endif
    static int rxe_udp_encap_recv(struct sock *sk, struct sk_buff *skb) @@ -549,8 +559,7 @@ int rxe_send(struct rxe_pkt_info *pkt, struct sk_buff *skb)
    #ifdef CONFIG_RDMA_RXE_DUAL_PORT_MODULE
      if (unlikely(err != NET_XMIT_SUCCESS))
- prepare_udp_ports_spin(htons(ROCE_V2_UDP_DUAL_DPORT),
-                       htons(RXE_ROCE_V2_DUAL_SPORT));
+        exchange_udp_port();
  #endif
        if (unlikely(net_xmit_eval(err))) {



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux