[ofw] [Patch 18/62] Reference implementation of NDv2
Fab Tillier
ftillier at microsoft.com
Wed Feb 20 17:41:35 PST 2013
Make CM interface const-correct.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\kernel\al_cm.c .\core\al\kernel\al_cm.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\kernel\al_cm.c Fri Aug 03 12:58:50 2012
+++ .\core\al\kernel\al_cm.c Thu Jul 26 15:31:13 2012
@@ -160,6 +168,7 @@ cm_create_id(NTSTATUS (*callback)(iba_cm
}
kal_cep_config(gh_al, id->cid, cm_cep_handler, id, cm_destroy_handler);
+
*pp_id = id;
return STATUS_SUCCESS;
}
@@ -228,7 +237,7 @@ cm_send_rep(iba_cm_id *p_id, iba_cm_rep
}
static NTSTATUS
-cm_send_rtu(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len)
+cm_send_rtu(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len)
{
ib_api_status_t ib_status;
@@ -237,7 +246,7 @@ cm_send_rtu(iba_cm_id *p_id, void *p_pda
}
static NTSTATUS
-cm_send_dreq(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len)
+cm_send_dreq(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len)
{
ib_api_status_t ib_status;
@@ -246,7 +255,7 @@ cm_send_dreq(iba_cm_id *p_id, void *p_pd
}
static NTSTATUS
-cm_send_drep(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len)
+cm_send_drep(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len)
{
ib_api_status_t ib_status;
@@ -256,8 +265,8 @@ cm_send_drep(iba_cm_id *p_id, void *p_pd
static NTSTATUS
cm_send_rej(iba_cm_id *p_id, ib_rej_status_t status,
- void *p_ari, uint8_t ari_len,
- void *p_pdata, uint8_t pdata_len)
+ const void *p_ari, uint8_t ari_len,
+ const void *p_pdata, uint8_t pdata_len)
{
ib_api_status_t ib_status;
@@ -268,7 +277,7 @@ cm_send_rej(iba_cm_id *p_id, ib_rej_stat
static NTSTATUS
cm_send_mra(iba_cm_id *p_id, uint8_t service_timeout,
- void *p_pdata, uint8_t pdata_len)
+ const void *p_pdata, uint8_t pdata_len)
{
ib_cm_mra_t mra;
ib_api_status_t ib_status;
diff -dwup3 -x *svn* -x *makefile.inc -x *sources -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\iba\ib_cm_ifc.h .\inc\kernel\iba\ib_cm_ifc.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\kernel\iba\ib_cm_ifc.h Fri Aug 03 12:58:50 2012
+++ .\inc\kernel\iba\ib_cm_ifc.h Thu Jul 26 15:31:14 2012
@@ -55,7 +55,7 @@ typedef struct _iba_cm_req
ib_qp_type_t qp_type;
net32_t starting_psn;
- void *p_pdata;
+ const void *p_pdata;
uint8_t pdata_len;
uint8_t max_cm_retries;
@@ -105,7 +105,7 @@ typedef struct _iba_cm_rep
net32_t qpn;
net32_t starting_psn;
- void *p_pdata;
+ const void *p_pdata;
uint8_t pdata_len;
ib_cm_failover_t failover_accepted;
@@ -263,16 +263,16 @@ typedef struct _iba_cm_interface
NTSTATUS (*send_req)(iba_cm_id *p_id, iba_cm_req *p_req);
NTSTATUS (*send_rep)(iba_cm_id *p_id, iba_cm_rep *p_rep);
- NTSTATUS (*send_rtu)(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len);
+ NTSTATUS (*send_rtu)(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len);
- NTSTATUS (*send_dreq)(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len);
- NTSTATUS (*send_drep)(iba_cm_id *p_id, void *p_pdata, uint8_t pdata_len);
+ NTSTATUS (*send_dreq)(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len);
+ NTSTATUS (*send_drep)(iba_cm_id *p_id, const void *p_pdata, uint8_t pdata_len);
NTSTATUS (*send_rej)(iba_cm_id *p_id, ib_rej_status_t status,
- void *p_ari, uint8_t ari_len,
- void *p_pdata, uint8_t pdata_len);
+ const void *p_ari, uint8_t ari_len,
+ const void *p_pdata, uint8_t pdata_len);
NTSTATUS (*send_mra)(iba_cm_id *p_id, uint8_t service_timeout,
- void *p_pdata, uint8_t pdata_len);
+ const void *p_pdata, uint8_t pdata_len);
NTSTATUS (*send_lap)(iba_cm_id *p_id, iba_cm_lap *p_lap);
NTSTATUS (*send_apr)(iba_cm_id *p_id, iba_cm_apr *p_apr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.18.patch
Type: application/octet-stream
Size: 3866 bytes
Desc: ndv2.18.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/441af8a8/attachment.obj>
More information about the ofw
mailing list