QoS support according to the proposed LWG2 QoS Annex:
pass socket priority to CMA
Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
---
SDP is not upstream, this patch is posted for completeness,
to demonstrate how the new rdma_set_priority call might be used.
diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c
b/drivers/infiniband/ulp/sdp/sdp_cma.c
index 59c8052..50c4e38 100644
--- a/drivers/infiniband/ulp/sdp/sdp_cma.c
+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -47,6 +47,11 @@
#include "sdp_socket.h"
#include "sdp.h"
+static int sdp_qos_support;
+
+module_param_named(qos_support, sdp_qos_support, int, 0644);
+MODULE_PARM_DESC(qos_support, "Enable QoS support if > 0.");
+
union cma_ip_addr {
struct in6_addr ip6;
struct {
@@ -363,6 +368,12 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct
rdma_cm_event *event)
switch (event->event) {
case RDMA_CM_EVENT_ADDR_RESOLVED:
sdp_dbg(sk, "RDMA_CM_EVENT_ADDR_RESOLVED\n");
+ if (sdp_qos_support) {
+ rc = rdma_set_priority(id, sk->sk_priority);
+ if (rc)
+ sdp_warn(sk, "rdma_set_priority failed: %d\n",
rc);
+ }
+
rc = rdma_resolve_route(id, SDP_ROUTE_TIMEOUT);
break;
case RDMA_CM_EVENT_ADDR_ERROR:
--
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general