]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoDocument SA-15:06.
gjb [Wed, 25 Mar 2015 17:58:44 +0000 (17:58 +0000)]
Document SA-15:06.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@280628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279398
arybchik [Wed, 25 Mar 2015 14:10:20 +0000 (14:10 +0000)]
MFC: 279398

sfxge: compile out LRO if kernel is compiled without IPv4 and IPv6

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

MFC: 279411

Unbreak 'make depend' with sfxge by removing debugging code activated in the
INET || INET6 case

X-MFC with: r279398
Pointyhat to: arybchik

git-svn-id: svn://svn.freebsd.org/base/stable/10@280615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280433
arybchik [Wed, 25 Mar 2015 13:57:54 +0000 (13:57 +0000)]
MFC: 280433

sfxge: cleanup: fix index variable type to match upper boundary type

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280432
arybchik [Wed, 25 Mar 2015 13:56:42 +0000 (13:56 +0000)]
MFC: 280432

sfxge: cleanup: add a blank line before each #if to improve readability

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280431
arybchik [Wed, 25 Mar 2015 13:55:36 +0000 (13:55 +0000)]
MFC: 280431

sfxge: cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280380
arybchik [Wed, 25 Mar 2015 13:54:28 +0000 (13:54 +0000)]
MFC: 280380

sfxge: remove unnecessary and wrong prediction

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2085

git-svn-id: svn://svn.freebsd.org/base/stable/10@280610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280379
arybchik [Wed, 25 Mar 2015 13:53:28 +0000 (13:53 +0000)]
MFC: 280379

sfxge: do not check MCDI status word

This is a temporary workaround until we determine a reliable sequence
of operations for detecting MC reboots.

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2084

git-svn-id: svn://svn.freebsd.org/base/stable/10@280609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280378
arybchik [Wed, 25 Mar 2015 13:52:31 +0000 (13:52 +0000)]
MFC: 280378

sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64

bus_space_*_8() are not always macros, so it is not correct to use
#ifndef.

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2083

git-svn-id: svn://svn.freebsd.org/base/stable/10@280608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280377
arybchik [Wed, 25 Mar 2015 13:51:39 +0000 (13:51 +0000)]
MFC: 280377

sfxge: add statistics for each Tx queue

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2082

git-svn-id: svn://svn.freebsd.org/base/stable/10@280607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280376
arybchik [Wed, 25 Mar 2015 13:50:38 +0000 (13:50 +0000)]
MFC: 280376

sfxge: remove obsolete Tx non-multi queue support

Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier
versions support.

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2081

git-svn-id: svn://svn.freebsd.org/base/stable/10@280606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280375
arybchik [Wed, 25 Mar 2015 13:48:54 +0000 (13:48 +0000)]
MFC: 280375

sfxge: add barriers to BAR write macros

In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
 1. Before the first write to guarantee that previous writes to the region
    have been done
 2. Before the last write to guarantee that write to the last dword/qword is
    done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2077

git-svn-id: svn://svn.freebsd.org/base/stable/10@280605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280374
arybchik [Wed, 25 Mar 2015 13:47:48 +0000 (13:47 +0000)]
MFC: 280374

sfxge: assert either kernel or internal copy of interface flags

ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by:   Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2075

git-svn-id: svn://svn.freebsd.org/base/stable/10@280604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280164
arybchik [Wed, 25 Mar 2015 13:46:30 +0000 (13:46 +0000)]
MFC: 280164

sfxge: increase default put-list limit to 1024

Drops are observed under multi-stream TCP traffic due to put-list
overflow with limit equal to 64.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280163
arybchik [Wed, 25 Mar 2015 13:45:20 +0000 (13:45 +0000)]
MFC: 280163

sfxge: prefetch txq->common if TxQ is started only

Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280162
arybchik [Wed, 25 Mar 2015 13:44:01 +0000 (13:44 +0000)]
MFC: 280162

sfxge: adding version info to device description

The information is required for NIC update and config tools.

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280161
arybchik [Wed, 25 Mar 2015 13:42:37 +0000 (13:42 +0000)]
MFC: 280161

sfxge: move deferred packet list statistics to dedicated node

It is done to structure sysctl and do not mix with Tx queue statistics
to be added.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 280160
arybchik [Wed, 25 Mar 2015 13:41:26 +0000 (13:41 +0000)]
MFC: 280160

sfxge: add tunables to control LRO parameters on driver load time

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279351
arybchik [Wed, 25 Mar 2015 13:18:51 +0000 (13:18 +0000)]
MFC: 279351

