Home
last modified time | relevance | path

Searched refs:portid (Results 1 – 25 of 73) sorted by relevance

123

/freebsd/contrib/ofed/libibmad/
H A Dsmp.c60 uint8_t *smp_set_status_via(void *data, ib_portid_t * portid, unsigned attrid, in smp_set_status_via() argument
67 DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid)); in smp_set_status_via()
68 if ((portid->lid <= 0) || in smp_set_status_via()
69 (portid->drpath.drslid == 0xffff) || in smp_set_status_via()
70 (portid->drpath.drdlid == 0xffff)) in smp_set_status_via()
83 portid->sl = 0; in smp_set_status_via()
84 portid->qp = 0; in smp_set_status_via()
86 res = mad_rpc(srcport, &rpc, portid, data, data); in smp_set_status_via()
92 uint8_t *smp_set_via(void *data, ib_portid_t * portid, unsigned attrid, in smp_set_via() argument
96 return smp_set_status_via(data, portid, attrid, mod, timeout, NULL, in smp_set_via()
[all …]
H A Dresolve.c80 int ib_resolve_gid_via(ib_portid_t * portid, ibmad_gid_t gid, in ib_resolve_gid_via() argument
95 if ((portid->lid = in ib_resolve_gid_via()
102 int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid, in ib_resolve_guid_via() argument
127 memcpy(&prefix, portid->gid, sizeof(prefix)); in ib_resolve_guid_via()
129 mad_set_field64(portid->gid, 0, IB_GID_PREFIX_F, in ib_resolve_guid_via()
132 mad_set_field64(portid->gid, 0, IB_GID_GUID_F, *guid); in ib_resolve_guid_via()
134 if ((portid->lid = in ib_resolve_guid_via()
135 ib_path_query_via(srcport, selfgid, portid->gid, sm_id, buf)) < 0) in ib_resolve_guid_via()
138 mad_decode_field(buf, IB_SA_PR_SL_F, &portid->sl); in ib_resolve_guid_via()
142 int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str, in ib_resolve_portid_str_via() argument
[all …]
H A Dcc.c49 void *cc_query_status_via(void *rcvbuf, ib_portid_t * portid, in cc_query_status_via() argument
57 DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid)); in cc_query_status_via()
73 portid->qp = 1; in cc_query_status_via()
74 if (!portid->qkey) in cc_query_status_via()
75 portid->qkey = IB_DEFAULT_QP1_QKEY; in cc_query_status_via()
77 res = mad_rpc(srcport, (ib_rpc_t *)&rpc, portid, rcvbuf, rcvbuf); in cc_query_status_via()
84 void *cc_config_status_via(void *payload, void *rcvbuf, ib_portid_t * portid, in cc_config_status_via() argument
92 DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid)); in cc_config_status_via()
108 portid->qp = 1; in cc_config_status_via()
109 if (!portid->qkey) in cc_config_status_via()
[all …]
H A Dportid.c48 int portid2portnum(ib_portid_t * portid) in portid2portnum() argument
50 if (portid->lid > 0) in portid2portnum()
53 if (portid->drpath.cnt == 0) in portid2portnum()
56 return portid->drpath.p[(portid->drpath.cnt - 1)]; in portid2portnum()
59 char *portid2str(ib_portid_t * portid) in portid2str() argument
64 if (portid->lid > 0) { in portid2str()
65 n += sprintf(buf + n, "Lid %d", portid->lid); in portid2str()
66 if (portid->grh_present) { in portid2str()
69 if (inet_ntop(AF_INET6, portid->gid, gid, sizeof(gid))) in portid2str()
72 if (portid->drpath.cnt) in portid2str()
[all …]
H A Dserv.c86 int mad_respond(void *umad, ib_portid_t * portid, uint32_t rstatus) in mad_respond() argument
88 return mad_respond_via(umad, portid, rstatus, ibmp); in mad_respond()
91 int mad_respond_via(void *umad, ib_portid_t * portid, uint32_t rstatus, in mad_respond_via() argument
100 if (!portid) { in mad_respond_via()
118 portid = &rport; in mad_respond_via()
121 DEBUG("dest %s", portid2str(portid)); in mad_respond_via()
147 portid->qp = 0; in mad_respond_via()
148 else if (!portid->qp) in mad_respond_via()
149 portid->qp = 1; in mad_respond_via()
151 if (!portid->qkey && portid->qp == 1) in mad_respond_via()
[all …]
H A Dvendor.c57 uint8_t *ib_vendor_call(void *data, ib_portid_t * portid, in ib_vendor_call() argument
60 return ib_vendor_call_via(data, portid, call, ibmp); in ib_vendor_call()
63 uint8_t *ib_vendor_call_via(void *data, ib_portid_t * portid, in ib_vendor_call_via() argument
72 DEBUG("route %s data %p", portid2str(portid), data); in ib_vendor_call_via()
73 if (portid->lid <= 0) in ib_vendor_call_via()
101 portid->qp = 1; in ib_vendor_call_via()
102 if (!portid->qkey) in ib_vendor_call_via()
103 portid->qkey = IB_DEFAULT_QP1_QKEY; in ib_vendor_call_via()
106 p_ret = mad_rpc_rmpp(srcport, rpcold, portid, 0, data); /* FIXME: no RMPP for now */ in ib_vendor_call_via()
111 return mad_send_via(rpcold, portid, 0, data, srcport) < 0 ? 0 : data; /* FIXME: no RMPP for now */ in ib_vendor_call_via()
H A Dbm.c51 uint8_t *bm_call_via(void *data, ib_portid_t * portid, ib_bm_call_t * call, in bm_call_via() argument
62 DEBUG("route %s data %p", portid2str(portid), data); in bm_call_via()
63 if (portid->lid <= 0) { in bm_call_via()
90 portid->qp = 1; in bm_call_via()
91 if (!portid->qkey) in bm_call_via()
92 portid->qkey = IB_DEFAULT_QP1_QKEY; in bm_call_via()
96 if (mad_rpc(srcport, &rpc, portid, &bm_data, &bm_data)) in bm_call_via()
101 if (mad_send_via(&rpc, portid, 0, &bm_data, srcport) < 0) in bm_call_via()
H A Dsa.c50 ib_portid_t * portid, ib_sa_call_t * sa, unsigned timeout) in sa_rpc_call() argument
56 portid2str(portid)); in sa_rpc_call()
58 if (portid->lid <= 0) { in sa_rpc_call()
73 portid->qp = 1; in sa_rpc_call()
74 if (!portid->qkey) in sa_rpc_call()
75 portid->qkey = IB_DEFAULT_QP1_QKEY; in sa_rpc_call()
77 p = mad_rpc_rmpp(ibmad_port, &rpc, portid, 0 /*&sa->rmpp */ , rcvbuf); /* TODO: RMPP */ in sa_rpc_call()
84 uint8_t *sa_call(void *rcvbuf, ib_portid_t * portid, ib_sa_call_t * sa, in sa_call() argument
87 return sa_rpc_call(ibmp, rcvbuf, portid, sa, timeout); in sa_call()
H A Dmad.h305 typedef struct portid { struct
1532 MAD_EXPORT char *portid2str(ib_portid_t * portid);
1533 MAD_EXPORT int portid2portnum(ib_portid_t * portid);
1538 static inline int ib_portid_set(ib_portid_t * portid, int lid, int qp, int qkey) in ib_portid_set() argument
1540 portid->lid = lid; in ib_portid_set()
1541 portid->qp = qp; in ib_portid_set()
1542 portid->qkey = qkey; in ib_portid_set()
1543 portid->grh_present = 0; in ib_portid_set()
1630 MAD_EXPORT int mad_respond(void *umad, ib_portid_t * portid, uint32_t rstatus)
1639 MAD_EXPORT int mad_respond_via(void *umad, ib_portid_t * portid,
[all …]
/freebsd/contrib/ofed/infiniband-diags/src/
H A Dperfquery.c215 static void output_aggregate_perfcounters(ib_portid_t * portid, in output_aggregate_perfcounters() argument
254 portid2str(portid), ALL_PORTS, ntohs(cap_mask), buf); in output_aggregate_perfcounters()
320 static void output_aggregate_perfcounters_ext(ib_portid_t * portid, in output_aggregate_perfcounters_ext() argument
387 portid2str(portid), ALL_PORTS, ntohs(cap_mask), cap_mask2, buf); in output_aggregate_perfcounters_ext()
391 uint32_t cap_mask2, ib_portid_t * portid, in dump_perfcounters() argument
398 if (!pma_query_via(pc, portid, port, timeout, in dump_perfcounters()
431 if (!pma_query_via(pc, portid, port, timeout, in dump_perfcounters()
445 portid2str(portid), port, ntohs(cap_mask), in dump_perfcounters()
450 portid2str(portid), port, ntohs(cap_mask), buf); in dump_perfcounters()
455 ib_portid_t * portid, int port) in reset_counters() argument
[all …]
H A Dibmirror.c146 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
[all …]
H A Dibaddr.c52 static int ib_resolve_addr(ib_portid_t * portid, int portnum, int show_lid, in ib_resolve_addr() argument
62 if (!smp_query_via(nodeinfo, portid, IB_ATTR_NODE_INFO, 0, 0, srcport)) in ib_resolve_addr()
65 if (!smp_query_via(portinfo, portid, IB_ATTR_PORT_INFO, portnum, 0, in ib_resolve_addr()
69 mad_decode_field(portinfo, IB_PORT_LID_F, &portid->lid); in ib_resolve_addr()
83 printf("LID start 0x%x end 0x%x", portid->lid, in ib_resolve_addr()
84 portid->lid + (1 << lmc) - 1); in ib_resolve_addr()
86 printf("LID start %u end %u", portid->lid, in ib_resolve_addr()
87 portid->lid + (1 << lmc) - 1); in ib_resolve_addr()
116 ib_portid_t portid = { 0 }; in main() local
155 if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0], in main()
[all …]
H A Dibqueryerrors.c373 static int query_and_dump(char *buf, size_t size, ib_portid_t * portid, in query_and_dump() argument
384 if (!pma_query_via(pc, portid, portnum, ibd_timeout, attr_id, in query_and_dump()
387 node_name, portid2str(portid), portnum); in query_and_dump()
403 static int print_results(ib_portid_t * portid, char *node_name, in print_results() argument
427 n += query_and_dump(str + n, sizeof(buf) - n, portid, in print_results()
435 n += query_and_dump(str + n, sizeof(buf) - n, portid, in print_results()
516 static int query_cap_mask(ib_portid_t * portid, char *node_name, int portnum, in query_cap_mask() argument
522 portid->sl = lid2sl_table[portid->lid]; in query_cap_mask()
525 if (!pma_query_via(pc, portid, portnum, ibd_timeout, CLASS_PORT_INFO, in query_cap_mask()
528 node_name, portid2str(portid), portnum); in query_cap_mask()
[all …]
H A Dvendstat.c178 static int do_vendor(ib_portid_t *portid, struct ibmad_port *srcport, in do_vendor() argument
191 if (!ib_vendor_call_via(data, portid, &call, srcport)) { in do_vendor()
198 static int do_config_space_records(ib_portid_t *portid, unsigned set, in do_config_space_records() argument
211 if (do_vendor(portid, srcport, IB_MLX_VENDOR_CLASS, in do_config_space_records()
226 static int counter_groups_info(ib_portid_t * portid, int port) in counter_groups_info() argument
234 if (do_vendor(portid, srcport, IB_MLX_VENDOR_CLASS, IB_MAD_METHOD_GET, in counter_groups_info()
260 static int config_counter_groups(ib_portid_t * portid, int port) in config_counter_groups() argument
274 if (do_vendor(portid, srcport, IB_MLX_VENDOR_CLASS, IB_MAD_METHOD_SET, in config_counter_groups()
282 if (do_vendor(portid, srcport, IB_MLX_VENDOR_CLASS, IB_MAD_METHOD_GET, in config_counter_groups()
356 ib_portid_t portid = { 0 }; in main() local
[all …]
H A Dibping.c110 static uint64_t ibping(ib_portid_t * portid, int quiet) in ibping() argument
128 if (!ib_vendor_call_via(data, portid, &call, srcport)) in ibping()
138 data, portid2str(portid), rtt / 1000, rtt % 1000); in ibping()
145 static ib_portid_t portid = { 0 }; variable
154 portid2str(&portid)); in report()
239 IBEXIT("ibping to %s: %s", portid2str(&portid), err); in main()
249 if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0], in main()
254 portid.grh_present = 1; in main()
255 memcpy(&portid.gid, &dgid, sizeof(portid.gid)); in main()
265 if ((rtt = ibping(&portid, flood)) == ~0ull) { in main()
[all …]
H A Dibdiag_common.c598 int resolve_self(char *ca_name, uint8_t ca_port, ib_portid_t *portid, in resolve_self() argument
605 if (!(portid || portnum || gid)) in resolve_self()
611 if (portid) { in resolve_self()
612 memset(portid, 0, sizeof(*portid)); in resolve_self()
613 portid->lid = port.base_lid; in resolve_self()
614 portid->sl = port.sm_sl; in resolve_self()
631 int resolve_gid(char *ca_name, uint8_t ca_port, ib_portid_t * portid, in resolve_gid() argument
644 if ((portid->lid = in resolve_gid()
651 int resolve_guid(char *ca_name, uint8_t ca_port, ib_portid_t *portid, in resolve_guid() argument
669 memcpy(&prefix, portid->gid, sizeof(prefix)); in resolve_guid()
[all …]
H A Dibroute.c62 char *check_switch(ib_portid_t * portid, unsigned int *nports, uint64_t * guid, in check_switch() argument
69 if (!smp_query_via(ni, portid, IB_ATTR_NODE_INFO, 0, 0, srcport)) { in check_switch()
74 if (!smp_query_via(nd, portid, IB_ATTR_NODE_DESC, 0, 0, srcport)) in check_switch()
85 if (!smp_query_via(sw, portid, IB_ATTR_SWITCH_INFO, 0, 0, srcport)) in check_switch()
138 char *dump_multicast_tables(ib_portid_t * portid, unsigned startlid, in dump_multicast_tables() argument
152 if ((s = check_switch(portid, &nports, &nodeguid, sw, nd))) in dump_multicast_tables()
184 " (%s):\n", startlid, endlid, portid2str(portid), nodeguid, in dump_multicast_tables()
220 (mft + j, portid, IB_ATTR_MULTICASTFORWTBL, mod, 0, in dump_multicast_tables()
326 char *dump_unicast_tables(ib_portid_t * portid, int startlid, int endlid) in dump_unicast_tables() argument
338 if ((s = check_switch(portid, &nports, &nodeguid, sw, nd))) in dump_unicast_tables()
[all …]
H A Dibsysstat.c222 static char *ibsystat(ib_portid_t * portid, int attr) in ibsystat() argument
239 portid->qp = 1; in ibsystat()
240 if (!portid->qkey) in ibsystat()
241 portid->qkey = IB_DEFAULT_QP1_QKEY; in ibsystat()
243 if ((len = mad_build_pkt(buf, &rpc, portid, NULL, NULL)) < 0) in ibsystat()
308 ib_portid_t portid = { 0 }; in main() local
344 IBEXIT("ibssystat to %s: %s", portid2str(&portid), in main()
354 if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0], in main()
358 portid.grh_present = 1; in main()
359 memcpy(&portid.gid, &dgid, sizeof(portid.gid)); in main()
[all …]
H A Dsminfo.c100 ib_portid_t portid = { 0 }; in main() local
128 if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0], in main()
132 if (resolve_sm_portid(ibd_ca, ibd_ca_port, &portid) < 0) in main()
143 if (!(p = smp_set_via(sminfo, &portid, IB_ATTR_SMINFO, mod, in main()
146 } else if (!(p = smp_query_via(sminfo, &portid, IB_ATTR_SMINFO, 0, in main()
157 ", activity count %u priority %d state %d %s\n", portid.lid, in main()
H A Dibtracert.c136 static int get_node(Node * node, Port * port, ib_portid_t * portid) in get_node() argument
142 if (!smp_query_via(ni, portid, IB_ATTR_NODE_INFO, 0, timeout, srcport)) in get_node()
146 if (!smp_query_via(nd, portid, IB_ATTR_NODE_DESC, 0, timeout, srcport)) in get_node()
157 if (!smp_query_via(pi, portid, IB_ATTR_PORT_INFO, 0, timeout, srcport)) in get_node()
170 DEBUG("portid %s: got node %" PRIx64 " '%s'", portid2str(portid), in get_node()
175 static int switch_lookup(Switch * sw, ib_portid_t * portid, int lid) in switch_lookup() argument
180 if (!smp_query_via(si, portid, IB_ATTR_SWITCH_INFO, 0, timeout, in switch_lookup()
192 if (!smp_query_via(fdb, portid, IB_ATTR_LINEARFORWTBL, lid / 64, in switch_lookup()
197 portid2str(portid), lid, sw->fdb[lid % 64]); in switch_lookup()
433 static int get_port(Port * port, int portnum, ib_portid_t * portid) in get_port() argument
[all …]
/freebsd/contrib/libpcap/
H A Dpcap-dpdk.c179 uint16_t portid; // portid of DPDK member
293 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt); in dpdk_read_with_timeout()
298 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt); in dpdk_read_with_timeout()
443 rte_eth_promiscuous_disable(pd->portid); in pcap_dpdk_close()
445 rte_eth_dev_stop(pd->portid); in pcap_dpdk_close()
446 rte_eth_dev_close(pd->portid); in pcap_dpdk_close()
452 uint16_t portid = pd->portid; in nic_stats_display() local
454 rte_eth_stats_get(portid, &stats); in nic_stats_display()
456 … " RX-bytes: %-10"PRIu64" RX-Imissed: %-10"PRIu64"\n", portid, stats.ipackets, stats.ierrors, in nic_stats_display()
458 …RTE_LOG(INFO,USER1, "portid:%d, RX-PPS: %-10"PRIu64" RX-Mbps: %.2lf\n", portid, pd->pps, pd->bps/1… in nic_stats_display()
[all …]
/freebsd/sys/contrib/device-tree/src/powerpc/fsl/
H A Dt4240si-pre.dtsi95 fsl,portid-mapping = <0x80000000>;
102 fsl,portid-mapping = <0x80000000>;
109 fsl,portid-mapping = <0x80000000>;
116 fsl,portid-mapping = <0x80000000>;
123 fsl,portid-mapping = <0x40000000>;
130 fsl,portid-mapping = <0x40000000>;
137 fsl,portid-mapping = <0x40000000>;
144 fsl,portid-mapping = <0x40000000>;
151 fsl,portid-mapping = <0x20000000>;
158 fsl,portid-mapping = <0x20000000>;
[all …]
/freebsd/contrib/ofed/libibumad/
H A Dumad.h200 int umad_close_port(int portid);
214 int umad_send(int portid, int agentid, void *umad, int length,
216 int umad_recv(int portid, void *umad, int *length, int timeout_ms);
217 int umad_poll(int portid, int timeout_ms);
218 int umad_get_fd(int portid);
220 int umad_register(int portid, int mgmt_class, int mgmt_version,
222 int umad_register_oui(int portid, int mgmt_class, uint8_t rmpp_version,
224 int umad_unregister(int portid, int agentid);
/freebsd/contrib/ofed/libibnetdisc/
H A Dibnetdisc.c64 static int query_node_info(smp_engine_t * engine, ib_portid_t * portid,
66 static int query_port_info(smp_engine_t * engine, ib_portid_t * portid,
81 static int query_switch_info(smp_engine_t * engine, ib_portid_t * portid, in query_switch_info() argument
85 return issue_smp(engine, portid, IB_ATTR_SWITCH_INFO, 0, in query_switch_info()
98 static int retract_dpath(smp_engine_t * engine, ib_portid_t * portid) in retract_dpath() argument
113 portid->drpath.p[portid->drpath.cnt] = 0; in retract_dpath()
114 portid->drpath.cnt--; in retract_dpath()
118 static int extend_dpath(smp_engine_t * engine, ib_portid_t * portid, in extend_dpath() argument
128 if (portid->lid) { in extend_dpath()
130 portid->drpath.drslid = (uint16_t) scan->selfportid.lid; in extend_dpath()
[all …]
/freebsd/tests/sys/net/
H A Dstp.py65 portid=0x8007, maxage=41, hellotime=2, fwddelay=30)
69 portid=0x8007, maxage=5, hellotime=2, fwddelay=30)
75 portid=0x8007, maxage=40, hellotime=3, fwddelay=30)
79 portid=0x8007, maxage=40, hellotime=1, fwddelay=30)
85 portid=0x8007, maxage=40, hellotime=2, fwddelay=31)
89 portid=0x8007, maxage=40, hellotime=2, fwddelay=3)

123