Home
last modified time | relevance | path

Searched refs:ntb (Results 1 – 25 of 29) sorted by relevance

12

/Linux-v5.4/include/linux/
Dntb.h174 int (*probe)(struct ntb_client *client, struct ntb_dev *ntb);
175 void (*remove)(struct ntb_client *client, struct ntb_dev *ntb);
261 int (*port_number)(struct ntb_dev *ntb);
262 int (*peer_port_count)(struct ntb_dev *ntb);
263 int (*peer_port_number)(struct ntb_dev *ntb, int pidx);
264 int (*peer_port_idx)(struct ntb_dev *ntb, int port);
266 u64 (*link_is_up)(struct ntb_dev *ntb,
268 int (*link_enable)(struct ntb_dev *ntb,
270 int (*link_disable)(struct ntb_dev *ntb);
272 int (*mw_count)(struct ntb_dev *ntb, int pidx);
[all …]
Dgenl_magic_func.h144 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-v5.4/drivers/ntb/
Dcore.c101 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 …]
Dmsi.c31 int ntb_msi_init(struct ntb_dev *ntb, in ntb_msi_init() argument
42 peers = ntb_peer_port_count(ntb); in ntb_msi_init()
46 struct_size = sizeof(*ntb->msi) + sizeof(*ntb->msi->peer_mws) * peers; in ntb_msi_init()
48 ntb->msi = devm_kzalloc(&ntb->dev, struct_size, GFP_KERNEL); in ntb_msi_init()
49 if (!ntb->msi) in ntb_msi_init()
52 ntb->msi->desc_changed = desc_changed; in ntb_msi_init()
55 peer_widx = ntb_peer_mw_count(ntb) - 1 - i; in ntb_msi_init()
57 ret = ntb_peer_mw_get_addr(ntb, peer_widx, &mw_phys_addr, in ntb_msi_init()
62 ntb->msi->peer_mws[i] = devm_ioremap(&ntb->dev, mw_phys_addr, in ntb_msi_init()
64 if (!ntb->msi->peer_mws[i]) { in ntb_msi_init()
[all …]
DMakefile2 obj-$(CONFIG_NTB) += ntb.o hw/ test/
5 ntb-y := core.o
6 ntb-$(CONFIG_NTB_MSI) += msi.o
DKconfig9 ntb Linux driver uses this point-to-point communication as a method to
27 source "drivers/ntb/hw/Kconfig"
29 source "drivers/ntb/test/Kconfig"
35 messages over the ntb hardware. The transport exposes a queue pair api
/Linux-v5.4/drivers/ntb/test/
Dntb_pingpong.c100 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 …]
Dntb_msi_test.c20 struct ntb_dev *ntb; member
48 dev_dbg(&nm->ntb->dev, "Interrupt Occurred: %d", in ntb_msit_isr()
65 ret = ntb_msi_setup_mws(nm->ntb); in ntb_msit_setup_work()
67 dev_err(&nm->ntb->dev, "Unable to setup MSI windows: %d\n", in ntb_msit_setup_work()
77 irq = ntbm_msi_request_irq(nm->ntb, ntb_msit_isr, in ntb_msit_setup_work()
87 ret = ntb_spad_write(nm->ntb, 2 * i + 1, in ntb_msit_setup_work()
92 ret = ntb_spad_write(nm->ntb, 2 * i + 2, in ntb_msit_setup_work()
100 ntb_spad_write(nm->ntb, 0, irq_count); in ntb_msit_setup_work()
101 ntb_peer_db_set(nm->ntb, BIT(ntb_port_number(nm->ntb))); in ntb_msit_setup_work()
109 dev_dbg(&nm->ntb->dev, "MSI Descriptors Changed\n"); in ntb_msit_desc_changed()
[all …]
Dntb_perf.c185 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()
287 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send()
290 ntb_peer_db_set(perf->ntb, PERF_SPAD_NOTIFY(peer->gidx)); in perf_spad_cmd_send()
292 dev_dbg(&perf->ntb->dev, "DB ring peer %#llx\n", in perf_spad_cmd_send()
307 ntb_db_clear(perf->ntb, PERF_SPAD_NOTIFY(perf->gidx)); in perf_spad_cmd_recv()
[all …]
Dntb_tool.c257 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 …]
DKconfig6 doorbells of the ntb hardware. This driver may be used to test that
7 your ntb hardware and drivers are functioning at a basic level.
17 This driver may be used to test that your ntb hardware and drivers are
/Linux-v5.4/drivers/ntb/hw/amd/
Dntb_hw_amd.c84 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 …]
Dntb_hw_amd.h184 struct ntb_dev ntb; member
218 #define ntb_ndev(__ntb) container_of(__ntb, struct amd_ntb_dev, ntb)
/Linux-v5.4/drivers/ntb/hw/intel/
Dntb_hw_gen1.h157 int intel_ntb_mw_count(struct ntb_dev *ntb, int pidx);
158 int intel_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int idx,
161 int intel_ntb_peer_mw_count(struct ntb_dev *ntb);
162 int intel_ntb_peer_mw_get_addr(struct ntb_dev *ntb, int idx,
164 u64 intel_ntb_link_is_up(struct ntb_dev *ntb, enum ntb_speed *speed,
166 int intel_ntb_link_disable(struct ntb_dev *ntb);
167 u64 intel_ntb_db_valid_mask(struct ntb_dev *ntb);
168 int intel_ntb_db_vector_count(struct ntb_dev *ntb);
169 u64 intel_ntb_db_vector_mask(struct ntb_dev *ntb, int db_vector);
170 int intel_ntb_db_set_mask(struct ntb_dev *ntb, u64 db_bits);
[all …]
Dntb_hw_gen3.c102 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 …]
Dntb_hw_gen1.c151 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()
288 dev_dbg(&ndev->ntb.pdev->dev, "Peer spad addr %llx\n", in ndev_spad_addr()
330 dev_dbg(&ndev->ntb.pdev->dev, "vec %d vec_mask %llx\n", vec, vec_mask); in ndev_interrupt()
336 ntb_link_event(&ndev->ntb); in ndev_interrupt()
340 ntb_db_event(&ndev->ntb, vec); in ndev_interrupt()
349 dev_dbg(&nvec->ndev->ntb.pdev->dev, "irq: %d nvec->num: %d\n", in ndev_vec_isr()
359 return ndev_interrupt(ndev, irq - ndev->ntb.pdev->irq); in ndev_irq_isr()
369 pdev = ndev->ntb.pdev; in ndev_init_isr()
[all …]
Dntb_hw_intel.h139 struct ntb_dev ntb; member
187 #define ntb_ndev(__ntb) container_of(__ntb, struct intel_ntb_dev, ntb)
/Linux-v5.4/drivers/ntb/hw/idt/
Dntb_hw_idt.c530 dev_dbg(&ndev->ntb.pdev->dev, "Local port: %hhu, num of peers: %hhu\n", in idt_scan_ports()
535 dev_warn(&ndev->ntb.pdev->dev, "No active peer found\n"); in idt_scan_ports()
548 static int idt_ntb_port_number(struct ntb_dev *ntb) in idt_ntb_port_number() argument
550 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_port_number()
563 static int idt_ntb_peer_port_count(struct ntb_dev *ntb) in idt_ntb_peer_port_count() argument
565 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_count()
577 static int idt_ntb_peer_port_number(struct ntb_dev *ntb, int pidx) in idt_ntb_peer_port_number() argument
579 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_number()
598 static int idt_ntb_peer_port_idx(struct ntb_dev *ntb, int port) in idt_ntb_peer_port_idx() argument
600 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_idx()
[all …]
Dntb_hw_idt.h1125 struct ntb_dev ntb; member
1153 #define to_ndev_ntb(__ntb) container_of(__ntb, struct idt_ntb_dev, ntb)
/Linux-v5.4/drivers/ntb/hw/mscc/
Dntb_hw_switchtec.c46 struct ntb_dev ntb; member
93 static struct switchtec_ntb *ntb_sndev(struct ntb_dev *ntb) in ntb_sndev() argument
95 return container_of(ntb, struct switchtec_ntb, ntb); in ntb_sndev()
166 static int switchtec_ntb_mw_count(struct ntb_dev *ntb, int pidx) in switchtec_ntb_mw_count() argument
168 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_count()
191 static int switchtec_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, in switchtec_ntb_mw_get_align() argument
196 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_get_align()
270 static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, in switchtec_ntb_mw_set_trans() argument
273 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_set_trans()
285 if (widx >= switchtec_ntb_mw_count(ntb, pidx)) in switchtec_ntb_mw_set_trans()
[all …]
/Linux-v5.4/drivers/ntb/hw/
DKconfig2 source "drivers/ntb/hw/amd/Kconfig"
3 source "drivers/ntb/hw/idt/Kconfig"
4 source "drivers/ntb/hw/intel/Kconfig"
5 source "drivers/ntb/hw/mscc/Kconfig"
/Linux-v5.4/Documentation/driver-api/
Dntb.rst17 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
123 NTB Transport Client (ntb\_transport) and NTB Netdev (ntb\_netdev)
128 across the ntb, to exchange packets of network data. The Transport client
135 NTB Ping Pong Test Client (ntb\_pingpong)
163 NTB Tool Test Client (ntb\_tool)
166 The Tool test client serves for debugging, primarily, ntb hardware and drivers.
174 * *debugfs*/ntb\_tool/*hw*/
[all …]
Dindex.rst86 ntb
/Linux-v5.4/drivers/net/
Dntb_netdev.c403 struct ntb_dev *ntb; in ntb_netdev_probe() local
409 ntb = dev_ntb(client_dev->parent); in ntb_netdev_probe()
410 pdev = ntb->pdev; in ntb_netdev_probe()
/Linux-v5.4/tools/testing/selftests/ntb/
Dntb_test.sh608 ls -1 /sys/bus/ntb/devices
613 ssh $REMOTE_HOST ls -1 /sys/bus/ntb/devices

12