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.
37 /* Bit mask values for lio->ifstate */
38 #define LIO_IFSTATE_DROQ_OPS 0x01
39 #define LIO_IFSTATE_REGISTERED 0x02
40 #define LIO_IFSTATE_RUNNING 0x04
41 #define LIO_IFSTATE_DETACH 0x08
42 #define LIO_IFSTATE_RESETTING 0x10
46 * Structure of a node in list of gather components maintained by
47 * NIC driver for each network device.
50 /* List manipulation. Next and prev pointers. */
51 struct lio_stailq_node node;
53 /* Size of the gather component at sg in bytes. */
57 * Gather component that can accommodate max sized fragment list
58 * received from the IP layer.
60 struct lio_sg_entry *sg;
68 #if _BYTE_ORDER == _BIG_ENDIAN
72 #else /* _BYTE_ORDER == _LITTLE_ENDIAN */
80 int lio_xmit(struct lio *lio, struct lio_instr_queue *iq,
81 struct mbuf **m_headp);
82 int lio_mq_start_locked(if_t ifp, struct lio_instr_queue *iq);
83 int lio_mq_start(if_t ifp, struct mbuf *m);
84 void lio_qflush(if_t ifp);
85 #endif /* _LIO_RXTX_H_ */