\hypertarget{mlx5__en__ethtool_8c_source}{}\doxysection{mlx5\+\_\+en\+\_\+ethtool.\+c}
\label{mlx5__en__ethtool_8c_source}\index{dev/mlx5/mlx5\_en/mlx5\_en\_ethtool.c@{dev/mlx5/mlx5\_en/mlx5\_en\_ethtool.c}}
\mbox{\hyperlink{mlx5__en__ethtool_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2015-\/2021 Mellanox Technologies. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00004}00004 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00005}00005 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00006}00006 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00007}00007 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00008}00008 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00009}00009 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00011}00011 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00013}00013 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00014}00014 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00015}00015 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00016}00016 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00017}00017 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00018}00018 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00019}00019 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00020}00020 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00021}00021 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00022}00022 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00023}00023 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00025}00025 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_ratelimit.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{en_8h}{dev/mlx5/mlx5\_en/en.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{port__buffer_8h}{dev/mlx5/mlx5\_en/port\_buffer.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00034}00034 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00035}\mbox{\hyperlink{en_8h_a4e4bdf2cdabe62d0271ac03f0c416a5a}{00035}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ae864d5b892a4f0d1e04baec683018568}{mlx5e\_create\_stats}}(\textcolor{keyword}{struct} sysctl\_ctx\_list *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00036}00036     \textcolor{keyword}{struct} sysctl\_oid\_list *parent, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *buffer,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00037}00037     \textcolor{keyword}{const} \textcolor{keywordtype}{char} **desc, \textcolor{keywordtype}{unsigned} num, u64 * arg)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00038}00038 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00039}00039         \textcolor{keyword}{struct }sysctl\_oid *node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00040}00040         \textcolor{keywordtype}{unsigned} x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00042}00042         sysctl\_ctx\_init(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00044}00044         node = SYSCTL\_ADD\_NODE(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, parent, OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00045}00045             buffer, CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Statistics"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00046}00046         \textcolor{keywordflow}{if} (node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00047}00047                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00048}00048         \textcolor{keywordflow}{for} (x = 0; x != num; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00049}00049                 SYSCTL\_ADD\_UQUAD(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00050}00050                     desc[2 * x], CTLFLAG\_RD, arg + x, desc[2 * x + 1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00051}00051         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00052}00052 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00054}00054 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00055}\mbox{\hyperlink{en_8h_aa2ad7d69980d8530a8d52f4a155bccf9}{00055}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ad300767b4a6201af398796b63bd67823}{mlx5e\_create\_counter\_stats}}(\textcolor{keyword}{struct} sysctl\_ctx\_list *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00056}00056     \textcolor{keyword}{struct} sysctl\_oid\_list *parent, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *buffer,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00057}00057     \textcolor{keyword}{const} \textcolor{keywordtype}{char} **desc, \textcolor{keywordtype}{unsigned} num, counter\_u64\_t *arg)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00058}00058 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00059}00059         \textcolor{keyword}{struct }sysctl\_oid *node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00060}00060         \textcolor{keywordtype}{unsigned} x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00062}00062         sysctl\_ctx\_init(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00064}00064         node = SYSCTL\_ADD\_NODE(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, parent, OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00065}00065             buffer, CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Statistics"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00066}00066         \textcolor{keywordflow}{if} (node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00067}00067                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00068}00068         \textcolor{keywordflow}{for} (x = 0; x != num; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00069}00069                 SYSCTL\_ADD\_COUNTER\_U64(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00070}00070                     desc[2 * x], CTLFLAG\_RD, arg + x, desc[2 * x + 1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00071}00071         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00072}00072 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00074}00074 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00075}\mbox{\hyperlink{mlx5__en__ethtool_8c_aa4b64cbc68788c297770d7857caf1df5}{00075}} \mbox{\hyperlink{mlx5__en__ethtool_8c_aa4b64cbc68788c297770d7857caf1df5}{mlx5e\_ethtool\_sync\_tx\_completion\_fact}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00076}00076 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00077}00077         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00078}00078 \textcolor{comment}{         * Limit the maximum distance between completion events to}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00079}00079 \textcolor{comment}{         * half of the currently set TX queue size.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00080}00080 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00081}00081 \textcolor{comment}{         * The maximum number of queue entries a single IP packet can}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00082}00082 \textcolor{comment}{         * consume is given by MLX5\_SEND\_WQE\_MAX\_WQEBBS.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00083}00083 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00084}00084 \textcolor{comment}{         * The worst case max value is then given as below:}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00085}00085 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00086}00086         uint64\_t max = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size /}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00087}00087             (2 * \mbox{\hyperlink{qp_8h_acf031a18714fab9c47677ce9eba30e70ae9ee53a01bfecf39e7d490f05809d64e}{MLX5\_SEND\_WQE\_MAX\_WQEBBS}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00089}00089         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00090}00090 \textcolor{comment}{         * Update the maximum completion factor value in case the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00091}00091 \textcolor{comment}{         * tx\_queue\_size field changed. Ensure we don't overflow}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00092}00092 \textcolor{comment}{         * 16-\/bits.}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00093}00093 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00094}00094         \textcolor{keywordflow}{if} (max < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00095}00095                 max = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00096}00096         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (max > 65535)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00097}00097                 max = 65535;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00098}00098         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_completion\_fact\_max = max;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00100}00100         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00101}00101 \textcolor{comment}{         * Verify that the current TX completion factor is within the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00102}00102 \textcolor{comment}{         * given limits:}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00103}00103 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00104}00104         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_completion\_fact < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00105}00105                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_completion\_fact = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00106}00106         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_completion\_fact > max)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00107}00107                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_completion\_fact = max;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00108}00108 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00111}\mbox{\hyperlink{mlx5__en__ethtool_8c_ad6ba2405ddad78507daec9a1db393419}{00111}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ad6ba2405ddad78507daec9a1db393419}{mlx5e\_getmaxrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00112}00112 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00113}00113         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00114}00114         u8 max\_bw\_unit[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00115}00115         u8 max\_bw\_value[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00116}00116         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00117}00117         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00119}00119         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00120}00120         err = -\/\mbox{\hyperlink{mlx5__port_8c_a1e9dd0d7320c408a211ca9040488a41d}{mlx5\_query\_port\_tc\_rate\_limit}}(mdev, max\_bw\_value, max\_bw\_unit);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00121}00121         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00122}00122                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00124}00124         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00125}00125                 \textcolor{keywordflow}{switch} (max\_bw\_unit[i]) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00126}00126                 \textcolor{keywordflow}{case} \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dcaefab1aa8868be2d7e9c9367ceae12eea}{MLX5\_100\_MBPS\_UNIT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00127}00127                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[i] = max\_bw\_value[i] * \mbox{\hyperlink{en_8h_a04fc288ba5876fd3ea43dfb7e6a4f03b}{MLX5E\_100MB}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00128}00128                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00129}00129                 \textcolor{keywordflow}{case} \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dca22c8251fa94ec7b809965df78fbb85dc}{MLX5\_GBPS\_UNIT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00130}00130                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[i] = max\_bw\_value[i] * \mbox{\hyperlink{en_8h_adaeaa34934b9b3f5d1ee119cd32be202}{MLX5E\_1GB}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00131}00131                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00132}00132                 \textcolor{keywordflow}{case} \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dcad67d40699f994c9275a10af096df9eec}{MLX5\_BW\_NO\_LIMIT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00133}00133                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[i] = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00134}00134                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00135}00135                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00136}00136                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[i] = -\/1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00137}00137                         WARN\_ONCE(\textcolor{keyword}{true}, \textcolor{stringliteral}{"{}non-\/supported BW unit"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00138}00138                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00139}00139                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00140}00140         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00141}00141 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00142}00142         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00143}00143         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00144}00144 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00146}00146 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00147}\mbox{\hyperlink{mlx5__en__ethtool_8c_a5fce23433004dfe56d734e0c5ffddb18}{00147}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a5fce23433004dfe56d734e0c5ffddb18}{mlx5e\_get\_max\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00148}00148 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00149}00149         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00150}00150         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00151}00151         \textcolor{keywordtype}{int} x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00153}00153         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00154}00154         err = -\/\mbox{\hyperlink{mlx5__port_8c_a3bff739bb1d26721baac627ba595236e}{mlx5\_query\_port\_tc\_bw\_alloc}}(mdev, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00155}00155         \textcolor{keywordflow}{if} (err == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00156}00156                 \textcolor{comment}{/* set default value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00157}00157                 \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00158}00158                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}}[x] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00159}00159                             100 / \mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00160}00160                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00161}00161                 err = -\/\mbox{\hyperlink{mlx5__port_8c_a1f21911cbbc6a806d4f165efd6711de1}{mlx5\_set\_port\_tc\_bw\_alloc}}(mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00162}00162                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00163}00163         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00164}00164         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00166}00166         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00170}\mbox{\hyperlink{mlx5__en__ethtool_8c_a05bdd8482c51f78f886d26b44902546b}{00170}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a05bdd8482c51f78f886d26b44902546b}{mlx5e\_get\_dscp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00172}00172         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00173}00173         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00175}00175         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, qcam\_reg) == 0 ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00176}00176             \mbox{\hyperlink{device_8h_a48304d69631691d5792beba2a806dbe2}{MLX5\_CAP\_QCAM\_REG}}(mdev, qpts) == 0 ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00177}00177             \mbox{\hyperlink{device_8h_a48304d69631691d5792beba2a806dbe2}{MLX5\_CAP\_QCAM\_REG}}(mdev, qpdpm) == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00178}00178                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00180}00180         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00181}00181         err = -\/\mbox{\hyperlink{mlx5__port_8c_aa003c31ff5f5f6dae8728880dd8392db}{mlx5\_query\_dscp2prio}}(mdev, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00182}00182         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00183}00183                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00185}00185         err = -\/\mbox{\hyperlink{mlx5__port_8c_afcaee87f88eaa778d725f66812f561ba}{mlx5\_query\_trust\_state}}(mdev, \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8a46c1dfd225a38139b68a1d69308674}{trust\_state}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00186}00186         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00187}00187                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00188}00188 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00189}00189         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00190}00190         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00191}00191 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00194}\mbox{\hyperlink{mlx5__en__ethtool_8c_a7ef7e6237e8f86368569ce390a5a89dc}{00194}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a7ef7e6237e8f86368569ce390a5a89dc}{mlx5e\_tc\_get\_parameters}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00195}00195     u64 *new\_bw\_value, u8 *max\_bw\_value, u8 *max\_bw\_unit)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00196}00196 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00197}00197         \textcolor{keyword}{const} u64 upper\_limit\_mbps = 255 * \mbox{\hyperlink{en_8h_a04fc288ba5876fd3ea43dfb7e6a4f03b}{MLX5E\_100MB}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00198}00198         \textcolor{keyword}{const} u64 upper\_limit\_gbps = 255 * \mbox{\hyperlink{en_8h_adaeaa34934b9b3f5d1ee119cd32be202}{MLX5E\_1GB}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00199}00199         u64 temp;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00200}00200         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00202}00202         memset(max\_bw\_value, 0, \mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00203}00203         memset(max\_bw\_unit, 0, \mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00205}00205         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00206}00206                 temp = (new\_bw\_value != NULL) ?}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00207}00207                     new\_bw\_value[i] : \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[i];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00208}00208 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00209}00209                 if (!temp) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00210}00210                         max\_bw\_unit[i] = \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dcad67d40699f994c9275a10af096df9eec}{MLX5\_BW\_NO\_LIMIT}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00211}00211                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (temp > upper\_limit\_gbps) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00212}00212                         max\_bw\_unit[i] = \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dcad67d40699f994c9275a10af096df9eec}{MLX5\_BW\_NO\_LIMIT}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00213}00213                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (temp <= upper\_limit\_mbps) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00214}00214                         max\_bw\_value[i] = howmany(temp, \mbox{\hyperlink{en_8h_a04fc288ba5876fd3ea43dfb7e6a4f03b}{MLX5E\_100MB}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00215}00215                         max\_bw\_unit[i]  = \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dcaefab1aa8868be2d7e9c9367ceae12eea}{MLX5\_100\_MBPS\_UNIT}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00216}00216                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00217}00217                         max\_bw\_value[i] = howmany(temp, \mbox{\hyperlink{en_8h_adaeaa34934b9b3f5d1ee119cd32be202}{MLX5E\_1GB}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00218}00218                         max\_bw\_unit[i]  = \mbox{\hyperlink{en_8h_a4efaf4e07364d6302f598569aa7e55dca22c8251fa94ec7b809965df78fbb85dc}{MLX5\_GBPS\_UNIT}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00219}00219                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00220}00220         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00221}00221 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00223}00223 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00224}\mbox{\hyperlink{mlx5__en__ethtool_8c_a9bc63b71057b01dfb927453004352489}{00224}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a9bc63b71057b01dfb927453004352489}{mlx5e\_tc\_maxrate\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00225}00225 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00226}00226         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00227}00227         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00228}00228         u8 max\_bw\_unit[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00229}00229         u8 max\_bw\_value[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00230}00230         u64 new\_bw\_value[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00231}00231         u8 max\_rates = \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev) + 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00232}00232         u8 x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00233}00233         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00235}00235         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00236}00236         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00237}00237             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}[0]) * max\_rates);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00238}00238         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00239}00239                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00240}00240         err = SYSCTL\_IN(req, new\_bw\_value,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00241}00241             \textcolor{keyword}{sizeof}(new\_bw\_value[0]) * max\_rates);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00242}00242         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00243}00243                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00245}00245         \textcolor{comment}{/* range check input value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00246}00246         \textcolor{keywordflow}{for} (x = 0; x != max\_rates; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00247}00247                 \textcolor{keywordflow}{if} (new\_bw\_value[x] \% \mbox{\hyperlink{en_8h_a04fc288ba5876fd3ea43dfb7e6a4f03b}{MLX5E\_100MB}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00248}00248                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00249}00249                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00250}00250                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00251}00251         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00253}00253         \mbox{\hyperlink{mlx5__en__ethtool_8c_a7ef7e6237e8f86368569ce390a5a89dc}{mlx5e\_tc\_get\_parameters}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, new\_bw\_value, max\_bw\_value, max\_bw\_unit);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00255}00255         err = -\/\mbox{\hyperlink{mlx5__port_8c_aec4e85f531e077cf816101a0026ad225}{mlx5\_modify\_port\_tc\_rate\_limit}}(mdev, max\_bw\_value, max\_bw\_unit);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00256}00256         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00257}00257                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00259}00259         memcpy(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}, new\_bw\_value,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00260}00260             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ac0db76261f47e1c6d37cc1a37754e6b3}{max\_bw\_value}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00261}00261 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00262}00262         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00263}00263         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00264}00264 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00266}00266 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00267}\mbox{\hyperlink{mlx5__en__ethtool_8c_abe354acf2239f6ba5b62ecd3ca610e99}{00267}} \mbox{\hyperlink{mlx5__en__ethtool_8c_abe354acf2239f6ba5b62ecd3ca610e99}{mlx5e\_tc\_rate\_share\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00268}00268 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00269}00269         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00270}00270         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00271}00271         u8 max\_bw\_share[\mbox{\hyperlink{en_8h_af46ca0739c479a3c89e1ead9f9e0c110}{IEEE\_8021QAZ\_MAX\_TCS}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00272}00272         u8 max\_rates = \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev) + 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00273}00273         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00274}00274         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00275}00275         \textcolor{keywordtype}{int} sum;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00277}00277         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00278}00278         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}}, max\_rates);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00279}00279         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00280}00280                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00281}00281         err = SYSCTL\_IN(req, max\_bw\_share, max\_rates);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00282}00282         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00283}00283                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00285}00285         \textcolor{comment}{/* range check input value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00286}00286         \textcolor{keywordflow}{for} (sum = i = 0; i != max\_rates; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00287}00287                 \textcolor{keywordflow}{if} (max\_bw\_share[i] < 1 || max\_bw\_share[i] > 100) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00288}00288                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00289}00289                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00290}00290                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00291}00291                 sum += max\_bw\_share[i];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00292}00292         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00294}00294         \textcolor{comment}{/* sum of values should be as close to 100 as possible */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00295}00295         \textcolor{keywordflow}{if} (sum < (100 -\/ max\_rates + 1) || sum > 100) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00296}00296                 err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00297}00297                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00298}00298         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00300}00300         err = -\/\mbox{\hyperlink{mlx5__port_8c_a1f21911cbbc6a806d4f165efd6711de1}{mlx5\_set\_port\_tc\_bw\_alloc}}(mdev, max\_bw\_share);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00301}00301         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00302}00302                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00304}00304         memcpy(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}}, max\_bw\_share,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00305}00305             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a6862ed99267551fd0762fc032486e088}{max\_bw\_share}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00306}00306 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00307}00307         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00308}00308         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00309}00309 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00310}00310 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00311}00311 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00312}\mbox{\hyperlink{mlx5__en__ethtool_8c_ac8b32c4bbcf4490a5f2a9dabfff48ec4}{00312}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ac8b32c4bbcf4490a5f2a9dabfff48ec4}{mlx5e\_get\_prio\_tc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00313}00313 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00314}00314         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00315}00315         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00316}00316         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00317}00317 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00318}00318         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00319}00319         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, ets)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00320}00320                 \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00321}00321                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00322}00322         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00324}00324         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00325}00325                 err = -\/\mbox{\hyperlink{mlx5__port_8c_ae0dd290d698ec73c31e72788ac917eec}{mlx5\_query\_port\_prio\_tc}}(mdev, i, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a49a5e91c14e78b725a505779ab043fbe}{prio\_tc}} + i);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00326}00326                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00327}00327                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00329}00329         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00330}00330         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00331}00331 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00333}00333 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00334}\mbox{\hyperlink{mlx5__en__ethtool_8c_a9768c316e9d388ee1cdaa4b3e47d5dfd}{00334}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a9768c316e9d388ee1cdaa4b3e47d5dfd}{mlx5e\_prio\_to\_tc\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00335}00335 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00336}00336         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00337}00337         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00338}00338         uint8\_t temp[\mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00339}00339         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00340}00340         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00342}00342         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00343}00343         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a49a5e91c14e78b725a505779ab043fbe}{prio\_tc}}, \mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00344}00344         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00345}00345                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00346}00346         err = SYSCTL\_IN(req, temp, \mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00347}00347         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00348}00348                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00350}00350         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00351}00351                 \textcolor{keywordflow}{if} (temp[i] > \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00352}00352                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00353}00353                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00354}00354                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00355}00355         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00357}00357         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{en_8h_a86a6351aa591c0a7fa058d6de7728dea}{MLX5E\_MAX\_PRIORITY}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00358}00358                 \textcolor{keywordflow}{if} (temp[i] == \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a49a5e91c14e78b725a505779ab043fbe}{prio\_tc}}[i])}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00359}00359                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00360}00360                 err = -\/\mbox{\hyperlink{mlx5__port_8c_a0a52893d89d21c33052292f05e2d3618}{mlx5\_set\_port\_prio\_tc}}(mdev, i, temp[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00361}00361                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00362}00362                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00363}00363                 \textcolor{comment}{/* update cached value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00364}00364                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a49a5e91c14e78b725a505779ab043fbe}{prio\_tc}}[i] = temp[i];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00365}00365         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00366}00366 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00367}00367         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00368}00368         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00369}00369 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00371}00371 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00372}\mbox{\hyperlink{en_8h_a74c15a50b0b567e0042d0bdc75eaf8c0}{00372}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a74c15a50b0b567e0042d0bdc75eaf8c0}{mlx5e\_fec\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00373}00373 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00374}00374         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00375}00375         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pplm\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00376}00376         \textcolor{keyword}{const} \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pplm\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00377}00377         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00379}00379         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, pcam\_reg))}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00380}00380                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00382}00382         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_a3e22556a526eba8cc07df7bcee127a6f}{MLX5\_CAP\_PCAM\_REG}}(mdev, pplm))}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00383}00383                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00384}00384 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00385}00385         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00387}00387         err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, in, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda7b622726c70de476b1d754ad85b2b96f}{MLX5\_REG\_PPLM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00388}00388         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00389}00389                 \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00390}00390 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00391}00391         \textcolor{comment}{/* get 10x..25x mask */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00392}00392         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[0] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00393}00393             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_10g\_40g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00394}00394         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[1] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00395}00395             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_25g) \&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00396}00396             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_50g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00397}00397         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[2] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00398}00398             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_56g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00399}00399         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[3] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00400}00400             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_100g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00401}00401 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00402}00402         \textcolor{comment}{/* get 10x..25x available bits */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00403}00403         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}[0] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00404}00404             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_10g\_40g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00405}00405         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}[1] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00406}00406             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_25g) \&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00407}00407             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_50g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00408}00408         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}[2] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00409}00409             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_56g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00410}00410         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}[3] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00411}00411             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_100g);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00413}00413         \textcolor{comment}{/* get 50x mask */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00414}00414         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[0] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00415}00415             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_50g\_1x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00416}00416         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[1] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00417}00417             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_100g\_2x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00418}00418         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[2] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00419}00419             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_200g\_4x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00420}00420         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[3] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00421}00421             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_admin\_400g\_8x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00423}00423         \textcolor{comment}{/* get 50x available bits */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00424}00424         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}[0] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00425}00425             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_50g\_1x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00426}00426         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}[1] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00427}00427             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_100g\_2x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00428}00428         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}[2] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00429}00429             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_200g\_4x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00430}00430         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}[3] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00431}00431             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_override\_cap\_400g\_8x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00433}00433         \textcolor{comment}{/* get current FEC mask */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00434}00434         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a5bd0195161e75f51b5fb70a90fc90679}{fec\_mode\_active}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00435}00435             \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pplm\_reg, in, fec\_mode\_active);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00437}00437         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00438}00438 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00440}00440 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00441}\mbox{\hyperlink{mlx5__en__ethtool_8c_a61a1366eb4582f87ad6fe19e99f1edcf}{00441}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a61a1366eb4582f87ad6fe19e99f1edcf}{mlx5e\_fec\_mask\_10x\_25x\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00442}00442 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00443}00443         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00444}00444         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00445}00445         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pplm\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00446}00446         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pplm\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00447}00447         \textcolor{keyword}{const} \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pplm\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00448}00448         u8 fec\_mask\_10x\_25x[\mbox{\hyperlink{en_8h_acef62e1beb007341fc321e98751c3c38}{MLX5E\_MAX\_FEC\_10X\_25X}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00449}00449         u8 fec\_cap\_changed = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00450}00450         u8 x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00451}00451         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00452}00452 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00453}00453         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00454}00454         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00455}00455             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00456}00456         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00457}00457                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00458}00458 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00459}00459         err = SYSCTL\_IN(req, fec\_mask\_10x\_25x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00460}00460             \textcolor{keyword}{sizeof}(fec\_mask\_10x\_25x));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00461}00461         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00462}00462                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00463}00463 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00464}00464         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, pcam\_reg)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00465}00465                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00466}00466                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00467}00467         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00469}00469         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_a3e22556a526eba8cc07df7bcee127a6f}{MLX5\_CAP\_PCAM\_REG}}(mdev, pplm)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00470}00470                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00471}00471                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00472}00472         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00473}00473 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00474}00474         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00476}00476         err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, in, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda7b622726c70de476b1d754ad85b2b96f}{MLX5\_REG\_PPLM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00477}00477         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00478}00478                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00480}00480         \textcolor{comment}{/* range check input value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00481}00481         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{en_8h_acef62e1beb007341fc321e98751c3c38}{MLX5E\_MAX\_FEC\_10X\_25X}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00482}00482                 \textcolor{comment}{/* check only one bit is set, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00483}00483                 \textcolor{keywordflow}{if} (fec\_mask\_10x\_25x[x] \& (fec\_mask\_10x\_25x[x] -\/ 1)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00484}00484                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00485}00485                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00486}00486                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00487}00487                 \textcolor{comment}{/* check a supported bit is set, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00488}00488                 \textcolor{keywordflow}{if} (fec\_mask\_10x\_25x[x] \&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00489}00489                     \string~\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}[x]) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00490}00490                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00491}00491                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00492}00492                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00493}00493                 fec\_cap\_changed |= (fec\_mask\_10x\_25x[x] \string^}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00494}00494                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[x]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00495}00495         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00497}00497         \textcolor{comment}{/* check for no changes */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00498}00498         \textcolor{keywordflow}{if} (fec\_cap\_changed == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00499}00499                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00501}00501         memset(in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00503}00503         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00504}00504 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00505}00505         \textcolor{comment}{/* set new values */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00506}00506         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_10g\_40g, fec\_mask\_10x\_25x[0]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00507}00507         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_25g, fec\_mask\_10x\_25x[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00508}00508         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_50g, fec\_mask\_10x\_25x[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00509}00509         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_56g, fec\_mask\_10x\_25x[2]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00510}00510         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_100g, fec\_mask\_10x\_25x[3]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00511}00511 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00512}00512         \textcolor{comment}{/* preserve other values */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00513}00513         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_50g\_1x, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[0]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00514}00514         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_100g\_2x, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00515}00515         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_200g\_4x, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[2]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00516}00516         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_400g\_8x, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[3]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00517}00517 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00518}00518         \textcolor{comment}{/* send new value to the firmware */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00519}00519         err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda7b622726c70de476b1d754ad85b2b96f}{MLX5\_REG\_PPLM}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00520}00520         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00521}00521                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00523}00523         memcpy(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}, fec\_mask\_10x\_25x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00524}00524             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00526}00526         \mbox{\hyperlink{driver_8h_ab3a7e9f68df8c7aaf1d9e25c13de644c}{mlx5\_toggle\_port\_link}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00527}00527 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00528}00528         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00529}00529         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00530}00530 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00532}00532 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00533}\mbox{\hyperlink{mlx5__en__ethtool_8c_acddb9f649a531abb229c0de0f5603fcf}{00533}} \mbox{\hyperlink{mlx5__en__ethtool_8c_acddb9f649a531abb229c0de0f5603fcf}{mlx5e\_fec\_avail\_10x\_25x\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00534}00534 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00535}00535         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00536}00536         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00538}00538         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00539}00539         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00540}00540             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a3ec3d6e0375eaa9dbc50d7c2f0bbce98}{fec\_avail\_10x\_25x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00541}00541         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00542}00542         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00543}00543 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00545}00545 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00546}\mbox{\hyperlink{mlx5__en__ethtool_8c_ad21cae970023cbd828b2da6132084ee9}{00546}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ad21cae970023cbd828b2da6132084ee9}{mlx5e\_fec\_mask\_50x\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00547}00547 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00548}00548         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00549}00549         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00550}00550         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pplm\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00551}00551         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pplm\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00552}00552         \textcolor{keyword}{const} \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pplm\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00553}00553         u16 fec\_mask\_50x[\mbox{\hyperlink{en_8h_acfc79cfdabfe7788f3bb10f0879bd44b}{MLX5E\_MAX\_FEC\_50X}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00554}00554         u16 fec\_cap\_changed = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00555}00555         u8 x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00556}00556         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00557}00557 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00558}00558         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00559}00559         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00560}00560             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00561}00561         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00562}00562                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00563}00563 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00564}00564         err = SYSCTL\_IN(req, fec\_mask\_50x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00565}00565             \textcolor{keyword}{sizeof}(fec\_mask\_50x));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00566}00566         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00567}00567                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00569}00569         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, pcam\_reg)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00570}00570                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00571}00571                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00572}00572         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00574}00574         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_a3e22556a526eba8cc07df7bcee127a6f}{MLX5\_CAP\_PCAM\_REG}}(mdev, pplm)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00575}00575                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00576}00576                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00577}00577         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00579}00579         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00581}00581         err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, in, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda7b622726c70de476b1d754ad85b2b96f}{MLX5\_REG\_PPLM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00582}00582         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00583}00583                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00584}00584 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00585}00585         \textcolor{comment}{/* range check input value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00586}00586         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{en_8h_acfc79cfdabfe7788f3bb10f0879bd44b}{MLX5E\_MAX\_FEC\_50X}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00587}00587                 \textcolor{comment}{/* check only one bit is set, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00588}00588                 \textcolor{keywordflow}{if} (fec\_mask\_50x[x] \& (fec\_mask\_50x[x] -\/ 1)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00589}00589                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00590}00590                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00591}00591                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00592}00592                 \textcolor{comment}{/* check a supported bit is set, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00593}00593                 \textcolor{keywordflow}{if} (fec\_mask\_50x[x] \&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00594}00594                     \string~\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}[x]) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00595}00595                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00596}00596                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00597}00597                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00598}00598                 fec\_cap\_changed |= (fec\_mask\_50x[x] \string^}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00599}00599                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}[x]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00600}00600         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00602}00602         \textcolor{comment}{/* check for no changes */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00603}00603         \textcolor{keywordflow}{if} (fec\_cap\_changed == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00604}00604                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00606}00606         memset(in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00607}00607 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00608}00608         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00610}00610         \textcolor{comment}{/* set new values */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00611}00611         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_50g\_1x, fec\_mask\_50x[0]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00612}00612         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_100g\_2x, fec\_mask\_50x[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00613}00613         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_200g\_4x, fec\_mask\_50x[2]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00614}00614         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_400g\_8x, fec\_mask\_50x[3]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00616}00616         \textcolor{comment}{/* preserve other values */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00617}00617         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_10g\_40g, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[0]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00618}00618         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_25g, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00619}00619         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_50g, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00620}00620         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_56g, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[2]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00621}00621         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pplm\_reg, in, fec\_override\_admin\_100g, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a193ebb1398e562a8758d53d43926ed93}{fec\_mask\_10x\_25x}}[3]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00622}00622 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00623}00623         \textcolor{comment}{/* send new value to the firmware */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00624}00624         err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda7b622726c70de476b1d754ad85b2b96f}{MLX5\_REG\_PPLM}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00625}00625         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00626}00626                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00628}00628         memcpy(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}, fec\_mask\_50x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00629}00629             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_ad6f869e4c98f27117ec1a0a3e02171dc}{fec\_mask\_50x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00631}00631         \mbox{\hyperlink{driver_8h_ab3a7e9f68df8c7aaf1d9e25c13de644c}{mlx5\_toggle\_port\_link}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00632}00632 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00633}00633         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00634}00634         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00635}00635 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00636}00636 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00637}00637 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00638}\mbox{\hyperlink{mlx5__en__ethtool_8c_ac8793d7cf79708f94711f8bf2f03226c}{00638}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ac8793d7cf79708f94711f8bf2f03226c}{mlx5e\_fec\_avail\_50x\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00639}00639 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00640}00640         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00641}00641         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00642}00642 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00643}00643         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00644}00644         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00645}00645             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aa5f8f0c9147d4ff4bb843885e644d60f}{fec\_avail\_50x}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00646}00646         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00647}00647         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00648}00648 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00650}00650 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00651}\mbox{\hyperlink{mlx5__en__ethtool_8c_a26ca0973263de07cd76d25e4352f5c15}{00651}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a26ca0973263de07cd76d25e4352f5c15}{mlx5e\_trust\_state\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00652}00652 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00653}00653         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00654}00654         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00655}00655         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00656}00656         u8 result;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00657}00657 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00658}00658         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00659}00659         result = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8a46c1dfd225a38139b68a1d69308674}{trust\_state}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00660}00660         err = sysctl\_handle\_8(oidp, \&result, 0, req);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00661}00661         \textcolor{keywordflow}{if} (err || !req-\/>newptr ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00662}00662             result == \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8a46c1dfd225a38139b68a1d69308674}{trust\_state}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00663}00663                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00665}00665         \textcolor{keywordflow}{switch} (result) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00666}00666         \textcolor{keywordflow}{case} \mbox{\hyperlink{port_8h_a4f09af9c41d3faeeda2e2ef76abd3eb4a70e163a5bbc7e4e6e103aae4f7b27156}{MLX5\_QPTS\_TRUST\_PCP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00667}00667         \textcolor{keywordflow}{case} \mbox{\hyperlink{port_8h_a4f09af9c41d3faeeda2e2ef76abd3eb4a6ee5d92cd5071fab7d55550e5d5bd4e0}{MLX5\_QPTS\_TRUST\_DSCP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00668}00668                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00669}00669         \textcolor{keywordflow}{case} \mbox{\hyperlink{port_8h_a4f09af9c41d3faeeda2e2ef76abd3eb4aa14dda0d9bd361fc144619bc147e0d80}{MLX5\_QPTS\_TRUST\_BOTH}}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00670}00670                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_a194a41519307bea133540d3ed9d140d0}{MLX5\_CAP\_QCAM\_FEATURE}}(mdev, qpts\_trust\_both)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00671}00671                         err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00672}00672                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00673}00673                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00674}00674                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00675}00675         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00676}00676                 err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00677}00677                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00678}00678         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00679}00679 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00680}00680         err = -\/\mbox{\hyperlink{mlx5__port_8c_a7c22c110dca7d84adcdaade920784192}{mlx5\_set\_trust\_state}}(mdev, result);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00681}00681         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00682}00682                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00683}00683 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00684}00684         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8a46c1dfd225a38139b68a1d69308674}{trust\_state}} = result;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00686}00686         \textcolor{comment}{/* update inline mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00687}00687         \mbox{\hyperlink{en_8h_a82576754aaba9305ce5af957034e83bf}{mlx5e\_refresh\_sq\_inline}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00688}00688 \textcolor{preprocessor}{\#ifdef RATELIMIT}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00689}00689         \mbox{\hyperlink{en__rl_8h_a65aa7ae6a73ae260f46234f6de97e2ab}{mlx5e\_rl\_refresh\_sq\_inline}}(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ad17b237a153f50dbdfcfd493c20974f7}{rl}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00690}00690 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00691}00691 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00692}00692         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00693}00693         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00694}00694 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00696}00696 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00697}\mbox{\hyperlink{mlx5__en__ethtool_8c_abc3a789f99d4142d8220a0cf8dbeb4f9}{00697}} \mbox{\hyperlink{mlx5__en__ethtool_8c_abc3a789f99d4142d8220a0cf8dbeb4f9}{mlx5e\_dscp\_prio\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00698}00698 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00699}00699         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00700}00700         \textcolor{keywordtype}{int} prio\_index = arg2;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00701}00701         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00702}00702         uint8\_t dscp2prio[\mbox{\hyperlink{port_8h_a9d7d601613ffc05172f7291dad601a60}{MLX5\_MAX\_SUPPORTED\_DSCP}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00703}00703         uint8\_t x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00704}00704         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00706}00706         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00707}00707         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}} + prio\_index,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00708}00708             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}}) / 8);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00709}00709         \textcolor{keywordflow}{if} (err || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00710}00710                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00712}00712         memcpy(dscp2prio, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}}, \textcolor{keyword}{sizeof}(dscp2prio));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00713}00713         err = SYSCTL\_IN(req, dscp2prio + prio\_index, \textcolor{keyword}{sizeof}(dscp2prio) / 8);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00714}00714         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00715}00715                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00716}00716         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{port_8h_a9d7d601613ffc05172f7291dad601a60}{MLX5\_MAX\_SUPPORTED\_DSCP}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00717}00717                 \textcolor{keywordflow}{if} (dscp2prio[x] > 7) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00718}00718                         err = ERANGE;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00719}00719                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00720}00720                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00721}00721         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00722}00722         err = -\/\mbox{\hyperlink{mlx5__port_8c_a97c245e50598b16dcb43cb32cbc37423}{mlx5\_set\_dscp2prio}}(mdev, dscp2prio);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00723}00723         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00724}00724                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00725}00725 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00726}00726         \textcolor{comment}{/* update local array */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00727}00727         memcpy(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}}, dscp2prio,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00728}00728             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_aaa31a72e1c9bad25a4fcf7e3e566e738}{dscp2prio}}));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00729}00729 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00730}00730         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00731}00731         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00732}00732 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00734}00734 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00735}\mbox{\hyperlink{en_8h_a361585a8af7d3bf658bc6fe1df6b05ee}{00735}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a361585a8af7d3bf658bc6fe1df6b05ee}{mlx5e\_update\_buf\_lossy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00736}00736 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00737}00737         \textcolor{keyword}{struct }\mbox{\hyperlink{structieee__pfc}{ieee\_pfc}} pfc;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00738}00738 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00739}00739         \mbox{\hyperlink{en_8h_a4c6853b22d3ef62d471108c564615973}{PRIV\_ASSERT\_LOCKED}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00740}00740         bzero(\&pfc, \textcolor{keyword}{sizeof}(pfc));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00741}00741         pfc.\mbox{\hyperlink{structieee__pfc_aab707175d4a1009369b33ed73165d5aa}{pfc\_en}} = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa064cdabd465e046026fb82a4b01ad8f}{rx\_priority\_flow\_control}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00742}00742         \textcolor{keywordflow}{return} (-\/\mbox{\hyperlink{mlx5__en__port__buffer_8c_a75561486cd5e67b1a07ea559224ffd52}{mlx5e\_port\_manual\_buffer\_config}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, \mbox{\hyperlink{port__buffer_8h_a1e06e534e565b0e44afdf96c77951725a8f3ed43d92e14ead43fdfac429a0601e}{MLX5E\_PORT\_BUFFER\_PFC}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00743}00743             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_mtu, \&pfc, NULL, NULL));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00744}00744 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00746}00746 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00747}\mbox{\hyperlink{mlx5__en__ethtool_8c_a030aa6f693825ee850af6bc0f5dff512}{00747}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a030aa6f693825ee850af6bc0f5dff512}{mlx5e\_buf\_size\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00748}00748 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00749}00749         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00750}00750         u32 buf\_size[\mbox{\hyperlink{port__buffer_8h_ad37bc7d5900a4786ae13ec02d013f7c5}{MLX5E\_MAX\_BUFFER}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00751}00751         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__port__buffer}{mlx5e\_port\_buffer}} port\_buffer;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00752}00752         \textcolor{keywordtype}{int} error, i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00754}00754         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00755}00755         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00756}00756         error = -\/\mbox{\hyperlink{mlx5__en__port__buffer_8c_a1281dfc1f0829aa9ca4f7fd6ca79fc5c}{mlx5e\_port\_query\_buffer}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, \&port\_buffer);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00757}00757         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00758}00758                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00759}00759         \textcolor{keywordflow}{for} (i = 0; i < nitems(buf\_size); i++)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00760}00760                 buf\_size[i] = port\_buffer.\mbox{\hyperlink{structmlx5e__port__buffer_a126fc00edefacc8c49d326f52f8c26ea}{buffer}}[i].\mbox{\hyperlink{structmlx5e__bufferx__reg_a1fa9658fd6edaf696b4bc8e8046f497b}{size}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00761}00761         error = SYSCTL\_OUT(req, buf\_size, \textcolor{keyword}{sizeof}(buf\_size));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00762}00762         \textcolor{keywordflow}{if} (error != 0 || req-\/>newptr == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00763}00763                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00764}00764         error = SYSCTL\_IN(req, buf\_size, \textcolor{keyword}{sizeof}(buf\_size));}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00765}00765         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00766}00766                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00767}00767         error = -\/\mbox{\hyperlink{mlx5__en__port__buffer_8c_a75561486cd5e67b1a07ea559224ffd52}{mlx5e\_port\_manual\_buffer\_config}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, \mbox{\hyperlink{port__buffer_8h_a1e06e534e565b0e44afdf96c77951725a430006fb480493c80a1ca8cc7349e39d}{MLX5E\_PORT\_BUFFER\_SIZE}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00768}00768             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_mtu, NULL, buf\_size, NULL);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00769}00769 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00770}00770         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00771}00771         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00772}00772 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00774}00774 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00775}\mbox{\hyperlink{mlx5__en__ethtool_8c_a439eb6583abb15b7ade465716a6bec4f}{00775}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a439eb6583abb15b7ade465716a6bec4f}{mlx5e\_buf\_prio\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00776}00776 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00777}00777         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00778}00778         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00779}00779         u8 buffer[\mbox{\hyperlink{port__buffer_8h_ad37bc7d5900a4786ae13ec02d013f7c5}{MLX5E\_MAX\_BUFFER}}];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00780}00780         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00782}00782         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00783}00783         mdev = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00784}00784         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00785}00785         error = -\/\mbox{\hyperlink{mlx5__port_8c_a3deead3af97d84e34bffc1065fa4263f}{mlx5e\_port\_query\_priority2buffer}}(mdev, buffer);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00786}00786         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00787}00787                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00788}00788         error = SYSCTL\_OUT(req, buffer, \mbox{\hyperlink{port__buffer_8h_ad37bc7d5900a4786ae13ec02d013f7c5}{MLX5E\_MAX\_BUFFER}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00789}00789         \textcolor{keywordflow}{if} (error != 0 || req-\/>newptr == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00790}00790                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00791}00791         error = SYSCTL\_IN(req, buffer, \mbox{\hyperlink{port__buffer_8h_ad37bc7d5900a4786ae13ec02d013f7c5}{MLX5E\_MAX\_BUFFER}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00792}00792         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00793}00793                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00794}00794         error = -\/\mbox{\hyperlink{mlx5__en__port__buffer_8c_a75561486cd5e67b1a07ea559224ffd52}{mlx5e\_port\_manual\_buffer\_config}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00795}00795             \mbox{\hyperlink{port__buffer_8h_a1e06e534e565b0e44afdf96c77951725aaa6fa009707c495c479a56aaf55fad64}{MLX5E\_PORT\_BUFFER\_PRIO2BUFFER}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00796}00796             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_mtu, NULL, NULL, buffer);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00797}00797         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00798}00798                 error = \mbox{\hyperlink{mlx5__en__ethtool_8c_a361585a8af7d3bf658bc6fe1df6b05ee}{mlx5e\_update\_buf\_lossy}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00799}00799 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00800}00800         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00801}00801         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00802}00802 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00804}00804 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00805}\mbox{\hyperlink{mlx5__en__ethtool_8c_a8641a9dcee4ab02eaa93d491570edc97}{00805}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a8641a9dcee4ab02eaa93d491570edc97}{mlx5e\_cable\_length\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00806}00806 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00807}00807         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00808}00808         u\_int cable\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00809}00809         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00810}00810 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00811}00811         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00812}00812         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00813}00813         cable\_len = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_aabc59462469abef8ff29a709a350dbe8}{dcbx}}.\mbox{\hyperlink{structmlx5e__dcbx_acde304f3a526e2e3cb2954b2a5f8d136}{cable\_len}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00814}00814         error = sysctl\_handle\_int(oidp, \&cable\_len, 0, req);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00815}00815         \textcolor{keywordflow}{if} (error == 0 \&\& req-\/>newptr != NULL \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00816}00816             cable\_len != \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_aabc59462469abef8ff29a709a350dbe8}{dcbx}}.\mbox{\hyperlink{structmlx5e__dcbx_acde304f3a526e2e3cb2954b2a5f8d136}{cable\_len}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00817}00817                 error = -\/\mbox{\hyperlink{mlx5__en__port__buffer_8c_a75561486cd5e67b1a07ea559224ffd52}{mlx5e\_port\_manual\_buffer\_config}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00818}00818                     \mbox{\hyperlink{port__buffer_8h_a1e06e534e565b0e44afdf96c77951725a64940309ee5afc0d5d77ef719d5d6a1a}{MLX5E\_PORT\_BUFFER\_CABLE\_LEN}}, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_mtu,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00819}00819                     NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00820}00820                 \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00821}00821                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_aabc59462469abef8ff29a709a350dbe8}{dcbx}}.\mbox{\hyperlink{structmlx5e__dcbx_acde304f3a526e2e3cb2954b2a5f8d136}{cable\_len}} = cable\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00822}00822         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00823}00823         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00824}00824         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00825}00825 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00826}00826 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00827}00827 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00828}\mbox{\hyperlink{mlx5__en__ethtool_8c_a76ef479f018483a065abb804fa670594}{00828}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a76ef479f018483a065abb804fa670594}{mlx5e\_hw\_temperature\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00829}00829 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00830}00830         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00831}00831         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00833}00833         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00834}00834         err = SYSCTL\_OUT(req, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a1cdc6e256930b53fd5d18686022e4e4b}{hw\_val\_temp}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00835}00835             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a1cdc6e256930b53fd5d18686022e4e4b}{hw\_val\_temp}}[0]) *}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00836}00836             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8dc52d672b141b8c18278b2b16c90066}{hw\_num\_temp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00837}00837         \textcolor{keywordflow}{if} (err == 0 \&\& req-\/>newptr != NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00838}00838                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00839}00839         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00840}00840         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00841}00841 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00843}00843 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00844}\mbox{\hyperlink{en_8h_aee46549466d24c65fd095254d0733303}{00844}} \mbox{\hyperlink{mlx5__en__ethtool_8c_aee46549466d24c65fd095254d0733303}{mlx5e\_hw\_temperature\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00845}00845 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00846}00846         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00847}00847         u32 x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00848}00848 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00849}00849         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8dc52d672b141b8c18278b2b16c90066}{hw\_num\_temp}} == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00850}00850                 u32 out\_cap[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mtcap)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00851}00851                 \textcolor{keyword}{const} \textcolor{keywordtype}{int} sz\_cap = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(mtcap);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00852}00852                 u32 value;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00853}00853 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00854}00854                 err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, NULL, 0, out\_cap, sz\_cap,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00855}00855                     \mbox{\hyperlink{mlx5__ifc_8h_a91208fef98a8e6a0f21eddcb9c5a8b78a8c79890ed1a27164dbe884b87fba9a55}{MLX5\_ACCESS\_REG\_SUMMARY\_CTRL\_ID\_MTCAP}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00856}00856                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00857}00857                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00858}00858                 value = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mtcap, out\_cap, sensor\_count);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00859}00859                 \textcolor{keywordflow}{if} (value == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00860}00860                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00861}00861                 \textcolor{keywordflow}{if} (value > \mbox{\hyperlink{mlx5__ifc_8h_a91208fef98a8e6a0f21eddcb9c5a8b78a34a31666163096543f7f71b3dc4790bc}{MLX5\_MAX\_TEMPERATURE}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00862}00862                         value = \mbox{\hyperlink{mlx5__ifc_8h_a91208fef98a8e6a0f21eddcb9c5a8b78a34a31666163096543f7f71b3dc4790bc}{MLX5\_MAX\_TEMPERATURE}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00863}00863                 \textcolor{comment}{/* update number of temperature sensors */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00864}00864                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8dc52d672b141b8c18278b2b16c90066}{hw\_num\_temp}} = value;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00865}00865         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00867}00867         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a8dc52d672b141b8c18278b2b16c90066}{hw\_num\_temp}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00868}00868                 u32 out\_sensor[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mtmp\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00869}00869                 \textcolor{keyword}{const} \textcolor{keywordtype}{int} sz\_sensor = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(mtmp\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00870}00870 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00871}00871                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mtmp\_reg, out\_sensor, sensor\_index, x);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00872}00872 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00873}00873                 err = -\/\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, out\_sensor, sz\_sensor,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00874}00874                     out\_sensor, sz\_sensor,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00875}00875                     \mbox{\hyperlink{mlx5__ifc_8h_a91208fef98a8e6a0f21eddcb9c5a8b78ac5eff03cec930c9ccf5c1804aab2366e}{MLX5\_ACCESS\_REG\_SUMMARY\_CTRL\_ID\_MTMP}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00876}00876                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00877}00877                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00878}00878                 \textcolor{comment}{/* convert from 0.125 celsius to millicelsius */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00879}00879                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a1cdc6e256930b53fd5d18686022e4e4b}{hw\_val\_temp}}[x] =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00880}00880                     (s16)\mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mtmp\_reg, out\_sensor, temperature) * 125;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00881}00881         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00882}00882 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00883}00883         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00884}00884 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00885}00885 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00886}\mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{00886}} \textcolor{preprocessor}{\#define MLX5\_PARAM\_OFFSET(n)                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00887}00887 \textcolor{preprocessor}{    \_\_offsetof(struct mlx5e\_priv, params\_ethtool.n)}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00888}00888 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00889}00889 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00890}\mbox{\hyperlink{mlx5__en__ethtool_8c_aea37d0cfeb7cc725436b9f1003661b73}{00890}} \mbox{\hyperlink{mlx5__en__ethtool_8c_aea37d0cfeb7cc725436b9f1003661b73}{mlx5e\_ethtool\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00891}00891 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00892}00892         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00893}00893         uint64\_t value;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00894}00894         \textcolor{keywordtype}{int} mode\_modify;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00895}00895         \textcolor{keywordtype}{int} was\_opened;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00896}00896         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00898}00898         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00899}00899         value = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_adc8f4624e5b0b0b95b6d80fc9c1f6fae}{arg}}[arg2];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00900}00900         \textcolor{keywordflow}{if} (req != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00901}00901                 error = sysctl\_handle\_64(oidp, \&value, 0, req);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00902}00902                 \textcolor{keywordflow}{if} (error || req-\/>newptr == NULL ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00903}00903                     value == \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_adc8f4624e5b0b0b95b6d80fc9c1f6fae}{arg}}[arg2])}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00904}00904                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00905}00905 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00906}00906                 \textcolor{comment}{/* assign new value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00907}00907                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_adc8f4624e5b0b0b95b6d80fc9c1f6fae}{arg}}[arg2] = value;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00908}00908         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00909}00909                 error = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00910}00910         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00911}00911         \textcolor{comment}{/* check if device is gone */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00912}00912         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a4795b5a0fa2d0a63a36e40c448f9f50b}{gone}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00913}00913                 error = ENXIO;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00914}00914                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00915}00915         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00916}00916         was\_opened = test\_bit(\mbox{\hyperlink{en_8h_a39b4e25c4e8f5fed29720be17a532fa8aec33f2064af07bad472151247b8ad9f9}{MLX5E\_STATE\_OPENED}}, \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ac8a64ac65b617b8f5fc8a6c90b095797}{state}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00917}00917         mode\_modify = \mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, cq\_period\_mode\_modify);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00919}00919         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(arg[arg2])) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00920}00920         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(rx\_coalesce\_usecs):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00921}00921                 \textcolor{comment}{/* import RX coal time */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00922}00922                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00923}00923                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00924}00924                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00925}00925                     \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_period)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00926}00926                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00927}00927                             \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_period);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00928}00928                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00929}00929                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a056f68acd74d63d5fef34195748043e4}{rx\_cq\_moderation\_usec}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00930}00930                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00932}00932                 \textcolor{comment}{/* check to avoid down and up the network interface */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00933}00933                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00934}00934                         error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00935}00935                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00936}00936 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00937}00937         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(rx\_coalesce\_pkts):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00938}00938                 \textcolor{comment}{/* import RX coal pkts */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00939}00939                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00940}00940                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00941}00941                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00942}00942                     \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_max\_count)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00943}00943                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00944}00944                             \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_max\_count);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00945}00945                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00946}00946                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a1328f069cf9a4feadc284cdc779cc733}{rx\_cq\_moderation\_pkts}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00947}00947                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00948}00948 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00949}00949                 \textcolor{comment}{/* check to avoid down and up the network interface */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00950}00950                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00951}00951                         error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00952}00952                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00953}00953 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00954}00954         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(tx\_coalesce\_usecs):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00955}00955                 \textcolor{comment}{/* import TX coal time */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00956}00956                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00957}00957                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00958}00958                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00959}00959                     \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_period)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00960}00960                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00961}00961                             \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_period);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00962}00962                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00963}00963                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a6fd8c908eee433ab1844a32e1d7f011c}{tx\_cq\_moderation\_usec}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00964}00964                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00966}00966                 \textcolor{comment}{/* check to avoid down and up the network interface */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00967}00967                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00968}00968                         error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00969}00969                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00971}00971         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(tx\_coalesce\_pkts):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00972}00972                 \textcolor{comment}{/* import TX coal pkts */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00973}00973                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00974}00974                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00975}00975                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00976}00976                     \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_max\_count)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00977}00977                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00978}00978                             \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_max\_count);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00979}00979                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00980}00980                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a4d456927e29dc7a2628f01730fae8d4d}{tx\_cq\_moderation\_pkts}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00981}00981                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00982}00982 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00983}00983                 \textcolor{comment}{/* check to avoid down and up the network interface */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00984}00984                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00985}00985                         error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00986}00986                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00987}00987 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00988}00988         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(tx\_queue\_size):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00989}00989                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00990}00990                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00991}00991                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00992}00992 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00993}00993                 \textcolor{comment}{/* import TX queue size */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00994}00994                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size <}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00995}00995                     (1 << \mbox{\hyperlink{en_8h_a22235c41ecfc559d4d1a40f39a2f3754}{MLX5E\_PARAMS\_MINIMUM\_LOG\_SQ\_SIZE}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00996}00996                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00997}00997                             (1 << \mbox{\hyperlink{en_8h_a22235c41ecfc559d4d1a40f39a2f3754}{MLX5E\_PARAMS\_MINIMUM\_LOG\_SQ\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00998}00998                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l00999}00999                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size\_max) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01000}01000                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01001}01001                             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size\_max;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01002}01002                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01003}01003                 \textcolor{comment}{/* store actual TX queue size */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01004}01004                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_ab8aafaea26efc93829bac5f899717442}{log\_sq\_size}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01005}01005                     order\_base\_2(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01006}01006                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01007}01007                     1 << \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_ab8aafaea26efc93829bac5f899717442}{log\_sq\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01008}01008 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01009}01009                 \textcolor{comment}{/* verify TX completion factor */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01010}01010                 \mbox{\hyperlink{mlx5__en__ethtool_8c_aa4b64cbc68788c297770d7857caf1df5}{mlx5e\_ethtool\_sync\_tx\_completion\_fact}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01012}01012                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01013}01013                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01014}01014                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01015}01015                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01017}01017         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(rx\_queue\_size):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01018}01018                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01019}01019                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01020}01020                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01022}01022                 \textcolor{comment}{/* import RX queue size */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01023}01023                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size <}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01024}01024                     (1 << \mbox{\hyperlink{en_8h_a4fe8bba5401154ddd40b7901d08cdd42}{MLX5E\_PARAMS\_MINIMUM\_LOG\_RQ\_SIZE}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01025}01025                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01026}01026                             (1 << \mbox{\hyperlink{en_8h_a4fe8bba5401154ddd40b7901d08cdd42}{MLX5E\_PARAMS\_MINIMUM\_LOG\_RQ\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01027}01027                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01028}01028                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size\_max) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01029}01029                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01030}01030                             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size\_max;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01031}01031                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01032}01032                 \textcolor{comment}{/* store actual RX queue size */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01033}01033                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa16e0c879f0d1cd513e51e150124b72d}{log\_rq\_size}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01034}01034                     order\_base\_2(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01035}01035                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01036}01036                     1 << \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa16e0c879f0d1cd513e51e150124b72d}{log\_rq\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01037}01037 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01038}01038                 \textcolor{comment}{/* update least number of RX WQEs */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01039}01039                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_af024e7d9d56da2679d9a67a3747b9279}{min\_rx\_wqes}} = min(}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01040}01040                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size -\/ 1,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01041}01041                     \mbox{\hyperlink{en_8h_afd5b07d67584cb7c287f6b529889b474}{MLX5E\_PARAMS\_DEFAULT\_MIN\_RX\_WQES}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01043}01043                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01044}01044                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01045}01045                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01046}01046                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01047}01047 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01048}01048         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(channels\_rsss):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01049}01049                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01050}01050                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01051}01051                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01052}01052 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01053}01053                 \textcolor{comment}{/* import number of channels */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01054}01054                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01055}01055                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01056}01056                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss > 128)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01057}01057                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss = 128;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01059}01059                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aab9a785a3a34a28b13e0aa906dcd1de9}{channels\_rsss}} = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01060}01060 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01061}01061                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01062}01062                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01063}01063                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01064}01064                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01065}01065 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01066}01066         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(channels):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01067}01067                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01068}01068                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01069}01069                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01070}01070 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01071}01071                 \textcolor{comment}{/* import number of channels */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01072}01072                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels < 1)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01073}01073                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01074}01074                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels >}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01075}01075                     (u64) \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a964673598512783a751c61e61e82f365}{eq\_table}}.\mbox{\hyperlink{structmlx5__eq__table_a830abb074ed5cb9dc35589a88a9a7b8f}{num\_comp\_vectors}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01076}01076                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01077}01077                             (u64) \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a964673598512783a751c61e61e82f365}{eq\_table}}.\mbox{\hyperlink{structmlx5__eq__table_a830abb074ed5cb9dc35589a88a9a7b8f}{num\_comp\_vectors}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01078}01078                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01079}01079                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a1685215dbf54ebe54fe976013ec6644a}{num\_channels}} = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01081}01081                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01082}01082                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01083}01083                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01084}01084                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01085}01085 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01086}01086         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(rx\_coalesce\_mode):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01087}01087                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01088}01088                 \textcolor{keywordflow}{if} (was\_opened != 0 \&\& mode\_modify == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01089}01089                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01090}01090 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01091}01091                 \textcolor{comment}{/* import RX coalesce mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01092}01092                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_mode > 3)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01093}01093                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_mode = 3;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01094}01094                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_af020d09ecf766e907d6d3e122d7ba865}{rx\_cq\_moderation\_mode}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01095}01095                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_mode;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01097}01097                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01098}01098                 \textcolor{keywordflow}{if} (was\_opened != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01099}01099                         \textcolor{keywordflow}{if} (mode\_modify == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01100}01100                                 \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01101}01101                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01102}01102                                 error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01103}01103                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01104}01104                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01105}01105 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01106}01106         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(tx\_coalesce\_mode):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01107}01107                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01108}01108                 \textcolor{keywordflow}{if} (was\_opened != 0 \&\& mode\_modify == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01109}01109                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01110}01110 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01111}01111                 \textcolor{comment}{/* import TX coalesce mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01112}01112                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_mode != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01113}01113                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_mode = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01114}01114                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_ad833f0d4fc4e278cd5bfa0888a3afb6d}{tx\_cq\_moderation\_mode}} =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01115}01115                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_mode;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01117}01117                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01118}01118                 \textcolor{keywordflow}{if} (was\_opened != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01119}01119                         \textcolor{keywordflow}{if} (mode\_modify == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01120}01120                                 \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01121}01121                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01122}01122                                 error = \mbox{\hyperlink{en_8h_a63277a0576b81cf18f500ab17a6549ee}{mlx5e\_refresh\_channel\_params}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01123}01123                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01124}01124                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01126}01126         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(hw\_lro):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01127}01127                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01128}01128                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01129}01129                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01130}01130 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01131}01131                 \textcolor{comment}{/* import HW LRO mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01132}01132                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_lro != 0 \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01133}01133                     \mbox{\hyperlink{device_8h_acbb8e62a681f9f153484fc18bbfa0cfe}{MLX5\_CAP\_ETH}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, lro\_cap)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01134}01134                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_lro = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01135}01135                         \textcolor{comment}{/* check if feature should actually be enabled */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01136}01136                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}}-\/>if\_capenable \& IFCAP\_LRO) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01137}01137                                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a38dfd7126e601a9dba0ec254cde85133}{hw\_lro\_en}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01138}01138                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01139}01139                                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a38dfd7126e601a9dba0ec254cde85133}{hw\_lro\_en}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01140}01140 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01141}01141                                 \mbox{\hyperlink{en_8h_ac4fc5b81462d19aaea59dcdff61be0c3}{mlx5\_en\_warn}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}}, \textcolor{stringliteral}{"{}To enable HW LRO "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01142}01142                                     \textcolor{stringliteral}{"{}please also enable LRO via ifconfig(8).\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01143}01143                         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01144}01144                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01145}01145                         \textcolor{comment}{/* return an error if HW does not support this feature */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01146}01146                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_lro != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01147}01147                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01148}01148                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a38dfd7126e601a9dba0ec254cde85133}{hw\_lro\_en}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01149}01149                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_lro = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01150}01150                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01151}01151                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01152}01152                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01153}01153                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01154}01154                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01155}01155 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01156}01156         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(cqe\_zipping):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01157}01157                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01158}01158                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01159}01159                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01160}01160 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01161}01161                 \textcolor{comment}{/* import CQE zipping mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01162}01162                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.cqe\_zipping \&\&}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01163}01163                     \mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, cqe\_compression)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01164}01164                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa2f2e0b47a30ab74578060a216e1eba0}{cqe\_zipping\_en}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01165}01165                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.cqe\_zipping = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01166}01166                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01167}01167                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa2f2e0b47a30ab74578060a216e1eba0}{cqe\_zipping\_en}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01168}01168                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.cqe\_zipping = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01169}01169                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01170}01170                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01171}01171                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01172}01172                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01173}01173                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01174}01174 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01175}01175         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(tx\_completion\_fact):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01176}01176                 \textcolor{comment}{/* network interface must be down */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01177}01177                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01178}01178                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01180}01180                 \textcolor{comment}{/* verify parameter */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01181}01181                 \mbox{\hyperlink{mlx5__en__ethtool_8c_aa4b64cbc68788c297770d7857caf1df5}{mlx5e\_ethtool\_sync\_tx\_completion\_fact}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01182}01182 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01183}01183                 \textcolor{comment}{/* restart network interface, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01184}01184                 \textcolor{keywordflow}{if} (was\_opened)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01185}01185                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01186}01186                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01188}01188         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(modify\_tx\_dma):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01189}01189                 \textcolor{comment}{/* check if network interface is opened */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01190}01190                 \textcolor{keywordflow}{if} (was\_opened) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01191}01191                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_tx\_dma =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01192}01192                             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_tx\_dma ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01193}01193                         \textcolor{comment}{/* modify tx according to value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01194}01194                         \mbox{\hyperlink{en_8h_a0dd1382243655875a9aadcc8dbe4baa5}{mlx5e\_modify\_tx\_dma}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, value != 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01195}01195                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01196}01196                         \textcolor{comment}{/* if closed force enable tx */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01197}01197                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_tx\_dma = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01198}01198                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01199}01199                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01200}01200 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01201}01201         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(modify\_rx\_dma):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01202}01202                 \textcolor{comment}{/* check if network interface is opened */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01203}01203                 \textcolor{keywordflow}{if} (was\_opened) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01204}01204                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_rx\_dma =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01205}01205                             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_rx\_dma ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01206}01206                         \textcolor{comment}{/* modify rx according to value */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01207}01207                         \mbox{\hyperlink{en_8h_ad727f96a83eb1f91b09f14134e7fa5ee}{mlx5e\_modify\_rx\_dma}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, value != 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01208}01208                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01209}01209                         \textcolor{comment}{/* if closed force enable rx */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01210}01210                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.modify\_rx\_dma = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01211}01211                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01212}01212                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01213}01213 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01214}01214         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(diag\_pci\_enable):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01215}01215                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_pci\_enable =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01216}01216                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_pci\_enable ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01217}01217 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01218}01218                 error = -\/\mbox{\hyperlink{diagnostics_8h_a8119f9ce2267687f5ad06db5d26f4488}{mlx5\_core\_set\_diagnostics\_full}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01219}01219                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_pci\_enable,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01220}01220                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_general\_enable);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01221}01221                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01222}01222 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01223}01223         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(diag\_general\_enable):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01224}01224                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_general\_enable =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01225}01225                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_general\_enable ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01226}01226 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01227}01227                 error = -\/\mbox{\hyperlink{diagnostics_8h_a8119f9ce2267687f5ad06db5d26f4488}{mlx5\_core\_set\_diagnostics\_full}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01228}01228                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_pci\_enable,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01229}01229                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.diag\_general\_enable);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01230}01230                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01231}01231 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01232}01232         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(mc\_local\_lb):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01233}01233                 \textcolor{comment}{/* check if mlx5ib is managing this feature */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01234}01234                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, port\_type) != \mbox{\hyperlink{device_8h_a531c35e38ede3ea4e5ba5afb24b29493a6ace91bc7da0325275aa0cfa2ba31674}{MLX5\_CAP\_PORT\_TYPE\_ETH}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01235}01235                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01236}01236                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01237}01237                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01238}01238 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01239}01239                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.mc\_local\_lb =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01240}01240                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.mc\_local\_lb ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01241}01241 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01242}01242                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, disable\_local\_lb\_mc)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01243}01243                         error = \mbox{\hyperlink{mlx5__vport_8c_a603f4ce0ffe8e7f135af7750598f3d8c}{mlx5\_nic\_vport\_modify\_local\_lb}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01244}01244                             \mbox{\hyperlink{vport_8h_ae45294cfc836eb6f7b074732b7467716a627533e0efd77e002b526a699d218452}{MLX5\_LOCAL\_MC\_LB}}, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.mc\_local\_lb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01245}01245                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01246}01246                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01247}01247                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01248}01248                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01249}01249 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01250}01250         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(uc\_local\_lb):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01251}01251                 \textcolor{comment}{/* check if mlx5ib is managing this feature */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01252}01252                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, port\_type) != \mbox{\hyperlink{device_8h_a531c35e38ede3ea4e5ba5afb24b29493a6ace91bc7da0325275aa0cfa2ba31674}{MLX5\_CAP\_PORT\_TYPE\_ETH}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01253}01253                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01254}01254                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01255}01255                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01257}01257                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.uc\_local\_lb =}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01258}01258                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.uc\_local\_lb ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01259}01259 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01260}01260                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, disable\_local\_lb\_uc)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01261}01261                         error = \mbox{\hyperlink{mlx5__vport_8c_a603f4ce0ffe8e7f135af7750598f3d8c}{mlx5\_nic\_vport\_modify\_local\_lb}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01262}01262                             \mbox{\hyperlink{vport_8h_ae45294cfc836eb6f7b074732b7467716afec59d8a4c4ed410fc87d216fbcb99d6}{MLX5\_LOCAL\_UC\_LB}}, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.uc\_local\_lb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01263}01263                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01264}01264                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01265}01265                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01266}01266                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01267}01267 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01268}01268         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(irq\_cpu\_base):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01269}01269         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__en__ethtool_8c_a03a5313fb9b41d32338359909c2f2d79}{MLX5\_PARAM\_OFFSET}}(irq\_cpu\_stride):}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01270}01270                 \textcolor{keywordflow}{if} (was\_opened) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01271}01271                         \textcolor{comment}{/* network interface must toggled */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01272}01272                         \mbox{\hyperlink{en_8h_aa4f7066fe440ff9ab1ade9cca3358c8b}{mlx5e\_close\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01273}01273                         \mbox{\hyperlink{en_8h_a3be75273c5d3f27a027a298330898a62}{mlx5e\_open\_locked}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_afe944afbe198db0e1a84a20df94af781}{ifp}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01274}01274                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01275}01275                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01276}01276 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01277}01277         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01278}01278                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01279}01279         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01280}01280 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01281}01281         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01282}01282         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01283}01283 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01284}01284 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01285}\mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{01285}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[] = \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01286}01286         \mbox{\hyperlink{en_8h_a49235d793a38174984d528145d9b80ae}{MLX5E\_PARAMS}}(\mbox{\hyperlink{en_8h_af4656c8e301a23dbeeedaafa0d11ed58}{MLX5E\_STATS\_DESC}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01287}01287 \};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01288}01288 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01289}\mbox{\hyperlink{mlx5__en__ethtool_8c_a87ac89a9c326c04acae4fba310a1bbd8}{01289}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{mlx5__en__ethtool_8c_a87ac89a9c326c04acae4fba310a1bbd8}{mlx5e\_port\_stats\_debug\_desc}}[] = \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01290}01290         \mbox{\hyperlink{en_8h_a70cd51c23c990a9bbb6fbeb7ea360991}{MLX5E\_PORT\_STATS\_DEBUG}}(\mbox{\hyperlink{en_8h_af4656c8e301a23dbeeedaafa0d11ed58}{MLX5E\_STATS\_DESC}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01291}01291 \};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01293}01293 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01294}\mbox{\hyperlink{mlx5__en__ethtool_8c_a55c2a18040a1164d6b0bb9a19e07932f}{01294}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a55c2a18040a1164d6b0bb9a19e07932f}{mlx5e\_ethtool\_debug\_channel\_info}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01295}01295 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01296}01296         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01297}01297         \textcolor{keyword}{struct }sbuf sb;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01298}01298         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__channel}{mlx5e\_channel}} *c;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01299}01299         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__sq}{mlx5e\_sq}} *\mbox{\hyperlink{en_8h_a64e9e48395dc8b3b44c1edd328af2aac}{sq}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01300}01300         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__rq}{mlx5e\_rq}} *\mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01301}01301         \textcolor{keywordtype}{int} error, i, \mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01302}01302         \textcolor{keywordtype}{bool} opened;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01303}01303 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01304}01304         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01305}01305         error = sysctl\_wire\_old\_buffer(req, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01306}01306         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01307}01307                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01308}01308         \textcolor{keywordflow}{if} (sbuf\_new\_for\_sysctl(\&sb, NULL, 1024, req) == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01309}01309                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01310}01310         sbuf\_clear\_flags(\&sb, SBUF\_INCLUDENUL);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01311}01311 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01312}01312         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01313}01313         opened = test\_bit(\mbox{\hyperlink{en_8h_a39b4e25c4e8f5fed29720be17a532fa8aec33f2064af07bad472151247b8ad9f9}{MLX5E\_STATE\_OPENED}}, \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ac8a64ac65b617b8f5fc8a6c90b095797}{state}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01314}01314 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01315}01315         sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}pages irq \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01316}01316             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a8be22ab92b25f4d7ce05c1a21cba2643}{msix\_arr}}[\mbox{\hyperlink{driver_8h_a1b70d876770ccff427513794d6b0b2a7a5132dfb8a6e64941b79a6e35bec79292}{MLX5\_EQ\_VEC\_PAGES}}].vector);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01317}01317         sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}command irq \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01318}01318             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a8be22ab92b25f4d7ce05c1a21cba2643}{msix\_arr}}[\mbox{\hyperlink{driver_8h_a1b70d876770ccff427513794d6b0b2a7ab4d7fd9751e66c0f7b7ac96d39a0bcc4}{MLX5\_EQ\_VEC\_CMD}}].vector);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01319}01319         sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}async irq \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01320}01320             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a8be22ab92b25f4d7ce05c1a21cba2643}{msix\_arr}}[\mbox{\hyperlink{driver_8h_a1b70d876770ccff427513794d6b0b2a7a659698518ea7509e6e5832897aff21ca}{MLX5\_EQ\_VEC\_ASYNC}}].vector);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01321}01321 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01322}01322         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a1685215dbf54ebe54fe976013ec6644a}{num\_channels}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01323}01323                 \textcolor{keywordtype}{int} eqn\_not\_used = -\/1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01324}01324                 \textcolor{keywordtype}{int} irqn = \mbox{\hyperlink{driver_8h_a1b70d876770ccff427513794d6b0b2a7a097a3a0769380c7eb5dc37607e2464a2}{MLX5\_EQ\_VEC\_COMP\_BASE}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01325}01325 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01326}01326                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{driver_8h_aeaccd90e6d73c5463f84985214248baa}{mlx5\_vector2eqn}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, i, \&eqn\_not\_used, \&irqn) != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01327}01327                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01328}01328 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01329}01329                 c = opened ? \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a9f8b97cbaf574081e1c05b8a0001c92b}{channel}}[i] : NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01330}01330                 \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}} = opened ? \&c-\/>\mbox{\hyperlink{structmlx5e__channel_a05bacb267de436fdfa6fa3148b61cb08}{rq}} : NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01331}01331                 sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}channel \%d rq \%d cq \%d irq \%d\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01332}01332                     opened ? \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_ab4354012d0bb9cce73163f8e970aca21}{rqn}} : -\/1,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01333}01333                     opened ? \mbox{\hyperlink{en_8h_a34505eb7805ba3ccf9969192542b52ad}{rq}}-\/>\mbox{\hyperlink{structmlx5e__rq_a7a4768d6d167831e23f888181960237f}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}} : -\/1,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01334}01334                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a8be22ab92b25f4d7ce05c1a21cba2643}{msix\_arr}}[irqn].vector);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01336}01336                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}} = 0; \mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}} != \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a19e25fc2c071c79efa74623600132fd3}{num\_tc}}; \mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}}++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01337}01337                         \mbox{\hyperlink{en_8h_a64e9e48395dc8b3b44c1edd328af2aac}{sq}} = opened ? \&c-\/>\mbox{\hyperlink{structmlx5e__channel_a712caf49d48ce64044ab951fa53a036a}{sq}}[\mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}}] : NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01338}01338                         sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}channel \%d tc \%d sq \%d cq \%d irq \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01339}01339                             i, \mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01340}01340                             opened ? \mbox{\hyperlink{en_8h_a64e9e48395dc8b3b44c1edd328af2aac}{sq}}-\/>\mbox{\hyperlink{structmlx5e__sq_ae65e9f03d02b152e7f24b1ae80917ac0}{sqn}} : -\/1,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01341}01341                             opened ? \mbox{\hyperlink{en_8h_a64e9e48395dc8b3b44c1edd328af2aac}{sq}}-\/>\mbox{\hyperlink{structmlx5e__sq_af0fd03756e5c60d867c60bd7a12ed871}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}} : -\/1,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01342}01342                             \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a8be22ab92b25f4d7ce05c1a21cba2643}{msix\_arr}}[irqn].vector);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01343}01343                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01344}01344         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01345}01345         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01346}01346         error = sbuf\_finish(\&sb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01347}01347         sbuf\_delete(\&sb);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01348}01348         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01349}01349 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01350}01350 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01351}01351 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01352}\mbox{\hyperlink{mlx5__en__ethtool_8c_af1f2cc3d3d839027dc4e42b6c512f882}{01352}} \mbox{\hyperlink{mlx5__en__ethtool_8c_af1f2cc3d3d839027dc4e42b6c512f882}{mlx5e\_ethtool\_debug\_stats}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01353}01353 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01354}01354         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}} = arg1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01355}01355         \textcolor{keywordtype}{int} sys\_debug;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01356}01356         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01357}01357 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01358}01358         \mbox{\hyperlink{en_8h_a620151530f515c0208ad0bfe37cfc130}{PRIV\_LOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01359}01359         \textcolor{keywordflow}{if} (\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a4795b5a0fa2d0a63a36e40c448f9f50b}{gone}} != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01360}01360                 error = ENODEV;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01361}01361                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01362}01362         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01363}01363         sys\_debug = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a4be8add6eeb3b85c315b7c3f16e9ba14}{sysctl\_debug}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01364}01364         error = sysctl\_handle\_int(oidp, \&sys\_debug, 0, req);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01365}01365         \textcolor{keywordflow}{if} (error != 0 || !req-\/>newptr)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01366}01366                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01367}01367         sys\_debug = sys\_debug ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01368}01368         \textcolor{keywordflow}{if} (sys\_debug == \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a4be8add6eeb3b85c315b7c3f16e9ba14}{sysctl\_debug}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01369}01369                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01370}01370 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01371}01371         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a4be8add6eeb3b85c315b7c3f16e9ba14}{sysctl\_debug}} = sys\_debug)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01372}01372                 \mbox{\hyperlink{mlx5__en__ethtool_8c_ae864d5b892a4f0d1e04baec683018568}{mlx5e\_create\_stats}}(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a6eca4ff57f12b570ef075fbe9a0e3651}{stats}}.\mbox{\hyperlink{structmlx5e__stats_a7f2dbb4c146fadb24dfd26f2831dba83}{port\_stats\_debug}}.\mbox{\hyperlink{structmlx5e__port__stats__debug_a278106e34849b523eb325271abac72fd}{ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01373}01373                     SYSCTL\_CHILDREN(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ae61717d6358ea9565ea0dcc3ef683d67}{sysctl\_ifnet}}), \textcolor{stringliteral}{"{}debug\_stats"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01374}01374                     \mbox{\hyperlink{mlx5__en__ethtool_8c_a87ac89a9c326c04acae4fba310a1bbd8}{mlx5e\_port\_stats\_debug\_desc}}, \mbox{\hyperlink{en_8h_a3a0083cc202f2821c744a3bb26bfd0aa}{MLX5E\_PORT\_STATS\_DEBUG\_NUM}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01375}01375                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a6eca4ff57f12b570ef075fbe9a0e3651}{stats}}.\mbox{\hyperlink{structmlx5e__stats_a7f2dbb4c146fadb24dfd26f2831dba83}{port\_stats\_debug}}.\mbox{\hyperlink{structmlx5e__port__stats__debug_a2e4d234e8eb5b107efaa95e2d6de2564}{arg}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01376}01376                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a6eca4ff57f12b570ef075fbe9a0e3651}{stats}}.\mbox{\hyperlink{structmlx5e__stats_a7f2dbb4c146fadb24dfd26f2831dba83}{port\_stats\_debug}}.\mbox{\hyperlink{structmlx5e__port__stats__debug_a278106e34849b523eb325271abac72fd}{ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01377}01377                     SYSCTL\_CHILDREN(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ae61717d6358ea9565ea0dcc3ef683d67}{sysctl\_ifnet}}), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01378}01378                     \textcolor{stringliteral}{"{}hw\_ctx\_debug"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01379}01379                     CTLFLAG\_RD | CTLFLAG\_MPSAFE | CTLTYPE\_STRING, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01380}01380                     \mbox{\hyperlink{mlx5__en__ethtool_8c_a55c2a18040a1164d6b0bb9a19e07932f}{mlx5e\_ethtool\_debug\_channel\_info}}, \textcolor{stringliteral}{"{}S"{}}, \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01381}01381         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01382}01382                 sysctl\_ctx\_free(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a6eca4ff57f12b570ef075fbe9a0e3651}{stats}}.\mbox{\hyperlink{structmlx5e__stats_a7f2dbb4c146fadb24dfd26f2831dba83}{port\_stats\_debug}}.\mbox{\hyperlink{structmlx5e__port__stats__debug_a278106e34849b523eb325271abac72fd}{ctx}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01383}01383         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01384}01384 done:}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01385}01385         \mbox{\hyperlink{en_8h_addaf2f16168bbed718b7be9e5cd27b4c}{PRIV\_UNLOCK}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01386}01386         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01387}01387 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01388}01388 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01389}01389 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01390}\mbox{\hyperlink{mlx5__en__ethtool_8c_a8964328a37f9bab2eea5f58a6b8c43f8}{01390}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a8964328a37f9bab2eea5f58a6b8c43f8}{mlx5e\_create\_diagnostics}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01391}01391 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01392}01392         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__diagnostics__entry}{mlx5\_core\_diagnostics\_entry}} entry;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01393}01393         \textcolor{keyword}{struct }sysctl\_ctx\_list *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01394}01394         \textcolor{keyword}{struct }sysctl\_oid *node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01395}01395         \textcolor{keywordtype}{int} x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01396}01396 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01397}01397         \textcolor{comment}{/* sysctl context we are using */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01398}01398         \mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}} = \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01399}01399 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01400}01400         \textcolor{comment}{/* create root node */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01401}01401         node = SYSCTL\_ADD\_NODE(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01402}01402             SYSCTL\_CHILDREN(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ae61717d6358ea9565ea0dcc3ef683d67}{sysctl\_ifnet}}), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01403}01403             \textcolor{stringliteral}{"{}diagnostics"{}}, CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Diagnostics"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01404}01404         \textcolor{keywordflow}{if} (node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01405}01405                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01406}01406 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01407}01407         \textcolor{comment}{/* create PCI diagnostics */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01408}01408         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{diagnostics_8h_a78075f2194bf8c27dfe1630c064866cd}{MLX5\_CORE\_PCI\_DIAGNOSTICS\_NUM}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01409}01409                 entry = \mbox{\hyperlink{diagnostics_8h_abc401592678e18f1f00922140bacfb75}{mlx5\_core\_pci\_diagnostics\_table}}[x];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01410}01410                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{diagnostics_8h_ae08773a28ebd8a8ad883d39acb1d32a6}{mlx5\_core\_supports\_diagnostics}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, entry.\mbox{\hyperlink{structmlx5__core__diagnostics__entry_a90e81a3fc16bb67bf7d87f2013f0cdfc}{counter\_id}}) == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01411}01411                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01412}01412                 SYSCTL\_ADD\_UQUAD(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01413}01413                     entry.\mbox{\hyperlink{structmlx5__core__diagnostics__entry_a46e07f1b513eba7c9f465fd756fc49ad}{desc}}, CTLFLAG\_RD, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a140ac84e1c59648b3cfe57354167012d}{params\_pci}}.\mbox{\hyperlink{unionmlx5__core__pci__diagnostics_a253059b17b683329f7e61c72bfa1d86f}{array}} + x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01414}01414                     \textcolor{stringliteral}{"{}PCI diagnostics counter"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01415}01415         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01416}01416 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01417}01417         \textcolor{comment}{/* create general diagnostics */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01418}01418         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{diagnostics_8h_a51625de9157770f21f56084a50008198}{MLX5\_CORE\_GENERAL\_DIAGNOSTICS\_NUM}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01419}01419                 entry = \mbox{\hyperlink{diagnostics_8h_ac02a3acc52b0b521aff23f44dcbc81e3}{mlx5\_core\_general\_diagnostics\_table}}[x];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01420}01420                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{diagnostics_8h_ae08773a28ebd8a8ad883d39acb1d32a6}{mlx5\_core\_supports\_diagnostics}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, entry.\mbox{\hyperlink{structmlx5__core__diagnostics__entry_a90e81a3fc16bb67bf7d87f2013f0cdfc}{counter\_id}}) == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01421}01421                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01422}01422                 SYSCTL\_ADD\_UQUAD(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01423}01423                     entry.\mbox{\hyperlink{structmlx5__core__diagnostics__entry_a46e07f1b513eba7c9f465fd756fc49ad}{desc}}, CTLFLAG\_RD, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ac0a4b25d84dcaa318445071c4064967e}{params\_general}}.\mbox{\hyperlink{unionmlx5__core__general__diagnostics_a795959b86dca310d59fdb8d5ee94a970}{array}} + x,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01424}01424                     \textcolor{stringliteral}{"{}General diagnostics counter"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01425}01425         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01426}01426 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01427}01427 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01428}01428 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01429}\mbox{\hyperlink{en_8h_a616f5d6e058528444b01761ff3011968}{01429}} \mbox{\hyperlink{mlx5__en__ethtool_8c_ad2cb91fd8c5c51588718ad0c34fe0d91}{mlx5e\_create\_ethtool}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__priv}{mlx5e\_priv}} *\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}})}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01430}01430 \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01431}01431         \textcolor{keyword}{struct }sysctl\_oid *fec\_node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01432}01432         \textcolor{keyword}{struct }sysctl\_oid *qos\_node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01433}01433         \textcolor{keyword}{struct }sysctl\_oid *node;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01434}01434         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *pnameunit;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01435}01435         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__port__buffer}{mlx5e\_port\_buffer}} port\_buffer;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01436}01436         \textcolor{keywordtype}{unsigned} x;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01437}01437         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01438}01438 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01439}01439         \textcolor{comment}{/* set some defaults */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01440}01440         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.irq\_cpu\_base = -\/1;       \textcolor{comment}{/* disabled */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01441}01441         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.irq\_cpu\_stride = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01442}01442         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size\_max = 1 << \mbox{\hyperlink{en_8h_a206f5e85999691a42512b51f6931406c}{MLX5E\_PARAMS\_MAXIMUM\_LOG\_SQ\_SIZE}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01443}01443         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size\_max = 1 << \mbox{\hyperlink{en_8h_abeeb9d5c5385cac5a7e8007006b7d001}{MLX5E\_PARAMS\_MAXIMUM\_LOG\_RQ\_SIZE}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01444}01444         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_queue\_size = 1 << \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_ab8aafaea26efc93829bac5f899717442}{log\_sq\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01445}01445         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_queue\_size = 1 << \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa16e0c879f0d1cd513e51e150124b72d}{log\_rq\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01446}01446         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a1685215dbf54ebe54fe976013ec6644a}{num\_channels}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01447}01447         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.channels\_rsss = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aab9a785a3a34a28b13e0aa906dcd1de9}{channels\_rsss}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01448}01448         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.coalesce\_pkts\_max = \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_max\_count);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01449}01449         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.coalesce\_usecs\_max = \mbox{\hyperlink{en_8h_a43f62771030f13e91ca613bbb88677a7}{MLX5E\_FLD\_MAX}}(cqc, cq\_period);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01450}01450         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_mode = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_af020d09ecf766e907d6d3e122d7ba865}{rx\_cq\_moderation\_mode}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01451}01451         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_usecs = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a056f68acd74d63d5fef34195748043e4}{rx\_cq\_moderation\_usec}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01452}01452         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.rx\_coalesce\_pkts = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a1328f069cf9a4feadc284cdc779cc733}{rx\_cq\_moderation\_pkts}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01453}01453         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_mode = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_ad833f0d4fc4e278cd5bfa0888a3afb6d}{tx\_cq\_moderation\_mode}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01454}01454         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_usecs = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a6fd8c908eee433ab1844a32e1d7f011c}{tx\_cq\_moderation\_usec}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01455}01455         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.tx\_coalesce\_pkts = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a4d456927e29dc7a2628f01730fae8d4d}{tx\_cq\_moderation\_pkts}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01456}01456         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.hw\_lro = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_a38dfd7126e601a9dba0ec254cde85133}{hw\_lro\_en}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01457}01457         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.cqe\_zipping = \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a082db7e920f50827afe0cf93857b5043}{params}}.\mbox{\hyperlink{structmlx5e__params_aa2f2e0b47a30ab74578060a216e1eba0}{cqe\_zipping\_en}};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01458}01458         \mbox{\hyperlink{mlx5__en__ethtool_8c_aa4b64cbc68788c297770d7857caf1df5}{mlx5e\_ethtool\_sync\_tx\_completion\_fact}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01460}01460         \textcolor{comment}{/* get default values for local loopback, if any */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01461}01461         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, disable\_local\_lb\_mc) ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01462}01462             \mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, disable\_local\_lb\_uc)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01463}01463                 \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01464}01464                 u8 val;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01465}01465 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01466}01466                 err = \mbox{\hyperlink{mlx5__vport_8c_acd6db224dd82f5178ad4b6cbf653bc2d}{mlx5\_nic\_vport\_query\_local\_lb}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, \mbox{\hyperlink{vport_8h_ae45294cfc836eb6f7b074732b7467716a627533e0efd77e002b526a699d218452}{MLX5\_LOCAL\_MC\_LB}}, \&val);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01467}01467                 \textcolor{keywordflow}{if} (err == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01468}01468                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.mc\_local\_lb = val;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01469}01469 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01470}01470                 err = \mbox{\hyperlink{mlx5__vport_8c_acd6db224dd82f5178ad4b6cbf653bc2d}{mlx5\_nic\_vport\_query\_local\_lb}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, \mbox{\hyperlink{vport_8h_ae45294cfc836eb6f7b074732b7467716afec59d8a4c4ed410fc87d216fbcb99d6}{MLX5\_LOCAL\_UC\_LB}}, \&val);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01471}01471                 \textcolor{keywordflow}{if} (err == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01472}01472                         \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.uc\_local\_lb = val;}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01473}01473         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01474}01474 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01475}01475         \textcolor{comment}{/* create root node */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01476}01476         node = SYSCTL\_ADD\_NODE(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01477}01477             SYSCTL\_CHILDREN(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ae61717d6358ea9565ea0dcc3ef683d67}{sysctl\_ifnet}}), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01478}01478             \textcolor{stringliteral}{"{}conf"{}}, CTLFLAG\_RW | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Configuration"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01479}01479         \textcolor{keywordflow}{if} (node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01480}01480                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01481}01481         \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{en_8h_a7c131131d889085a920ab2965bcac977}{MLX5E\_PARAMS\_NUM}}; x++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01482}01482                 \textcolor{comment}{/* check for read-\/only parameter */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01483}01483                 \textcolor{keywordflow}{if} (strstr(\mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], \textcolor{stringliteral}{"{}\_max"{}}) != NULL ||}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01484}01484                     strstr(\mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], \textcolor{stringliteral}{"{}\_mtu"{}}) != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01485}01485                         SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01486}01486                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], CTLTYPE\_U64 | CTLFLAG\_RD |}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01487}01487                             CTLFLAG\_MPSAFE, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, x, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_aea37d0cfeb7cc725436b9f1003661b73}{mlx5e\_ethtool\_handler}}, \textcolor{stringliteral}{"{}QU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01488}01488                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x + 1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01489}01489                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], \textcolor{stringliteral}{"{}hw\_lro"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01490}01490                         \textcolor{comment}{/* read-\/only, but tunable parameters */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01491}01491                         SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01492}01492                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], CTLTYPE\_U64 | CTLFLAG\_RDTUN |}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01493}01493                             CTLFLAG\_MPSAFE, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, x, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_aea37d0cfeb7cc725436b9f1003661b73}{mlx5e\_ethtool\_handler}}, \textcolor{stringliteral}{"{}QU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01494}01494                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x + 1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01495}01495                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01496}01496                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01497}01497 \textcolor{comment}{                         * NOTE: In FreeBSD-\/11 and newer the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01498}01498 \textcolor{comment}{                         * CTLFLAG\_RWTUN flag will take care of}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01499}01499 \textcolor{comment}{                         * loading default sysctl value from the}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01500}01500 \textcolor{comment}{                         * kernel environment, if any:}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01501}01501 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01502}01502                         SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01503}01503                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x], CTLTYPE\_U64 | CTLFLAG\_RWTUN |}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01504}01504                             CTLFLAG\_MPSAFE, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, x, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_aea37d0cfeb7cc725436b9f1003661b73}{mlx5e\_ethtool\_handler}}, \textcolor{stringliteral}{"{}QU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01505}01505                             \mbox{\hyperlink{mlx5__en__ethtool_8c_a9d5ad5e189695dbb2f9d8b066b2c4cc1}{mlx5e\_params\_desc}}[2 * x + 1]);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01506}01506                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01507}01507         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01508}01508 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01509}01509         \textcolor{comment}{/* create fec node */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01510}01510         fec\_node = SYSCTL\_ADD\_NODE(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01511}01511             SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01512}01512             \textcolor{stringliteral}{"{}fec"{}}, CTLFLAG\_RW | CTLFLAG\_MPSAFE, NULL,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01513}01513             \textcolor{stringliteral}{"{}Forward Error Correction"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01514}01514         \textcolor{keywordflow}{if} (fec\_node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01515}01515                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01516}01516 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01517}01517         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_a74c15a50b0b567e0042d0bdc75eaf8c0}{mlx5e\_fec\_update}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01518}01518                 SYSCTL\_ADD\_U32(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(fec\_node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01519}01519                     \textcolor{stringliteral}{"{}mode\_active"{}}, CTLFLAG\_RD | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01520}01520                     \&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a7786efa3697f61dfe2ad4e4434cf3008}{params\_ethtool}}.\mbox{\hyperlink{structmlx5e__params__ethtool_a5bd0195161e75f51b5fb70a90fc90679}{fec\_mode\_active}}, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01521}01521                     \textcolor{stringliteral}{"{}Current FEC mode bit, if any."{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01523}01523                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(fec\_node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01524}01524                     \textcolor{stringliteral}{"{}mask\_10x\_25x"{}}, CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01525}01525                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_a61a1366eb4582f87ad6fe19e99f1edcf}{mlx5e\_fec\_mask\_10x\_25x\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01526}01526                     \textcolor{stringliteral}{"{}Set FEC masks for 10G\_40G, 25G\_50G, 56G, 100G respectivly. "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01527}01527                     \textcolor{stringliteral}{"{}0:Auto "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01528}01528                     \textcolor{stringliteral}{"{}1:NOFEC "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01529}01529                     \textcolor{stringliteral}{"{}2:FIRECODE "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01530}01530                     \textcolor{stringliteral}{"{}4:RS"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01531}01531 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01532}01532                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(fec\_node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01533}01533                     \textcolor{stringliteral}{"{}avail\_10x\_25x"{}}, CTLTYPE\_U8 | CTLFLAG\_RD | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01534}01534                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_acddb9f649a531abb229c0de0f5603fcf}{mlx5e\_fec\_avail\_10x\_25x\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01535}01535                     \textcolor{stringliteral}{"{}Get available FEC bits for 10G\_40G, 25G\_50G, 56G, 100G respectivly. "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01536}01536                     \textcolor{stringliteral}{"{}0:Auto "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01537}01537                     \textcolor{stringliteral}{"{}1:NOFEC "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01538}01538                     \textcolor{stringliteral}{"{}2:FIRECODE "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01539}01539                     \textcolor{stringliteral}{"{}4:RS"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01540}01540 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01541}01541                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(fec\_node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01542}01542                     \textcolor{stringliteral}{"{}mask\_50x"{}}, CTLTYPE\_U16 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01543}01543                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_ad21cae970023cbd828b2da6132084ee9}{mlx5e\_fec\_mask\_50x\_handler}}, \textcolor{stringliteral}{"{}SU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01544}01544                     \textcolor{stringliteral}{"{}Set FEC masks for 50G 1x, 100G 2x, 200G 4x, 400G 8x respectivly. "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01545}01545                     \textcolor{stringliteral}{"{}0:Auto "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01546}01546                     \textcolor{stringliteral}{"{}128:RS "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01547}01547                     \textcolor{stringliteral}{"{}512:LL RS"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01548}01548 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01549}01549                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(fec\_node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01550}01550                     \textcolor{stringliteral}{"{}avail\_50x"{}}, CTLTYPE\_U16 | CTLFLAG\_RD | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01551}01551                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_ac8793d7cf79708f94711f8bf2f03226c}{mlx5e\_fec\_avail\_50x\_handler}}, \textcolor{stringliteral}{"{}SU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01552}01552                     \textcolor{stringliteral}{"{}Get available FEC bits for 50G 1x, 100G 2x, 200G 4x, 400G 8x respectivly. "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01553}01553                     \textcolor{stringliteral}{"{}0:Auto "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01554}01554                     \textcolor{stringliteral}{"{}128:RS "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01555}01555                     \textcolor{stringliteral}{"{}512:LL RS"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01556}01556         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01557}01557 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01558}01558         SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01559}01559             \textcolor{stringliteral}{"{}debug\_stats"{}}, CTLTYPE\_INT | CTLFLAG\_RW | CTLFLAG\_MPSAFE, \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01560}01560             0, \&\mbox{\hyperlink{mlx5__en__ethtool_8c_af1f2cc3d3d839027dc4e42b6c512f882}{mlx5e\_ethtool\_debug\_stats}}, \textcolor{stringliteral}{"{}I"{}}, \textcolor{stringliteral}{"{}Extended debug statistics"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01561}01561 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01562}01562         pnameunit = device\_get\_nameunit(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}-\/>\mbox{\hyperlink{structmlx5__core__dev_a0819dc9fa4983c9140507e1a02aa8313}{pdev}}-\/>dev.bsddev);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01563}01563 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01564}01564         SYSCTL\_ADD\_STRING(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01565}01565             OID\_AUTO, \textcolor{stringliteral}{"{}device\_name"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01566}01566             \_\_DECONST(\textcolor{keywordtype}{void} *, pnameunit), 0,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01567}01567             \textcolor{stringliteral}{"{}PCI device name"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01568}01568 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01569}01569         \textcolor{comment}{/* Diagnostics support */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01570}01570         \mbox{\hyperlink{mlx5__en__ethtool_8c_a8964328a37f9bab2eea5f58a6b8c43f8}{mlx5e\_create\_diagnostics}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01571}01571 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01572}01572         \textcolor{comment}{/* create qos node */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01573}01573         qos\_node = SYSCTL\_ADD\_NODE(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01574}01574             SYSCTL\_CHILDREN(node), OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01575}01575             \textcolor{stringliteral}{"{}qos"{}}, CTLFLAG\_RW | CTLFLAG\_MPSAFE, NULL,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01576}01576             \textcolor{stringliteral}{"{}Quality Of Service configuration"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01577}01577         \textcolor{keywordflow}{if} (qos\_node == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01578}01578                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01580}01580         \textcolor{comment}{/* Priority rate limit support */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01581}01581         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_ad6ba2405ddad78507daec9a1db393419}{mlx5e\_getmaxrate}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01582}01582                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01583}01583                     OID\_AUTO, \textcolor{stringliteral}{"{}tc\_max\_rate"{}}, CTLTYPE\_U64 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01584}01584                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a9bc63b71057b01dfb927453004352489}{mlx5e\_tc\_maxrate\_handler}}, \textcolor{stringliteral}{"{}QU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01585}01585                     \textcolor{stringliteral}{"{}Max rate for priority, specified in kilobits, where kilo=1000, "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01586}01586                     \textcolor{stringliteral}{"{}max\_rate must be divisible by 100000"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01587}01587         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01588}01588 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01589}01589         \textcolor{comment}{/* Bandwidth limiting by ratio */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01590}01590         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_a5fce23433004dfe56d734e0c5ffddb18}{mlx5e\_get\_max\_alloc}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01591}01591                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01592}01592                     OID\_AUTO, \textcolor{stringliteral}{"{}tc\_rate\_share"{}}, CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01593}01593                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_abe354acf2239f6ba5b62ecd3ca610e99}{mlx5e\_tc\_rate\_share\_handler}}, \textcolor{stringliteral}{"{}QU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01594}01594                     \textcolor{stringliteral}{"{}Specify bandwidth ratio from 1 to 100 "{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01595}01595                     \textcolor{stringliteral}{"{}for the available traffic classes"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01596}01596         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01597}01597 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01598}01598         \textcolor{comment}{/* Priority to traffic class mapping */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01599}01599         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_ac8b32c4bbcf4490a5f2a9dabfff48ec4}{mlx5e\_get\_prio\_tc}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01600}01600                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01601}01601                     OID\_AUTO, \textcolor{stringliteral}{"{}prio\_0\_7\_tc"{}}, CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01602}01602                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a9768c316e9d388ee1cdaa4b3e47d5dfd}{mlx5e\_prio\_to\_tc\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01603}01603                     \textcolor{stringliteral}{"{}Set traffic class 0 to 7 for priority 0 to 7 inclusivly"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01604}01604         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01605}01605 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01606}01606         \textcolor{comment}{/* DSCP support */}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01607}01607         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_a05bdd8482c51f78f886d26b44902546b}{mlx5e\_get\_dscp}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01608}01608                 \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{port_8h_a9d7d601613ffc05172f7291dad601a60}{MLX5\_MAX\_SUPPORTED\_DSCP}}; i += 8) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01609}01609                         \textcolor{keywordtype}{char} name[32];}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01610}01610                         snprintf(name, \textcolor{keyword}{sizeof}(name), \textcolor{stringliteral}{"{}dscp\_\%d\_\%d\_prio"{}}, i, i + 7);}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01611}01611                         SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01612}01612                                 OID\_AUTO, name, CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01613}01613                                 \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, i, \mbox{\hyperlink{mlx5__en__ethtool_8c_abc3a789f99d4142d8220a0cf8dbeb4f9}{mlx5e\_dscp\_prio\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01614}01614                                 \textcolor{stringliteral}{"{}Set DSCP to priority mapping, 0..7"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01615}01615                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01616}01616 \textcolor{preprocessor}{\#define A       "{}Set trust state, 1:PCP 2:DSCP"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01617}01617 \textcolor{preprocessor}{\#define B       "{} 3:BOTH"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01618}01618                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01619}01619                     OID\_AUTO, \textcolor{stringliteral}{"{}trust\_state"{}}, CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01620}01620                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a26ca0973263de07cd76d25e4352f5c15}{mlx5e\_trust\_state\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01621}01621                     \mbox{\hyperlink{device_8h_a194a41519307bea133540d3ed9d140d0}{MLX5\_CAP\_QCAM\_FEATURE}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_a2223d57c4964aa044a50089734600ab8}{mdev}}, qpts\_trust\_both) ?}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01622}01622                     \mbox{\hyperlink{mlx5__en__ethtool_8c_a955f504eccf76b4eb2489c0adab03121}{A}} \mbox{\hyperlink{mlx5__en__ethtool_8c_a111da81ae5883147168bbb8366377b10}{B}} : \mbox{\hyperlink{mlx5__en__ethtool_8c_a955f504eccf76b4eb2489c0adab03121}{A}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01623}01623 \textcolor{preprocessor}{\#undef B}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01624}01624 \textcolor{preprocessor}{\#undef A}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01625}01625         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01626}01626 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01627}01627         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__port__buffer_8c_a1281dfc1f0829aa9ca4f7fd6ca79fc5c}{mlx5e\_port\_query\_buffer}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, \&port\_buffer) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01628}01628                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01629}01629                     OID\_AUTO, \textcolor{stringliteral}{"{}buffers\_size"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01630}01630                     CTLTYPE\_U32 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01631}01631                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a030aa6f693825ee850af6bc0f5dff512}{mlx5e\_buf\_size\_handler}}, \textcolor{stringliteral}{"{}IU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01632}01632                     \textcolor{stringliteral}{"{}Set buffers sizes"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01633}01633                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01634}01634                     OID\_AUTO, \textcolor{stringliteral}{"{}buffers\_prio"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01635}01635                     CTLTYPE\_U8 | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01636}01636                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a439eb6583abb15b7ade465716a6bec4f}{mlx5e\_buf\_prio\_handler}}, \textcolor{stringliteral}{"{}CU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01637}01637                     \textcolor{stringliteral}{"{}Set prio to buffers mapping"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01638}01638                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(qos\_node),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01639}01639                     OID\_AUTO, \textcolor{stringliteral}{"{}cable\_length"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01640}01640                     CTLTYPE\_UINT | CTLFLAG\_RWTUN | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01641}01641                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a8641a9dcee4ab02eaa93d491570edc97}{mlx5e\_cable\_length\_handler}}, \textcolor{stringliteral}{"{}IU"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01642}01642                     \textcolor{stringliteral}{"{}Set cable length in meters for xoff threshold calculation"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01643}01643         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01644}01644 }
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01645}01645         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__en__ethtool_8c_aee46549466d24c65fd095254d0733303}{mlx5e\_hw\_temperature\_update}}(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01646}01646                 SYSCTL\_ADD\_PROC(\&\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ab8f466ca91f232b49ea361c662c6b0d2}{sysctl\_ctx}}, SYSCTL\_CHILDREN(\mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}-\/>\mbox{\hyperlink{structmlx5e__priv_ae61717d6358ea9565ea0dcc3ef683d67}{sysctl\_ifnet}}),}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01647}01647                     OID\_AUTO, \textcolor{stringliteral}{"{}hw\_temperature"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01648}01648                     CTLTYPE\_S32 | CTLFLAG\_RD | CTLFLAG\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01649}01649                     \mbox{\hyperlink{en_8h_a5fb0e4bc38f8b60aad81d13acf50020f}{priv}}, 0, \mbox{\hyperlink{mlx5__en__ethtool_8c_a76ef479f018483a065abb804fa670594}{mlx5e\_hw\_temperature\_handler}}, \textcolor{stringliteral}{"{}I"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01650}01650                     \textcolor{stringliteral}{"{}HW temperature in millicelsius"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01651}01651         \}}
\DoxyCodeLine{\Hypertarget{mlx5__en__ethtool_8c_source_l01652}01652 \}}

\end{DoxyCode}
