From 9b51c0b88bad3be6764487e1fd4968fb0abc2222 Mon Sep 17 00:00:00 2001 From: maxim Date: Thu, 17 Jul 2008 21:39:10 +0000 Subject: [PATCH] b=16102 i=isaac i=liang Landing the patch (attachment #17747) on LNET b1_x_lnet_gate. --- lnet/selftest/selftest.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lnet/selftest/selftest.h b/lnet/selftest/selftest.h index 5038350..ee4e8e8 100644 --- a/lnet/selftest/selftest.h +++ b/lnet/selftest/selftest.h @@ -58,6 +58,7 @@ typedef struct { volatile int counter; } atomic_t; #define SWI_STATE_REQUEST_SENT 4 #define SWI_STATE_REPLY_RECEIVED 5 #define SWI_STATE_BULK_STARTED 6 +#define SWI_STATE_BULK_ERRORED 7 #define SWI_STATE_DONE 10 /* forward refs */ @@ -73,11 +74,11 @@ struct sfw_test_instance; * serialized with respect to itself. * - no CPU affinity, a workitem does not necessarily run on the same CPU * that schedules it. However, this might change in the future. - * - if a workitem is scheduled again before it has a chance to run, it + * - if a workitem is scheduled again before it has a chance to run, it * runs only once. - * - if a workitem is scheduled while it runs, it runs again after it - * completes; this ensures that events occurring while other events are - * being processed receive due attention. This behavior also allows a + * - if a workitem is scheduled while it runs, it runs again after it + * completes; this ensures that events occurring while other events are + * being processed receive due attention. This behavior also allows a * workitem to reschedule itself. * * Usage notes: @@ -357,7 +358,7 @@ typedef struct { typedef struct { int (*tso_init)(struct sfw_test_instance *tsi); /* intialize test client */ void (*tso_fini)(struct sfw_test_instance *tsi); /* finalize test client */ - int (*tso_prep_rpc)(struct sfw_test_unit *tsu, + int (*tso_prep_rpc)(struct sfw_test_unit *tsu, lnet_process_id_t dest, srpc_client_rpc_t **rpc); /* prep a tests rpc */ void (*tso_done_rpc)(struct sfw_test_unit *tsu, @@ -390,7 +391,7 @@ typedef struct sfw_test_instance { } tsi_u; } sfw_test_instance_t; -/* XXX: trailing (CFS_PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at +/* XXX: trailing (CFS_PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at * the end of pages are not used */ #define SFW_MAX_CONCUR LST_MAX_CONCUR #define SFW_ID_PER_PAGE (CFS_PAGE_SIZE / sizeof(lnet_process_id_t)) @@ -427,7 +428,7 @@ void sfw_add_bulk_page(srpc_bulk_t *bk, cfs_page_t *pg, int i); int sfw_alloc_pages(srpc_server_rpc_t *rpc, int npages, int sink); srpc_client_rpc_t * -srpc_create_client_rpc(lnet_process_id_t peer, int service, +srpc_create_client_rpc(lnet_process_id_t peer, int service, int nbulkiov, int bulklen, void (*rpc_done)(srpc_client_rpc_t *), void (*rpc_fini)(srpc_client_rpc_t *), void *priv); @@ -515,12 +516,12 @@ srpc_init_client_rpc (srpc_client_rpc_t *rpc, lnet_process_id_t peer, return; } -static inline const char * +static inline const char * swi_state2str (int state) { #define STATE2STR(x) case x: return #x switch(state) { - default: + default: LBUG(); STATE2STR(SWI_STATE_NEWBORN); STATE2STR(SWI_STATE_REPLY_SUBMITTED); @@ -529,6 +530,7 @@ swi_state2str (int state) STATE2STR(SWI_STATE_REQUEST_SENT); STATE2STR(SWI_STATE_REPLY_RECEIVED); STATE2STR(SWI_STATE_BULK_STARTED); + STATE2STR(SWI_STATE_BULK_ERRORED); STATE2STR(SWI_STATE_DONE); } #undef STATE2STR -- 1.8.3.1