Lines Matching refs:pidx

145 	int pidx;  member
205 int (*cmd_recv)(struct perf_ctx *perf, int *pidx, enum perf_cmd *cmd,
254 return !!(link & BIT_ULL_MASK(peer->pidx)); in perf_link_is_up()
277 sts = ntb_peer_spad_read(perf->ntb, peer->pidx, in perf_spad_cmd_send()
284 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send()
287 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send()
290 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send()
304 static int perf_spad_cmd_recv(struct perf_ctx *perf, int *pidx, in perf_spad_cmd_recv() argument
318 for (*pidx = 0; *pidx < perf->pcnt; (*pidx)++) { in perf_spad_cmd_recv()
319 peer = &perf->peers[*pidx]; in perf_spad_cmd_recv()
373 ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_LDATA, in perf_msg_cmd_send()
381 ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_HDATA, in perf_msg_cmd_send()
385 ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_CMD, cmd); in perf_msg_cmd_send()
393 static int perf_msg_cmd_recv(struct perf_ctx *perf, int *pidx, in perf_msg_cmd_recv() argument
404 val = ntb_msg_read(perf->ntb, pidx, PERF_MSG_CMD); in perf_msg_cmd_recv()
407 val = ntb_msg_read(perf->ntb, pidx, PERF_MSG_LDATA); in perf_msg_cmd_recv()
410 val = ntb_msg_read(perf->ntb, pidx, PERF_MSG_HDATA); in perf_msg_cmd_recv()
459 int ret, pidx, cmd; in perf_cmd_recv() local
462 while (!(ret = perf->cmd_recv(perf, &pidx, &cmd, &data))) { in perf_cmd_recv()
463 peer = &perf->peers[pidx]; in perf_cmd_recv()
487 int pidx; in perf_link_event() local
489 for (pidx = 0; pidx < perf->pcnt; pidx++) { in perf_link_event()
490 peer = &perf->peers[pidx]; in perf_link_event()
534 (void)ntb_peer_mw_clear_trans(peer->perf->ntb, peer->pidx, peer->gidx); in perf_free_outbuf()
543 ret = ntb_peer_mw_set_trans(perf->ntb, peer->pidx, peer->gidx, in perf_setup_outbuf()
562 (void)ntb_mw_clear_trans(peer->perf->ntb, peer->pidx, peer->gidx); in perf_free_inbuf()
575 ret = ntb_mw_get_align(perf->ntb, peer->pidx, perf->gidx, in perf_setup_inbuf()
606 ret = ntb_mw_set_trans(perf->ntb, peer->pidx, peer->gidx, in perf_setup_inbuf()
742 int pidx; in perf_disable_service() local
755 for (pidx = 0; pidx < perf->pcnt; pidx++) in perf_disable_service()
756 perf_cmd_exec(&perf->peers[pidx], PERF_CMD_CLEAR); in perf_disable_service()
758 for (pidx = 0; pidx < perf->pcnt; pidx++) in perf_disable_service()
759 flush_work(&perf->peers[pidx].service); in perf_disable_service()
761 for (pidx = 0; pidx < perf->pcnt; pidx++) { in perf_disable_service()
762 struct perf_peer *peer = &perf->peers[pidx]; in perf_disable_service()
1127 " Peer %d test statistics:\n", perf->test_peer->pidx); in perf_read_stats()
1189 int ret, pidx; in perf_dbgfs_read_info() local
1208 ntb_peer_port_number(perf->ntb, perf->test_peer->pidx), in perf_dbgfs_read_info()
1209 perf->test_peer->pidx); in perf_dbgfs_read_info()
1214 for (pidx = 0; pidx < perf->pcnt; pidx++) { in perf_dbgfs_read_info()
1215 peer = &perf->peers[pidx]; in perf_dbgfs_read_info()
1219 ntb_peer_port_number(perf->ntb, peer->pidx), peer->pidx, in perf_dbgfs_read_info()
1292 int pidx, ret; in perf_dbgfs_write_run() local
1294 ret = kstrtoint_from_user(ubuf, size, 0, &pidx); in perf_dbgfs_write_run()
1298 if (pidx < 0 || pidx >= perf->pcnt) in perf_dbgfs_write_run()
1301 peer = &perf->peers[pidx]; in perf_dbgfs_write_run()
1431 "Peer %d outbuf reduced to %pa\n", peer->pidx, in perf_setup_peer_mw()
1441 int pidx, lport, ret; in perf_init_peers() local
1445 for (pidx = 0; pidx < perf->pcnt; pidx++) { in perf_init_peers()
1446 peer = &perf->peers[pidx]; in perf_init_peers()
1449 peer->pidx = pidx; in perf_init_peers()
1450 if (lport < ntb_peer_port_number(perf->ntb, pidx)) { in perf_init_peers()
1452 perf->gidx = pidx; in perf_init_peers()
1453 peer->gidx = pidx + 1; in perf_init_peers()
1455 peer->gidx = pidx; in perf_init_peers()
1461 perf->gidx = pidx; in perf_init_peers()
1473 for (pidx = 0; pidx < perf->pcnt; pidx++) { in perf_init_peers()
1474 ret = perf_setup_peer_mw(&perf->peers[pidx]); in perf_init_peers()