/Linux-v4.19/include/linux/ |
D | ntb.h | 172 int (*probe)(struct ntb_client *client, struct ntb_dev *ntb); 173 void (*remove)(struct ntb_client *client, struct ntb_dev *ntb); 259 int (*port_number)(struct ntb_dev *ntb); 260 int (*peer_port_count)(struct ntb_dev *ntb); 261 int (*peer_port_number)(struct ntb_dev *ntb, int pidx); 262 int (*peer_port_idx)(struct ntb_dev *ntb, int port); 264 u64 (*link_is_up)(struct ntb_dev *ntb, 266 int (*link_enable)(struct ntb_dev *ntb, 268 int (*link_disable)(struct ntb_dev *ntb); 270 int (*mw_count)(struct ntb_dev *ntb, int pidx); [all …]
|
D | genl_magic_func.h | 144 struct nlattr **ntb = nested_attr_tb; \ 151 err = drbd_nla_parse_nested(ntb, maxtype, tla, s_name ## _nl_policy); \ 170 nla = ntb[attr_nr]; \
|
/Linux-v4.19/drivers/ntb/ |
D | ntb.c | 101 int ntb_register_device(struct ntb_dev *ntb) in ntb_register_device() argument 103 if (!ntb) in ntb_register_device() 105 if (!ntb->pdev) in ntb_register_device() 107 if (!ntb->ops) in ntb_register_device() 109 if (!ntb_dev_ops_is_valid(ntb->ops)) in ntb_register_device() 112 init_completion(&ntb->released); in ntb_register_device() 114 ntb->dev.bus = &ntb_bus; in ntb_register_device() 115 ntb->dev.parent = &ntb->pdev->dev; in ntb_register_device() 116 ntb->dev.release = ntb_dev_release; in ntb_register_device() 117 dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev)); in ntb_register_device() [all …]
|
D | Kconfig | 8 ntb Linux driver uses this point-to-point communication as a method to 15 source "drivers/ntb/hw/Kconfig" 17 source "drivers/ntb/test/Kconfig" 23 messages over the ntb hardware. The transport exposes a queue pair api
|
D | Makefile | 1 obj-$(CONFIG_NTB) += ntb.o hw/ test/
|
/Linux-v4.19/drivers/ntb/test/ |
D | ntb_pingpong.c | 100 struct ntb_dev *ntb; member 121 link = ntb_link_is_up(pp->ntb, NULL, NULL); in pp_find_next_peer() 146 ntb_db_set_mask(pp->ntb, pp->in_db); in pp_setup() 152 dev_dbg(&pp->ntb->dev, "Got no peers, so cancel\n"); in pp_setup() 156 dev_dbg(&pp->ntb->dev, "Ping-pong started with port %d, db %#llx\n", in pp_setup() 157 ntb_peer_port_number(pp->ntb, pp->out_pidx), pp->out_db); in pp_setup() 166 ntb_db_set_mask(pp->ntb, pp->in_db); in pp_clear() 168 dev_dbg(&pp->ntb->dev, "Ping-pong cancelled\n"); in pp_clear() 178 ntb_peer_spad_write(pp->ntb, pp->out_pidx, 0, count); in pp_ping() 179 ntb_peer_msg_write(pp->ntb, pp->out_pidx, 0, count); in pp_ping() [all …]
|
D | ntb_perf.c | 185 struct ntb_dev *ntb; member 250 link = ntb_link_is_up(peer->perf->ntb, NULL, NULL); in perf_link_is_up() 261 dev_dbg(&perf->ntb->dev, "CMD send: %d 0x%llx\n", cmd, data); in perf_spad_cmd_send() 274 sts = ntb_peer_spad_read(perf->ntb, peer->pidx, in perf_spad_cmd_send() 281 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 284 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 288 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 292 ntb_peer_db_set(perf->ntb, PERF_SPAD_NOTIFY(peer->gidx)); in perf_spad_cmd_send() 294 dev_dbg(&perf->ntb->dev, "DB ring peer %#llx\n", in perf_spad_cmd_send() 309 ntb_db_clear(perf->ntb, PERF_SPAD_NOTIFY(perf->gidx)); in perf_spad_cmd_recv() [all …]
|
D | ntb_tool.c | 257 struct ntb_dev *ntb; member 296 up = ntb_link_is_up(tc->ntb, &speed, &width); in tool_link_event() 298 dev_dbg(&tc->ntb->dev, "link is %s speed %d width %d\n", in tool_link_event() 309 db_mask = ntb_db_vector_mask(tc->ntb, vec); in tool_db_event() 310 db_bits = ntb_db_read(tc->ntb); in tool_db_event() 312 dev_dbg(&tc->ntb->dev, "doorbell vec %d mask %#llx bits %#llx\n", in tool_db_event() 323 msg_sts = ntb_msg_read_sts(tc->ntb); in tool_msg_event() 325 dev_dbg(&tc->ntb->dev, "message bits %#llx\n", msg_sts); in tool_msg_event() 354 pos = scnprintf(buf, buf_size, "%#llx\n", fn_read(tc->ntb)); in tool_fn_read() 392 ret = fn_set(tc->ntb, bits); in tool_fn_write() [all …]
|
D | Kconfig | 5 doorbells of the ntb hardware. This driver may be used to test that 6 your ntb hardware and drivers are functioning at a basic level. 16 This driver may be used to test that your ntb hardware and drivers are
|
/Linux-v4.19/drivers/ntb/hw/intel/ |
D | ntb_hw_gen1.h | 154 int intel_ntb_mw_count(struct ntb_dev *ntb, int pidx); 155 int intel_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int idx, 158 int intel_ntb_peer_mw_count(struct ntb_dev *ntb); 159 int intel_ntb_peer_mw_get_addr(struct ntb_dev *ntb, int idx, 161 u64 intel_ntb_link_is_up(struct ntb_dev *ntb, enum ntb_speed *speed, 163 int intel_ntb_link_disable(struct ntb_dev *ntb); 164 u64 intel_ntb_db_valid_mask(struct ntb_dev *ntb); 165 int intel_ntb_db_vector_count(struct ntb_dev *ntb); 166 u64 intel_ntb_db_vector_mask(struct ntb_dev *ntb, int db_vector); 167 int intel_ntb_db_set_mask(struct ntb_dev *ntb, u64 db_bits); [all …]
|
D | ntb_hw_gen1.c | 151 if (!ntb_topo_is_b2b(ndev->ntb.topo)) in ndev_reset_unsafe_flags() 192 dev_dbg(&ndev->ntb.pdev->dev, "Peer db addr %llx\n", *db_addr); in ndev_db_addr() 197 dev_dbg(&ndev->ntb.pdev->dev, "Peer db size %llx\n", *db_size); in ndev_db_addr() 290 dev_dbg(&ndev->ntb.pdev->dev, "Peer spad addr %llx\n", in ndev_spad_addr() 332 dev_dbg(&ndev->ntb.pdev->dev, "vec %d vec_mask %llx\n", vec, vec_mask); in ndev_interrupt() 338 ntb_link_event(&ndev->ntb); in ndev_interrupt() 342 ntb_db_event(&ndev->ntb, vec); in ndev_interrupt() 351 dev_dbg(&nvec->ndev->ntb.pdev->dev, "irq: %d nvec->num: %d\n", in ndev_vec_isr() 361 return ndev_interrupt(ndev, irq - ndev->ntb.pdev->irq); in ndev_irq_isr() 371 pdev = ndev->ntb.pdev; in ndev_init_isr() [all …]
|
D | ntb_hw_gen3.c | 102 rc = pci_read_config_word(ndev->ntb.pdev, in gen3_poll_link() 150 pdev = ndev->ntb.pdev; in gen3_setup_b2b_mw() 187 switch (ndev->ntb.topo) { in gen3_init_ntb() 194 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) { in gen3_init_ntb() 232 pdev = ndev->ntb.pdev; in gen3_init_dev() 240 ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); in gen3_init_dev() 242 ntb_topo_string(ndev->ntb.topo)); in gen3_init_dev() 243 if (ndev->ntb.topo == NTB_TOPO_NONE) in gen3_init_dev() 281 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb3_debugfs_read() 347 if (ntb_topo_is_b2b(ndev->ntb.topo)) { in ndev_ntb3_debugfs_read() [all …]
|
D | ntb_hw_intel.h | 138 struct ntb_dev ntb; member 186 #define ntb_ndev(__ntb) container_of(__ntb, struct intel_ntb_dev, ntb)
|
/Linux-v4.19/drivers/ntb/hw/amd/ |
D | ntb_hw_amd.c | 84 static int amd_ntb_mw_count(struct ntb_dev *ntb, int pidx) in amd_ntb_mw_count() argument 89 return ntb_ndev(ntb)->mw_count; in amd_ntb_mw_count() 92 static int amd_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int idx, in amd_ntb_mw_get_align() argument 97 struct amd_ntb_dev *ndev = ntb_ndev(ntb); in amd_ntb_mw_get_align() 114 *size_max = pci_resource_len(ndev->ntb.pdev, bar); in amd_ntb_mw_get_align() 119 static int amd_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx, in amd_ntb_mw_set_trans() argument 122 struct amd_ntb_dev *ndev = ntb_ndev(ntb); in amd_ntb_mw_set_trans() 136 mw_size = pci_resource_len(ntb->pdev, bar); in amd_ntb_mw_set_trans() 145 base_addr = pci_resource_start(ntb->pdev, bar); in amd_ntb_mw_set_trans() 222 static u64 amd_ntb_link_is_up(struct ntb_dev *ntb, in amd_ntb_link_is_up() argument [all …]
|
D | ntb_hw_amd.h | 181 struct ntb_dev ntb; member 214 #define ntb_ndev(__ntb) container_of(__ntb, struct amd_ntb_dev, ntb)
|
/Linux-v4.19/drivers/ntb/hw/idt/ |
D | ntb_hw_idt.c | 529 dev_dbg(&ndev->ntb.pdev->dev, "Local port: %hhu, num of peers: %hhu\n", in idt_scan_ports() 534 dev_warn(&ndev->ntb.pdev->dev, "No active peer found\n"); in idt_scan_ports() 547 static int idt_ntb_port_number(struct ntb_dev *ntb) in idt_ntb_port_number() argument 549 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_port_number() 562 static int idt_ntb_peer_port_count(struct ntb_dev *ntb) in idt_ntb_peer_port_count() argument 564 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_count() 576 static int idt_ntb_peer_port_number(struct ntb_dev *ntb, int pidx) in idt_ntb_peer_port_number() argument 578 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_number() 597 static int idt_ntb_peer_port_idx(struct ntb_dev *ntb, int port) in idt_ntb_peer_port_idx() argument 599 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_idx() [all …]
|
D | ntb_hw_idt.h | 1050 struct ntb_dev ntb; member 1076 #define to_ndev_ntb(__ntb) container_of(__ntb, struct idt_ntb_dev, ntb)
|
/Linux-v4.19/drivers/ntb/hw/mscc/ |
D | ntb_hw_switchtec.c | 83 struct ntb_dev ntb; member 129 static struct switchtec_ntb *ntb_sndev(struct ntb_dev *ntb) in ntb_sndev() argument 131 return container_of(ntb, struct switchtec_ntb, ntb); in ntb_sndev() 202 static int switchtec_ntb_mw_count(struct ntb_dev *ntb, int pidx) in switchtec_ntb_mw_count() argument 204 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_count() 227 static int switchtec_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, in switchtec_ntb_mw_get_align() argument 232 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_get_align() 303 static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, in switchtec_ntb_mw_set_trans() argument 306 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_set_trans() 318 if (widx >= switchtec_ntb_mw_count(ntb, pidx)) in switchtec_ntb_mw_set_trans() [all …]
|
/Linux-v4.19/drivers/ntb/hw/ |
D | Kconfig | 1 source "drivers/ntb/hw/amd/Kconfig" 2 source "drivers/ntb/hw/idt/Kconfig" 3 source "drivers/ntb/hw/intel/Kconfig" 4 source "drivers/ntb/hw/mscc/Kconfig"
|
/Linux-v4.19/Documentation/ |
D | ntb.txt | 17 NTB Core Driver (ntb) 31 as ntb hardware, or hardware drivers, are inserted and removed. The 42 inbound translation configured on the local ntb port and outbound translation 43 configured by the peer, on the peer ntb port. The first type is 117 NTB Transport Client (ntb\_transport) and NTB Netdev (ntb\_netdev) 122 across the ntb, to exchange packets of network data. The Transport client 129 NTB Ping Pong Test Client (ntb\_pingpong) 157 NTB Tool Test Client (ntb\_tool) 160 The Tool test client serves for debugging, primarily, ntb hardware and drivers. 168 * *debugfs*/ntb\_tool/*hw*/ [all …]
|
D | 00-INDEX | 287 ntb.txt
|
/Linux-v4.19/drivers/net/ |
D | ntb_netdev.c | 406 struct ntb_dev *ntb; in ntb_netdev_probe() local 412 ntb = dev_ntb(client_dev->parent); in ntb_netdev_probe() 413 pdev = ntb->pdev; in ntb_netdev_probe() 468 struct ntb_dev *ntb; in ntb_netdev_remove() local 474 ntb = dev_ntb(client_dev->parent); in ntb_netdev_remove() 475 pdev = ntb->pdev; in ntb_netdev_remove()
|
/Linux-v4.19/tools/testing/selftests/ntb/ |
D | ntb_test.sh | 569 ls -1 /sys/bus/ntb/devices 574 ssh $REMOTE_HOST ls -1 /sys/bus/ntb/devices
|
/Linux-v4.19/drivers/ |
D | Makefile | 170 obj-$(CONFIG_NTB) += ntb/
|
D | Kconfig | 170 source "drivers/ntb/Kconfig"
|