\hypertarget{mlx5__en__rx_8c_source}{}\doxysection{mlx5\+\_\+en\+\_\+rx.\+c}
\label{mlx5__en__rx_8c_source}\index{dev/mlx5/mlx5\_en/mlx5\_en\_rx.c@{dev/mlx5/mlx5\_en/mlx5\_en\_rx.c}}
\mbox{\hyperlink{mlx5__en__rx_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2015-\/2021 Mellanox Technologies. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00004}00004 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00005}00005 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00006}00006 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00007}00007 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00008}00008 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00009}00009 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00011}00011 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00013}00013 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00014}00014 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00015}00015 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00016}00016 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00017}00017 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00018}00018 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00019}00019 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00020}00020 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00021}00021 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00022}00022 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00023}00023 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00025}00025 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_ratelimit.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{en_8h}{dev/mlx5/mlx5\_en/en.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <machine/in\_cksum.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00034}00034 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00035}\mbox{\hyperlink{mlx5__en__rx_8c_aa064495be4261827441747ceacbff4a6}{00035}} \mbox{\hyperlink{mlx5__en__rx_8c_aa064495be4261827441747ceacbff4a6}{mlx5e\_alloc\_rx\_wqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00036}00036     \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rx__wqe}{mlx5e\_rx\_wqe}} *wqe, u16 \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00037}00037 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00038}00038         bus\_dma\_segment\_t segs[\mbox{\hyperlink{en_8h_ad65f76a78017b76e35c4f02c2c8108d4}{MLX5E\_MAX\_BUSDMA\_RX\_SEGS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00039}00039         \textcolor{keyword}{struct }\mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00040}00040         \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a7066952143eddf023af26f94e478d93c}{nsegs}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00041}00041         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00042}00042         \textcolor{keyword}{struct }\mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb\_head;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00043}00043         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00045}00045         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_a86adf14255167ca9bf7efad41058318b}{mbuf}} != NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00046}00046                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00048}00048         mb\_head = mb = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00049}00049             \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00050}00050         \textcolor{keywordflow}{if} (unlikely(mb == NULL))}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00051}00051                 \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00053}00053         mb-\/>m\_len = \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00054}00054         mb-\/>m\_pkthdr.len = \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00056}00056         \textcolor{keywordflow}{for} (i = 1; i < \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_ac1bdd2afedc0bf16513ed92d51fe5af1}{nsegs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00057}00057                 \textcolor{keywordflow}{if} (mb\_head-\/>m\_pkthdr.len >= \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a10185b4866405f0e6fff3a3622c0c76f}{wqe\_sz}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00058}00058                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00059}00059                 mb = mb-\/>m\_next = m\_getjcl(M\_NOWAIT, MT\_DATA, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00060}00060                     \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00061}00061                 \textcolor{keywordflow}{if} (unlikely(mb == NULL)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00062}00062                         m\_freem(mb\_head);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00063}00063                         \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00064}00064                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00065}00065                 mb-\/>m\_len = \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00066}00066                 mb\_head-\/>m\_pkthdr.len += \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00067}00067         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00068}00068         \textcolor{comment}{/* rewind to first mbuf in chain */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00069}00069         mb = mb\_head;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00071}00071         \textcolor{comment}{/* get IP header aligned */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00072}00072         m\_adj(mb, \mbox{\hyperlink{en_8h_a59d37bd11be302fab85d3e6c5b5e4c8a}{MLX5E\_NET\_IP\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00074}00074         err = -\/bus\_dmamap\_load\_mbuf\_sg(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7c1c61cec3d950cf2e7a1730819d6048}{dma\_tag}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_a027b1d0b8405d68abc75718af13636d1}{dma\_map}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00075}00075             mb, segs, \&\mbox{\hyperlink{en_8h_a7066952143eddf023af26f94e478d93c}{nsegs}}, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00076}00076         \textcolor{keywordflow}{if} (err != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00077}00077                 \textcolor{keywordflow}{goto} err\_free\_mbuf;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00078}00078         \textcolor{keywordflow}{if} (unlikely(\mbox{\hyperlink{en_8h_a7066952143eddf023af26f94e478d93c}{nsegs}} == 0)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00079}00079                 bus\_dmamap\_unload(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7c1c61cec3d950cf2e7a1730819d6048}{dma\_tag}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_a027b1d0b8405d68abc75718af13636d1}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00080}00080                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00081}00081                 \textcolor{keywordflow}{goto} err\_free\_mbuf;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00082}00082         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00083}00083         wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[0].\mbox{\hyperlink{structmlx5__wqe__data__seg_a12d24c2dede618f9700fc54ba3fb1662}{addr}} = cpu\_to\_be64(segs[0].ds\_addr);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00084}00084         wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[0].\mbox{\hyperlink{structmlx5__wqe__data__seg_a9ff18a3853cc814afe957a12a8787521}{byte\_count}} = cpu\_to\_be32(segs[0].ds\_len |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00085}00085             \mbox{\hyperlink{device_8h_a16af7b253440dadd46a80a4b9fddba4da6892706f04df68bf4c6ee1b889289cb8}{MLX5\_HW\_START\_PADDING}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00086}00086         \textcolor{keywordflow}{for} (i = 1; i != \mbox{\hyperlink{en_8h_a7066952143eddf023af26f94e478d93c}{nsegs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00087}00087                 wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[i].\mbox{\hyperlink{structmlx5__wqe__data__seg_a12d24c2dede618f9700fc54ba3fb1662}{addr}} = cpu\_to\_be64(segs[i].ds\_addr);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00088}00088                 wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[i].\mbox{\hyperlink{structmlx5__wqe__data__seg_a9ff18a3853cc814afe957a12a8787521}{byte\_count}} = cpu\_to\_be32(segs[i].ds\_len);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00089}00089         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00090}00090         \textcolor{keywordflow}{for} (; i < \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_ac1bdd2afedc0bf16513ed92d51fe5af1}{nsegs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00091}00091                 wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[i].\mbox{\hyperlink{structmlx5__wqe__data__seg_a12d24c2dede618f9700fc54ba3fb1662}{addr}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00092}00092                 wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_ada6950ee0a1b753c04842dbf7536e421}{data}}[i].\mbox{\hyperlink{structmlx5__wqe__data__seg_a9ff18a3853cc814afe957a12a8787521}{byte\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00093}00093         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00095}00095         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_a86adf14255167ca9bf7efad41058318b}{mbuf}} = mb;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00096}00096         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_adae01a1c4a7604c6b2b08ff9f78b7bd0}{data}} = mb-\/>m\_data;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00098}00098         bus\_dmamap\_sync(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7c1c61cec3d950cf2e7a1730819d6048}{dma\_tag}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}].\mbox{\hyperlink{structmlx5e__rq__mbuf_a027b1d0b8405d68abc75718af13636d1}{dma\_map}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00099}00099             BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00100}00100         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00102}00102 err\_free\_mbuf:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00103}00103         m\_freem(mb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00104}00104         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00105}00105 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00107}00107 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00108}\mbox{\hyperlink{mlx5__en__rx_8c_a4835e504bf9d87a3626728dacac17c2a}{00108}} \mbox{\hyperlink{mlx5__en__rx_8c_a4835e504bf9d87a3626728dacac17c2a}{mlx5e\_post\_rx\_wqes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00109}00109 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00110}00110         \textcolor{keywordflow}{if} (unlikely(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a33214472cad1cdcb236c9ef4825975e5}{enabled}} == 0))}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00111}00111                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00113}00113         \textcolor{keywordflow}{while} (!\mbox{\hyperlink{wq_8h_a2c1b970d0bf6dbf178c41bcb789ecaa3}{mlx5\_wq\_ll\_is\_full}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00114}00114                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__rx__wqe}{mlx5e\_rx\_wqe}} *wqe = \mbox{\hyperlink{wq_8h_a587e6ce3a7eb366bba87ba96160d387c}{mlx5\_wq\_ll\_get\_wqe}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}.\mbox{\hyperlink{structmlx5__wq__ll_a4f53bcc5a91ee7a08b22e36926b3c63d}{head}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00116}00116                 \textcolor{keywordflow}{if} (unlikely(\mbox{\hyperlink{mlx5__en__rx_8c_aa064495be4261827441747ceacbff4a6}{mlx5e\_alloc\_rx\_wqe}}(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, wqe, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}.\mbox{\hyperlink{structmlx5__wq__ll_a4f53bcc5a91ee7a08b22e36926b3c63d}{head}}))) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00117}00117                         callout\_reset\_curcpu(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af74db0dab1c630bcd6f19e5a05abdb97}{watchdog}}, 1, (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{mlx5__en__rx_8c_a4835e504bf9d87a3626728dacac17c2a}{mlx5e\_post\_rx\_wqes}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00118}00118                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00119}00119                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00120}00120                 \mbox{\hyperlink{wq_8h_a0df2d3597994c31a98d4e6c178f8053f}{mlx5\_wq\_ll\_push}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}, be16\_to\_cpu(wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_a2dc84c1064e40fb2bf0cad7cf28e2ac6}{next}}.\mbox{\hyperlink{structmlx5__wqe__srq__next__seg_ae5982b75252c6513b700584d105f9c8a}{next\_wqe\_index}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00121}00121         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00123}00123         \textcolor{comment}{/* ensure wqes are visible to device before updating doorbell record */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00124}00124         atomic\_thread\_fence\_rel();}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00126}00126         \mbox{\hyperlink{wq_8h_afd8ebe19e14bbca963f16b85a9b4ee48}{mlx5\_wq\_ll\_update\_db\_record}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00127}00127 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00130}\mbox{\hyperlink{mlx5__en__rx_8c_adfb2e7562e9a2ae89a06fe832d3bb380}{00130}} \mbox{\hyperlink{mlx5__en__rx_8c_adfb2e7562e9a2ae89a06fe832d3bb380}{mlx5e\_lro\_update\_hdr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00131}00131 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00132}00132         \textcolor{comment}{/* TODO: consider vlans, ip options, ... */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00133}00133         \textcolor{keyword}{struct }ether\_header *eh;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00134}00134         uint16\_t eh\_type;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00135}00135         uint16\_t tot\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00136}00136         \textcolor{keyword}{struct }ip6\_hdr *ip6 = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00137}00137         \textcolor{keyword}{struct }ip *ip4 = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00138}00138         \textcolor{keyword}{struct }tcphdr *th;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00139}00139         uint32\_t *ts\_ptr;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00140}00140         uint8\_t l4\_hdr\_type;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00141}00141         \textcolor{keywordtype}{int} tcp\_ack;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00143}00143         eh = mtod(mb, \textcolor{keyword}{struct} ether\_header *);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00144}00144         eh\_type = ntohs(eh-\/>ether\_type);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00146}00146         l4\_hdr\_type = \mbox{\hyperlink{device_8h_afbeb658a1d23b9d60e9ccbe7dfd20b53}{get\_cqe\_l4\_hdr\_type}}(cqe);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00147}00147         tcp\_ack = ((\mbox{\hyperlink{device_8h_ac205be2172292384dd687b5471a87eddad7b7d270b97f64a897656a1e46bb721a}{CQE\_L4\_HDR\_TYPE\_TCP\_ACK\_NO\_DATA}} == l4\_hdr\_type) ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00148}00148             (\mbox{\hyperlink{device_8h_ac205be2172292384dd687b5471a87eddaab54d5f1bb6ddcfe402bc9f61f4315c9}{CQE\_L4\_HDR\_TYPE\_TCP\_ACK\_AND\_DATA}} == l4\_hdr\_type));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00150}00150         \textcolor{comment}{/* TODO: consider vlan */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00151}00151         tot\_len = be32\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a153afdc80bf9d2ccfb3be09055f1a5c6}{byte\_cnt}}) -\/ ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00153}00153         \textcolor{keywordflow}{switch} (eh\_type) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00154}00154         \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00155}00155                 ip4 = (\textcolor{keyword}{struct }ip *)(eh + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00156}00156                 th = (\textcolor{keyword}{struct }tcphdr *)(ip4 + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00157}00157                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00158}00158         \textcolor{keywordflow}{case} ETHERTYPE\_IPV6:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00159}00159                 ip6 = (\textcolor{keyword}{struct }ip6\_hdr *)(eh + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00160}00160                 th = (\textcolor{keyword}{struct }tcphdr *)(ip6 + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00161}00161                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00162}00162         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00163}00163                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00164}00164         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00166}00166         ts\_ptr = (uint32\_t *)(th + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00168}00168         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_a30e5c7b078eaa23a2bab5fa0a057b301}{get\_cqe\_lro\_tcppsh}}(cqe))}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00169}00169                 th-\/>th\_flags |= TH\_PUSH;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00171}00171         if (tcp\_ack) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00172}00172                 th-\/>th\_flags |= TH\_ACK;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00173}00173                 th-\/>th\_ack = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a1d8692cf9fd29d16a0034744cc6512a9}{lro\_ack\_seq\_num}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00174}00174                 th-\/>th\_win = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_aca7a9279fe9e645a75f610ab5dc93a1e}{lro\_tcp\_win}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00176}00176                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00177}00177 \textcolor{comment}{                 * FreeBSD handles only 32bit aligned timestamp right after}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00178}00178 \textcolor{comment}{                 * the TCP hdr}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00179}00179 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00180}00180 \textcolor{comment}{                 * |   NOP  |  NOP   |  TSopt |   10   |}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00181}00181 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00182}00182 \textcolor{comment}{                 * |          TSval   timestamp        |}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00183}00183 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00184}00184 \textcolor{comment}{                 * |          TSecr   timestamp        |}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00185}00185 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00186}00186 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00187}00187                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_a8856d978f23dbaa1910618e40afefd25}{get\_cqe\_lro\_timestamp\_valid}}(cqe) \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00188}00188                     (\_\_predict\_true(*ts\_ptr) == ntohl(TCPOPT\_NOP << 24 |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00189}00189                     TCPOPT\_NOP << 16 | TCPOPT\_TIMESTAMP << 8 |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00190}00190                     TCPOLEN\_TIMESTAMP))) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00191}00191                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00192}00192 \textcolor{comment}{                         * cqe-\/>timestamp is 64bit long.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00193}00193 \textcolor{comment}{                         * [0-\/31] -\/ timestamp.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00194}00194 \textcolor{comment}{                         * [32-\/64] -\/ timestamp echo replay.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00195}00195 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00196}00196                         ts\_ptr[1] = *(uint32\_t *)\&cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_ac2fd9120b62398f379b246188984f253}{timestamp}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00197}00197                         ts\_ptr[2] = *((uint32\_t *)\&cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_ac2fd9120b62398f379b246188984f253}{timestamp}} + 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00198}00198                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00199}00199         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00200}00200         \textcolor{keywordflow}{if} (ip4) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00201}00201                 ip4-\/>ip\_ttl = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a632e2d8159c7045d60eb2d8487335258}{lro\_min\_ttl}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00202}00202                 ip4-\/>ip\_len = cpu\_to\_be16(tot\_len);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00203}00203                 ip4-\/>ip\_sum = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00204}00204                 ip4-\/>ip\_sum = in\_cksum(mb, ip4-\/>ip\_hl << 2);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00205}00205         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00206}00206                 ip6-\/>ip6\_hlim = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a632e2d8159c7045d60eb2d8487335258}{lro\_min\_ttl}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00207}00207                 ip6-\/>ip6\_plen = cpu\_to\_be16(tot\_len -\/}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00208}00208                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ip6\_hdr));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00209}00209         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00210}00210         \textcolor{comment}{/* TODO: handle tcp checksum */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00211}00211 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00213}00213 \textcolor{keyword}{static} uint64\_t}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00214}\mbox{\hyperlink{mlx5__en__rx_8c_a3ed534f114ac00969f35eca0e8b6452a}{00214}} \mbox{\hyperlink{mlx5__en__rx_8c_a3ed534f114ac00969f35eca0e8b6452a}{mlx5e\_mbuf\_tstmp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, uint64\_t hw\_tstmp)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00215}00215 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00216}00216         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__clbr__point}{mlx5e\_clbr\_point}} *cp, dcp;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00217}00217         uint64\_t a1, a2, res;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00218}00218         u\_int gen;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00220}00220         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00221}00221                 cp = \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ad5920f7cce8b29b9aa75a7a127b2f029}{clbr\_points}}[\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a55acdd1e5138eb505d381d5a83e05e3d}{clbr\_curr}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00222}00222                 gen = atomic\_load\_acq\_int(\&cp-\/>\mbox{\hyperlink{structmlx5e__clbr__point_a2a68fa225d301e55dbe4f9e0b84cd538}{clbr\_gen}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00223}00223                 \textcolor{keywordflow}{if} (gen == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00224}00224                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00225}00225                 dcp = *cp;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00226}00226                 atomic\_thread\_fence\_acq();}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00227}00227         \} \textcolor{keywordflow}{while} (gen != cp-\/>\mbox{\hyperlink{structmlx5e__clbr__point_a2a68fa225d301e55dbe4f9e0b84cd538}{clbr\_gen}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00229}00229         a1 = (hw\_tstmp -\/ dcp.\mbox{\hyperlink{structmlx5e__clbr__point_afa9f0388888e15ea62a71416c3fdbb72}{clbr\_hw\_prev}}) >> \mbox{\hyperlink{en_8h_a0a272b3ec4b5c856beb12b0134f8aa27}{MLX5E\_TSTMP\_PREC}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00230}00230         a2 = (dcp.\mbox{\hyperlink{structmlx5e__clbr__point_afff5e1be0e2e12399d4fd6fc08a9e3ca}{base\_curr}} -\/ dcp.\mbox{\hyperlink{structmlx5e__clbr__point_adaa15bba3cb6bfa9b9be15b70a968512}{base\_prev}}) >> \mbox{\hyperlink{en_8h_a0a272b3ec4b5c856beb12b0134f8aa27}{MLX5E\_TSTMP\_PREC}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00231}00231         res = (a1 * a2) << \mbox{\hyperlink{en_8h_a0a272b3ec4b5c856beb12b0134f8aa27}{MLX5E\_TSTMP\_PREC}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00233}00233         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00234}00234 \textcolor{comment}{         * Divisor cannot be zero because calibration callback}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00235}00235 \textcolor{comment}{         * checks for the condition and disables timestamping}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00236}00236 \textcolor{comment}{         * if clock halted.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00237}00237 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00238}00238         res /= (dcp.\mbox{\hyperlink{structmlx5e__clbr__point_a8453068a8b39198c83a63e56a976d947}{clbr\_hw\_curr}} -\/ dcp.\mbox{\hyperlink{structmlx5e__clbr__point_afa9f0388888e15ea62a71416c3fdbb72}{clbr\_hw\_prev}}) >> \mbox{\hyperlink{en_8h_a0a272b3ec4b5c856beb12b0134f8aa27}{MLX5E\_TSTMP\_PREC}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00240}00240         res += dcp.\mbox{\hyperlink{structmlx5e__clbr__point_adaa15bba3cb6bfa9b9be15b70a968512}{base\_prev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00241}00241         \textcolor{keywordflow}{return} (res);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00242}00242 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00244}00244 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00245}\mbox{\hyperlink{mlx5__en__rx_8c_a53f70886be2fa9692149721ab3ebb0e5}{00245}} \mbox{\hyperlink{mlx5__en__rx_8c_a53f70886be2fa9692149721ab3ebb0e5}{mlx5e\_build\_rx\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00246}00246     \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00247}00247     u32 cqe\_bcnt)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00248}00248 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00249}00249         \textcolor{keyword}{struct }ifnet *\mbox{\hyperlink{en_8h_a55ba31cf9df263813f4c49c32e4de4f2}{ifp}} = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00250}00250         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__channel}{mlx5e\_channel}} *c;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00251}00251         \textcolor{keyword}{struct }\mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb\_head;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00252}00252         \textcolor{keywordtype}{int} lro\_num\_seg;        \textcolor{comment}{/* HW LRO session aggregated packets counter */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00253}00253         uint64\_t tstmp;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00255}00255         lro\_num\_seg = be32\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_ac521313917e46afa6384835d4189c7f2}{srqn}}) >> 24;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00256}00256         \textcolor{keywordflow}{if} (lro\_num\_seg > 1) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00257}00257                 \mbox{\hyperlink{mlx5__en__rx_8c_adfb2e7562e9a2ae89a06fe832d3bb380}{mlx5e\_lro\_update\_hdr}}(mb, cqe);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00258}00258                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.lro\_packets++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00259}00259                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.lro\_bytes += cqe\_bcnt;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00260}00260         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00262}00262         mb-\/>m\_pkthdr.len = cqe\_bcnt;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00263}00263         \textcolor{keywordflow}{for} (mb\_head = mb; mb != NULL; mb = mb-\/>m\_next) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00264}00264                 \textcolor{keywordflow}{if} (mb-\/>m\_len > cqe\_bcnt)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00265}00265                         mb-\/>m\_len = cqe\_bcnt;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00266}00266                 cqe\_bcnt -\/= mb-\/>m\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00267}00267                 \textcolor{keywordflow}{if} (likely(cqe\_bcnt == 0)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00268}00268                         \textcolor{keywordflow}{if} (likely(mb-\/>m\_next != NULL)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00269}00269                                 \textcolor{comment}{/* trim off empty mbufs */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00270}00270                                 m\_freem(mb-\/>m\_next);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00271}00271                                 mb-\/>m\_next = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00272}00272                         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00273}00273                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00274}00274                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00275}00275         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00276}00276         \textcolor{comment}{/* rewind to first mbuf in chain */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00277}00277         mb = mb\_head;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00279}00279         \textcolor{comment}{/* check if a Toeplitz hash was computed */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00280}00280         \textcolor{keywordflow}{if} (cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a9816076d1d9b87efead8eb30a12d6ad9}{rss\_hash\_type}} != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00281}00281                 mb-\/>m\_pkthdr.flowid = be32\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a8a7c2a15ee44e08a3833cbd754f21acd}{rss\_hash\_result}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00282}00282 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00283}00283                 \textcolor{comment}{/* decode the RSS hash type */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00284}00284                 \textcolor{keywordflow}{switch} (cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a9816076d1d9b87efead8eb30a12d6ad9}{rss\_hash\_type}} \&}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00285}00285                     (\mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da2b8cbe02921a636603fe76ec1f6931e8}{CQE\_RSS\_DST\_HTYPE\_L4}} | \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77daaebfb36f3b4b95fd7dea7a42c011e942}{CQE\_RSS\_DST\_HTYPE\_IP}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00286}00286                 \textcolor{comment}{/* IPv4 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00287}00287                 \textcolor{keywordflow}{case} (\mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77dabe1bce851f1a30a3a1d424d772faa01a}{CQE\_RSS\_DST\_HTYPE\_TCP}} | \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da72f3a2714b14b0b31f33c53551faeb93}{CQE\_RSS\_DST\_HTYPE\_IPV4}}):}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00288}00288                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_TCP\_IPV4);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00289}00289                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00290}00290                 \textcolor{keywordflow}{case} (\mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da9d654517b023be29107deb6518c8eaef}{CQE\_RSS\_DST\_HTYPE\_UDP}} | \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da72f3a2714b14b0b31f33c53551faeb93}{CQE\_RSS\_DST\_HTYPE\_IPV4}}):}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00291}00291                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_UDP\_IPV4);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00292}00292                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00293}00293                 \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da72f3a2714b14b0b31f33c53551faeb93}{CQE\_RSS\_DST\_HTYPE\_IPV4}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00294}00294                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_IPV4);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00295}00295                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00296}00296                 \textcolor{comment}{/* IPv6 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00297}00297                 \textcolor{keywordflow}{case} (\mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77dabe1bce851f1a30a3a1d424d772faa01a}{CQE\_RSS\_DST\_HTYPE\_TCP}} | \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77dabbbe0339a198cd9f48dd8bfa629dbb27}{CQE\_RSS\_DST\_HTYPE\_IPV6}}):}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00298}00298                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_TCP\_IPV6);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00299}00299                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00300}00300                 \textcolor{keywordflow}{case} (\mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77da9d654517b023be29107deb6518c8eaef}{CQE\_RSS\_DST\_HTYPE\_UDP}} | \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77dabbbe0339a198cd9f48dd8bfa629dbb27}{CQE\_RSS\_DST\_HTYPE\_IPV6}}):}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00301}00301                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_UDP\_IPV6);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00302}00302                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00303}00303                 \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_a157d5577a5b2f5986037d0d09c7dc77dabbbe0339a198cd9f48dd8bfa629dbb27}{CQE\_RSS\_DST\_HTYPE\_IPV6}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00304}00304                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_RSS\_IPV6);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00305}00305                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00306}00306                 \textcolor{keywordflow}{default}:        \textcolor{comment}{/* Other */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00307}00307                         M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_OPAQUE\_HASH);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00308}00308                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00309}00309                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00310}00310 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00311}00311                 M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_OPAQUE\_HASH);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00312}00312 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00313}00313 \textcolor{preprocessor}{\#ifdef M\_HASHTYPE\_SETINNER}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00314}00314                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab189ab09e88d2c97f6151ae769b73f3c}{cqe\_is\_tunneled}}(cqe))}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00315}00315                         M\_HASHTYPE\_SETINNER(mb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00316}00316 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00317}00317         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00318}00318                 mb-\/>m\_pkthdr.flowid = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aedb21c049dec854d0e4e5ee50bc6ba2f}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00319}00319                 M\_HASHTYPE\_SET(mb, M\_HASHTYPE\_OPAQUE);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00320}00320         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00321}00321         mb-\/>m\_pkthdr.rcvif = \mbox{\hyperlink{en_8h_a55ba31cf9df263813f4c49c32e4de4f2}{ifp}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00323}00323         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab189ab09e88d2c97f6151ae769b73f3c}{cqe\_is\_tunneled}}(cqe)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00324}00324                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00325}00325 \textcolor{comment}{                 * CQE can be tunneled only if TIR is configured to}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00326}00326 \textcolor{comment}{                 * enable parsing of tunneled payload, so no need to}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00327}00327 \textcolor{comment}{                 * check for capabilities.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00328}00328 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00329}00329                 \textcolor{keywordflow}{if} (((cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a6fdd1e0f9f018dd9a69e79839b75d1c7}{hds\_ip\_ext}} \& (\mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89ac247b6aa085feddd0b14c35ac5c02343}{CQE\_L2\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89a0651552a9aa449325a82a8c3703dde5a}{CQE\_L3\_OK}})) ==}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00330}00330                     (\mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89ac247b6aa085feddd0b14c35ac5c02343}{CQE\_L2\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89a0651552a9aa449325a82a8c3703dde5a}{CQE\_L3\_OK}}))) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00331}00331                         mb-\/>m\_pkthdr.csum\_flags |=}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00332}00332                             CSUM\_INNER\_L3\_CALC | CSUM\_INNER\_L3\_VALID |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00333}00333                             CSUM\_IP\_CHECKED | CSUM\_IP\_VALID |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00334}00334                             CSUM\_DATA\_VALID | CSUM\_PSEUDO\_HDR;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00335}00335                         mb-\/>m\_pkthdr.csum\_data = htons(0xffff);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00337}00337                         \textcolor{keywordflow}{if} (likely((cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a6fdd1e0f9f018dd9a69e79839b75d1c7}{hds\_ip\_ext}} \& \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89afd29c1e7b479be60f3d4a08321615429}{CQE\_L4\_OK}}) == \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89afd29c1e7b479be60f3d4a08321615429}{CQE\_L4\_OK}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00338}00338                                 mb-\/>m\_pkthdr.csum\_flags |=}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00339}00339                                     CSUM\_INNER\_L4\_CALC | CSUM\_INNER\_L4\_VALID;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00340}00340                         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00341}00341                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00342}00342                         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.csum\_none++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00343}00343                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00344}00344         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (likely((\mbox{\hyperlink{en_8h_a55ba31cf9df263813f4c49c32e4de4f2}{ifp}}-\/>if\_capenable \& (IFCAP\_RXCSUM |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00345}00345             IFCAP\_RXCSUM\_IPV6)) != 0) \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00346}00346             ((cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a6fdd1e0f9f018dd9a69e79839b75d1c7}{hds\_ip\_ext}} \& (\mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89ac247b6aa085feddd0b14c35ac5c02343}{CQE\_L2\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89a0651552a9aa449325a82a8c3703dde5a}{CQE\_L3\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89afd29c1e7b479be60f3d4a08321615429}{CQE\_L4\_OK}})) ==}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00347}00347             (\mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89ac247b6aa085feddd0b14c35ac5c02343}{CQE\_L2\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89a0651552a9aa449325a82a8c3703dde5a}{CQE\_L3\_OK}} | \mbox{\hyperlink{device_8h_a84627a72058502328269676b81780f89afd29c1e7b479be60f3d4a08321615429}{CQE\_L4\_OK}}))) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00348}00348                 mb-\/>m\_pkthdr.csum\_flags =}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00349}00349                     CSUM\_IP\_CHECKED | CSUM\_IP\_VALID |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00350}00350                     CSUM\_DATA\_VALID | CSUM\_PSEUDO\_HDR;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00351}00351                 mb-\/>m\_pkthdr.csum\_data = htons(0xffff);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00352}00352         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00353}00353                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.csum\_none++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00354}00354         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00356}00356         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_a785ff7f6d7f0682a608921bf00ee512a}{cqe\_has\_vlan}}(cqe)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00357}00357                 mb-\/>m\_pkthdr.ether\_vtag = be16\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_adbdedfb8bd0521bd676ade4d6a01db26}{vlan\_info}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00358}00358                 mb-\/>m\_flags |= M\_VLANTAG;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00359}00359         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00361}00361         c = container\_of(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__channel}{mlx5e\_channel}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00362}00362         \textcolor{keywordflow}{if} (c-\/>\mbox{\hyperlink{structmlx5e__channel_a876e7f03c2ea4d219f1a6bfa1d8463ab}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a6b8004b188956f884fce65060553fd41}{clbr\_done}} >= 2) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00363}00363                 tstmp = \mbox{\hyperlink{mlx5__en__rx_8c_a3ed534f114ac00969f35eca0e8b6452a}{mlx5e\_mbuf\_tstmp}}(c-\/>\mbox{\hyperlink{structmlx5e__channel_a876e7f03c2ea4d219f1a6bfa1d8463ab}{priv}}, be64\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_ac2fd9120b62398f379b246188984f253}{timestamp}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00364}00364                 \textcolor{keywordflow}{if} ((tstmp \& \mbox{\hyperlink{device_8h_aa2e8d24f9a93ecdd010431aa1ff54c62}{MLX5\_CQE\_TSTMP\_PTP}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00365}00365                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00366}00366 \textcolor{comment}{                         * Timestamp was taken on the packet entrance,}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00367}00367 \textcolor{comment}{                         * instead of the cqe generation.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00368}00368 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00369}00369                         tstmp \&= \string~MLX5\_CQE\_TSTMP\_PTP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00370}00370                         mb-\/>m\_flags |= M\_TSTMP\_HPREC;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00371}00371                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00372}00372                 mb-\/>m\_pkthdr.rcv\_tstmp = tstmp;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00373}00373                 mb-\/>m\_flags |= M\_TSTMP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00374}00374         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00376}00376         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{device_8h_a8a115a80b0a857ebcc99965228d23b7c}{get\_cqe\_tls\_offload}}(cqe)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00377}00377         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_af3520ff6d43011872bab77edd27d4de3accdcd258ba6b82c0795ebec8d54ac47f}{CQE\_TLS\_OFFLOAD\_DECRYPTED}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00378}00378                 \textcolor{comment}{/* set proper checksum flag for decrypted packets */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00379}00379                 mb-\/>m\_pkthdr.csum\_flags |= CSUM\_TLS\_DECRYPTED;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00380}00380                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.decrypted\_ok\_packets++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00381}00381                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00382}00382         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_af3520ff6d43011872bab77edd27d4de3afa7a787c6bcae3b77b29fae1b0863684}{CQE\_TLS\_OFFLOAD\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00383}00383                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.decrypted\_error\_packets++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00384}00384                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00385}00385         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00386}00386                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00387}00387         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00388}00388 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00390}00390 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00391}\mbox{\hyperlink{mlx5__en__rx_8c_a43da7d73dd8151b5a16d538c44228f59}{00391}} \mbox{\hyperlink{mlx5__en__rx_8c_a43da7d73dd8151b5a16d538c44228f59}{mlx5e\_read\_cqe\_slot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__cq}{mlx5e\_cq}} *\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, u32 \mbox{\hyperlink{en_8h_ae00f2116d2966eba17d23f0623321f21}{cc}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00392}00392 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00393}00393         memcpy(\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, \mbox{\hyperlink{wq_8h_acb024510e442f16bb20f9943b05eab7e}{mlx5\_cqwq\_get\_wqe}}(\&\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}, (\mbox{\hyperlink{en_8h_ae00f2116d2966eba17d23f0623321f21}{cc}} \& \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a88acd1298a4533563bbecbcb4a1f69e6}{sz\_m1}})),}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00394}00394             \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00395}00395 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00397}00397 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00398}\mbox{\hyperlink{mlx5__en__rx_8c_a30541251314ff87f21075e3af029f208}{00398}} \mbox{\hyperlink{mlx5__en__rx_8c_a30541251314ff87f21075e3af029f208}{mlx5e\_write\_cqe\_slot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__cq}{mlx5e\_cq}} *\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, u32 \mbox{\hyperlink{en_8h_ae00f2116d2966eba17d23f0623321f21}{cc}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00399}00399 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00400}00400         memcpy(\mbox{\hyperlink{wq_8h_acb024510e442f16bb20f9943b05eab7e}{mlx5\_cqwq\_get\_wqe}}(\&\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}, \mbox{\hyperlink{en_8h_ae00f2116d2966eba17d23f0623321f21}{cc}} \& \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a88acd1298a4533563bbecbcb4a1f69e6}{sz\_m1}}),}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00401}00401             \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00402}00402 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00404}00404 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00405}\mbox{\hyperlink{mlx5__en__rx_8c_ab7f17a7e509bc404ca06e1f317494a29}{00405}} \mbox{\hyperlink{mlx5__en__rx_8c_ab7f17a7e509bc404ca06e1f317494a29}{mlx5e\_decompress\_cqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__cq}{mlx5e\_cq}} *\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *title,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00406}00406     \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__mini__cqe8}{mlx5\_mini\_cqe8}} *mini,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00407}00407     u16 wqe\_counter, \textcolor{keywordtype}{int} i)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00408}00408 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00409}00409         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00410}00410 \textcolor{comment}{         * NOTE: The fields which are not set here are copied from the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00411}00411 \textcolor{comment}{         * initial and common title. See memcpy() in}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00412}00412 \textcolor{comment}{         * mlx5e\_write\_cqe\_slot().}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00413}00413 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00414}00414         title-\/>\mbox{\hyperlink{structmlx5__cqe64_a153afdc80bf9d2ccfb3be09055f1a5c6}{byte\_cnt}} = mini-\/>\mbox{\hyperlink{structmlx5__mini__cqe8_aa15301bd4fff9c845a99bc471b5a3bce}{byte\_cnt}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00415}00415         title-\/>\mbox{\hyperlink{structmlx5__cqe64_af16e0b265dec7e07555179d5cd7388c6}{wqe\_counter}} = cpu\_to\_be16((wqe\_counter + i) \& \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a88acd1298a4533563bbecbcb4a1f69e6}{sz\_m1}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00416}00416         title-\/>\mbox{\hyperlink{structmlx5__cqe64_a8a7c2a15ee44e08a3833cbd754f21acd}{rss\_hash\_result}} = mini-\/>\mbox{\hyperlink{structmlx5__mini__cqe8_ac566c4e38bb1e17bcdccf6ad892d1b6a}{rx\_hash\_result}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00417}00417         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00418}00418 \textcolor{comment}{         * Since we use MLX5\_CQE\_FORMAT\_HASH when creating the RX CQ,}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00419}00419 \textcolor{comment}{         * the value of the checksum should be ignored.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00420}00420 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00421}00421         title-\/>\mbox{\hyperlink{structmlx5__cqe64_a81f179467b7d9d2ff915a677a90202a3}{check\_sum}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00422}00422         title-\/>\mbox{\hyperlink{structmlx5__cqe64_a3dbb1dc2c9f2ee64863edf7f750f5885}{op\_own}} = (title-\/>\mbox{\hyperlink{structmlx5__cqe64_a3dbb1dc2c9f2ee64863edf7f750f5885}{op\_own}} \& 0xf0) |}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00423}00423             (((\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}} + i) >> \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a1424397dcd9a4425c8c22b03a51f408c}{log\_sz}}) \& 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00424}00424 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00426}\mbox{\hyperlink{mlx5__en__rx_8c_ac3274ca6e7e6941593dd0cf5b8bac82b}{00426}} \textcolor{preprocessor}{\#define MLX5E\_MINI\_ARRAY\_SZ 8}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00427}00427 \textcolor{comment}{/* Make sure structs are not packet differently */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00428}\mbox{\hyperlink{mlx5__en__rx_8c_a8790fde6034cb683d8117f86ae53606e}{00428}} \mbox{\hyperlink{mlx5__en__rx_8c_a8790fde6034cb683d8117f86ae53606e}{CTASSERT}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}}) ==}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00429}00429     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__mini__cqe8}{mlx5\_mini\_cqe8}}) * \mbox{\hyperlink{mlx5__en__rx_8c_ac3274ca6e7e6941593dd0cf5b8bac82b}{MLX5E\_MINI\_ARRAY\_SZ}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00430}00430 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00431}\mbox{\hyperlink{mlx5__en__rx_8c_abc6279657a08128bb9bc138c09aa4d25}{00431}} \mbox{\hyperlink{mlx5__en__rx_8c_abc6279657a08128bb9bc138c09aa4d25}{mlx5e\_decompress\_cqes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__cq}{mlx5e\_cq}} *\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00432}00432 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00433}00433         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__mini__cqe8}{mlx5\_mini\_cqe8}} mini\_array[\mbox{\hyperlink{mlx5__en__rx_8c_ac3274ca6e7e6941593dd0cf5b8bac82b}{MLX5E\_MINI\_ARRAY\_SZ}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00434}00434         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} title;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00435}00435         u32 cqe\_count;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00436}00436         u32 i = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00437}00437         u16 title\_wqe\_counter;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00439}00439         \mbox{\hyperlink{mlx5__en__rx_8c_a43da7d73dd8151b5a16d538c44228f59}{mlx5e\_read\_cqe\_slot}}(\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}}, \&title);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00440}00440         title\_wqe\_counter = be16\_to\_cpu(title.\mbox{\hyperlink{structmlx5__cqe64_af16e0b265dec7e07555179d5cd7388c6}{wqe\_counter}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00441}00441         cqe\_count = be32\_to\_cpu(title.\mbox{\hyperlink{structmlx5__cqe64_a153afdc80bf9d2ccfb3be09055f1a5c6}{byte\_cnt}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00443}00443         \textcolor{comment}{/* Make sure we won't overflow */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00444}00444         KASSERT(cqe\_count <= cq-\/>\mbox{\hyperlink{en_8h_a7d3b6ace6641f1454eb59728e77cac94}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a88acd1298a4533563bbecbcb4a1f69e6}{sz\_m1}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00445}00445             (\textcolor{stringliteral}{"{}\%s: cqe\_count \%u > cq-\/>wq.sz\_m1 \%u"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00446}00446             cqe\_count, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_a88acd1298a4533563bbecbcb4a1f69e6}{sz\_m1}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00448}00448         \mbox{\hyperlink{mlx5__en__rx_8c_a43da7d73dd8151b5a16d538c44228f59}{mlx5e\_read\_cqe\_slot}}(\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}} + 1, mini\_array);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00449}00449         \textcolor{keywordflow}{while} (\textcolor{keyword}{true}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00450}00450                 \mbox{\hyperlink{mlx5__en__rx_8c_ab7f17a7e509bc404ca06e1f317494a29}{mlx5e\_decompress\_cqe}}(\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \&title,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00451}00451                     \&mini\_array[i \% \mbox{\hyperlink{mlx5__en__rx_8c_ac3274ca6e7e6941593dd0cf5b8bac82b}{MLX5E\_MINI\_ARRAY\_SZ}}],}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00452}00452                     title\_wqe\_counter, i);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00453}00453                 \mbox{\hyperlink{mlx5__en__rx_8c_a30541251314ff87f21075e3af029f208}{mlx5e\_write\_cqe\_slot}}(\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}} + i, \&title);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00454}00454                 i++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00456}00456                 \textcolor{keywordflow}{if} (i == cqe\_count)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00457}00457                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00458}00458                 \textcolor{keywordflow}{if} (i \% \mbox{\hyperlink{mlx5__en__rx_8c_ac3274ca6e7e6941593dd0cf5b8bac82b}{MLX5E\_MINI\_ARRAY\_SZ}} == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00459}00459                         \mbox{\hyperlink{mlx5__en__rx_8c_a43da7d73dd8151b5a16d538c44228f59}{mlx5e\_read\_cqe\_slot}}(\mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}-\/>\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}} + i, mini\_array);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00460}00460         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00461}00461 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00463}00463 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00464}\mbox{\hyperlink{mlx5__en__rx_8c_a6c78de0eb7219b425e99f36bd85c3b59}{00464}} \mbox{\hyperlink{mlx5__en__rx_8c_a6c78de0eb7219b425e99f36bd85c3b59}{mlx5e\_poll\_rx\_cq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, \textcolor{keywordtype}{int} budget)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00465}00465 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00466}00466         \textcolor{keyword}{struct }pfil\_head *pfil;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00467}00467         \textcolor{keywordtype}{int} i, rv;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00469}00469         CURVNET\_SET\_QUIET(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}-\/>if\_vnet);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00470}00470         pfil = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a2baaa69f51680e2cf31371ad898b2d07}{channel}}-\/>\mbox{\hyperlink{structmlx5e__channel_a876e7f03c2ea4d219f1a6bfa1d8463ab}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a164e28acb0cd5646e6edccd0fd39db4a}{pfil}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00471}00471         \textcolor{keywordflow}{for} (i = 0; i < budget; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00472}00472                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__rx__wqe}{mlx5e\_rx\_wqe}} *wqe;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00473}00473                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00474}00474                 \textcolor{keyword}{struct }\mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00475}00475                 \_\_be16 wqe\_counter\_be;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00476}00476                 u16 wqe\_counter;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00477}00477                 u32 byte\_cnt, seglen;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00479}00479                 cqe = \mbox{\hyperlink{en_8h_a86f667d7fce082471e64ad721a51475b}{mlx5e\_get\_cqe}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00480}00480                 \textcolor{keywordflow}{if} (!cqe)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00481}00481                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00483}00483                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_a90da769b845a0b042d0739973a515829}{mlx5\_get\_cqe\_format}}(cqe) == \mbox{\hyperlink{device_8h_ade9ca5088d171ad20b4c237f1c2d6260a3a8866f70103fb704a420ca832c5395b}{MLX5\_COMPRESSED}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00484}00484                         \mbox{\hyperlink{mlx5__en__rx_8c_abc6279657a08128bb9bc138c09aa4d25}{mlx5e\_decompress\_cqes}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00486}00486                 \mbox{\hyperlink{wq_8h_a423d89918b59613e695918f45f4ada79}{mlx5\_cqwq\_pop}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00488}00488                 wqe\_counter\_be = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_af16e0b265dec7e07555179d5cd7388c6}{wqe\_counter}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00489}00489                 wqe\_counter = be16\_to\_cpu(wqe\_counter\_be);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00490}00490                 wqe = \mbox{\hyperlink{wq_8h_a587e6ce3a7eb366bba87ba96160d387c}{mlx5\_wq\_ll\_get\_wqe}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}, wqe\_counter);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00491}00491                 byte\_cnt = be32\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a153afdc80bf9d2ccfb3be09055f1a5c6}{byte\_cnt}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00493}00493                 bus\_dmamap\_sync(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7c1c61cec3d950cf2e7a1730819d6048}{dma\_tag}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00494}00494                     \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_a027b1d0b8405d68abc75718af13636d1}{dma\_map}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00495}00495                     BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00497}00497                 \textcolor{keywordflow}{if} (unlikely((cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a3dbb1dc2c9f2ee64863edf7f750f5885}{op\_own}} >> 4) != \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7ab4fc60bde7cd4b1acc475584ef6ea813}{MLX5\_CQE\_RESP\_SEND}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00498}00498                         \mbox{\hyperlink{en_8h_a2f9a12822727cbe472b2f20291dc78d2}{mlx5e\_dump\_err\_cqe}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_ab4354012d0bb9cce73163f8e970aca21}{rqn}}, (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)cqe);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00499}00499                         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.wqe\_err++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00500}00500                         \textcolor{keywordflow}{goto} wq\_ll\_pop;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00501}00501                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00502}00502                 \textcolor{keywordflow}{if} (pfil != NULL \&\& PFIL\_HOOKED\_IN(pfil)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00503}00503                         seglen = MIN(byte\_cnt, \mbox{\hyperlink{en_8h_a276d3cd29e7fa15cce686015c5cefd9d}{MLX5E\_MAX\_RX\_BYTES}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00504}00504                         rv = pfil\_run\_hooks(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a2baaa69f51680e2cf31371ad898b2d07}{channel}}-\/>\mbox{\hyperlink{structmlx5e__channel_a876e7f03c2ea4d219f1a6bfa1d8463ab}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a164e28acb0cd5646e6edccd0fd39db4a}{pfil}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00505}00505                             \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_adae01a1c4a7604c6b2b08ff9f78b7bd0}{data}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00506}00506                             seglen | PFIL\_MEMPTR | PFIL\_IN, NULL);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00508}00508                         \textcolor{keywordflow}{switch} (rv) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00509}00509                         \textcolor{keywordflow}{case} PFIL\_DROPPED:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00510}00510                         \textcolor{keywordflow}{case} PFIL\_CONSUMED:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00511}00511                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00512}00512 \textcolor{comment}{                                 * Filter dropped or consumed it. In}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00513}00513 \textcolor{comment}{                                 * either case, we can just recycle}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00514}00514 \textcolor{comment}{                                 * buffer; there is no more work to do.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00515}00515 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00516}00516                                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.packets++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00517}00517                                 \textcolor{keywordflow}{goto} wq\_ll\_pop;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00518}00518                         \textcolor{keywordflow}{case} PFIL\_REALLOCED:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00519}00519                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00520}00520 \textcolor{comment}{                                 * Filter copied it; recycle buffer}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00521}00521 \textcolor{comment}{                                 * and receive the new mbuf allocated}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00522}00522 \textcolor{comment}{                                 * by the Filter}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00523}00523 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00524}00524                                 mb = pfil\_mem2mbuf(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_adae01a1c4a7604c6b2b08ff9f78b7bd0}{data}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00525}00525                                 \textcolor{keywordflow}{goto} rx\_common;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00526}00526                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00527}00527                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00528}00528 \textcolor{comment}{                                 * The Filter said it was OK, so}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00529}00529 \textcolor{comment}{                                 * receive like normal.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00530}00530 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00531}00531                                 KASSERT(rv == PFIL\_PASS,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00532}00532                                         (\textcolor{stringliteral}{"{}Filter returned \%d!\(\backslash\)n"{}}, rv));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00533}00533                         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00534}00534                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00535}00535                 \textcolor{keywordflow}{if} ((MHLEN -\/ \mbox{\hyperlink{en_8h_a59d37bd11be302fab85d3e6c5b5e4c8a}{MLX5E\_NET\_IP\_ALIGN}}) >= byte\_cnt \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00536}00536                     (mb = m\_gethdr(M\_NOWAIT, MT\_DATA)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00537}00537                         \textcolor{comment}{/* set maximum mbuf length */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00538}00538                         mb-\/>m\_len = MHLEN -\/ \mbox{\hyperlink{en_8h_a59d37bd11be302fab85d3e6c5b5e4c8a}{MLX5E\_NET\_IP\_ALIGN}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00539}00539                         \textcolor{comment}{/* get IP header aligned */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00540}00540                         mb-\/>m\_data += \mbox{\hyperlink{en_8h_a59d37bd11be302fab85d3e6c5b5e4c8a}{MLX5E\_NET\_IP\_ALIGN}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00541}00541 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00542}00542                         bcopy(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_adae01a1c4a7604c6b2b08ff9f78b7bd0}{data}}, mtod(mb, caddr\_t),}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00543}00543                             byte\_cnt);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00544}00544                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00545}00545                         mb = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_a86adf14255167ca9bf7efad41058318b}{mbuf}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00546}00546                         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_a86adf14255167ca9bf7efad41058318b}{mbuf}} = NULL;    \textcolor{comment}{/* safety clear */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00547}00547 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00548}00548                         bus\_dmamap\_unload(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7c1c61cec3d950cf2e7a1730819d6048}{dma\_tag}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00549}00549                             \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a794f2dc455358549526cb46711b07254}{mbuf}}[wqe\_counter].\mbox{\hyperlink{structmlx5e__rq__mbuf_a027b1d0b8405d68abc75718af13636d1}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00550}00550                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00551}00551 rx\_common:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00552}00552                 \mbox{\hyperlink{mlx5__en__rx_8c_a53f70886be2fa9692149721ab3ebb0e5}{mlx5e\_build\_rx\_mbuf}}(cqe, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, mb, byte\_cnt);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00553}00553                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.bytes += byte\_cnt;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00554}00554                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.packets++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00555}00555 \textcolor{preprocessor}{\#ifdef NUMA}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00556}00556                 mb-\/>m\_pkthdr.numa\_domain = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}-\/>if\_numa\_domain;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00557}00557 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00559}00559 \textcolor{preprocessor}{\#if !defined(HAVE\_TCP\_LRO\_RX)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00560}00560                 tcp\_lro\_queue\_mbuf(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7dc342e043ae90f04c86ee45428363f1}{lro}}, mb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00561}00561 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00562}00562                 \textcolor{keywordflow}{if} (mb-\/>m\_pkthdr.csum\_flags == 0 ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00563}00563                     (\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}-\/>if\_capenable \& IFCAP\_LRO) == 0 ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00564}00564                     \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7dc342e043ae90f04c86ee45428363f1}{lro}}.lro\_cnt == 0 ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00565}00565                     tcp\_lro\_rx(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7dc342e043ae90f04c86ee45428363f1}{lro}}, mb, 0) != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00566}00566                         \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}-\/>if\_input(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}, mb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00567}00567                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00568}00568 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00569}00569 wq\_ll\_pop:}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00570}00570                 \mbox{\hyperlink{wq_8h_a94427ced6c2cbfa6d081da8a2dded968}{mlx5\_wq\_ll\_pop}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_af73e7d74ad8352b1fcf761e310b9772e}{wq}}, wqe\_counter\_be,}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00571}00571                     \&wqe-\/>\mbox{\hyperlink{structmlx5e__rx__wqe_a2dc84c1064e40fb2bf0cad7cf28e2ac6}{next}}.\mbox{\hyperlink{structmlx5__wqe__srq__next__seg_ae5982b75252c6513b700584d105f9c8a}{next\_wqe\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00572}00572         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00573}00573         CURVNET\_RESTORE();}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00575}00575         \mbox{\hyperlink{wq_8h_aa2f616f10c8f7ee91d34c33e0de0661c}{mlx5\_cqwq\_update\_db\_record}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad4b619ee0ca108ddb421d7922b5e097c}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00577}00577         \textcolor{comment}{/* ensure cq space is freed before enabling more cqes */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00578}00578         atomic\_thread\_fence\_rel();}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00579}00579         \textcolor{keywordflow}{return} (i);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00580}00580 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00582}00582 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00583}\mbox{\hyperlink{mlx5__en__rx_8c_a017bdd9048154f18dc0c4b60e4d74389}{00583}} \mbox{\hyperlink{mlx5__en__rx_8c_a017bdd9048154f18dc0c4b60e4d74389}{mlx5e\_rx\_cq\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__cq}{mlx5\_core\_cq}} *\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__eqe}{mlx5\_eqe}} *eqe \_\_unused)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00584}00584 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00585}00585         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__channel}{mlx5e\_channel}} *c = container\_of(\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__channel}{mlx5e\_channel}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}.\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00586}00586         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}} = container\_of(\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00587}00587         \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00589}00589 \textcolor{preprocessor}{\#ifdef HAVE\_PER\_CQ\_EVENT\_PACKET}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00590}00590 \textcolor{preprocessor}{\#if (MHLEN < 15)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00591}00591 \textcolor{preprocessor}{\#error "{}MHLEN is too small"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00592}00592 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00593}00593         \textcolor{keyword}{struct }\mbox{\hyperlink{en_8h_afe7667866ada7786d2c5a74903709909}{mbuf}} *mb = m\_gethdr(M\_NOWAIT, MT\_DATA);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00595}00595         \textcolor{keywordflow}{if} (mb != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00596}00596                 \textcolor{comment}{/* this code is used for debugging purpose only */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00597}00597                 mb-\/>m\_pkthdr.len = mb-\/>m\_len = 15;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00598}00598                 memset(mb-\/>m\_data, 255, 14);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00599}00599                 mb-\/>m\_data[14] = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aedb21c049dec854d0e4e5ee50bc6ba2f}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00600}00600                 mb-\/>m\_pkthdr.rcvif = \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00601}00601                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}-\/>if\_input(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aff32dc37bf8f54248142c6e54e4ee88d}{ifp}}, mb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00602}00602         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00603}00603 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00604}00604         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} j = 0; j != \mbox{\hyperlink{en_8h_a9624e8c369385946b7e89bb9440412c6}{MLX5E\_MAX\_TX\_NUM\_TC}}; j++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00605}00605                 mtx\_lock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_abc390d5364f72404d7a6a7b35aa9ba78}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00606}00606                 c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_a40f148baa1b54abdc3ba8b1ae89e0423}{db\_inhibit}}++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00607}00607                 mtx\_unlock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_abc390d5364f72404d7a6a7b35aa9ba78}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00608}00608         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00610}00610         mtx\_lock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ae4a2e99bdd4c30b2a45133670848e121}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00611}00611         c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ad6a3a64cb7274f7a615671e5beb1f252}{db\_inhibit}}++;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00612}00612         mtx\_unlock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ae4a2e99bdd4c30b2a45133670848e121}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00613}00613 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00614}00614         mtx\_lock(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a3f119df0480e3059832580c93b09c064}{mtx}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00616}00616         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00617}00617 \textcolor{comment}{         * Polling the entire CQ without posting new WQEs results in}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00618}00618 \textcolor{comment}{         * lack of receive WQEs during heavy traffic scenarios.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00619}00619 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00620}00620         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00621}00621                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__rx_8c_a6c78de0eb7219b425e99f36bd85c3b59}{mlx5e\_poll\_rx\_cq}}(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}, \mbox{\hyperlink{en_8h_af590e78b4561d1df9f50a0fe9448ee96}{MLX5E\_RX\_BUDGET\_MAX}}) !=}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00622}00622                     \mbox{\hyperlink{en_8h_af590e78b4561d1df9f50a0fe9448ee96}{MLX5E\_RX\_BUDGET\_MAX}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00623}00623                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00624}00624                 i += \mbox{\hyperlink{en_8h_af590e78b4561d1df9f50a0fe9448ee96}{MLX5E\_RX\_BUDGET\_MAX}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00625}00625                 \textcolor{keywordflow}{if} (i >= \mbox{\hyperlink{en_8h_aec5d94e3a9d30b3576438f71cbbcb7c0}{MLX5E\_BUDGET\_MAX}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00626}00626                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00627}00627                 \mbox{\hyperlink{mlx5__en__rx_8c_a4835e504bf9d87a3626728dacac17c2a}{mlx5e\_post\_rx\_wqes}}(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00628}00628         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00629}00629         \mbox{\hyperlink{mlx5__en__rx_8c_a4835e504bf9d87a3626728dacac17c2a}{mlx5e\_post\_rx\_wqes}}(\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00630}00630         \textcolor{comment}{/* check for dynamic interrupt moderation callback */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00631}00631         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aa1dea110c48ba3df5cdf1991306236bd}{dim}}.mode != NET\_DIM\_CQ\_PERIOD\_MODE\_DISABLED)}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00632}00632                 net\_dim(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_aa1dea110c48ba3df5cdf1991306236bd}{dim}}, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.packets, \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a5e2116ae6494a09666a310830556d5db}{stats}}.bytes);}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00633}00633         \mbox{\hyperlink{en_8h_a6b7bcdcd835612ffd60bafec03c7db3b}{mlx5e\_cq\_arm}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}, \mbox{\hyperlink{doorbell_8h_ab8aa70fd78380f89ef76837858b16bd9}{MLX5\_GET\_DOORBELL\_LOCK}}(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a2baaa69f51680e2cf31371ad898b2d07}{channel}}-\/>\mbox{\hyperlink{structmlx5e__channel_a876e7f03c2ea4d219f1a6bfa1d8463ab}{priv}}-\/>doorbell\_lock));}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00634}00634         tcp\_lro\_flush\_all(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7dc342e043ae90f04c86ee45428363f1}{lro}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00635}00635         mtx\_unlock(\&\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a3f119df0480e3059832580c93b09c064}{mtx}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00636}00636 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00637}00637         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} j = 0; j != \mbox{\hyperlink{en_8h_a9624e8c369385946b7e89bb9440412c6}{MLX5E\_MAX\_TX\_NUM\_TC}}; j++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00638}00638                 mtx\_lock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_abc390d5364f72404d7a6a7b35aa9ba78}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00639}00639                 c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_a40f148baa1b54abdc3ba8b1ae89e0423}{db\_inhibit}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00640}00640                 \textcolor{comment}{/* Update the doorbell record, if any. */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00641}00641                 \mbox{\hyperlink{en_8h_a1e1594b5c6e312f81ffc97fd75213b8a}{mlx5e\_tx\_notify\_hw}}(c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}} + j, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00642}00642                 mtx\_unlock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[j].\mbox{\hyperlink{structmlx5e__sq_abc390d5364f72404d7a6a7b35aa9ba78}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00643}00643         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00644}00644 }
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00645}00645         mtx\_lock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ae4a2e99bdd4c30b2a45133670848e121}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00646}00646         c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ad6a3a64cb7274f7a615671e5beb1f252}{db\_inhibit}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00647}00647         \mbox{\hyperlink{en_8h_a2b7166bf8392480e8718cdbdf21c2315}{mlx5e\_iq\_notify\_hw}}(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00648}00648         mtx\_unlock(\&c-\/>\mbox{\hyperlink{structmlx5e__channel_a2fe0645c542ce76b893d7a6b89c29c77}{iq}}.\mbox{\hyperlink{structmlx5e__iq_ae4a2e99bdd4c30b2a45133670848e121}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__rx_8c_source_l00649}00649 \}}

\end{DoxyCode}
