\hypertarget{lio__droq_8h_source}{}\doxysection{lio\+\_\+droq.\+h}
\label{lio__droq_8h_source}\index{dev/liquidio/base/lio\_droq.h@{dev/liquidio/base/lio\_droq.h}}
\mbox{\hyperlink{lio__droq_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00002}00002 \textcolor{comment}{ *   BSD LICENSE}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00004}00004 \textcolor{comment}{ *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00005}00005 \textcolor{comment}{ *   All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00007}00007 \textcolor{comment}{ *   Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00008}00008 \textcolor{comment}{ *   modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00009}00009 \textcolor{comment}{ *   are met:}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00011}00011 \textcolor{comment}{ *     * Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00012}00012 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00013}00013 \textcolor{comment}{ *     * Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00014}00014 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00015}00015 \textcolor{comment}{ *       the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00016}00016 \textcolor{comment}{ *       distribution.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00017}00017 \textcolor{comment}{ *     * Neither the name of Cavium, Inc. nor the names of its}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00018}00018 \textcolor{comment}{ *       contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00019}00019 \textcolor{comment}{ *       from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00021}00021 \textcolor{comment}{ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00022}00022 \textcolor{comment}{ *   "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00023}00023 \textcolor{comment}{ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00024}00024 \textcolor{comment}{ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00025}00025 \textcolor{comment}{ *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00026}00026 \textcolor{comment}{ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00027}00027 \textcolor{comment}{ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00028}00028 \textcolor{comment}{ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00029}00029 \textcolor{comment}{ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00030}00030 \textcolor{comment}{ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00031}00031 \textcolor{comment}{ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00033}00033 \textcolor{comment}{/*\$FreeBSD\$*/}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00035}00035 \textcolor{comment}{/*   \(\backslash\)file  lio\_droq.h}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00036}00036 \textcolor{comment}{ *   \(\backslash\)brief Implementation of Octeon Output queues. "{}Output"{} is with}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00037}00037 \textcolor{comment}{ *   respect to the Octeon device on the NIC. From this driver's point of}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00038}00038 \textcolor{comment}{ *   view they are ingress queues.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00039}00039 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00041}00041 \textcolor{preprocessor}{\#ifndef \_\_LIO\_DROQ\_H\_\_}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00042}00042 \textcolor{preprocessor}{\#define \_\_LIO\_DROQ\_H\_\_}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00044}00044 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00045}00045 \textcolor{comment}{ *  Octeon descriptor format.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00046}00046 \textcolor{comment}{ *  The descriptor ring is made of descriptors which have 2 64-\/bit values:}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00047}00047 \textcolor{comment}{ *  -\/\# Physical (bus) address of the data buffer.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00048}00048 \textcolor{comment}{ *  -\/\# Physical (bus) address of a lio\_droq\_info structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00049}00049 \textcolor{comment}{ *  The Octeon device DMA's incoming packets and its information at the address}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00050}00050 \textcolor{comment}{ *  given by these descriptor fields.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00051}00051 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00052}\mbox{\hyperlink{structlio__droq__desc}{00052}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__desc}{lio\_droq\_desc}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00053}00053         \textcolor{comment}{/* The buffer pointer */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00054}\mbox{\hyperlink{structlio__droq__desc_a04ffb7c6d114c12003c5caaeed6b2a2a}{00054}}         uint64\_t        \mbox{\hyperlink{structlio__droq__desc_a04ffb7c6d114c12003c5caaeed6b2a2a}{buffer\_ptr}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00056}00056         \textcolor{comment}{/* The Info pointer */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00057}\mbox{\hyperlink{structlio__droq__desc_a0dfd463cdca83b05fe986356a28bba25}{00057}}         uint64\_t        \mbox{\hyperlink{structlio__droq__desc_a0dfd463cdca83b05fe986356a28bba25}{info\_ptr}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00058}00058 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00060}\mbox{\hyperlink{lio__droq_8h_af2c0bcd9defa87c1aaa24938bbf31604}{00060}} \textcolor{preprocessor}{\#define LIO\_DROQ\_DESC\_SIZE      (sizeof(struct lio\_droq\_desc))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00062}00062 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00063}00063 \textcolor{comment}{ *  Information about packet DMA'ed by Octeon.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00064}00064 \textcolor{comment}{ *  The format of the information available at Info Pointer after Octeon}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00065}00065 \textcolor{comment}{ *  has posted a packet. Not all descriptors have valid information. Only}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00066}00066 \textcolor{comment}{ *  the Info field of the first descriptor for a packet has information}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00067}00067 \textcolor{comment}{ *  about the packet.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00068}00068 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00069}\mbox{\hyperlink{structlio__droq__info}{00069}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__info}{lio\_droq\_info}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00070}00070         \textcolor{comment}{/* The Length of the packet. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00071}\mbox{\hyperlink{structlio__droq__info_ad2f69ca2da313a15771cc0d92c65bf11}{00071}}         uint64\_t        \mbox{\hyperlink{structlio__droq__info_ad2f69ca2da313a15771cc0d92c65bf11}{length}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00073}00073         \textcolor{comment}{/* The Output Receive Header. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00074}\mbox{\hyperlink{structlio__droq__info_a14e965b67f4fcee91dc47fa613475f36}{00074}}         \textcolor{keyword}{union           }\mbox{\hyperlink{unionocteon__rh}{octeon\_rh}} \mbox{\hyperlink{structlio__droq__info_a14e965b67f4fcee91dc47fa613475f36}{rh}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00076}00076 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00078}\mbox{\hyperlink{lio__droq_8h_aaac9c27a5385c5ae787c0b5be2214e13}{00078}} \textcolor{preprocessor}{\#define LIO\_DROQ\_INFO\_SIZE      (sizeof(struct lio\_droq\_info))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00080}00080 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00081}00081 \textcolor{comment}{ *  Pointer to data buffer.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00082}00082 \textcolor{comment}{ *  Driver keeps a pointer to the data buffer that it made available to}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00083}00083 \textcolor{comment}{ *  the Octeon device. Since the descriptor ring keeps physical (bus)}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00084}00084 \textcolor{comment}{ *  addresses, this field is required for the driver to keep track of}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00085}00085 \textcolor{comment}{ *  the virtual address pointers.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00086}00086 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00087}\mbox{\hyperlink{structlio__recv__buffer}{00087}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__buffer}{lio\_recv\_buffer}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00088}00088         \textcolor{comment}{/* Packet buffer, including metadata. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00089}\mbox{\hyperlink{structlio__recv__buffer_a3488e41a585200845e7a437b46cced3d}{00089}}         \textcolor{keywordtype}{void}    *\mbox{\hyperlink{structlio__recv__buffer_a3488e41a585200845e7a437b46cced3d}{buffer}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00091}00091         \textcolor{comment}{/* Data in the packet buffer.  */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00092}\mbox{\hyperlink{structlio__recv__buffer_a15a275f9e0810091cf5b426e42a2b61d}{00092}}         uint8\_t *\mbox{\hyperlink{structlio__recv__buffer_a15a275f9e0810091cf5b426e42a2b61d}{data}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00093}00093 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00095}\mbox{\hyperlink{lio__droq_8h_a1e51bf31da6805e7a031bb6657e34b84}{00095}} \textcolor{preprocessor}{\#define LIO\_DROQ\_RECVBUF\_SIZE   (sizeof(struct lio\_recv\_buffer))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00097}00097 \textcolor{comment}{/* Output Queue statistics. Each output queue has four stats fields. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00098}\mbox{\hyperlink{structlio__droq__stats}{00098}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__stats}{lio\_droq\_stats}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00099}00099         \textcolor{comment}{/* Number of packets received in this queue. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00100}\mbox{\hyperlink{structlio__droq__stats_a68147c1ccbbb203db10cfd30b83441fe}{00100}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a68147c1ccbbb203db10cfd30b83441fe}{pkts\_received}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00102}00102         \textcolor{comment}{/* Bytes received by this queue. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00103}\mbox{\hyperlink{structlio__droq__stats_aaeca37f23f6adc6a7f825ac201c05b5b}{00103}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_aaeca37f23f6adc6a7f825ac201c05b5b}{bytes\_received}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00105}00105         \textcolor{comment}{/* Packets dropped due to no dispatch function. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00106}\mbox{\hyperlink{structlio__droq__stats_a5c14c6f42a8ffab26d32010a4ea3a745}{00106}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a5c14c6f42a8ffab26d32010a4ea3a745}{dropped\_nodispatch}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00108}00108         \textcolor{comment}{/* Packets dropped due to no memory available. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00109}\mbox{\hyperlink{structlio__droq__stats_aa21c24220776519cf476f3a34251a966}{00109}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_aa21c24220776519cf476f3a34251a966}{dropped\_nomem}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00111}00111         \textcolor{comment}{/* Packets dropped due to large number of pkts to process. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00112}\mbox{\hyperlink{structlio__droq__stats_a6d147f027c4763956929383c8e5a072c}{00112}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a6d147f027c4763956929383c8e5a072c}{dropped\_toomany}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00114}00114         \textcolor{comment}{/* Number of packets  sent to stack from this queue. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00115}\mbox{\hyperlink{structlio__droq__stats_a2e77254e863f3f28bc556c82ca981ec8}{00115}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a2e77254e863f3f28bc556c82ca981ec8}{rx\_pkts\_received}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00117}00117         \textcolor{comment}{/* Number of Bytes sent to stack from this queue. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00118}\mbox{\hyperlink{structlio__droq__stats_a8013608358914a71ffd3ec49f62444d9}{00118}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a8013608358914a71ffd3ec49f62444d9}{rx\_bytes\_received}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00120}00120         \textcolor{comment}{/* Num of Packets dropped due to receive path failures. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00121}\mbox{\hyperlink{structlio__droq__stats_a89626c4cc74275a654d2d52b9560cef7}{00121}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a89626c4cc74275a654d2d52b9560cef7}{rx\_dropped}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00123}\mbox{\hyperlink{structlio__droq__stats_aaa20090fb5155a345ad4bddd185caa60}{00123}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_aaa20090fb5155a345ad4bddd185caa60}{rx\_vxlan}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00125}00125         \textcolor{comment}{/* Num of failures of lio\_recv\_buffer\_alloc() */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00126}\mbox{\hyperlink{structlio__droq__stats_a10cefb6fb2997dc4dfc4287b170cab5c}{00126}}         uint64\_t        \mbox{\hyperlink{structlio__droq__stats_a10cefb6fb2997dc4dfc4287b170cab5c}{rx\_alloc\_failure}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00128}00128 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00130}00130 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00131}00131 \textcolor{comment}{ * The maximum number of buffers that can be dispatched from the}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00132}00132 \textcolor{comment}{ * output/dma queue. Set to 64 assuming 1K buffers in DROQ and the fact that}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00133}00133 \textcolor{comment}{ * max packet size from DROQ is 64K.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00134}00134 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00135}\mbox{\hyperlink{lio__droq_8h_aa5fc8de4605739303a80362605310612}{00135}} \textcolor{preprocessor}{\#define LIO\_MAX\_RECV\_BUFS       64}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00137}00137 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00138}00138 \textcolor{comment}{ *  Receive Packet format used when dispatching output queue packets}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00139}00139 \textcolor{comment}{ *  with non-\/raw opcodes.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00140}00140 \textcolor{comment}{ *  The received packet will be sent to the upper layers using this}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00141}00141 \textcolor{comment}{ *  structure which is passed as a parameter to the dispatch function}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00142}00142 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00143}\mbox{\hyperlink{structlio__recv__pkt}{00143}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__pkt}{lio\_recv\_pkt}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00144}00144         \textcolor{comment}{/* Number of buffers in this received packet */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00145}\mbox{\hyperlink{structlio__recv__pkt_a756ac1586a62f8c682e3bdb031890cc5}{00145}}         uint16\_t        \mbox{\hyperlink{structlio__recv__pkt_a756ac1586a62f8c682e3bdb031890cc5}{buffer\_count}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00146}00146 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00147}00147         \textcolor{comment}{/* Id of the device that is sending the packet up */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00148}\mbox{\hyperlink{structlio__recv__pkt_a79e567bfb11e26bffe2844c36210b680}{00148}}         uint16\_t        \mbox{\hyperlink{structlio__recv__pkt_a79e567bfb11e26bffe2844c36210b680}{octeon\_id}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00150}00150         \textcolor{comment}{/* Length of data in the packet buffer */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00151}\mbox{\hyperlink{structlio__recv__pkt_a90228bc207e3567d63de999440eb8fc2}{00151}}         uint32\_t        \mbox{\hyperlink{structlio__recv__pkt_a90228bc207e3567d63de999440eb8fc2}{length}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00153}00153         \textcolor{comment}{/* The receive header */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00154}\mbox{\hyperlink{structlio__recv__pkt_ad9934d21e17e8082c40dd044ea49622a}{00154}}         \textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__rh}{octeon\_rh}}        \mbox{\hyperlink{structlio__recv__pkt_ad9934d21e17e8082c40dd044ea49622a}{rh}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00156}00156         \textcolor{comment}{/* Pointer to the OS-\/specific packet buffer */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00157}\mbox{\hyperlink{structlio__recv__pkt_a80709536f103c2df8b2ade47ddb07d99}{00157}}         \textcolor{keyword}{struct }mbuf     *\mbox{\hyperlink{structlio__recv__pkt_a80709536f103c2df8b2ade47ddb07d99}{buffer\_ptr}}[\mbox{\hyperlink{lio__droq_8h_aa5fc8de4605739303a80362605310612}{LIO\_MAX\_RECV\_BUFS}}];}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00159}00159         \textcolor{comment}{/* Size of the buffers pointed to by ptr's in buffer\_ptr */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00160}\mbox{\hyperlink{structlio__recv__pkt_a1b1292fb259e9a0f6481efdf8516a9b8}{00160}}         uint32\_t        \mbox{\hyperlink{structlio__recv__pkt_a1b1292fb259e9a0f6481efdf8516a9b8}{buffer\_size}}[\mbox{\hyperlink{lio__droq_8h_aa5fc8de4605739303a80362605310612}{LIO\_MAX\_RECV\_BUFS}}];}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00161}00161 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00163}\mbox{\hyperlink{lio__droq_8h_ae62f170c0028f87e145056c958b11cf2}{00163}} \textcolor{preprocessor}{\#define LIO\_RECV\_PKT\_SIZE       (sizeof(struct lio\_recv\_pkt))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00165}00165 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00166}00166 \textcolor{comment}{ *  The first parameter of a dispatch function.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00167}00167 \textcolor{comment}{ *  For a raw mode opcode, the driver dispatches with the device}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00168}00168 \textcolor{comment}{ *  pointer in this structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00169}00169 \textcolor{comment}{ *  For non-\/raw mode opcode, the driver dispatches the recv\_pkt}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00170}00170 \textcolor{comment}{ *  created to contain the buffers with data received from Octeon.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00171}00171 \textcolor{comment}{ *  -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00172}00172 \textcolor{comment}{ *  |     *recv\_pkt -\/-\/-\/-\/|-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00173}00173 \textcolor{comment}{ *  |-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/|   |}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00174}00174 \textcolor{comment}{ *  | 0 or more bytes   |   |}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00175}00175 \textcolor{comment}{ *  | reserved by driver|   |}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00176}00176 \textcolor{comment}{ *  |-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/|<-\//}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00177}00177 \textcolor{comment}{ *  | lio\_recv\_pkt   |}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00178}00178 \textcolor{comment}{ *  |                   |}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00179}00179 \textcolor{comment}{ *  |\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_|}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00180}00180 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00181}\mbox{\hyperlink{structlio__recv__info}{00181}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00182}\mbox{\hyperlink{structlio__recv__info_aae19d36f6343d2dc2e6715f02b2ff40b}{00182}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structlio__recv__info_aae19d36f6343d2dc2e6715f02b2ff40b}{rsvd}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00183}\mbox{\hyperlink{structlio__recv__info_af74be43e7c57a463316f57b9b26e6231}{00183}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__pkt}{lio\_recv\_pkt}} *\mbox{\hyperlink{structlio__recv__info_af74be43e7c57a463316f57b9b26e6231}{recv\_pkt}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00184}00184 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00186}\mbox{\hyperlink{lio__droq_8h_ac2eee9c60a5318c7e5d4e943cfd0eceb}{00186}} \textcolor{preprocessor}{\#define LIO\_RECV\_INFO\_SIZE      (sizeof(struct lio\_recv\_info))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00188}00188 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00189}00189 \textcolor{comment}{ *  Allocate a recv\_info structure. The recv\_pkt pointer in the recv\_info}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00190}00190 \textcolor{comment}{ *  structure is filled in before this call returns.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00191}00191 \textcolor{comment}{ *  @param extra\_bytes -\/ extra bytes to be allocated at the end of the recv info}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00192}00192 \textcolor{comment}{ *                       structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00193}00193 \textcolor{comment}{ *  @return -\/ pointer to a newly allocated recv\_info structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00194}00194 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00196}\mbox{\hyperlink{lio__droq_8h_aca06bdc084c01378831f142e11184353}{00196}} \mbox{\hyperlink{lio__droq_8h_aca06bdc084c01378831f142e11184353}{lio\_alloc\_recv\_info}}(\textcolor{keywordtype}{int} extra\_bytes)}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00197}00197 \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00198}00198         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}}       *recv\_info;}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00199}00199         uint8\_t                 *buf;}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00201}00201         buf = malloc(\mbox{\hyperlink{lio__droq_8h_ae62f170c0028f87e145056c958b11cf2}{LIO\_RECV\_PKT\_SIZE}} + \mbox{\hyperlink{lio__droq_8h_ac2eee9c60a5318c7e5d4e943cfd0eceb}{LIO\_RECV\_INFO\_SIZE}} +}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00202}00202                      extra\_bytes, M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00203}00203         \textcolor{keywordflow}{if} (buf == NULL)}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00204}00204                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00206}00206         recv\_info = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *)buf;}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00207}00207         recv\_info-\/>\mbox{\hyperlink{structlio__recv__info_af74be43e7c57a463316f57b9b26e6231}{recv\_pkt}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__pkt}{lio\_recv\_pkt}} *)(buf + \mbox{\hyperlink{lio__droq_8h_ac2eee9c60a5318c7e5d4e943cfd0eceb}{LIO\_RECV\_INFO\_SIZE}});}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00208}00208         recv\_info-\/>\mbox{\hyperlink{structlio__recv__info_aae19d36f6343d2dc2e6715f02b2ff40b}{rsvd}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00209}00209         \textcolor{keywordflow}{if} (extra\_bytes)}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00210}00210                 recv\_info-\/>\mbox{\hyperlink{structlio__recv__info_aae19d36f6343d2dc2e6715f02b2ff40b}{rsvd}} = buf + \mbox{\hyperlink{lio__droq_8h_ac2eee9c60a5318c7e5d4e943cfd0eceb}{LIO\_RECV\_INFO\_SIZE}} + \mbox{\hyperlink{lio__droq_8h_ae62f170c0028f87e145056c958b11cf2}{LIO\_RECV\_PKT\_SIZE}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00212}00212         \textcolor{keywordflow}{return} (recv\_info);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00213}00213 \}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00215}00215 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00216}00216 \textcolor{comment}{ *  Free a recv\_info structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00217}00217 \textcolor{comment}{ *  @param recv\_info -\/ Pointer to receive\_info to be freed}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00218}00218 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00219}00219 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00220}\mbox{\hyperlink{lio__droq_8h_a5c8c9166464ffdd36c020c5565061fee}{00220}} \mbox{\hyperlink{lio__droq_8h_a5c8c9166464ffdd36c020c5565061fee}{lio\_free\_recv\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *recv\_info)}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00221}00221 \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00223}00223         free(recv\_info, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00224}00224 \}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00226}\mbox{\hyperlink{lio__droq_8h_ad5ea08f46f27dc54d86cc04739eacd0f}{00226}} \textcolor{keyword}{typedef} int     (*\mbox{\hyperlink{lio__droq_8h_ad5ea08f46f27dc54d86cc04739eacd0f}{lio\_dispatch\_fn\_t}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00228}00228 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00229}00229 \textcolor{comment}{ * Used by NIC module to register packet handler and to get device}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00230}00230 \textcolor{comment}{ * information for each octeon device.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00231}00231 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00232}\mbox{\hyperlink{structlio__droq__ops}{00232}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__ops}{lio\_droq\_ops}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00233}00233         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00234}00234 \textcolor{comment}{         *  This registered function will be called by the driver with}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00235}00235 \textcolor{comment}{         *  the pointer to buffer from droq and length of}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00236}00236 \textcolor{comment}{         *  data in the buffer. The receive header gives the port}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00237}00237 \textcolor{comment}{         *  number to the caller.  Function pointer is set by caller.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00238}00238 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00239}\mbox{\hyperlink{structlio__droq__ops_a3af9e6d88a3e035687f01f8f9f23df90}{00239}}         void            (*\mbox{\hyperlink{structlio__droq__ops_a3af9e6d88a3e035687f01f8f9f23df90}{fptr}}) (\textcolor{keywordtype}{void} *, uint32\_t, \textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__rh}{octeon\_rh}} *, \textcolor{keywordtype}{void}  *,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00240}00240                                  \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00241}\mbox{\hyperlink{structlio__droq__ops_a8d6399fb87c92fa1f7c8182bd74a9825}{00241}}         \textcolor{keywordtype}{void}            *\mbox{\hyperlink{structlio__droq__ops_a8d6399fb87c92fa1f7c8182bd74a9825}{farg}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00243}00243         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00244}00244 \textcolor{comment}{         *  Flag indicating if the DROQ handler should drop packets that}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00245}00245 \textcolor{comment}{         *  it cannot handle in one iteration. Set by caller.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00246}00246 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00247}\mbox{\hyperlink{structlio__droq__ops_ad8637959ec8d28db4e71bceb3cd0bb72}{00247}}         uint32\_t        \mbox{\hyperlink{structlio__droq__ops_ad8637959ec8d28db4e71bceb3cd0bb72}{drop\_on\_max}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00248}00248 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00250}00250 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00251}00251 \textcolor{comment}{ * The Descriptor Ring Output Queue structure.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00252}00252 \textcolor{comment}{ *  This structure has all the information required to implement a}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00253}00253 \textcolor{comment}{ *  Octeon DROQ.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00254}00254 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00255}\mbox{\hyperlink{structlio__droq}{00255}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq}{lio\_droq}} \{}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00256}00256         \textcolor{comment}{/* A lock to protect access to this ring. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00257}\mbox{\hyperlink{structlio__droq_a7251e1f94d2cddfad791a291af24c9d5}{00257}}         \textcolor{keyword}{struct }mtx              \mbox{\hyperlink{structlio__droq_a7251e1f94d2cddfad791a291af24c9d5}{lock}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00259}\mbox{\hyperlink{structlio__droq_a47165d09beab28fd12aff1d79cfb3cab}{00259}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a47165d09beab28fd12aff1d79cfb3cab}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00261}\mbox{\hyperlink{structlio__droq_a7e4188ebcc228a188655c0d72ddfab57}{00261}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a7e4188ebcc228a188655c0d72ddfab57}{pkt\_count}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00263}\mbox{\hyperlink{structlio__droq_ae88a0286d66cf94bb9d0ff1ac5df1dbd}{00263}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__ops}{lio\_droq\_ops}} \mbox{\hyperlink{structlio__droq_ae88a0286d66cf94bb9d0ff1ac5df1dbd}{ops}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00265}\mbox{\hyperlink{structlio__droq_abfe9c93b6ecc98001aee1aba83e2d237}{00265}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *\mbox{\hyperlink{structlio__droq_abfe9c93b6ecc98001aee1aba83e2d237}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00267}00267         \textcolor{comment}{/* The 8B aligned descriptor ring starts at this address. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00268}\mbox{\hyperlink{structlio__droq_a964950f902d9033c717463b2ca020b79}{00268}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__desc}{lio\_droq\_desc}}       *\mbox{\hyperlink{structlio__droq_a964950f902d9033c717463b2ca020b79}{desc\_ring}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00270}00270         \textcolor{comment}{/* Index in the ring where the driver should read the next packet */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00271}\mbox{\hyperlink{structlio__droq_a9b4449c2b3fc4151bd2f4142723de1df}{00271}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a9b4449c2b3fc4151bd2f4142723de1df}{read\_idx}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00273}00273         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00274}00274 \textcolor{comment}{         * Index in the ring where the driver will refill the descriptor's}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00275}00275 \textcolor{comment}{         * buffer}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00276}00276 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00277}\mbox{\hyperlink{structlio__droq_a19aff95c84a1e597bfe02cb77852743b}{00277}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a19aff95c84a1e597bfe02cb77852743b}{refill\_idx}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00279}00279         \textcolor{comment}{/* Packets pending to be processed */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00280}\mbox{\hyperlink{structlio__droq_ad2d6a2f0ddd1504443b2c4e78c2f4844}{00280}}         \textcolor{keyword}{volatile} \textcolor{keywordtype}{int}            \mbox{\hyperlink{structlio__droq_ad2d6a2f0ddd1504443b2c4e78c2f4844}{pkts\_pending}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00282}00282         \textcolor{comment}{/* Number of  descriptors in this ring. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00283}\mbox{\hyperlink{structlio__droq_a04b2786b96b7d2824968691a5f052c26}{00283}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a04b2786b96b7d2824968691a5f052c26}{max\_count}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00285}00285         \textcolor{comment}{/* The number of descriptors pending refill. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00286}\mbox{\hyperlink{structlio__droq_aca3878dba23d563bf2279feddba97491}{00286}}         uint32\_t                \mbox{\hyperlink{structlio__droq_aca3878dba23d563bf2279feddba97491}{refill\_count}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00288}\mbox{\hyperlink{structlio__droq_a0096ca7a82bc865e2b3040695ec15fac}{00288}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a0096ca7a82bc865e2b3040695ec15fac}{pkts\_per\_intr}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00289}\mbox{\hyperlink{structlio__droq_af15c36d3df1d3e3905cdab406a4a2141}{00289}}         uint32\_t                \mbox{\hyperlink{structlio__droq_af15c36d3df1d3e3905cdab406a4a2141}{refill\_threshold}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00291}00291         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00292}00292 \textcolor{comment}{         * The max number of descriptors in DROQ without a buffer.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00293}00293 \textcolor{comment}{         * This field is used to keep track of empty space threshold. If the}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00294}00294 \textcolor{comment}{         * refill\_count reaches this value, the DROQ cannot accept a max-\/sized}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00295}00295 \textcolor{comment}{         * (64K) packet.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00296}00296 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00297}\mbox{\hyperlink{structlio__droq_a52a418d93af4d0028c9dd4917cdbbf74}{00297}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a52a418d93af4d0028c9dd4917cdbbf74}{max\_empty\_descs}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00299}00299         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00300}00300 \textcolor{comment}{         * The receive buffer list. This list has the virtual addresses of}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00301}00301 \textcolor{comment}{         * the buffers.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00302}00302 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00303}\mbox{\hyperlink{structlio__droq_a931484986ed0017b4685ea5b8293219c}{00303}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__buffer}{lio\_recv\_buffer}}   *\mbox{\hyperlink{structlio__droq_a931484986ed0017b4685ea5b8293219c}{recv\_buf\_list}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00305}00305         \textcolor{comment}{/* The size of each buffer pointed by the buffer pointer. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00306}\mbox{\hyperlink{structlio__droq_a1ae80ac1aa8801f7ba98f5934bcd50a1}{00306}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a1ae80ac1aa8801f7ba98f5934bcd50a1}{buffer\_size}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00307}00307 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00308}00308         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00309}00309 \textcolor{comment}{         * Offset to packet credit register.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00310}00310 \textcolor{comment}{         * Host writes number of info/buffer ptrs available to this register}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00311}00311 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00312}\mbox{\hyperlink{structlio__droq_a6c03b162185dfc04f00630a1acee54c5}{00312}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a6c03b162185dfc04f00630a1acee54c5}{pkts\_credit\_reg}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00314}00314         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00315}00315 \textcolor{comment}{         * Offset packet sent register.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00316}00316 \textcolor{comment}{         * Octeon writes the number of packets DMA'ed to host memory}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00317}00317 \textcolor{comment}{         * in this register.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00318}00318 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00319}\mbox{\hyperlink{structlio__droq_a21beaa31b946600c6e1c9652f909d41e}{00319}}         uint32\_t                \mbox{\hyperlink{structlio__droq_a21beaa31b946600c6e1c9652f909d41e}{pkts\_sent\_reg}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00320}00320 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00321}\mbox{\hyperlink{structlio__droq_ac3f06ae0b248da4d5a26feff10dce63a}{00321}}         \textcolor{keyword}{struct }lio\_stailq\_head  \mbox{\hyperlink{structlio__droq_ac3f06ae0b248da4d5a26feff10dce63a}{dispatch\_stq\_head}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00323}00323         \textcolor{comment}{/* Statistics for this DROQ. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00324}\mbox{\hyperlink{structlio__droq_a8f9ff977aef838fdce6aee0d18286afb}{00324}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq__stats}{lio\_droq\_stats}}     \mbox{\hyperlink{structlio__droq_a8f9ff977aef838fdce6aee0d18286afb}{stats}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00326}00326         \textcolor{comment}{/* DMA mapped address of the DROQ descriptor ring. */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00327}\mbox{\hyperlink{structlio__droq_a947cadd3c6107afc0a53f5b146aea976}{00327}}         vm\_paddr\_t              \mbox{\hyperlink{structlio__droq_a947cadd3c6107afc0a53f5b146aea976}{desc\_ring\_dma}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00328}00328 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00329}00329         \textcolor{comment}{/* application context */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00330}\mbox{\hyperlink{structlio__droq_aebd798671f0dd78fd015b80946635234}{00330}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structlio__droq_aebd798671f0dd78fd015b80946635234}{app\_ctx}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00332}\mbox{\hyperlink{structlio__droq_ae75df61614caad7b315532e9b8d08626}{00332}}         uint32\_t                \mbox{\hyperlink{structlio__droq_ae75df61614caad7b315532e9b8d08626}{cpu\_id}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00334}\mbox{\hyperlink{structlio__droq_aec53447ea85ed1c19cd8b7e0cea12cfe}{00334}}         \textcolor{keyword}{struct }task             \mbox{\hyperlink{structlio__droq_aec53447ea85ed1c19cd8b7e0cea12cfe}{droq\_task}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00335}\mbox{\hyperlink{structlio__droq_ab239046de0e4e7b355023308f5bced5b}{00335}}         \textcolor{keyword}{struct }taskqueue        *\mbox{\hyperlink{structlio__droq_ab239046de0e4e7b355023308f5bced5b}{droq\_taskqueue}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00337}\mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{00337}}         \textcolor{keyword}{struct }lro\_ctrl         \mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{lro}};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00338}00338 \};}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00340}\mbox{\hyperlink{lio__droq_8h_a5b62cdc01704410922ce9eedf88ba02c}{00340}} \textcolor{preprocessor}{\#define LIO\_DROQ\_SIZE   (sizeof(struct lio\_droq))}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00342}00342 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00343}00343 \textcolor{comment}{ * Allocates space for the descriptor ring for the droq and sets the}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00344}00344 \textcolor{comment}{ *   base addr, num desc etc in Octeon registers.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00345}00345 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00346}00346 \textcolor{comment}{ * @param  oct\_dev    -\/ pointer to the octeon device structure}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00347}00347 \textcolor{comment}{ * @param  q\_no       -\/ droq no.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00348}00348 \textcolor{comment}{ * @param app\_ctx     -\/ pointer to application context}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00349}00349 \textcolor{comment}{ * @return Success: 0    Failure: 1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00350}00350 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00351}00351 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a75b6cd5ca70af922f47e37c03283e7b2}{lio\_init\_droq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct\_dev,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00352}00352                       uint32\_t q\_no, uint32\_t num\_descs, uint32\_t desc\_size,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00353}00353                       \textcolor{keywordtype}{void} *app\_ctx);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00355}00355 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00356}00356 \textcolor{comment}{ *  Frees the space for descriptor ring for the droq.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00357}00357 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00358}00358 \textcolor{comment}{ *  @param oct\_dev -\/ pointer to the octeon device structure}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00359}00359 \textcolor{comment}{ *  @param q\_no    -\/ droq no.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00360}00360 \textcolor{comment}{ *  @return:    Success: 0    Failure: 1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00361}00361 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00362}00362 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a6f13c052a5ce9a7e354da9fb916ba1f6}{lio\_delete\_droq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct\_dev, uint32\_t q\_no);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00364}00364 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00365}00365 \textcolor{comment}{ * Register a change in droq operations. The ops field has a pointer to a}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00366}00366 \textcolor{comment}{ * function which will called by the DROQ handler for all packets arriving}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00367}00367 \textcolor{comment}{ * on output queues given by q\_no irrespective of the type of packet.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00368}00368 \textcolor{comment}{ * The ops field also has a flag which if set tells the DROQ handler to}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00369}00369 \textcolor{comment}{ * drop packets if it receives more than what it can process in one}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00370}00370 \textcolor{comment}{ * invocation of the handler.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00371}00371 \textcolor{comment}{ * @param oct       -\/ octeon device}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00372}00372 \textcolor{comment}{ * @param q\_no      -\/ octeon output queue number (0 <= q\_no <= MAX\_OCTEON\_DROQ-\/1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00373}00373 \textcolor{comment}{ * @param ops       -\/ the droq\_ops settings for this queue}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00374}00374 \textcolor{comment}{ * @return          -\/ 0 on success, -\/ENODEV or -\/EINVAL on error.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00375}00375 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00376}00376 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_aa6cbb0408dce789e716024ae1a208b31}{lio\_register\_droq\_ops}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t q\_no,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00377}00377                               \textcolor{keyword}{struct} \mbox{\hyperlink{structlio__droq__ops}{lio\_droq\_ops}} *ops);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00379}00379 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00380}00380 \textcolor{comment}{ * Resets the function pointer and flag settings made by}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00381}00381 \textcolor{comment}{ * lio\_register\_droq\_ops(). After this routine is called, the DROQ handler}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00382}00382 \textcolor{comment}{ * will lookup dispatch function for each arriving packet on the output queue}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00383}00383 \textcolor{comment}{ * given by q\_no.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00384}00384 \textcolor{comment}{ * @param oct       -\/ octeon device}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00385}00385 \textcolor{comment}{ * @param q\_no      -\/ octeon output queue number (0 <= q\_no <= MAX\_OCTEON\_DROQ-\/1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00386}00386 \textcolor{comment}{ * @return          -\/ 0 on success, -\/ENODEV or -\/EINVAL on error.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00387}00387 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00388}00388 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a1f89c5971a094028121830eb9d611e03}{lio\_unregister\_droq\_ops}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t q\_no);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00390}00390 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00391}00391 \textcolor{comment}{ *    Register a dispatch function for a opcode/subcode. The driver will call}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00392}00392 \textcolor{comment}{ *    this dispatch function when it receives a packet with the given}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00393}00393 \textcolor{comment}{ *    opcode/subcode in its output queues along with the user specified}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00394}00394 \textcolor{comment}{ *    argument.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00395}00395 \textcolor{comment}{ *    @param  oct        -\/ the octeon device to register with.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00396}00396 \textcolor{comment}{ *    @param  opcode     -\/ the opcode for which the dispatch will be registered.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00397}00397 \textcolor{comment}{ *    @param  subcode    -\/ the subcode for which the dispatch will be registered}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00398}00398 \textcolor{comment}{ *    @param  fn         -\/ the dispatch function.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00399}00399 \textcolor{comment}{ *    @param  fn\_arg     -\/ user specified that will be passed along with the}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00400}00400 \textcolor{comment}{ *                         dispatch function by the driver.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00401}00401 \textcolor{comment}{ *    @return Success: 0; Failure: 1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00402}00402 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00403}00403 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_aab7e4b1f30fb3151911652a4ff9a3914}{lio\_register\_dispatch\_fn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint16\_t opcode,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00404}00404                                  uint16\_t subcode, \mbox{\hyperlink{lio__droq_8h_ad5ea08f46f27dc54d86cc04739eacd0f}{lio\_dispatch\_fn\_t}} fn,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00405}00405                                  \textcolor{keywordtype}{void} *fn\_arg);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00407}00407 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00408}00408 \textcolor{comment}{ *   Remove registration for an opcode/subcode. This will delete the mapping for}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00409}00409 \textcolor{comment}{ *   an opcode/subcode. The dispatch function will be unregistered and will no}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00410}00410 \textcolor{comment}{ *   longer be called if a packet with the opcode/subcode arrives in the driver}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00411}00411 \textcolor{comment}{ *   output queues.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00412}00412 \textcolor{comment}{ *   @param  oct        -\/  the octeon device to unregister from.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00413}00413 \textcolor{comment}{ *   @param  opcode     -\/  the opcode to be unregistered.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00414}00414 \textcolor{comment}{ *   @param  subcode    -\/  the subcode to be unregistered.}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00415}00415 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00416}00416 \textcolor{comment}{ *   @return Success: 0; Failure: 1}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00417}00417 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00418}00418 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a436842110562e9eccfd90a71d6eda00e}{lio\_unregister\_dispatch\_fn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint16\_t opcode,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00419}00419                                    uint16\_t subcode);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00421}00421 uint32\_t        \mbox{\hyperlink{lio__droq_8h_ad33dc530043bc887d6cfdc451be9794a}{lio\_droq\_check\_hw\_for\_pkts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00423}00423 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a6319a6eb35898836f553ef711af35b48}{lio\_create\_droq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t q\_no,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00424}00424                         uint32\_t num\_descs, uint32\_t desc\_size, \textcolor{keywordtype}{void} *app\_ctx);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00426}00426 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__droq_8h_a8d74c6fbc7377197651c550150bdca0a}{lio\_droq\_process\_packets}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00427}00427                                  \textcolor{keyword}{struct} \mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq, uint32\_t budget);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00429}00429 uint32\_t        \mbox{\hyperlink{lio__droq_8h_a0d890b5348eb19255227e4781f87c03e}{lio\_droq\_refill}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00430}00430                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00431}00431 \textcolor{keywordtype}{void}    \mbox{\hyperlink{lio__droq_8h_afc56a097d4b8c16de11eab8cd58a0a4b}{lio\_droq\_bh}}(\textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{int} pending \_\_unused);}
\DoxyCodeLine{\Hypertarget{lio__droq_8h_source_l00432}00432 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* \_\_LIO\_DROQ\_H\_\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
