MFC r256477:
cxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both
ingress and egress queues, and for both T4 and T5. These values are
used by the T4/T5 iWARP driver.
r255198:
For TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is
set to 15 to indicate that the peer did not send a window scale option
with its SYN. Do not send a window scale option in the SYN|ACK reply
in that case.
r255410:
Fix a miscalculation that caused cxgbe/tom to auto-increment
a TOE socket's tx buffer size too aggressively.
r255411:
Rework the tx credit mechanism between the cxgbe/tom driver
and the card. This helps smooth out some burstiness in the
exchange.
r255050:
Implement support for rx buffer packing. Enable it by default for T5
cards.
This is a T4 and T5 chip feature which lets the chip deliver multiple
Ethernet frames in a single buffer. This is more efficient within the
chip, in the driver, and reduces wastage of space in rx buffers.
- Always allocate rx buffers from the jumbop zone, no matter what the
MTU is. Do not use the normal cluster refcounting mechanism.
- Reserve space for an mbuf and a refcount in the cluster itself and let
the chip DMA multiple frames in the rest.
- Use the embedded mbuf for the first frame and allocate mbufs on the
fly for any additional frames delivered in the cluster. Each of these
mbufs has a reference on the underlying cluster.
r255052:
Fix the sysctl that displays whether buffer packing is enabled
or not.
This updates the network driver to support multiple queues, and several bug
fixes. Note that multiqueue support is not compiled in by default since that
would change ALTQ behavior.
- Sync VirtIO net device header file from recent Linux
- Import multiqueue VirtIO net driver
- Fix build with gcc
- Do not hold the vtnet Rx queue lock when calling up into the stack
- Read and write the MAC address in the config space byte by byte
- Also include the mbuf's csum_flags in an assert message
- Remove stray space
- Move duplicated transmit start code into a single function
- Avoid queue unlock followed by relock when the enable interrupt race is
lost
- Check for a full virtqueue in the multiqueue transmit path
- Do not place the sglist used for Rx/Tx on the stack
- Use m_defrag() instead of m_collapse() to compact a long mbuf chain
MFC r255047 (with a manual tweak to match the ext_free in stable/9):
Add a routine for attaching an mbuf to a buffer with an external
refcount. This one is willing to work with buffers that may already be
referenced. MEXTADD/m_extadd are suitable only for the first attachment
to a cluster -- they initialize the refcount to 1.
MFC r253701, r253829, r253873, r253889, r253890, r254577, r254727, and r254933.
r253701:
Display a string instead of a numeric code in the linkdnrc sysctl.
r253829:
Display SGE tunables in the sysctl tree.
dev.t5nex.0.fl_pktshift: payload DMA offset in rx buffer (bytes)
dev.t5nex.0.fl_pad: payload pad boundary (bytes)
dev.t5nex.0.spg_len: status page size (bytes)
dev.t5nex.0.cong_drop: congestion drop setting
r253873:
Set up congestion manager context properly for T5 based cards.
r253889:
Fix previous commit (r253873). "cong" has one bit per channel but the
congestion channel map has 1 nibble per channel. So bits wxyz need to
be blown up into 000w000x000y000z.
r253890:
Display temperature sensor data. Shows -1 if sensor not
available on the card.
r254577:
Display P/N information in the description.
r254727:
There is no need to hold the freelist lock around alloc/free of
software descriptors. This also silences WITNESS warnings when
the software descriptors are allocated with M_WAITOK.
r254933:
Use correct mailbox and PCIe PF number when querying RDMA parameters.
Exit with an error when make is called without a target at the top level
rather than poluting the source tree and causing use confusion in future
builds.
kib [Tue, 6 May 2014 12:39:23 +0000 (12:39 +0000)]
MFC r265102:
Fix one cases of recursive acquisitions of the vm object lock, only
possible in rare failure situations. The second part of r265102 is
not applicable to stable/9 since vm_page_insert() cannot fail there.
rmacklem [Mon, 5 May 2014 20:55:37 +0000 (20:55 +0000)]
MFC: r264738
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.
rmacklem [Mon, 5 May 2014 20:48:36 +0000 (20:48 +0000)]
MFC: r264705, r264749
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.
rmacklem [Mon, 5 May 2014 11:30:45 +0000 (11:30 +0000)]
MFC: r264739
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.
rmacklem [Mon, 5 May 2014 01:07:56 +0000 (01:07 +0000)]
MFC: r264681
Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.
rmacklem [Mon, 5 May 2014 01:01:30 +0000 (01:01 +0000)]
MFC: r264672
Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.
rmacklem [Sat, 3 May 2014 23:48:26 +0000 (23:48 +0000)]
MFC: r264630
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.
The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.
This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.
rmacklem [Sat, 3 May 2014 23:42:00 +0000 (23:42 +0000)]
MFC: r264517
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.
rmacklem [Sat, 3 May 2014 22:27:24 +0000 (22:27 +0000)]
MFC: r264469, r264498
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.
MFC r264494:
Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.
MFC r264600:
Remove redundant unlock.
This code was removed from the opensolaris and darwin's
netsmb implementations, in DfBSD it also has been disabled.
markj [Thu, 1 May 2014 03:16:40 +0000 (03:16 +0000)]
MFC r262733:
Use a full path to the target for make rules which create symlinks @,
machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named
"x86" or "x86.c" in the make path can cause problems.
MFC r264436:
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.
ian [Mon, 28 Apr 2014 13:28:10 +0000 (13:28 +0000)]
MFC uftdi(4) driver changes...
r264010: Support speeds up to 12mbaud on newer chips.
r264018: Update list of supported FTDI chips.
r264031: Use 2K IO buffers for improved throughput.
r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO,
and other modes.
r264800: Various fixes to r264149 pointed out by Coverity scan.
Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).
marius [Sat, 26 Apr 2014 01:00:37 +0000 (01:00 +0000)]
MFC: r264832 (partial)
- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
MFC r264794:
Move xdev knobs from release/arm/release.sh and into an
XDEV_FLAGS variable in ${KERNCONF}.conf file.
Local changes:
Fix XDEV_FLAGS for stable/9 branch, in particular, remove
all *_CLANG* knobs, and move WITH_GCC=1 to XDEV_FLAGS.
This is effectively a no-op on stable/9, and merged for
tracking purpose only.
marius [Fri, 25 Apr 2014 22:23:26 +0000 (22:23 +0000)]
MFC: r260064
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
devices.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
marius [Fri, 25 Apr 2014 22:19:06 +0000 (22:19 +0000)]
MFC: r260063
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
marius [Fri, 25 Apr 2014 22:04:33 +0000 (22:04 +0000)]
MFC: r260061
- Add support for using MSI instead of INTx, controllable via the tunable
hw.ral.msi_disable (defaulting to using MSI).
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Release resources again in case attaching fails.
- Quiesce the interrupt before detaching.
- Sprinkle const.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Trim headers.
- Nuke dupe $FreeBSD$.
marius [Fri, 25 Apr 2014 22:01:05 +0000 (22:01 +0000)]
MFC: r260058
- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.
marius [Fri, 25 Apr 2014 21:42:46 +0000 (21:42 +0000)]
MFC: r260053
- There's no need to keep track of resource IDs.
- Simplify MSI allocation and release. For a single one, we don't need to
fiddle with the MSI count and pci_release_msi(9) is smart enough to just
do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
marius [Fri, 25 Apr 2014 21:32:38 +0000 (21:32 +0000)]
MFC: r260050, r261528
- Switch to using the common MII bitbang'ing code instead of duplicating it.
- Based on lessons learnt with dc(4) (see r185750), add bus space barriers to
the MII bitbang read and write functions as well as to instances of page
switching.
- Add missing locking to ed_ifmedia_{upd,sts}().
- Canonicalize some messages.
- Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named
ED_TC5299J_MII_DIRIN.
- Remove unused headers.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
marius [Fri, 25 Apr 2014 21:28:41 +0000 (21:28 +0000)]
MFC: r260045
- Simplify MSI allocation and release. For a single one, we don't need to
fiddle with the MSI count and pci_release_msi(9) is smart enough to just
do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.
marius [Fri, 25 Apr 2014 21:24:53 +0000 (21:24 +0000)]
MFC: r260044
Free the MSI again on detach if allocated. Arguably, this code would be
better off living in aac_pci.c, but it doesn't seem worth creating a
aac_pci_detach() and it's also not the first PCI-specific bit in aac.c
marius [Fri, 25 Apr 2014 21:20:28 +0000 (21:20 +0000)]
MFC: r260041
Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number,
i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links
in the file system. This is also the default in mkisofs(8) and according to
its man page, no system only being able to cope with Rock Ridge version 1.10
is known to exist.
MFC r264318:
Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields.
This caused incorrect behavior of arrays with big-endian DDF metadata.
Little-endian (like used by Adaptec controllers) should not be harmed.
Add workaround should be enough to manage compatibility.
marius [Tue, 22 Apr 2014 13:02:06 +0000 (13:02 +0000)]
MFC: r264257, r264327, r264514
Distinguish between the different variants and configurations of Sunix
{MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S.
Among others, this fixes the hang seen when trying to probe the none-
existent second UART on an actually 1-port chip.
Obtained from: NetBSD (BAR layouts)
Sponsored by: Bally Wulff Games & Entertainment GmbH
MFC r264293:
Add workaround for MCP61 Ethernet controller found on MSI K9
motherboard. PHY hardware used for the controller responded at
all possible addresses which in turn resulted in having 32 PHYs
for the controller. If driver detects "MSI K9N6PGM2-V2 (MS-7309)"
motherboard, tell miibus(4) PHY is located at 0.
MFC r264062:
Correct endianness handling in getting station address from EEPROM.
While I'm here, remove aue_eeprom_getword() as its only usage is to
read station address and make it more readable. This change is
inspired by NetBSD.
With this change, aue(4) should work on big endian architectures.
This is a direct commit to stable/9, since these documents have
changed drastically, and merge conflicts are too irrelevant to
deal with for a 14-character removal.