fprintf(stderr,
"Request %lx: target[%u](xptr: %llu): %s, data[%llu](xptr: %llu): %s \n\t"
"offset: %llu, size: %llu, serviced; %llu, op: %u, state: %u, flags: %u \n\t"
- "src: %u, src_transit: %u, dst: %u, dst_transit: %u\n",
+ "src: %u, transit: %u, dst: %u, effective dst: %u\n",
(unsigned long) req, req->targetlen, (unsigned long long)req->target,
target,
(unsigned long long) req->datalen, (unsigned long long) req->data,
data,
(unsigned long long) req->offset, (unsigned long long) req->size,
(unsigned long long) req->serviced, req->op, req->state, req->flags,
- (unsigned int) req->src_portno, (unsigned int) req->src_transit_portno,
- (unsigned int) req->dst_portno, (unsigned int) req->dst_transit_portno);
+ (unsigned int) req->src_portno, (unsigned int) req->transit_portno,
+ (unsigned int) req->dst_portno, (unsigned int) req->effective_dst_portno);
}
struct xseg_request *submitted = NULL, *received;
long nr_submitted = 0, nr_received = 0, nr_failed = 0, nr_mismatch = 0, nr_flying = 0;
- int reported = 0, r;
+ int r;
uint64_t offset;
uint32_t targetlen = 10, chunksize = 4096;
struct timeval tv1, tv2;
//FIXME
++nr_flying;
nr_submitted += 1;
- reported = 0;
offset = 0;//pick(size);
submitted->offset = offset;
lock_status(&port->rq_lock, rls, 64);
lock_status(&port->pq_lock, pls, 64);
fprintf(stderr, "port %u:\n"
- " requests: %llu/%llu src gw: %u dst gw: %u\n"
+ " requests: %llu/%llu next: %u dst gw: %u\n"
" free_queue [%p] count : %4llu | %s\n"
" request_queue [%p] count : %4llu | %s\n"
" reply_queue [%p] count : %4llu | %s\n",
portno, (unsigned long long)port->alloc_reqs,
(unsigned long long)port->max_alloc_reqs,
- xseg->src_gw[portno],
+ xseg->path_next[portno],
xseg->dst_gw[portno],
(void *)fq, (unsigned long long)xq_count(fq), fls,
(void *)rq, (unsigned long long)xq_count(rq), rls,
return xseg_signal(xseg, portno);
}
+int cmd_set_next(xport portno, xport next)
+{
+ xseg->path_next[portno] = next;
+ return 0;
+}
+
int parse_ports(char *str)
{
int ret = 0;
continue;
}
+ if (!strcmp(argv[i], "set-next") && (i + 2 < argc)) {
+ ret = cmd_set_next(atol(argv[i+1]), atol(argv[i+2]));
+ i += 2;
+ continue;
+ }
+
if (!strcmp(argv[i], "signal") && (i + 1 < argc)) {
ret = cmd_signal(atol(argv[i+1]));
i += 1;
if (!strcmp(argv[i], "failreq") && (i + 1 < argc)) {
struct xseg_request *req;
- sscanf(argv[i+1], "%lx", &req);
+ sscanf(argv[i+1], "%lx", (unsigned long *)&req);
ret = cmd_request(req, FAIL);
i += 1;
continue;