sfxge: expect required init_state on data path and in periodic calls

With the patch applied the number of instruction events is 1% less and
number of mispredicted branch events is 5% less under multistream TCP
traffic load close to line rate.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279266
arybchik [Wed, 25 Mar 2015 13:15:47 +0000 (13:15 +0000)]
MFC: 279266

sfxge: correct limit for number of Rx queues

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279231
arybchik [Wed, 25 Mar 2015 13:14:50 +0000 (13:14 +0000)]
MFC: 279231

sfxge: add put-list high watermark

It is interesting to know how long put-list grows.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r280322 and r280429:
hselasky [Wed, 25 Mar 2015 13:14:25 +0000 (13:14 +0000)]
MFC r280322 and r280429:
The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.

While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.

Make some variables 32-bit to avoid problems with multithreading.

Use the feedback value from the synchronization endpoint as fallback
when there is no recording channel.

PR:  198444

git-svn-id: svn://svn.freebsd.org/base/stable/10@280591 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279230
arybchik [Wed, 25 Mar 2015 13:13:32 +0000 (13:13 +0000)]
MFC: 279230

sfxge: use goto to cleanup to avoid duplicate cleanup code

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279183
arybchik [Wed, 25 Mar 2015 13:12:15 +0000 (13:12 +0000)]
MFC: 279183

sfxge: add common code support for changing TX queue pace

To delay packets from a particular TX queue by a particular time, write a value
into the TX Pace table s.t. pace time <= TX Pace Clock Period * (2 ^ pace value)
- the TX pace clock is 1/13 of the system clock, so its period should be 104 or
52 ns depending on whether turbo mode is active.

EFX_TX_PACE_CLOCK_BASE added by me.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280589 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279182
arybchik [Wed, 25 Mar 2015 13:11:19 +0000 (13:11 +0000)]
MFC: 279182

sfxge: correct event queue interrupt moderation timer quanta

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279181
arybchik [Wed, 25 Mar 2015 13:09:46 +0000 (13:09 +0000)]
MFC: 279181

sfxge: add indefinite article and update timestamp

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279179
arybchik [Wed, 25 Mar 2015 13:06:37 +0000 (13:06 +0000)]
MFC: 279179

sfxge: DMA allocated memory is set to zeros because of BUS_DMA_ZERO flag

It is not required to set it to zeros once again.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280585 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279178
arybchik [Wed, 25 Mar 2015 13:05:33 +0000 (13:05 +0000)]
MFC: 279178

sfxge: do no allow EFSYS_MEM_ALLOC sleep

It solves locking problem when EFSYS_MEM_ALLOC is called in
the context holding a mutex (not allowed to sleep).
E.g. on interface bring up or multicast addresses addition.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280584 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279177
arybchik [Wed, 25 Mar 2015 13:04:28 +0000 (13:04 +0000)]
MFC: 279177

sfxge: assert event queue lock in event handlers

It is useful to highlight lock context.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279176
arybchik [Wed, 25 Mar 2015 13:03:36 +0000 (13:03 +0000)]
MFC: 279176

sfxge: pass correct address to free allocated memory in the case of load error

It is one more place missed in the previous fix.
Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279175
arybchik [Wed, 25 Mar 2015 13:02:33 +0000 (13:02 +0000)]
MFC: 279175

sfxge: using bus_space_*_stream_* API for better portability

Host-bus byte order translation is not requred.

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r280345:
hselasky [Wed, 25 Mar 2015 13:01:51 +0000 (13:01 +0000)]
MFC r280345:
Fix for out of order device destruction notifications when using the
delist_dev() function. In addition to this change:
- add a proper description of this function
- add a proper witness assert inside this function
- switch a nearby line to use the "cdp" pointer instead of cdev2priv()

git-svn-id: svn://svn.freebsd.org/base/stable/10@280579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279174
arybchik [Wed, 25 Mar 2015 13:01:10 +0000 (13:01 +0000)]
MFC: 279174

sfxge: add missing Siena sensors to common code

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279173
arybchik [Wed, 25 Mar 2015 12:59:49 +0000 (12:59 +0000)]
MFC: 279173

sfxge: add missing common code NVRAM types and map from MCDI

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279172
arybchik [Wed, 25 Mar 2015 12:59:01 +0000 (12:59 +0000)]
MFC: 279172

sfxge: add new identities to Siena static config

