Triton Repository branch, master, updated. da77b103814bafa582620190c16f8d17b9df86a9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via da77b103814bafa582620190c16f8d17b9df86a9 (commit) via aa757e58d42023f9fcc05f8527f45e07cd03b290 (commit) from 27165a8e4b9eff0e1cd5de40eae7db5741b33577 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit da77b103814bafa582620190c16f8d17b9df86a9 Author: Phil Carns <[email protected]> Date: Thu Aug 19 17:42:55 2010 -0400 compute a real niid value commit aa757e58d42023f9fcc05f8527f45e07cd03b290 Author: Phil Carns <[email protected]> Date: Thu Aug 19 16:14:43 2010 -0400 stub in hint passing for niid ----------------------------------------------------------------------- Summary of changes: code/src/remote/service.ae | 16 ++++++++++++++ code/src/replicated-osd/replicated-osd.aer | 32 ++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 4 deletions(-) Diff of changes: diff --git a/code/src/remote/service.ae b/code/src/remote/service.ae index 9cccb4c..9bf7c0d 100644 --- a/code/src/remote/service.ae +++ b/code/src/remote/service.ae @@ -90,6 +90,9 @@ triton_ret_t aer_service_init(void) ret = ae_hints_type_register("triton.remote.from", 0, NULL); if(ret != TRITON_SUCCESS) return ret; + ret = ae_hints_type_register("triton.remote.niid", 0, NULL); + if(ret != TRITON_SUCCESS) return ret; + ret = triton_msg_enable_method(triton_zeroconf_get("aesop.remote.method"), &ae_remote_msg_ctx); if(ret != TRITON_SUCCESS) return ret; @@ -199,6 +202,8 @@ __blocking triton_ret_t aer_service_invoke(triton_node_t from, uint64_t service_ triton_ret_t ret; struct triton_hash_link *s; struct aer_service *service; + uint64_t niid; + uint32_t h1 = 0, h2 = 0; assert(service_table != NULL); @@ -216,6 +221,17 @@ __blocking triton_ret_t aer_service_invoke(triton_node_t from, uint64_t service_ return ret; } + /* generate niid hash based on client id and request header */ + bj_hashlittle2(&from, sizeof(from), &h1, &h2); + /* use results from first hash as input to second hash */ + bj_hashlittle2(&in->header, sizeof(in->header), &h1, &h2); + niid = h1 + (((uint64_t)h2)<<32); + ret = aesop_hints_put("triton.remote.niid", sizeof(niid), &niid); + if(ret != TRITON_SUCCESS) + { + return ret; + } + /* service function decodes input, calls local function, encodes output, returns */ ret = service->invoke_fn(in, out); if(ret != TRITON_SUCCESS) diff --git a/code/src/replicated-osd/replicated-osd.aer b/code/src/replicated-osd/replicated-osd.aer index 2cb5353..b71cd8c 100644 --- a/code/src/replicated-osd/replicated-osd.aer +++ b/code/src/replicated-osd/replicated-osd.aer @@ -25,6 +25,8 @@ #include "src/common/resources/scheduling/sched.hae" #include "src/common/resources/timer/timer.hae" #include "src/zeroconf/zeroconf.h" +#include "src/aesop/hints.h" + #if 0 #include "src/net/mpi/mpi.hae" #include "src/net/mpi/mpi-method.h" @@ -38,12 +40,22 @@ __remote __blocking triton_ret_t rosd_create( ) { triton_ret_t tret; + uint64_t niid; out_nothing = NULL; - /* get an niid from somewhere... */ - tret = vosd_create(in_oid, 0); + tret = aesop_hints_get("triton.remote.niid", sizeof(niid), &niid); + if(tret != TRITON_SUCCESS) + { + /* TODO: remote code can't propigate fn errors yet */ + assert(tret == TRITON_SUCCESS); + return(tret); + } + tret = vosd_create(in_oid, niid); + + /* TODO: remote code can't propigate fn errors yet */ + assert(tret == TRITON_SUCCESS); return(tret); } @@ -53,12 +65,24 @@ __remote __blocking triton_ret_t rosd_remove( ) { triton_ret_t tret; + uint64_t niid; out_nothing = NULL; - /* get an niid from somewhere... */ - tret = vosd_remove(in_oid, 0); + tret = aesop_hints_get("triton.remote.niid", sizeof(niid), &niid); + if(tret != TRITON_SUCCESS) + { + /* TODO: remote code can't propigate fn errors yet */ + assert(tret == TRITON_SUCCESS); + return(tret); + } + + /* TODO: vosd_remove() doesn't handle niids yet... */ + niid = 0; + tret = vosd_remove(in_oid, niid); + /* TODO: remote code can't propigate fn errors yet */ + assert(tret == TRITON_SUCCESS); return(tret); } hooks/post-receive -- Triton Repository
participants (1)
-
noreply@mcs.anl.gov