\hypertarget{lio__network_8h_source}{}\doxysection{lio\+\_\+network.\+h}
\label{lio__network_8h_source}\index{dev/liquidio/lio\_network.h@{dev/liquidio/lio\_network.h}}
\mbox{\hyperlink{lio__network_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00002}00002 \textcolor{comment}{ *   BSD LICENSE}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00004}00004 \textcolor{comment}{ *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00005}00005 \textcolor{comment}{ *   All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00007}00007 \textcolor{comment}{ *   Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00008}00008 \textcolor{comment}{ *   modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00009}00009 \textcolor{comment}{ *   are met:}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00011}00011 \textcolor{comment}{ *     * Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00012}00012 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00013}00013 \textcolor{comment}{ *     * Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00014}00014 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00015}00015 \textcolor{comment}{ *       the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00016}00016 \textcolor{comment}{ *       distribution.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00017}00017 \textcolor{comment}{ *     * Neither the name of Cavium, Inc. nor the names of its}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00018}00018 \textcolor{comment}{ *       contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00019}00019 \textcolor{comment}{ *       from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00021}00021 \textcolor{comment}{ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00022}00022 \textcolor{comment}{ *   "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00023}00023 \textcolor{comment}{ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00024}00024 \textcolor{comment}{ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00025}00025 \textcolor{comment}{ *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00026}00026 \textcolor{comment}{ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00027}00027 \textcolor{comment}{ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00028}00028 \textcolor{comment}{ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00029}00029 \textcolor{comment}{ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00030}00030 \textcolor{comment}{ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00031}00031 \textcolor{comment}{ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00033}00033 \textcolor{comment}{/*\$FreeBSD\$*/}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00035}00035 \textcolor{comment}{/* \(\backslash\)file  lio\_network.h}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00036}00036 \textcolor{comment}{ * \(\backslash\)brief Host NIC Driver: Structure and Macro definitions used by NIC Module.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00037}00037 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00039}00039 \textcolor{preprocessor}{\#ifndef \_\_LIO\_NETWORK\_H\_\_}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00040}00040 \textcolor{preprocessor}{\#define \_\_LIO\_NETWORK\_H\_\_}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00042}00042 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__rss_8h}{lio\_rss.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00044}\mbox{\hyperlink{lio__network_8h_a0543d954104d9b478c423125da049724}{00044}} \textcolor{preprocessor}{\#define LIO\_MIN\_MTU\_SIZE        72}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00045}\mbox{\hyperlink{lio__network_8h_a7daadae141d26dfda745a969e7a24df0}{00045}} \textcolor{preprocessor}{\#define LIO\_MAX\_MTU\_SIZE        (LIO\_MAX\_FRM\_SIZE -\/ LIO\_FRM\_HEADER\_SIZE)}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00047}\mbox{\hyperlink{lio__network_8h_aa52cb75819e079f0cc21d14f42af60b0}{00047}} \textcolor{preprocessor}{\#define LIO\_MAX\_SG              64}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00048}\mbox{\hyperlink{lio__network_8h_a80dbb8efd4292df7a28ca518495ede67}{00048}} \textcolor{preprocessor}{\#define LIO\_MAX\_FRAME\_SIZE      60000}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00050}\mbox{\hyperlink{structlio__fw__stats__resp}{00050}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__fw__stats__resp}{lio\_fw\_stats\_resp}} \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00051}\mbox{\hyperlink{structlio__fw__stats__resp_a2559214afea7a800b6406f39baa1aae3}{00051}}         uint64\_t        \mbox{\hyperlink{structlio__fw__stats__resp_a2559214afea7a800b6406f39baa1aae3}{rh}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00052}\mbox{\hyperlink{structlio__fw__stats__resp_af35aae2394814e0aac7d6a15e98a8825}{00052}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__link__stats}{octeon\_link\_stats}} \mbox{\hyperlink{structlio__fw__stats__resp_af35aae2394814e0aac7d6a15e98a8825}{stats}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00053}\mbox{\hyperlink{structlio__fw__stats__resp_ac3032f8a075dfc0ede4f7f57c1ee6d2b}{00053}}         uint64\_t        \mbox{\hyperlink{structlio__fw__stats__resp_ac3032f8a075dfc0ede4f7f57c1ee6d2b}{status}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00054}00054 \};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00056}00056 \textcolor{comment}{/* LiquidIO per-\/interface network private data */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00057}\mbox{\hyperlink{structlio}{00057}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}} \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00058}00058         \textcolor{comment}{/* State of the interface. Rx/Tx happens only in the RUNNING state.  */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00059}\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{00059}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00061}00061         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00062}00062 \textcolor{comment}{         * Octeon Interface index number. This device will be represented as}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00063}00063 \textcolor{comment}{         * oct<ifidx> in the system.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00064}00064 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00065}\mbox{\hyperlink{structlio_a988e8b0d44ce15294b8d3189e649559f}{00065}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structlio_a988e8b0d44ce15294b8d3189e649559f}{ifidx}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00067}00067         \textcolor{comment}{/* Octeon Input queue to use to transmit for this network interface. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00068}\mbox{\hyperlink{structlio_a167bcc91feaa2154088544822fe28d37}{00068}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structlio_a167bcc91feaa2154088544822fe28d37}{txq}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00070}00070         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00071}00071 \textcolor{comment}{         * Octeon Output queue from which pkts arrive}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00072}00072 \textcolor{comment}{         * for this network interface.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00073}00073 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00074}\mbox{\hyperlink{structlio_ac9b8beb05358cc8bcd9043f50da63331}{00074}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structlio_ac9b8beb05358cc8bcd9043f50da63331}{rxq}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00076}00076         \textcolor{comment}{/* Guards each glist */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00077}\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{00077}}         \textcolor{keyword}{struct }mtx      *\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00079}\mbox{\hyperlink{lio__network_8h_aab0076f2201482a2496ef11c83420954}{00079}} \textcolor{preprocessor}{\#define LIO\_DEFAULT\_STATS\_INTERVAL 10000}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00080}00080         \textcolor{comment}{/* callout timer for stats */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00081}\mbox{\hyperlink{structlio_a8a5d5002a8fbf948c923b994cdc57abe}{00081}}         \textcolor{keyword}{struct }callout  \mbox{\hyperlink{structlio_a8a5d5002a8fbf948c923b994cdc57abe}{stats\_timer}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00083}00083         \textcolor{comment}{/* Stats Update Interval in milli Seconds */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00084}\mbox{\hyperlink{structlio_afdddb6007bdf5e32124801023f3e08ff}{00084}}         uint16\_t        \mbox{\hyperlink{structlio_afdddb6007bdf5e32124801023f3e08ff}{stats\_interval}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00086}00086         \textcolor{comment}{/* IRQ coalescing driver stats */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00087}\mbox{\hyperlink{structlio_a6eecd4c95b594cd1c390c8695f567930}{00087}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__intrmod__cfg}{octeon\_intrmod\_cfg}} \mbox{\hyperlink{structlio_a6eecd4c95b594cd1c390c8695f567930}{intrmod\_cfg}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00089}00089         \textcolor{comment}{/* Array of gather component linked lists */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00090}\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{00090}}         \textcolor{keyword}{struct }lio\_stailq\_head  *\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00091}\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{00091}}         \textcolor{keywordtype}{void}    **\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00092}\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{00092}}         vm\_paddr\_t      *\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00093}\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{00093}}         uint32\_t        \mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00095}00095         \textcolor{comment}{/* Pointer to the octeon device structure. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00096}\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{00096}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00098}\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{00098}}         \textcolor{keyword}{struct }ifnet    *\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00099}\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{00099}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}   \mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00100}\mbox{\hyperlink{structlio_a997937871fec0dbbf98b11b3a94769e7}{00100}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structlio_a997937871fec0dbbf98b11b3a94769e7}{if\_flags}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00102}00102         \textcolor{comment}{/* Link information sent by the core application for this interface. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00103}\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{00103}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__link__info}{octeon\_link\_info}} \mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00105}00105         \textcolor{comment}{/* counter of link changes */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00106}\mbox{\hyperlink{structlio_af5bb311dcb3438d0ed898e9df284c1c5}{00106}}         uint64\_t        \mbox{\hyperlink{structlio_af5bb311dcb3438d0ed898e9df284c1c5}{link\_changes}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00108}00108         \textcolor{comment}{/* Size of Tx queue for this octeon device. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00109}\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{00109}}         uint32\_t        \mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00111}00111         \textcolor{comment}{/* Size of Rx queue for this octeon device. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00112}\mbox{\hyperlink{structlio_af20ee297c86cab551b7c4f449fce8529}{00112}}         uint32\_t        \mbox{\hyperlink{structlio_af20ee297c86cab551b7c4f449fce8529}{rx\_qsize}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00114}00114         \textcolor{comment}{/* Size of MTU this octeon device. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00115}\mbox{\hyperlink{structlio_a2c9f94ccb0cc0cf6c75af8d35e604ef4}{00115}}         uint32\_t        \mbox{\hyperlink{structlio_a2c9f94ccb0cc0cf6c75af8d35e604ef4}{mtu}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00117}00117         \textcolor{comment}{/* msg level flag per interface. */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00118}\mbox{\hyperlink{structlio_a6e0cb10e3bbafb3171632acc6e8b1f49}{00118}}         uint32\_t        \mbox{\hyperlink{structlio_a6e0cb10e3bbafb3171632acc6e8b1f49}{msg\_enable}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00120}00120         \textcolor{comment}{/* Interface info */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00121}\mbox{\hyperlink{structlio_a17247aceb3068680d7a3909768da4877}{00121}}         uint32\_t        \mbox{\hyperlink{structlio_a17247aceb3068680d7a3909768da4877}{intf\_open}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00123}00123         \textcolor{comment}{/* task queue for  rx oom status */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00124}\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{00124}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__tq}{lio\_tq}}     \mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00126}00126         \textcolor{comment}{/* VLAN Filtering related */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00127}\mbox{\hyperlink{structlio_ac0152641b7461639ce1df03a5fc51cff}{00127}}         eventhandler\_tag        \mbox{\hyperlink{structlio_ac0152641b7461639ce1df03a5fc51cff}{vlan\_attach}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00128}\mbox{\hyperlink{structlio_ab61bce8cc063de0d59ffad7338724f54}{00128}}         eventhandler\_tag        \mbox{\hyperlink{structlio_ab61bce8cc063de0d59ffad7338724f54}{vlan\_detach}};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00129}00129 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00130}00130         \textcolor{keyword}{struct }lio\_rss\_params\_set rss\_set;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00131}00131 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* RSS */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00132}00132 \};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00134}\mbox{\hyperlink{lio__network_8h_a7382e4815b3d166ee9678325fa3dfdf9}{00134}} \textcolor{preprocessor}{\#define LIO\_MAX\_CORES   12}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00136}00136 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00137}00137 \textcolor{comment}{ * \(\backslash\)brief Enable or disable feature}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00138}00138 \textcolor{comment}{ * @param ifp       pointer to network device}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00139}00139 \textcolor{comment}{ * @param cmd       Command that just requires acknowledgment}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00140}00140 \textcolor{comment}{ * @param param1    Parameter to command}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00141}00141 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00142}00142 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__network_8h_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keywordtype}{int} cmd, uint16\_t param1);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00144}00144 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00145}00145 \textcolor{comment}{ * \(\backslash\)brief Link control command completion callback}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00146}00146 \textcolor{comment}{ * @param nctrl\_ptr pointer to control packet structure}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00147}00147 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00148}00148 \textcolor{comment}{ * This routine is called by the callback function when a ctrl pkt sent to}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00149}00149 \textcolor{comment}{ * core app completes. The nctrl\_ptr contains a copy of the command type}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00150}00150 \textcolor{comment}{ * and data sent to the core app. This routine is only called if the ctrl}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00151}00151 \textcolor{comment}{ * pkt was sent successfully to the core app.}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00152}00152 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00153}00153 \textcolor{keywordtype}{void}    \mbox{\hyperlink{lio__network_8h_a48c1e67dffbf88a354e7ef45e0261674}{lio\_ctrl\_cmd\_completion}}(\textcolor{keywordtype}{void} *nctrl\_ptr);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00155}00155 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__network_8h_ac8c224a0db68dcfda14f740e86a1c079}{lio\_setup\_io\_queues}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev, \textcolor{keywordtype}{int} ifidx,}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00156}00156                             uint32\_t num\_iqs, uint32\_t num\_oqs);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00158}00158 \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__network_8h_a8333172110fc5b71a077c5c6128a82a7}{lio\_setup\_interrupt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t num\_ioqs);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00160}00160 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00161}\mbox{\hyperlink{lio__network_8h_a27ad60010e29678678bd4f24f37992c9}{00161}} \mbox{\hyperlink{lio__network_8h_a27ad60010e29678678bd4f24f37992c9}{lio\_recv\_buffer\_alloc}}(uint32\_t size)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00162}00162 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00163}00163         \textcolor{keyword}{struct }mbuf     *mb = NULL;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00165}00165         mb = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR, size);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00166}00166         \textcolor{keywordflow}{if} (mb != NULL)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00167}00167                 mb-\/>m\_pkthdr.len = mb-\/>m\_len = size;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00169}00169         \textcolor{keywordflow}{return} ((\textcolor{keywordtype}{void} *)mb);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00170}00170 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00172}00172 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00173}\mbox{\hyperlink{lio__network_8h_a567443b40ed2cc007f9eb3a146779059}{00173}} \mbox{\hyperlink{lio__network_8h_a567443b40ed2cc007f9eb3a146779059}{lio\_recv\_buffer\_free}}(\textcolor{keywordtype}{void} *buffer)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00174}00174 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00176}00176         m\_freem((\textcolor{keyword}{struct} mbuf *)buffer);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00177}00177 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00179}00179 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00180}\mbox{\hyperlink{lio__network_8h_ac9deb5ce37bb33729ec550969e024f4d}{00180}} \mbox{\hyperlink{lio__network_8h_ac9deb5ce37bb33729ec550969e024f4d}{lio\_get\_order}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} size)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00181}00181 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00182}00182         \textcolor{keywordtype}{int}     order;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00184}00184         size = (size -\/ 1) >> PAGE\_SHIFT;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00185}00185         order = 0;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00186}00186         \textcolor{keywordflow}{while} (size) \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00187}00187                 order++;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00188}00188                 size >>= 1;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00189}00189         \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00191}00191         \textcolor{keywordflow}{return} (order);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00192}00192 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00195}\mbox{\hyperlink{lio__network_8h_a5cadbb52714f0c4c6eb2f61ff06a4a52}{00195}} \mbox{\hyperlink{lio__network_8h_a5cadbb52714f0c4c6eb2f61ff06a4a52}{lio\_dma\_alloc}}(\textcolor{keywordtype}{size\_t} size, vm\_paddr\_t *dma\_handle)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00196}00196 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00197}00197         \textcolor{keywordtype}{size\_t}  align;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00198}00198         \textcolor{keywordtype}{void}    *mem;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00200}00200         align = PAGE\_SIZE << \mbox{\hyperlink{lio__network_8h_ac9deb5ce37bb33729ec550969e024f4d}{lio\_get\_order}}(size);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00201}00201         mem = (\textcolor{keywordtype}{void} *)kmem\_alloc\_contig(size, M\_WAITOK, 0, \string~0ul, align, 0,}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00202}00202             VM\_MEMATTR\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00203}00203         \textcolor{keywordflow}{if} (mem != NULL)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00204}00204                 *dma\_handle = vtophys(mem);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00205}00205         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00206}00206                 *dma\_handle = 0;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00208}00208         \textcolor{keywordflow}{return} (mem);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00209}00209 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00211}00211 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00212}\mbox{\hyperlink{lio__network_8h_aa9eae17416dcdc92e8370166df882c34}{00212}} \mbox{\hyperlink{lio__network_8h_aa9eae17416dcdc92e8370166df882c34}{lio\_dma\_free}}(\textcolor{keywordtype}{size\_t} size, \textcolor{keywordtype}{void} *cpu\_addr)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00213}00213 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00215}00215         kmem\_free((vm\_offset\_t)cpu\_addr, size);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00216}00216 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00218}00218 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00219}\mbox{\hyperlink{lio__network_8h_ae1c4b45f6c758ab48bfab0a1a0b38455}{00219}} \mbox{\hyperlink{lio__network_8h_ae1c4b45f6c758ab48bfab0a1a0b38455}{lio\_map\_ring}}(device\_t dev, \textcolor{keywordtype}{void} *buf, uint32\_t size)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00220}00220 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00221}00221         vm\_paddr\_t      dma\_addr;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00223}00223         dma\_addr = vtophys(((\textcolor{keyword}{struct} mbuf *)buf)-\/>m\_data);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00224}00224         \textcolor{keywordflow}{return} ((uint64\_t)dma\_addr);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00227}00227 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00228}00228 \textcolor{comment}{ * \(\backslash\)brief check interface state}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00229}00229 \textcolor{comment}{ * @param lio per-\/network private data}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00230}00230 \textcolor{comment}{ * @param state\_flag flag state to check}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00231}00231 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00232}00232 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00233}\mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{00233}} \mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{lio\_ifstate\_check}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} state\_flag)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00234}00234 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00236}00236         \textcolor{keywordflow}{return} (atomic\_load\_acq\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}}) \& state\_flag);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00237}00237 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00239}00239 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00240}00240 \textcolor{comment}{ * \(\backslash\)brief set interface state}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00241}00241 \textcolor{comment}{ * @param lio per-\/network private data}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00242}00242 \textcolor{comment}{ * @param state\_flag flag state to set}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00243}00243 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00244}00244 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00245}\mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{00245}} \mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{lio\_ifstate\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} state\_flag)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00246}00246 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00248}00248         atomic\_store\_rel\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}},}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00249}00249                              (atomic\_load\_acq\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}}) | state\_flag));}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00250}00250 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00252}00252 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00253}00253 \textcolor{comment}{ * \(\backslash\)brief clear interface state}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00254}00254 \textcolor{comment}{ * @param lio per-\/network private data}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00255}00255 \textcolor{comment}{ * @param state\_flag flag state to clear}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00256}00256 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00257}00257 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00258}\mbox{\hyperlink{lio__network_8h_ae17e6bccf9904b2001d0ac924721927f}{00258}} \mbox{\hyperlink{lio__network_8h_ae17e6bccf9904b2001d0ac924721927f}{lio\_ifstate\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} state\_flag)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00259}00259 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00261}00261         atomic\_store\_rel\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}},}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00262}00262                              (atomic\_load\_acq\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}}) \&}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00263}00263                               \string~(state\_flag)));}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00264}00264 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00266}00266 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00267}00267 \textcolor{comment}{ * \(\backslash\)brief wait for all pending requests to complete}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00268}00268 \textcolor{comment}{ * @param oct Pointer to Octeon device}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00269}00269 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00270}00270 \textcolor{comment}{ * Called during shutdown sequence}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00271}00271 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00272}00272 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00273}\mbox{\hyperlink{lio__network_8h_a571873e98724c01fe5a3c01f02db19e3}{00273}} \mbox{\hyperlink{lio__network_8h_a571873e98724c01fe5a3c01f02db19e3}{lio\_wait\_for\_pending\_requests}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00274}00274 \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00275}00275         \textcolor{keywordtype}{int}     i, pcount = 0;}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00277}00277         \textcolor{keywordflow}{for} (i = 0; i < 100; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00278}00278                 pcount = atomic\_load\_acq\_int(}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00279}00279                                      \&oct-\/>\mbox{\hyperlink{structocteon__device_ad426f813a4e8c575116987354206fb52}{response\_list}}[\mbox{\hyperlink{lio__response__manager_8h_aaf105ae5beaca1dee30ae54530691fcea5422bc0a9ca1817fa2fed27de3788a37}{LIO\_ORDERED\_SC\_LIST}}].}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00280}00280                                              pending\_req\_count);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00281}00281                 \textcolor{keywordflow}{if} (pcount)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00282}00282                         \mbox{\hyperlink{lio__bsd_8h_a7127c19922ac115d8494a76ae19d0480}{lio\_sleep\_timeout}}(100);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00283}00283                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00284}00284                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00285}00285         \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00287}00287         \textcolor{keywordflow}{if} (pcount)}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00288}00288                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00290}00290         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00291}00291 \}}
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{lio__network_8h_source_l00293}00293 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* \_\_LIO\_NETWORK\_H\_\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