Submitted by:   Andrew Jackson <ajackson at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279147
arybchik [Wed, 25 Mar 2015 12:57:43 +0000 (12:57 +0000)]
MFC: 279147

sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r279725:
hselasky [Wed, 25 Mar 2015 11:12:48 +0000 (11:12 +0000)]
MFC r279725:
Add more USB IDs.

PR: 197753

git-svn-id: svn://svn.freebsd.org/base/stable/10@280569 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279146
arybchik [Wed, 25 Mar 2015 11:10:56 +0000 (11:10 +0000)]
MFC: 279146

sfxge: use sparse index to retrieve sensor value

Submitted by:   Andrew Jackson <ajackson at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280568 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279145
arybchik [Wed, 25 Mar 2015 11:09:35 +0000 (11:09 +0000)]
MFC: 279145

sfxge: use macros to acquire and release BAR locks everywhere

It was the result of invalid merge of the patch from out-of-tree driver.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279144
arybchik [Wed, 25 Mar 2015 11:08:41 +0000 (11:08 +0000)]
MFC: 279144

sfxge: packet can't require more than n_dma_seg descriptors plus one

Use remaining number of DMA segment instead of maximum number in mapping
when checking space for one more TSO segment packet.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279143
arybchik [Wed, 25 Mar 2015 11:07:56 +0000 (11:07 +0000)]
MFC: 279143

sfxge: use common definitions of MC shared memory offsets and PDU length

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279142
arybchik [Wed, 25 Mar 2015 11:07:10 +0000 (11:07 +0000)]
MFC: 279142

sfxge: synchronize EF10 registers header

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279141
arybchik [Wed, 25 Mar 2015 11:06:16 +0000 (11:06 +0000)]
MFC: 279141

sfxge: style fixes and cleanup

Sync endif comment with conditional.
BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena.
Restore commented out assertion.
Sync comments with out-of-tree driver.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279098
arybchik [Wed, 25 Mar 2015 11:04:12 +0000 (11:04 +0000)]
MFC: 279098

sfxge: allow TX and RX queue limits to be changed

Before the common code had hard coded limits on the IDs RXQs and TXQs could
be created with which were suited for the Windows driver with VMQ, and so
would prevent queues with IDs greater than or equal to 259 (for TXQs) or 768
(for RXQs) from being created. This change allows the limits to be set in
efsys.h, so that all 1024 queues can be created during new manftest tests.
Also, the descriptor cache sizes were also hard coded to values suited to
the smaller queue counts, and so it was necessary to make them configurable
as well.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279097
arybchik [Wed, 25 Mar 2015 11:01:58 +0000 (11:01 +0000)]
MFC: 279097

sfxge: check allocations are non-NULL before freeing them

Caught when efx_filter_init() failed and called efx_filter_fini() in the
teardown path.

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279096
arybchik [Wed, 25 Mar 2015 11:01:03 +0000 (11:01 +0000)]
MFC: 279096

sfxge: keep fw and driver view of autoneg parameters consistent

Previously the driver's view was the expected outcome of any
reconfiguration even if that reconfiguration failed.

Submitted by:   Ben Horgan
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279095
arybchik [Wed, 25 Mar 2015 11:00:09 +0000 (11:00 +0000)]
MFC: 279095

sfxge: never set RX_DESCQ_EN during self-test

We must not enable RX queues with random parameters when they are
mapped into a VF with an untrusted driver.  It's probably not a good
idea to do this anyway, so take this bit out of the table test masks.

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279094
arybchik [Wed, 25 Mar 2015 10:59:24 +0000 (10:59 +0000)]
MFC: 279094

sfxge: more accurate calculation of maximum number of TSO segments

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279080
arybchik [Wed, 25 Mar 2015 10:58:21 +0000 (10:58 +0000)]
MFC: 279080

sfxge: reap Tx descriptors on unblock

Otherwise when processing finally comes to efx_tx_qdesc_post() it could
be insufficient space between reaped and added to post pending
descriptors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279078
arybchik [Wed, 25 Mar 2015 10:57:26 +0000 (10:57 +0000)]
MFC: 279078

sfxge: add assertions that required event handlers are implemented

efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null.  Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279077
arybchik [Wed, 25 Mar 2015 10:56:10 +0000 (10:56 +0000)]
MFC: 279077

sfxge: style fixes

