[openib-general] [PATCH] sdp: set default zcopy threshold by module parameter

Michael S. Tsirkin mst at mellanox.co.il
Mon Sep 5 10:04:51 PDT 2005


Make default zcopy threshold values configurable by a module parameter.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_conn.c
===================================================================
--- linux-2.6.12.2.orig/drivers/infiniband/ulp/sdp/sdp_conn.c	2005-09-05 19:37:49.000000000 +0300
+++ linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_conn.c	2005-09-05 19:41:18.000000000 +0300
@@ -35,6 +35,13 @@
 
 #include "sdp_main.h"
 
+static int sdp_zcopy_thrsh_src_default = SDP_ZCOPY_THRSH_SRC_DEFAULT;
+module_param(sdp_zcopy_thrsh_src_default, int, 0666);
+MODULE_PARM_DESC(sdp_zcopy_thrsh_src_default, "Default ZCopy Threshold for Data Source");
+static int sdp_zcopy_thrsh_snk_default = SDP_ZCOPY_THRSH_SNK_DEFAULT;
+module_param(sdp_zcopy_thrsh_src_default, int, 0666);
+MODULE_PARM_DESC(sdp_zcopy_thrsh_snk_default, "Default ZCopy Threshold for Data Sink");
+
 static struct sdev_root dev_root_s;
 
 static void sdp_device_init_one(struct ib_device *device);
@@ -1178,8 +1185,8 @@ struct sdp_sock *sdp_conn_alloc(unsigned
 	conn->rcv_urg_cnt = 0;
 
 	conn->nodelay     = 0;
-	conn->src_zthresh = SDP_ZCOPY_THRSH_SRC_DEFAULT;
-	conn->snk_zthresh = SDP_ZCOPY_THRSH_SNK_DEFAULT;
+	conn->src_zthresh = sdp_zcopy_thrsh_src_default;
+	conn->snk_zthresh = sdp_zcopy_thrsh_snk_default;
 
 	conn->accept_next = NULL;
 	conn->accept_prev = NULL;

-- 
MST



More information about the general mailing list