Go to file
Hans Petter Selasky c40fbda341 MFC r322248:
Fix for mlx4en(4) to properly call m_defrag().

The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.

This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.

Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.

The counters are per-ring to avoid excessive cache misses in the
TX path.

Approved by:		re (kib)
Submitted by:		mjoras@
Differential Revision:	https://reviews.freebsd.org/D11683
Sponsored by:		Mellanox Technologies
2017-08-15 09:21:46 +00:00
bin MFC r320269: 2017-07-31 23:03:10 +00:00
cddl MFC r321921: Add compat shim part missed at r305197. 2017-08-05 08:36:04 +00:00
contrib MFC 321762 2017-08-07 02:15:13 +00:00
crypto Apply upstream fix: 2017-08-10 06:36:37 +00:00
etc MFC 321762 2017-08-07 02:15:13 +00:00
games MFC r267667: 2016-10-16 22:02:50 +00:00
gnu MFC: r306375 2017-08-05 12:33:00 +00:00
include MFC r318780: 2017-06-07 11:43:36 +00:00
kerberos5 MFC r318514-r318515, r318517, r318917 2017-05-31 06:26:37 +00:00
lib MFC r320991, r322016: 2017-08-10 15:34:50 +00:00
libexec MFC 321762 2017-08-07 02:15:13 +00:00
release Revise entry for r320646, rwho/rwhod/ruptime are not part of rcmds. 2017-08-09 12:45:49 +00:00
rescue MFC r315654: 2017-03-23 04:47:43 +00:00
sbin MFC r320761: 2017-08-02 05:47:26 +00:00
secure MFC r289172,r290254: 2017-02-09 22:49:48 +00:00
share MFC r321812: 2017-08-08 11:25:09 +00:00
sys MFC r322248: 2017-08-15 09:21:46 +00:00
tests MFC r320446: 2017-07-28 03:26:05 +00:00
tools MFC r320702,r320703: 2017-08-05 16:55:07 +00:00
usr.bin MFC r320991, r322016: 2017-08-10 15:34:50 +00:00
usr.sbin MFC r322124: 2017-08-13 17:30:03 +00:00
.arcconfig MFC r265842,r266120,r266121,r266959,r267148,r269985,r281789,r282261,r285064: 2015-12-29 18:22:06 +00:00
.arclint MFC r265842,r266120,r266121,r266959,r267148,r269985,r281789,r282261,r285064: 2015-12-29 18:22:06 +00:00
COPYRIGHT Bump copyright year. 2016-12-31 12:52:58 +00:00
LOCKS
MAINTAINERS
Makefile MFC r320273: 2017-07-21 17:58:06 +00:00
Makefile.inc1 MFC: r306375 2017-08-05 12:33:00 +00:00
ObsoleteFiles.inc MFC r268030,r268793,r303212,r319642,r319830: 2017-07-18 16:27:10 +00:00
README MFC r318294: 2017-05-18 12:27:41 +00:00
UPDATING MFC r318863: 2017-05-25 09:34:29 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html