Use nitem() to get number of array elements.
Remove unused define.
Use TAB to indent.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r279281:
hselasky [Wed, 25 Mar 2015 10:55:08 +0000 (10:55 +0000)]
MFC r279281:
Fix a special case in ip_fragment() to produce a more sensible chain
of packets. When the data payload length excluding any headers, of an
outgoing IPv4 packet exceeds PAGE_SIZE bytes, a special case in
ip_fragment() can kick in to optimise the outgoing payload(s). The
code which was added in r98849 as part of zero copy socket support
assumes that the beginning of any MTU sized payload is aligned to
where a MBUF's "m_data" pointer points. This is not always the case
and can sometimes cause large IPv4 packets, as part of ping replies,
to be split more than needed.

Instead of iterating the MBUFs to figure out how much data is in the
current chain, use the value already in the "m_pkthdr.len" field of
the first MBUF in the chain.

Reviewed by: ken @
Differential Revision: https://reviews.freebsd.org/D1893
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@280552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279076
arybchik [Wed, 25 Mar 2015 10:54:23 +0000 (10:54 +0000)]
MFC: 279076

sfxge: regenerate sensor map

Add Florence R7 and Modena sensors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279048
arybchik [Wed, 25 Mar 2015 10:53:27 +0000 (10:53 +0000)]
MFC: 279048

sfxge: add Florence R7 turbo mode support to common code

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279047
arybchik [Wed, 25 Mar 2015 10:52:35 +0000 (10:52 +0000)]
MFC: 279047

sfxge: regenerate MCDI protocol headers

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279046
arybchik [Wed, 25 Mar 2015 10:51:08 +0000 (10:51 +0000)]
MFC: 279046

sfxge: handle fragmented TCP header in mbuf

TCP header is fragmented in the case of VLAN tagged IPv6 traffic without
HW VLAN tagging.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r280264:
hselasky [Wed, 25 Mar 2015 10:50:13 +0000 (10:50 +0000)]
MFC r280264:
Define BINDIR for some test utilities.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@280546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278942
arybchik [Wed, 25 Mar 2015 10:49:45 +0000 (10:49 +0000)]
MFC: 278942

sfxge: fix broken MCDI_EV_FIELD() macro

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278941
arybchik [Wed, 25 Mar 2015 10:48:28 +0000 (10:48 +0000)]
MFC: 278941

sfxge: support variable-length response to MCDI GET_BOARD_CFG

Allocate the minimum or maximum response length for GET_BOARD_CFG as
appropriate.  When looking up firmware subtypes by partition ID,
check the ID against the actual response length.

Merge of the patch made by Ben Hutchings in 2011.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 279180
arybchik [Wed, 25 Mar 2015 10:46:04 +0000 (10:46 +0000)]
MFC: 279180

sfxge: list header in SRCS

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280542 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278940
arybchik [Wed, 25 Mar 2015 10:44:30 +0000 (10:44 +0000)]
MFC: 278940

sfxge: add driver context member with number of event queues

Mainly to unify with similar member for transmit and receive queues.
It will be used in the future for resources allocation processing.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280541 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r280211:
hselasky [Wed, 25 Mar 2015 10:44:09 +0000 (10:44 +0000)]
MFC r280211:
Add missing void pointer argument to SYSINIT() functions.

Sponsored by:   Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@280540 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278939
arybchik [Wed, 25 Mar 2015 10:43:06 +0000 (10:43 +0000)]
MFC: 278939

sfxge: add driver context member with number of receive queues

Mainly to unify with similar member for transmit queues.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278938
arybchik [Wed, 25 Mar 2015 10:42:19 +0000 (10:42 +0000)]
MFC: 278938

sfxge: add driver context member with number of transmit queues

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278937
arybchik [Wed, 25 Mar 2015 10:41:09 +0000 (10:41 +0000)]
MFC: 278937

sfxge: add TCP segment size to sfxge_tso_state

It avoids access to m_pkthdr when TSO packet is started and also makes
tso_start_new_packet() function smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280537 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278841
arybchik [Wed, 25 Mar 2015 10:40:17 +0000 (10:40 +0000)]
MFC: 278841

sfxge: flush all Tx queues from if_qflush

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius

git-svn-id: svn://svn.freebsd.org/base/stable/10@280536 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278839
arybchik [Wed, 25 Mar 2015 10:39:18 +0000 (10:39 +0000)]
MFC: 278839

sfxge: style fixes

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280535 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278838
arybchik [Wed, 25 Mar 2015 10:38:22 +0000 (10:38 +0000)]
MFC: 278838

sfxge: SYSCTL_IN/OUT should not be called with non-sleepable lock held

