4 * Copyright(c) 2017 Cavium, Inc.. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Cavium, Inc. nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 /* Bit mask values for lio->ifstate */
39 #define LIO_IFSTATE_DROQ_OPS 0x01
40 #define LIO_IFSTATE_REGISTERED 0x02
41 #define LIO_IFSTATE_RUNNING 0x04
42 #define LIO_IFSTATE_DETACH 0x08
43 #define LIO_IFSTATE_RESETTING 0x10
47 * Structure of a node in list of gather components maintained by
48 * NIC driver for each network device.
51 /* List manipulation. Next and prev pointers. */
52 struct lio_stailq_node node;
54 /* Size of the gather component at sg in bytes. */
58 * Gather component that can accommodate max sized fragment list
59 * received from the IP layer.
61 struct lio_sg_entry *sg;
69 #if _BYTE_ORDER == _BIG_ENDIAN
73 #else /* _BYTE_ORDER == _LITTLE_ENDIAN */
81 int lio_xmit(struct lio *lio, struct lio_instr_queue *iq,
82 struct mbuf **m_headp);
83 int lio_mq_start_locked(if_t ifp, struct lio_instr_queue *iq);
84 int lio_mq_start(if_t ifp, struct mbuf *m);
85 void lio_qflush(if_t ifp);
86 #endif /* _LIO_RXTX_H_ */