summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC: 280374arybchik2015-03-251-1/+10
| | | | | | | | | | | | | | | 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
* MFC: 280164arybchik2015-03-251-1/+1
| | | | | | | | | | 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)
* MFC: 280163arybchik2015-03-251-2/+4
| | | | | | | | | | | 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)
* MFC: 280162arybchik2015-03-253-1/+45
| | | | | | | | | | 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)
* MFC: 280161arybchik2015-03-251-16/+21
| | | | | | | | | | 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)
* MFC: 280160arybchik2015-03-252-0/+59
| | | | | | | sfxge: add tunables to control LRO parameters on driver load time Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279351arybchik2015-03-255-17/+18
| | | | | | | | | | | 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)
* MFC: 279266arybchik2015-03-251-1/+1
| | | | | | | sfxge: correct limit for number of Rx queues Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279231arybchik2015-03-252-0/+9
| | | | | | | | | 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)
* MFC r280322 and r280429:hselasky2015-03-253-129/+282
| | | | | | | | | | | | | | | | | | | | | 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
* MFC: 279230arybchik2015-03-251-11/+13
| | | | | | | sfxge: use goto to cleanup to avoid duplicate cleanup code Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279183arybchik2015-03-253-0/+73
| | | | | | | | | | | | | | | 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)
* MFC: 279182arybchik2015-03-255-7/+11
| | | | | | | | 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)
* MFC: 279181arybchik2015-03-251-2/+2
| | | | | | | sfxge: add indefinite article and update timestamp Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279179arybchik2015-03-252-2/+0
| | | | | | | | | 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)
* MFC: 279178arybchik2015-03-251-1/+5
| | | | | | | | | | | 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)
* MFC: 279177arybchik2015-03-251-0/+19
| | | | | | | | | sfxge: assert event queue lock in event handlers It is useful to highlight lock context. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279176arybchik2015-03-251-2/+2
| | | | | | | | | | | 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)
* MFC: 279175arybchik2015-03-251-35/+64
| | | | | | | | | | 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)
* MFC r280345:hselasky2015-03-251-2/+18
| | | | | | | | 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()
* MFC: 279174arybchik2015-03-251-0/+30
| | | | | | | sfxge: add missing Siena sensors to common code Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279173arybchik2015-03-252-0/+12
| | | | | | | sfxge: add missing common code NVRAM types and map from MCDI Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279172arybchik2015-03-251-1/+3
| | | | | | | | 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)
* MFC: 279147arybchik2015-03-251-7/+13
| | | | | | | sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC r279725:hselasky2015-03-253-1/+5
| | | | | | Add more USB IDs. PR: 197753
* MFC: 279146arybchik2015-03-251-4/+6
| | | | | | | | 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)
* MFC: 279145arybchik2015-03-251-10/+10
| | | | | | | | | 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)
* MFC: 279144arybchik2015-03-251-2/+2
| | | | | | | | | | 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)
* MFC: 279143arybchik2015-03-251-17/+12
| | | | | | | | 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)
* MFC: 279142arybchik2015-03-251-2/+134
| | | | | | | sfxge: synchronize EF10 registers header Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279141arybchik2015-03-259-15/+21
| | | | | | | | | | | | 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)
* MFC: 279098arybchik2015-03-254-6/+20
| | | | | | | | | | | | | | | | | 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)
* MFC: 279097arybchik2015-03-251-6/+14
| | | | | | | | | | | 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)
* MFC: 279096arybchik2015-03-251-0/+13
| | | | | | | | | | | 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)
* MFC: 279095arybchik2015-03-251-1/+1
| | | | | | | | | | | | 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)
* MFC: 279094arybchik2015-03-252-4/+14
| | | | | | | sfxge: more accurate calculation of maximum number of TSO segments Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279080arybchik2015-03-251-1/+4
| | | | | | | | | | | 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)
* MFC: 279078arybchik2015-03-251-0/+6
| | | | | | | | | | | | | 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)
* MFC: 279077arybchik2015-03-254-25/+15
| | | | | | | | | | | 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)
* MFC r279281:hselasky2015-03-251-3/+1
| | | | | | | | | | | | | | | | | | | | 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
* MFC: 279076arybchik2015-03-252-2/+30
| | | | | | | | | sfxge: regenerate sensor map Add Florence R7 and Modena sensors. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279048arybchik2015-03-254-17/+38
| | | | | | | | 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)
* MFC: 279047arybchik2015-03-251-41/+2348
| | | | | | | sfxge: regenerate MCDI protocol headers Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 279046arybchik2015-03-251-3/+16
| | | | | | | | | | 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)
* MFC r280264:hselasky2015-03-252-0/+4
| | | | | | Define BINDIR for some test utilities. Sponsored by: Mellanox Technologies
* MFC: 278942arybchik2015-03-253-8/+8
| | | | | | | | sfxge: fix broken MCDI_EV_FIELD() macro Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 278941arybchik2015-03-253-7/+19
| | | | | | | | | | | | | 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)
* MFC: 279180arybchik2015-03-251-0/+5
| | | | | | | sfxge: list header in SRCS Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor)
* MFC: 278940arybchik2015-03-252-7/+13
| | | | | | | | | | 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)
* MFC r280211:hselasky2015-03-251-2/+2
| | | | | | Add missing void pointer argument to SYSINIT() functions. Sponsored by: Mellanox Technologies
OpenPOWER on IntegriCloud