Lines Matching refs:portid

146 void port_mirror_route(ib_portid_t * portid, int query, int clear)  in port_mirror_route()  argument
153 if (!smp_set_via(buf, portid, ATTRID_PM_ROUTE, 0, 0, srcport)) in port_mirror_route()
159 if (!smp_query_via(buf, portid, ATTRID_PM_ROUTE, 0, 0, srcport)) in port_mirror_route()
185 mad_set_field(buf, 0, IB_PMR_LRH_SLID_F, portid->lid); in port_mirror_route()
188 if (!smp_set_via(buf, portid, ATTRID_PM_ROUTE, 0, 0, srcport)) in port_mirror_route()
196 void port_mirror_ports(ib_portid_t * portid, int query, int clear) in port_mirror_ports() argument
203 if (!smp_set_via(buf, portid, ATTRID_PM_PORTS, 0, 0, srcport)) in port_mirror_ports()
209 if (!smp_query_via(buf, portid, ATTRID_PM_PORTS, 0, 0, srcport)) in port_mirror_ports()
227 if (!smp_set_via(buf, portid, ATTRID_PM_PORTS, 0, 0, srcport)) in port_mirror_ports()
235 int get_out_port(ib_portid_t* portid) in get_out_port() argument
244 if (!smp_query_via(buf, portid, IB_ATTR_LINEARFORWTBL, block, 0, srcport)) in get_out_port()
254 int get_peer(ib_portid_t* portid, int outport, int* peerlid, int* peerport) in get_peer() argument
261 memcpy(&peerportid, portid, sizeof(peerportid)); in get_peer()
277 int get_mirror_vl(ib_portid_t* portid, int outport) in get_mirror_vl() argument
287 if (!smp_query_via(buf, portid, IB_ATTR_SLVL_TABLE, portnum, 0, srcport)) in get_mirror_vl()
296 int lossy_config(ib_portid_t* portid, int query, int clear) in lossy_config() argument
308 outport = get_out_port(portid); in lossy_config()
312 get_peer(portid, outport, &peerportid.lid, &peerport); in lossy_config()
314 printf("local lid %d / port %d\n", portid->lid, outport); in lossy_config()
317 mirror_vl = get_mirror_vl(portid, outport); in lossy_config()
320 if (!smp_query_via(buf, portid, ATTRID_LOSSY_CFG, outport, 0, srcport)) in lossy_config()
322 portid->lid, outport); in lossy_config()
333 portid->lid, outport, in lossy_config()
347 p_portid = portid; in lossy_config()
368 p_portid = portid; in lossy_config()
380 int mirror_config(ib_portid_t* portid, int query, int clear) in mirror_config() argument
382 port_mirror_route(portid, query, clear); in mirror_config()
384 port_mirror_ports(portid, query, clear); in mirror_config()
434 ib_portid_t portid = { 0 }; in main() local
476 if (ib_resolve_portid_str_via(&portid, argv[0], ibd_dest_type, in main()
488 if (!ib_vendor_call_via(&buf, &portid, &call, srcport)) in main()
506 portid.lid, mirror_clear, mirror_dlid, in main()
529 mirror_config(&portid, mirror_query, mirror_clear); in main()
533 lossy_config(&portid, mirror_query, mirror_clear); in main()