The problem is found using WITNESS option enabled.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280533 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278837
arybchik [Wed, 25 Mar 2015 10:37:36 +0000 (10:37 +0000)]
MFC: 278837

sfxge: remove inline specifiers

Now compiler does not need any help.
The patch does not change generated code.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius

git-svn-id: svn://svn.freebsd.org/base/stable/10@280532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278836
arybchik [Wed, 25 Mar 2015 10:36:37 +0000 (10:36 +0000)]
MFC: 278836

sfxge: remove used sfxge_tso_state member dma_seg_i

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r279854:
hselasky [Wed, 25 Mar 2015 10:35:54 +0000 (10:35 +0000)]
MFC r279854:
Lock softc before clearing bits.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280529 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278835
arybchik [Wed, 25 Mar 2015 10:35:19 +0000 (10:35 +0000)]
MFC: 278835

sfxge: remove full_packet_size from sfxge_tso_state

It makes sfxge_tso_state smaller and even makes tso_start_new_packet()
few bytes smaller. Data used to calculate packet size are used nearby,
so it should be no problems with cache etc.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius

git-svn-id: svn://svn.freebsd.org/base/stable/10@280528 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278833
arybchik [Wed, 25 Mar 2015 10:34:20 +0000 (10:34 +0000)]
MFC: 278833

sfxge: remove unused variable

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor), glebius

git-svn-id: svn://svn.freebsd.org/base/stable/10@280527 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278255
arybchik [Wed, 25 Mar 2015 10:32:49 +0000 (10:32 +0000)]
MFC: 278255

sfxge: Add statistics for partially dropped TSO packets

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280526 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278254
arybchik [Wed, 25 Mar 2015 10:31:43 +0000 (10:31 +0000)]
MFC: 278254

sfxge: using 64-bit access for x86-64

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280525 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278250
arybchik [Wed, 25 Mar 2015 10:30:45 +0000 (10:30 +0000)]
MFC: 278250

sfxge: make lock names unique

Lock name should include interface name.
Tx queue and event queue lock name should include queue number.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280524 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278248
arybchik [Wed, 25 Mar 2015 10:29:08 +0000 (10:29 +0000)]
MFC: 278248

sfxge: access statistics buffers under port lock

Allow access to statistics data not only from sysctl handlers.

Submitted by:   Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280523 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278221
arybchik [Wed, 25 Mar 2015 10:27:54 +0000 (10:27 +0000)]
MFC: 278221

sfxge: Add macros to init, destroy, acquire, release and assert locks

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280522 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 278220
arybchik [Wed, 25 Mar 2015 10:26:45 +0000 (10:26 +0000)]
MFC: 278220

sfxge: Implement EFSYS_MEM_READ_BARRIER()

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277895
arybchik [Wed, 25 Mar 2015 10:25:45 +0000 (10:25 +0000)]
MFC: 277895

sfxge: Separate software Tx queue limit for non-TCP traffic

Add separate software Tx queue limit for non-TCP traffic to make total
limit higher and avoid local drops of TCP packets because of no
backpressure.
There is no point to make non-TCP limit high since without backpressure
UDP stream easily overflows any sensible limit.

Split early drops statistics since it is better to have separate counter
for each drop reason to make it unabmiguous.

Add software Tx queue high watermark. The information is very useful to
understand how big queues grow under traffic load.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277894
arybchik [Wed, 25 Mar 2015 10:23:00 +0000 (10:23 +0000)]
MFC: 277894

sfxge: implemented parameter to restrict RSS channels

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277893
arybchik [Wed, 25 Mar 2015 10:21:42 +0000 (10:21 +0000)]
MFC: 277893

sfxge: Use SFXGE_MODERATION to initialize event moderation

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277892
arybchik [Wed, 25 Mar 2015 10:20:42 +0000 (10:20 +0000)]
MFC: 277892

sfxge: Pass correct address to free allocated memory in the case of load error

Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277891
arybchik [Wed, 25 Mar 2015 10:19:43 +0000 (10:19 +0000)]
MFC: 277891

sfxge: Remove unused esm_size member of the efsys_mem_t structure

esm_size is not even initialized properly when memory is allocated.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277890
arybchik [Wed, 25 Mar 2015 10:18:23 +0000 (10:18 +0000)]
MFC: 277890

sfxge: Do not bzero() DMA allocated memory once again

sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so
allocated memory is already filled in by zeros

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277889
arybchik [Wed, 25 Mar 2015 10:17:24 +0000 (10:17 +0000)]
MFC: 277889

