History log of /freebsd-11-stable/sys/dev/ntb/ntb_transport.c
Revision Date Author Comments
# 329057 09-Feb-2018 mav

MFC r328611: Try to preallocate receive memory early.

We may not have enough contiguous memory later, when NTB connection get
established. It is quite likely that NTB windows are symmetric and this
allocation remain, but even if not, we will just reallocate it later.


# 329056 09-Feb-2018 mav

MFC r328450: Use bus_dmamem_alloc(9) KPI instead of contigmalloc(9).

I suppose it should make this code NUMA-aware with recent NUMA drop-in,
trying to allocate shared memory buffers from domain closer to NT-bridge.


# 323456 11-Sep-2017 mav

MFC r323128: Increase negotiation polling period from 10ms to 100ms.

There is no big need to burn CPU if other side may be not there yet. For
example, the PLX hardware by default enables the NTB link up on reset, not
dependig on driver to do it. In case of Intel hardware this also reduces
race between MSI-X workaround negotiation and upper layers, using the same
scratchpad registers in different time.


# 323455 11-Sep-2017 mav

MFC r323126: Make NTB drivers report more info via NewBus methods.


# 323454 11-Sep-2017 mav

MFC r323074: Clear doorbell bits after masking them before processing.

In theory this allows to avoid one more expensive doorbell register read
later in some scenarios. But in practice it also significantly increases
packet rate on PLX hardware, that I can't explain yet, possibly work-
arounding some interrupt delays.


# 323452 11-Sep-2017 mav

MFC r322981: Mask doorbells while processing them.

This fixes interrupt storms on hardware using legacy level-triggered
interrupts, since doorbell processing could take time after interrupt
handler completion, that triggered extra interrupts in a loop.


# 323265 07-Sep-2017 mav

MFC r323046: Make ntb_transport(4) ready receive early link events.

Those events may be reported as soon as callback is registered, if the link
is enabled by hardware or some other application.

While there, clean link_is_up variable on link down event.


# 317892 07-May-2017 mav

MFC r317340: Report NTB link speed to console and interface.


# 304370 18-Aug-2016 mav

MFC r303514: Fix NTBT_QP_LINKS negotiation.

I believe it never worked correctly for more the one queue even in Linux.
This fixes case when one of consumer drivers is not loaded on one side,
but its queues still announced as ready if something else brought link up.

While there, remove some pointless NULL checks.


# 304368 18-Aug-2016 mav

MFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).

New design allows to attach multiple consumers to ntb_transport(4) instance.
Previous design obtained from Linux theoretically allowed that, but was not
practically usable (Linux also has only one consumer driver now).


# 304367 18-Aug-2016 mav

MFC r303429, r303437:
Once more refactor KPI between NTB hardware and consumers.

New design allows hardware resources to be split between several consumers.
For example, one BAR can be dedicated for remote memory access, while other
resources can be used for packet transport for virtual Ethernet interface.
And even without resource split, this code allows to specify which consumer
driver should attach the hardware.

From some points this makes the code even closer to Linux one, even though
Linux does not provide the described flexibility.


# 304364 18-Aug-2016 mav

MFC r302622 (by sephe): ntb: Fix LINT


# 304362 18-Aug-2016 mav

MFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().

At that point link is quite likely not established yet, so messing with
scratch registers is premature there. Original commit message mentioned
code diff reduction from Linux, but this line is not present in Linux now.


# 304356 18-Aug-2016 mav

MFC r302495: Improve memory allocation errors handling on receive.


# 304355 18-Aug-2016 mav

MFC r302494: Synchronize MTU code with Linux.

It is mandatory for transport compatibility.


# 304354 18-Aug-2016 mav

MFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.

This allows at least first three doorbells to work very close to normal
hardware, properly signaling events to upper layers without spurious or
lost events. Doorbells above the first three may still report spurious
events due to lack of reliable information, but they are rarely used.


# 304353 18-Aug-2016 mav

MFC r302492: Bring some more order into link and qp state handling.

Do not touch scratchpad registers until link is reported up.
Mask and do not handle doorbell events until respective qp is up.


# 304351 18-Aug-2016 mav

MFC r302490: Create separate RX taskqueue for each qp.


# 304350 18-Aug-2016 mav

MFC r302489: Remove rx_completion_task taskqueue.

It is not needed after RX lock removed in previous commit.


# 304349 18-Aug-2016 mav

MFC r302488: Remove unneeded RX lock, and make TX lock per-qp.


# 304348 18-Aug-2016 mav

MFC r302487: Reduce code divergence from Linux, preparing for DMA support.


# 304347 18-Aug-2016 mav

MFC r302486: Fix operation with multiple qps.


# 304346 18-Aug-2016 mav

MFC r302484: NewBus'ify NTB subsystem.

This follows NTB subsystem modularization in Linux, tuning it to FreeBSD
native NewBus interfaces. This change allows to support different types
of hardware with different drivers, support multiple NTB instances in a
system, ntb_transport module use for needs other then if_ntb, etc.

Sponsored by: iXsystems, Inc.