sfxge_tx.h (277895) | sfxge_tx.h (278221) |
---|---|
1/*- 2 * Copyright (c) 2010-2011 Solarflare Communications, Inc. 3 * All rights reserved. 4 * 5 * This software was developed in part by Philip Paeps under contract for 6 * Solarflare Communications, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2010-2011 Solarflare Communications, Inc. 3 * All rights reserved. 4 * 5 * This software was developed in part by Philip Paeps under contract for 6 * Solarflare Communications, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/sfxge/sfxge_tx.h 277895 2015-01-29 19:11:37Z arybchik $ | 29 * $FreeBSD: head/sys/dev/sfxge/sfxge_tx.h 278221 2015-02-04 20:03:57Z arybchik $ |
30 */ 31 32#ifndef _SFXGE_TX_H 33#define _SFXGE_TX_H 34 35#include <netinet/in.h> 36#include <netinet/ip.h> 37#include <netinet/tcp.h> --- 80 unchanged lines hidden (view full) --- 118 SFXGE_TXQ_NTYPES 119}; 120 121#define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) 122 123#define SFXGE_TX_BATCH 64 124 125#ifdef SFXGE_HAVE_MQ | 30 */ 31 32#ifndef _SFXGE_TX_H 33#define _SFXGE_TX_H 34 35#include <netinet/in.h> 36#include <netinet/ip.h> 37#include <netinet/tcp.h> --- 80 unchanged lines hidden (view full) --- 118 SFXGE_TXQ_NTYPES 119}; 120 121#define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) 122 123#define SFXGE_TX_BATCH 64 124 125#ifdef SFXGE_HAVE_MQ |
126#define SFXGE_TXQ_LOCK(txq) (&(txq)->lock) | 126#define SFXGE_TX_LOCK(txq) (&(txq)->lock) |
127#define SFXGE_TX_SCALE(sc) ((sc)->intr.n_alloc) 128#else | 127#define SFXGE_TX_SCALE(sc) ((sc)->intr.n_alloc) 128#else |
129#define SFXGE_TXQ_LOCK(txq) (&(txq)->sc->tx_lock) | 129#define SFXGE_TX_LOCK(txq) (&(txq)->sc->tx_lock) |
130#define SFXGE_TX_SCALE(sc) 1 131#endif 132 | 130#define SFXGE_TX_SCALE(sc) 1 131#endif 132 |
133#define SFXGE_TXQ_LOCK_INIT(_txq, _name) \ 134 mtx_init(&(_txq)->lock, (_name), NULL, MTX_DEF) 135#define SFXGE_TXQ_LOCK_DESTROY(_txq) \ 136 mtx_destroy(&(_txq)->lock) 137#define SFXGE_TXQ_LOCK(_txq) \ 138 mtx_lock(SFXGE_TX_LOCK(_txq)) 139#define SFXGE_TXQ_TRYLOCK(_txq) \ 140 mtx_trylock(SFXGE_TX_LOCK(_txq)) 141#define SFXGE_TXQ_UNLOCK(_txq) \ 142 mtx_unlock(SFXGE_TX_LOCK(_txq)) 143#define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ 144 mtx_assert(SFXGE_TX_LOCK(_txq), MA_OWNED) 145 146 |
|
133struct sfxge_txq { 134 /* The following fields should be written very rarely */ 135 struct sfxge_softc *sc; 136 enum sfxge_txq_state init_state; 137 enum sfxge_flush_state flush_state; 138 enum sfxge_txq_type type; 139 unsigned int txq_index; 140 unsigned int evq_index; --- 66 unchanged lines hidden --- | 147struct sfxge_txq { 148 /* The following fields should be written very rarely */ 149 struct sfxge_softc *sc; 150 enum sfxge_txq_state init_state; 151 enum sfxge_flush_state flush_state; 152 enum sfxge_txq_type type; 153 unsigned int txq_index; 154 unsigned int evq_index; --- 66 unchanged lines hidden --- |