sfxge: Add evq argument to sfxge_tx_qcomplete()

It removes necessity to get evq pointer by its index in soft context.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277888
arybchik [Wed, 25 Mar 2015 10:16:33 +0000 (10:16 +0000)]
MFC: 277888

sfxge: fixed TSO code to cope with VLAN headers

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277887
arybchik [Wed, 25 Mar 2015 10:14:30 +0000 (10:14 +0000)]
MFC: 277887

sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t

Remove the first member alignment to cacheline since it is nop.
Use __aligned() for the whole structure to make sure that the structure
size is cacheline aligned.
Remove lock alignment to make the structure smaller and fit all members
used on event queue processing into one cacheline (128 bytes) on x86-64.
The lock is obtained as well from different context when event queue
statistics are retrived from sysctl context, but it is infrequent.
Reorder members to avoid padding and go in usage order on event
processing.
As the result all structure members used on event queue processing fit
into exactly one cacheline (128 byte) now.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277886
arybchik [Wed, 25 Mar 2015 10:13:19 +0000 (10:13 +0000)]
MFC: 277886

sfxge: Make it possible to build without EVQ statistics

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277885
arybchik [Wed, 25 Mar 2015 10:12:13 +0000 (10:12 +0000)]
MFC: 277885

sfxge: Move txq->next pointer to part writable on completion path

In fact the pointer is used only if more than one TXQ is processed in
one interrupt.
It is used (read-write) on completion path only.
Also it makes the first part of the structure smaller and it fits now
into one 128byte cache line. So, TXQ structure becomes 128 bytes
smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 277884
arybchik [Wed, 25 Mar 2015 10:11:17 +0000 (10:11 +0000)]
MFC: 277884

sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access

It was the only place on data path where sc->evq array is accessed.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280508 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272411
arybchik [Wed, 25 Mar 2015 10:08:28 +0000 (10:08 +0000)]
MFC: 272411

Properly handle a case that should never happen (the bus_dma
callback being called with error set to non-zero).

git-svn-id: svn://svn.freebsd.org/base/stable/10@280507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272377
arybchik [Wed, 25 Mar 2015 10:06:26 +0000 (10:06 +0000)]
MFC: 272377

Some cleanup for sfxge.4

Use standard mdoc macros instead of pure roff, fix some other mdoc
usage,
make the style consistent, and fix some grammar issues.

Approved by:    hrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@280506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272331
arybchik [Wed, 25 Mar 2015 10:05:19 +0000 (10:05 +0000)]
MFC: 272331

Support tunable to control Tx deferred packet list limits

Also increase default for Tx queue get-list limit.
Too small limit results in TCP packets drops especiall when many
streams are running simultaneously.
Put list may be kept small enough since it is just a temporary
location if transmit function can't get Tx queue lock.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272330
arybchik [Wed, 25 Mar 2015 10:03:41 +0000 (10:03 +0000)]
MFC: 272330

The patch allows to check state of the software Tx queues at run time.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272329
arybchik [Wed, 25 Mar 2015 10:02:14 +0000 (10:02 +0000)]
MFC: 272329

Update SolarFlare driver manual page with new tunables.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272328
arybchik [Wed, 25 Mar 2015 10:01:07 +0000 (10:01 +0000)]
MFC: 272328

Make size of Tx and Rx rings configurable

Required size of event queue is calculated now.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 272325
arybchik [Wed, 25 Mar 2015 09:59:38 +0000 (09:59 +0000)]
MFC: 272325

cleanup: code style fixes

Remove trailing whitespaces and tabs.
Enclose value in return statements in parentheses.
Use tabs after #define.
Do not skip comparison with 0/NULL in boolean expressions.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 263649
arybchik [Wed, 25 Mar 2015 09:56:48 +0000 (09:56 +0000)]
MFC: 263649

sfxge: limit software Tx queue size.

Previous implementation limits put queue size only (when Tx lock can't
be acquired), but get queue may grow unboundedly which results in mbuf
pools exhaustion and latency growth.

Submitted by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r279776:
dchagin [Wed, 25 Mar 2015 09:54:07 +0000 (09:54 +0000)]
MFC r279776:

Add a cred parameter to the VOP_VPTOCNP(9) manpage.
While here fix igor warning about new line.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: 263332
arybchik [Wed, 25 Mar 2015 09:45:07 +0000 (09:45 +0000)]
MFC: 263332

Add counter for Tx errors returned from if_transmit.

Submitted by:   Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@280497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f