\hypertarget{mlx5fpga__conn_8c_source}{}\doxysection{mlx5fpga\+\_\+conn.\+c}
\label{mlx5fpga__conn_8c_source}\index{dev/mlx5/mlx5\_fpga/mlx5fpga\_conn.c@{dev/mlx5/mlx5\_fpga/mlx5fpga\_conn.c}}
\mbox{\hyperlink{mlx5fpga__conn_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2017 Mellanox Technologies. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00004}00004 \textcolor{comment}{ * This software is available to you under a choice of one of two}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00005}00005 \textcolor{comment}{ * licenses.  You may choose to be licensed under the terms of the GNU}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00006}00006 \textcolor{comment}{ * General Public License (GPL) Version 2, available from the file}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00007}00007 \textcolor{comment}{ * COPYING in the main directory of this source tree, or the}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00008}00008 \textcolor{comment}{ * OpenIB.org BSD license below:}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00010}00010 \textcolor{comment}{ *     Redistribution and use in source and binary forms, with or}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00011}00011 \textcolor{comment}{ *     without modification, are permitted provided that the following}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00012}00012 \textcolor{comment}{ *     conditions are met:}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00013}00013 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00014}00014 \textcolor{comment}{ *      -\/ Redistributions of source code must retain the above}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00015}00015 \textcolor{comment}{ *        copyright notice, this list of conditions and the following}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00016}00016 \textcolor{comment}{ *        disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00017}00017 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00018}00018 \textcolor{comment}{ *      -\/ Redistributions in binary form must reproduce the above}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00019}00019 \textcolor{comment}{ *        copyright notice, this list of conditions and the following}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00020}00020 \textcolor{comment}{ *        disclaimer in the documentation and/or other materials}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00021}00021 \textcolor{comment}{ *        provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00022}00022 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00023}00023 \textcolor{comment}{ * THE SOFTWARE IS PROVIDED "{}AS IS"{}, WITHOUT WARRANTY OF ANY KIND,}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00024}00024 \textcolor{comment}{ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00025}00025 \textcolor{comment}{ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00026}00026 \textcolor{comment}{ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00027}00027 \textcolor{comment}{ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00028}00028 \textcolor{comment}{ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00029}00029 \textcolor{comment}{ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00030}00030 \textcolor{comment}{ * SOFTWARE.}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00031}00031 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00032}00032 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <linux/etherdevice.h>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{vport_8h}{dev/mlx5/vport.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mlx5__core_8h}{dev/mlx5/mlx5\_core/mlx5\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mlx5_8h}{dev/mlx5/mlx5\_lib/mlx5.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{core_8h}{dev/mlx5/mlx5\_fpga/core.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{conn_8h}{dev/mlx5/mlx5\_fpga/conn.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00042}\mbox{\hyperlink{mlx5fpga__conn_8c_a81c6aac51c4f4ce6250eb3736c5e9540}{00042}} \textcolor{preprocessor}{\#define MLX5\_FPGA\_PKEY 0xFFFF}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00043}\mbox{\hyperlink{mlx5fpga__conn_8c_a298a5c44781bf54b93286ebf111d8624}{00043}} \textcolor{preprocessor}{\#define MLX5\_FPGA\_PKEY\_INDEX 0 }\textcolor{comment}{/* RoCE PKEY 0xFFFF is always at index 0 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00044}\mbox{\hyperlink{mlx5fpga__conn_8c_aee3d5ddae6e4184d74100db2e06ec228}{00044}} \textcolor{preprocessor}{\#define MLX5\_FPGA\_RECV\_SIZE 2048}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00045}\mbox{\hyperlink{mlx5fpga__conn_8c_a10ec220cdbeb78d5ba29c45f25522611}{00045}} \textcolor{preprocessor}{\#define MLX5\_FPGA\_PORT\_NUM 1}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00046}\mbox{\hyperlink{mlx5fpga__conn_8c_aee66f0748340c2bb19235dd98b5a8f44}{00046}} \textcolor{preprocessor}{\#define MLX5\_FPGA\_CQ\_BUDGET 64}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00048}\mbox{\hyperlink{mlx5fpga__conn_8c_a858fa2e919a46377b21e481442a49353}{00048}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a858fa2e919a46377b21e481442a49353}{mlx5\_fpga\_conn\_map\_buf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00049}00049                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00050}00050 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00051}00051         \textcolor{keyword}{struct }device *dma\_device;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00052}00052         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00054}00054         \textcolor{keywordflow}{if} (unlikely(!buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00055}00055                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00057}00057         dma\_device = \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev-\/>pdev-\/>dev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00058}00058         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}} = dma\_map\_single(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00059}00059                                              buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}}, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00060}00060         err = dma\_mapping\_error(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00061}00061         \textcolor{keywordflow}{if} (unlikely(err)) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00062}00062                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}DMA error on sg 0: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00063}00063                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00064}00064                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00065}00065         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00067}00067         \textcolor{keywordflow}{if} (!buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00068}00068                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00070}00070         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}} = dma\_map\_single(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00071}00071                                              buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}}, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00072}00072         err = dma\_mapping\_error(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00073}00073         \textcolor{keywordflow}{if} (unlikely(err)) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00074}00074                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}DMA error on sg 1: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00075}00075                 dma\_unmap\_single(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00076}00076                                  buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}}, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00077}00077                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00078}00078         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00080}00080 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00081}00081         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00082}00082 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00084}\mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{00084}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00085}00085                                      \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00086}00086 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00087}00087         \textcolor{keyword}{struct }device *dma\_device;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00089}00089         dma\_device = \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev-\/>pdev-\/>dev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00090}00090         \textcolor{keywordflow}{if} (buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00091}00091                 dma\_unmap\_single(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00092}00092                                  buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[1].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}}, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00094}00094         \textcolor{keywordflow}{if} (likely(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00095}00095                 dma\_unmap\_single(dma\_device, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00096}00096                                  buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}}, buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00097}00097 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00099}\mbox{\hyperlink{mlx5fpga__conn_8c_a4ce3ee1c00ff4ce8e4f20e6aad959a57}{00099}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a4ce3ee1c00ff4ce8e4f20e6aad959a57}{mlx5\_fpga\_conn\_post\_recv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00100}00100                                     \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00101}00101 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00102}00102         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__wqe__data__seg}{mlx5\_wqe\_data\_seg}} *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00103}00103         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00104}00104         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00106}00106         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a858fa2e919a46377b21e481442a49353}{mlx5\_fpga\_conn\_map\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00107}00107         \textcolor{keywordflow}{if} (unlikely(err))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00108}00108                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00110}00110         \textcolor{keywordflow}{if} (unlikely(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} -\/ conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}} >= conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00111}00111                 \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00112}00112                 \textcolor{keywordflow}{return} -\/EBUSY;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00113}00113         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00115}00115         \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} \& (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00116}00116         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}} = \mbox{\hyperlink{wq_8h_ac44dbf6d3f68034d259613bc6910f436}{mlx5\_wq\_cyc\_get\_wqe}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.rq, \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00117}00117         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a9ff18a3853cc814afe957a12a8787521}{byte\_count}} = cpu\_to\_be32(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00118}00118         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a6103f8dcc461e4229d4249fe275258c7}{lkey}} = cpu\_to\_be32(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>conn\_res.mkey.key);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00119}00119         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a12d24c2dede618f9700fc54ba3fb1662}{addr}} = cpu\_to\_be64(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00121}00121         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}}++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00122}00122         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = buf;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00124}00124         \textcolor{comment}{/* Make sure that descriptors are written before doorbell record. */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00125}00125         dma\_wmb();}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00126}00126         *conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.rq.\mbox{\hyperlink{structmlx5__cqwq_a5b6cef866d8329e03794183b61ea9693}{db}} = cpu\_to\_be32(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} \& 0xffff);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00127}00127 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00128}00128         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00129}00129 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00131}\mbox{\hyperlink{mlx5fpga__conn_8c_adc25fb261ac84546c470f6f00b0c3baf}{00131}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_adc25fb261ac84546c470f6f00b0c3baf}{mlx5\_fpga\_conn\_notify\_hw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn, \textcolor{keywordtype}{void} *wqe)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00132}00132 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00133}00133         \textcolor{comment}{/* ensure wqe is visible to device before updating doorbell record */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00134}00134         dma\_wmb();}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00135}00135         *conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.sq.\mbox{\hyperlink{structmlx5__cqwq_a5b6cef866d8329e03794183b61ea9693}{db}} = cpu\_to\_be32(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00136}00136         \textcolor{comment}{/* Make sure that doorbell record is visible before ringing */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00137}00137         wmb();}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00138}00138         \mbox{\hyperlink{doorbell_8h_a6271f8be404747b92e28e309fe040c0c}{mlx5\_write64}}(wqe, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>conn\_res.uar-\/>map + \mbox{\hyperlink{doorbell_8h_a90a4a21d48634be5978d332ad2e6c76e}{MLX5\_BF\_OFFSET}}, NULL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00139}00139 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00141}\mbox{\hyperlink{mlx5fpga__conn_8c_a51b1bbeb948fbba73c2752d976520d55}{00141}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a51b1bbeb948fbba73c2752d976520d55}{mlx5\_fpga\_conn\_post\_send}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00142}00142                                      \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00143}00143 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00144}00144         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__wqe__ctrl__seg}{mlx5\_wqe\_ctrl\_seg}} *\mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00145}00145         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__wqe__data__seg}{mlx5\_wqe\_data\_seg}} *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00146}00146         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}, sgi;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00147}00147         \textcolor{keywordtype}{int} size = 1;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00149}00149         \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} \& (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00151}00151         \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}} = \mbox{\hyperlink{wq_8h_ac44dbf6d3f68034d259613bc6910f436}{mlx5\_wq\_cyc\_get\_wqe}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.sq, \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00152}00152         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}} = (\textcolor{keywordtype}{void} *)(\mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}} + 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00154}00154         \textcolor{keywordflow}{for} (sgi = 0; sgi < ARRAY\_SIZE(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}); sgi++) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00155}00155                 \textcolor{keywordflow}{if} (!buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[sgi].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00156}00156                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00157}00157                 \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a9ff18a3853cc814afe957a12a8787521}{byte\_count}} = cpu\_to\_be32(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[sgi].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00158}00158                 \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a6103f8dcc461e4229d4249fe275258c7}{lkey}} = cpu\_to\_be32(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>conn\_res.mkey.key);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00159}00159                 \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}-\/>\mbox{\hyperlink{structmlx5__wqe__data__seg_a12d24c2dede618f9700fc54ba3fb1662}{addr}} = cpu\_to\_be64(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[sgi].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ad2f76bc63dd064fb7d31bb4a68944e9a}{dma\_addr}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00160}00160                 \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00161}00161                 size++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00162}00162         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00164}00164         \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}}-\/>\mbox{\hyperlink{structmlx5__wqe__ctrl__seg_ab97655212a69f960f1e81363dfc2d14e}{imm}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00165}00165         \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}}-\/>\mbox{\hyperlink{structmlx5__wqe__ctrl__seg_a7d85321973d98bdd15e5e3f8b7bd6a46}{fm\_ce\_se}} = \mbox{\hyperlink{qp_8h_aded9ca14dda7907d5a7b2bf085928aafa3565d308348b6941261cd92da38e5d87}{MLX5\_WQE\_CTRL\_CQ\_UPDATE}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00166}00166         \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}}-\/>\mbox{\hyperlink{structmlx5__wqe__ctrl__seg_aaddb4d0262711abc16daa51b8d912d0e}{opmod\_idx\_opcode}} = cpu\_to\_be32(((conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} \& 0xffff) << 8) |}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00167}00167                                              \mbox{\hyperlink{device_8h_a4caf8d8f829279fba122163d961608a4a99df50bc06e7d55dee6c4f2fbef34d52}{MLX5\_OPCODE\_SEND}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00168}00168         \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}}-\/>\mbox{\hyperlink{structmlx5__wqe__ctrl__seg_a6ffef5693dd860fda08b0d2a891942bc}{qpn\_ds}} = cpu\_to\_be32(size | (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}} << 8));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00170}00170         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}}++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00171}00171         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = buf;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00172}00172         \mbox{\hyperlink{mlx5fpga__conn_8c_adc25fb261ac84546c470f6f00b0c3baf}{mlx5\_fpga\_conn\_notify\_hw}}(conn, \mbox{\hyperlink{mlx5__en__tx_8c_a6c754dd718160143b485c2386deb76ba}{ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00173}00173 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00175}\mbox{\hyperlink{conn_8h_a2f46b0f5fe1b32e64a3105989aa903ae}{00175}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a2f46b0f5fe1b32e64a3105989aa903ae}{mlx5\_fpga\_conn\_send}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00176}00176                         \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00177}00177 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00178}00178         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00179}00179         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00181}00181         \textcolor{keywordflow}{if} (!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00182}00182                 \textcolor{keywordflow}{return} -\/ENOTCONN;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00184}00184         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a858fa2e919a46377b21e481442a49353}{mlx5\_fpga\_conn\_map\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00185}00185         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00186}00186                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00188}00188         spin\_lock\_irqsave(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad713136de225f5cd8ac3db195c2f86f3}{lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00190}00190         \textcolor{keywordflow}{if} (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} -\/ conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}} >= conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00191}00191                 list\_add\_tail(\&buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aeb7afbbf748d7f5aa82e8a3d3fd9d027}{list}}, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a351e6575f9bdfa06994d215b20e2af48}{backlog}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00192}00192                 \textcolor{keywordflow}{goto} out\_unlock;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00193}00193         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00195}00195         \mbox{\hyperlink{mlx5fpga__conn_8c_a51b1bbeb948fbba73c2752d976520d55}{mlx5\_fpga\_conn\_post\_send}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00197}00197 out\_unlock:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00198}00198         spin\_unlock\_irqrestore(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad713136de225f5cd8ac3db195c2f86f3}{lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00199}00199         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00200}00200 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00202}\mbox{\hyperlink{mlx5fpga__conn_8c_a23371e136587bdd0eb83a3cbf6319589}{00202}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a23371e136587bdd0eb83a3cbf6319589}{mlx5\_fpga\_conn\_post\_recv\_buf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00203}00203 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00204}00204         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00205}00205         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00207}00207         buf = kzalloc(\textcolor{keyword}{sizeof}(*buf) + \mbox{\hyperlink{mlx5fpga__conn_8c_aee3d5ddae6e4184d74100db2e06ec228}{MLX5\_FPGA\_RECV\_SIZE}}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00208}00208         \textcolor{keywordflow}{if} (!buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00209}00209                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00211}00211         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_ab6974342b5d28513b853746afd40e311}{data}} = (\textcolor{keywordtype}{void} *)(buf + 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00212}00212         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}} = \mbox{\hyperlink{mlx5fpga__conn_8c_aee3d5ddae6e4184d74100db2e06ec228}{MLX5\_FPGA\_RECV\_SIZE}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00213}00213         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_a0e70985be622f6eef9966139587904ba}{dma\_dir}} = DMA\_FROM\_DEVICE;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00215}00215         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a4ce3ee1c00ff4ce8e4f20e6aad959a57}{mlx5\_fpga\_conn\_post\_recv}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00216}00216         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00217}00217                 kfree(buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00219}00219         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00220}00220 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00222}\mbox{\hyperlink{mlx5fpga__conn_8c_a43a0ba0727d2168349b4e32e293a10d2}{00222}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a43a0ba0727d2168349b4e32e293a10d2}{mlx5\_fpga\_conn\_create\_mkey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 pdn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00223}00223                                       \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__mkey}{mlx5\_core\_mkey}} *mkey)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00224}00224 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00225}00225         \textcolor{keywordtype}{int} inlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(create\_mkey\_in);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00226}00226         \textcolor{keywordtype}{void} *mkc;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00227}00227         u32 *in;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00228}00228         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00230}00230         in = kvzalloc(inlen, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00231}00231         \textcolor{keywordflow}{if} (!in)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00232}00232                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00234}00234         mkc = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(create\_mkey\_in, in, memory\_key\_mkey\_entry);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00235}00235         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, access\_mode\_1\_0, MLX5\_MKC\_ACCESS\_MODE\_PA);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00236}00236         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, lw, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00237}00237         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, lr, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00239}00239         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, pd, pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00240}00240         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, length64, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00241}00241         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mkc, mkc, qpn, 0xffffff);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00243}00243         err = \mbox{\hyperlink{driver_8h_aa55afac86fb98fe1a074177838e412bf}{mlx5\_core\_create\_mkey}}(mdev, mkey, in, inlen);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00245}00245         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00246}00246         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00247}00247 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00249}\mbox{\hyperlink{mlx5fpga__conn_8c_a88be84f57dac5f85aa00df42879627e1}{00249}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a88be84f57dac5f85aa00df42879627e1}{mlx5\_fpga\_conn\_rq\_cqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00250}00250                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe, u8 status)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00251}00251 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00252}00252         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00253}00253         \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}, err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00255}00255         \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = be16\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_af16e0b265dec7e07555179d5cd7388c6}{wqe\_counter}}) \& (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00256}00256         buf = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}];}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00257}00257         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00258}00258         \textcolor{keywordflow}{if} (!status)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00259}00259                 buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}} = be32\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a153afdc80bf9d2ccfb3be09055f1a5c6}{byte\_cnt}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00260}00260         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}}++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00262}00262         \textcolor{keywordflow}{if} (unlikely(status \&\& (status != \mbox{\hyperlink{cq_8h_a06fc87d81c62e9abb8790b6e5713c55ba194f282fd1045d8fd1caca58888269f4}{MLX5\_CQE\_SYNDROME\_WR\_FLUSH\_ERR}})))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00263}00263                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}RQ buf \%p on FPGA QP \%u completion status \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00264}00264                                buf, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}}, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00265}00265         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00266}00266                 mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}RQ buf \%p on FPGA QP \%u completion status \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00267}00267                               buf, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}}, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00269}00269         \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00271}00271         \textcolor{keywordflow}{if} (unlikely(status || !conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00272}00272                 conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00273}00273                 kfree(buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00274}00274                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00275}00275         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00277}00277         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Message with \%u bytes received successfully\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00278}00278                       buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00279}00279         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ae69e6ffe164c87d1ddafa4707ea90842}{recv\_cb}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_aa3348698e168c9070a2dfc71c375c55a}{cb\_arg}}, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00281}00281         buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_abb1e11b2f62f9f0dc128da89c2823685}{sg}}[0].\mbox{\hyperlink{structmlx5__fpga__dma__entry_a1a299b7c503caf2cb13283d77d28a0a3}{size}} = \mbox{\hyperlink{mlx5fpga__conn_8c_aee3d5ddae6e4184d74100db2e06ec228}{MLX5\_FPGA\_RECV\_SIZE}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00282}00282         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a4ce3ee1c00ff4ce8e4f20e6aad959a57}{mlx5\_fpga\_conn\_post\_recv}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00283}00283         \textcolor{keywordflow}{if} (unlikely(err)) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00284}00284                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00285}00285                                \textcolor{stringliteral}{"{}Failed to re-\/post recv buf: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00286}00286                 kfree(buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00287}00287         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00288}00288 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00290}\mbox{\hyperlink{mlx5fpga__conn_8c_a6433bcadb148e37662c6086520cfd055}{00290}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a6433bcadb148e37662c6086520cfd055}{mlx5\_fpga\_conn\_sq\_cqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00291}00291                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe, u8 status)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00292}00292 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00293}00293         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf, *nextbuf;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00294}00294         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00295}00295         \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00297}00297         spin\_lock\_irqsave(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad713136de225f5cd8ac3db195c2f86f3}{lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00299}00299         \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = be16\_to\_cpu(cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_af16e0b265dec7e07555179d5cd7388c6}{wqe\_counter}}) \& (conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00300}00300         buf = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}];}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00301}00301         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00302}00302         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}}++;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00304}00304         \textcolor{comment}{/* Handle backlog still under the spinlock to ensure message post order */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00305}00305         \textcolor{keywordflow}{if} (unlikely(!list\_empty(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a351e6575f9bdfa06994d215b20e2af48}{backlog}}))) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00306}00306                 \textcolor{keywordflow}{if} (likely(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00307}00307                         nextbuf = list\_first\_entry(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a351e6575f9bdfa06994d215b20e2af48}{backlog}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00308}00308                                                    \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}}, \mbox{\hyperlink{structmlx5__fpga__dma__buf_aeb7afbbf748d7f5aa82e8a3d3fd9d027}{list}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00309}00309                         list\_del(\&nextbuf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aeb7afbbf748d7f5aa82e8a3d3fd9d027}{list}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00310}00310                         \mbox{\hyperlink{mlx5fpga__conn_8c_a51b1bbeb948fbba73c2752d976520d55}{mlx5\_fpga\_conn\_post\_send}}(conn, nextbuf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00311}00311                 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00312}00312         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00314}00314         spin\_unlock\_irqrestore(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad713136de225f5cd8ac3db195c2f86f3}{lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00316}00316         \textcolor{keywordflow}{if} (unlikely(status \&\& (status != \mbox{\hyperlink{cq_8h_a06fc87d81c62e9abb8790b6e5713c55ba194f282fd1045d8fd1caca58888269f4}{MLX5\_CQE\_SYNDROME\_WR\_FLUSH\_ERR}})))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00317}00317                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}SQ buf \%p on FPGA QP \%u completion status \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00318}00318                                buf, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}}, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00319}00319         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00320}00320                 mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}SQ buf \%p on FPGA QP \%u completion status \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00321}00321                               buf, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}}, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00323}00323         \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00325}00325         \textcolor{keywordflow}{if} (likely(buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00326}00326                 buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}}(conn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, buf, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00327}00327 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00328}00328         \textcolor{keywordflow}{if} (unlikely(status))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00329}00329                 conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00330}00330 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00332}\mbox{\hyperlink{mlx5fpga__conn_8c_af650c28ca9173d90edf4240611f594c8}{00332}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_af650c28ca9173d90edf4240611f594c8}{mlx5\_fpga\_conn\_handle\_cqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00333}00333                                       \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00334}00334 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00335}00335         u8 opcode, status = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00337}00337         opcode = cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a3dbb1dc2c9f2ee64863edf7f750f5885}{op\_own}} >> 4;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00339}00339         \textcolor{keywordflow}{switch} (opcode) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00340}00340         \textcolor{keywordflow}{case} \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7a7932d36dcd0aabba93860645a69f309a}{MLX5\_CQE\_REQ\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00341}00341                 status = ((\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__err__cqe}{mlx5\_err\_cqe}} *)cqe)-\/>syndrome;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00342}00342                 \textcolor{comment}{/* Fall through */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00343}00343         \textcolor{keywordflow}{case} \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7a40ac256eda7211b77ebd0faf8f8df63e}{MLX5\_CQE\_REQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00344}00344                 \mbox{\hyperlink{mlx5fpga__conn_8c_a6433bcadb148e37662c6086520cfd055}{mlx5\_fpga\_conn\_sq\_cqe}}(conn, cqe, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00345}00345                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00347}00347         \textcolor{keywordflow}{case} \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7a231f03fc9993015a0ccf553d431db771}{MLX5\_CQE\_RESP\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00348}00348                 status = ((\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__err__cqe}{mlx5\_err\_cqe}} *)cqe)-\/>syndrome;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00349}00349                 \textcolor{comment}{/* Fall through */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00350}00350         \textcolor{keywordflow}{case} \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7ab4fc60bde7cd4b1acc475584ef6ea813}{MLX5\_CQE\_RESP\_SEND}}:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00351}00351                 \mbox{\hyperlink{mlx5fpga__conn_8c_a88be84f57dac5f85aa00df42879627e1}{mlx5\_fpga\_conn\_rq\_cqe}}(conn, cqe, status);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00352}00352                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00353}00353         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00354}00354                 mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Unexpected cqe opcode \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00355}00355                                opcode);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00356}00356         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00357}00357 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00359}\mbox{\hyperlink{mlx5fpga__conn_8c_a96813844ab07953ab3c3a4dff239ed02}{00359}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a96813844ab07953ab3c3a4dff239ed02}{mlx5\_fpga\_conn\_arm\_cq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00360}00360 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00361}00361         \mbox{\hyperlink{cq_8h_a9b62d79172a706d5616363654ffdc0be}{mlx5\_cq\_arm}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}, \mbox{\hyperlink{cq_8h_adc29c2ff13d900c2f185ee95427fb06ca335efec9cc6e8fb8f55bc662d60f54dd}{MLX5\_CQ\_DB\_REQ\_NOT}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00362}00362                     conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>conn\_res.uar-\/>map, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00363}00363 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00365}\mbox{\hyperlink{mlx5fpga__conn_8c_a3207802ce1d140a6d8f90aa9ec977f17}{00365}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a3207802ce1d140a6d8f90aa9ec977f17}{mlx5\_fpga\_conn\_cq\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__cq}{mlx5\_core\_cq}} *\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00366}00366                                     \textcolor{keyword}{enum} mlx5\_event event)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00367}00367 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00368}00368         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00370}00370         conn = container\_of(\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00371}00371         mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}CQ event \%u on CQ \#\%u\(\backslash\)n"{}}, event, \mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}-\/>\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00372}00372 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00374}\mbox{\hyperlink{mlx5fpga__conn_8c_abc7210bb448dba43a2d813c4488f7ab9}{00374}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_abc7210bb448dba43a2d813c4488f7ab9}{mlx5\_fpga\_conn\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__qp}{mlx5\_core\_qp}} *\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}, \textcolor{keywordtype}{int} event)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00375}00375 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00376}00376         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00377}00377 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00378}00378         conn = container\_of(\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}}, \mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.mqp);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00379}00379         mlx5\_fpga\_warn(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}QP event \%u on QP \#\%u\(\backslash\)n"{}}, event, \mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}-\/>\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00380}00380 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00382}\mbox{\hyperlink{mlx5fpga__conn_8c_acf7d6257afd2eb55dc49e2a81fd16e3f}{00382}} \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_acf7d6257afd2eb55dc49e2a81fd16e3f}{mlx5\_fpga\_conn\_cqes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00383}00383                                        \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} budget)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00384}00384 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00385}00385         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00387}00387         \textcolor{keywordflow}{while} (budget) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00388}00388                 cqe = mlx5\_cqwq\_get\_cqe(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00389}00389                 \textcolor{keywordflow}{if} (!cqe)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00390}00390                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00392}00392                 budget-\/-\/;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00393}00393                 \mbox{\hyperlink{wq_8h_a423d89918b59613e695918f45f4ada79}{mlx5\_cqwq\_pop}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00394}00394                 \mbox{\hyperlink{mlx5fpga__conn_8c_af650c28ca9173d90edf4240611f594c8}{mlx5\_fpga\_conn\_handle\_cqe}}(conn, cqe);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00395}00395                 \mbox{\hyperlink{wq_8h_aa2f616f10c8f7ee91d34c33e0de0661c}{mlx5\_cqwq\_update\_db\_record}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00396}00396         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00397}00397         \textcolor{keywordflow}{if} (!budget) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00398}00398                 tasklet\_schedule(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0e9734dd467ff77cad882f86a6b32bc3}{tasklet}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00399}00399                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00400}00400         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00401}00401 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00402}00402         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Re-\/arming CQ with cc\# \%u\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}.\mbox{\hyperlink{structmlx5__cqwq_aa1f690c321868ccff5ec32e0c3540a8c}{cc}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00403}00403         \textcolor{comment}{/* ensure cq space is freed before enabling more cqes */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00404}00404         wmb();}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00405}00405         \mbox{\hyperlink{mlx5fpga__conn_8c_a96813844ab07953ab3c3a4dff239ed02}{mlx5\_fpga\_conn\_arm\_cq}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00406}00406 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00408}\mbox{\hyperlink{mlx5fpga__conn_8c_af80b90dd47b8035b445a1e1efad517f1}{00408}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_af80b90dd47b8035b445a1e1efad517f1}{mlx5\_fpga\_conn\_cq\_tasklet}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00409}00409 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00410}00410         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn = (\textcolor{keywordtype}{void} *)\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00411}00411 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00412}00412         \textcolor{keywordflow}{if} (unlikely(!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00413}00413                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00414}00414         \mbox{\hyperlink{mlx5fpga__conn_8c_acf7d6257afd2eb55dc49e2a81fd16e3f}{mlx5\_fpga\_conn\_cqes}}(conn, \mbox{\hyperlink{mlx5fpga__conn_8c_aee66f0748340c2bb19235dd98b5a8f44}{MLX5\_FPGA\_CQ\_BUDGET}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00415}00415 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00417}\mbox{\hyperlink{mlx5fpga__conn_8c_ad560233df1c22cc8eefb616a91e4029c}{00417}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_ad560233df1c22cc8eefb616a91e4029c}{mlx5\_fpga\_conn\_cq\_complete}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__cq}{mlx5\_core\_cq}} *\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00418}00418 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00419}00419         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00421}00421         conn = container\_of(\mbox{\hyperlink{en_8h_af69a66154472918b7d1481f1b1d974c8}{mcq}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}}, \mbox{\hyperlink{en_8h_a124cdf1cec8a4103ace100a401cd893c}{cq}}.\mbox{\hyperlink{structmlx5e__cq_ad9262877d1d03c6f244bdd35128e89ba}{mcq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00422}00422         \textcolor{keywordflow}{if} (unlikely(!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00423}00423                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00424}00424         \mbox{\hyperlink{mlx5fpga__conn_8c_acf7d6257afd2eb55dc49e2a81fd16e3f}{mlx5\_fpga\_conn\_cqes}}(conn, \mbox{\hyperlink{mlx5fpga__conn_8c_aee66f0748340c2bb19235dd98b5a8f44}{MLX5\_FPGA\_CQ\_BUDGET}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00425}00425 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00427}\mbox{\hyperlink{mlx5fpga__conn_8c_a919e3a27c69038bdf28405d8395abb73}{00427}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a919e3a27c69038bdf28405d8395abb73}{mlx5\_fpga\_conn\_create\_cq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn, \textcolor{keywordtype}{int} cq\_size)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00428}00428 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00429}00429         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00430}00430         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00431}00431         u32 temp\_cqc[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(cqc)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00432}00432         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__wq__param}{mlx5\_wq\_param}} wqp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00433}00433         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cqe64}{mlx5\_cqe64}} *cqe;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00434}00434         \textcolor{keywordtype}{int} inlen, err, eqn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00435}00435         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} irqn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00436}00436         \textcolor{keywordtype}{void} *cqc, *in;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00437}00437         \_\_be64 *pas;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00438}00438         u32 i;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00440}00440         cq\_size = roundup\_pow\_of\_two(cq\_size);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00441}00441         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(cqc, temp\_cqc, log\_cq\_size, ilog2(cq\_size));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00443}00443         wqp.buf\_numa\_node = mdev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a253fce7daa40bf4d6fdc9a7b5ee289d1}{numa\_node}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00444}00444         wqp.db\_numa\_node  = mdev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a253fce7daa40bf4d6fdc9a7b5ee289d1}{numa\_node}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00446}00446         err = \mbox{\hyperlink{mlx5__wq_8c_a721e8d14f1b17c0921e3dd1688936dc6}{mlx5\_cqwq\_create}}(mdev, \&wqp, temp\_cqc, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00447}00447                                \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00448}00448         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00449}00449                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00450}00450 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00451}00451         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{mlx5__wq_8c_ae3df4b28d828c4e73c0167b7d753508a}{mlx5\_cqwq\_get\_size}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00452}00452                 cqe = \mbox{\hyperlink{wq_8h_acb024510e442f16bb20f9943b05eab7e}{mlx5\_cqwq\_get\_wqe}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}}, i);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00453}00453                 cqe-\/>\mbox{\hyperlink{structmlx5__cqe64_a3dbb1dc2c9f2ee64863edf7f750f5885}{op\_own}} = \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7a040ca8ae114748853a108b181d3dadca}{MLX5\_CQE\_INVALID}} << 4 | \mbox{\hyperlink{cq_8h_adf764cbdea00d65edcd07bb9953ad2b7a62a86c5fb0a5057f1703dbe3d840e4e7}{MLX5\_CQE\_OWNER\_MASK}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00454}00454         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00456}00456         inlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(create\_cq\_in) +}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00457}00457                 \textcolor{keyword}{sizeof}(u64) * conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_aaa1ed69bad5d7422cc37046fbee2e3ca}{frag\_buf}}.\mbox{\hyperlink{structmlx5__frag__buf_a8f1777a64a234fa4f15438006716263c}{npages}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00458}00458         in = kvzalloc(inlen, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00459}00459         \textcolor{keywordflow}{if} (!in) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00460}00460                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00461}00461                 \textcolor{keywordflow}{goto} err\_cqwq;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00462}00462         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00463}00463 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00464}00464         err = \mbox{\hyperlink{driver_8h_aeaccd90e6d73c5463f84985214248baa}{mlx5\_vector2eqn}}(mdev, smp\_processor\_id(), \&eqn, \&irqn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00465}00465         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00466}00466                 \textcolor{keywordflow}{goto} err\_cqwq;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00467}00467 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00468}00468         cqc = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(create\_cq\_in, in, cq\_context);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00469}00469         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(cqc, cqc, log\_cq\_size, ilog2(cq\_size));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00470}00470         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(cqc, cqc, c\_eqn, eqn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00471}00471         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(cqc, cqc, uar\_page, fdev-\/>conn\_res.uar-\/>index);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00472}00472         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(cqc, cqc, log\_page\_size, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_aaa1ed69bad5d7422cc37046fbee2e3ca}{frag\_buf}}.\mbox{\hyperlink{structmlx5__frag__buf_a986c4be5f623374479c751d873170860}{page\_shift}} -\/}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00473}00473                            \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa4614720009368aaf55770e64acced36}{MLX5\_ADAPTER\_PAGE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00474}00474         \mbox{\hyperlink{device_8h_a6e7776ca1e3178584753950058580eb6}{MLX5\_SET64}}(cqc, cqc, dbr\_addr, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_a117d04c2db88fdac9e948b25d9d6fa3a}{db}}.\mbox{\hyperlink{structmlx5__db_a67fa49352985a2e13bc57bed6740471d}{dma}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00476}00476         pas = (\_\_be64 *)\mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(create\_cq\_in, in, pas);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00477}00477         mlx5\_fill\_page\_frag\_array(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_aaa1ed69bad5d7422cc37046fbee2e3ca}{frag\_buf}}, pas);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00479}00479         err = \mbox{\hyperlink{cq_8h_aea2bfcf5366ba54470890849d731ec22}{mlx5\_core\_create\_cq}}(mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}, in, inlen);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00480}00480         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00482}00482         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00483}00483                 \textcolor{keywordflow}{goto} err\_cqwq;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00484}00484 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00485}00485         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a458436764ec16a503d3e3fbb1457b394}{cqe\_sz}}     = 64;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00486}00486         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a1feaf10833bbd5fe6686d52108e0fd70}{set\_ci\_db}}  = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_a117d04c2db88fdac9e948b25d9d6fa3a}{db}}.\mbox{\hyperlink{structmlx5__db_a2b44107b5ba30379be0c556c16e8b89e}{db}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00487}00487         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a1a441188f2c4f406e29bdc804fea49c3}{arm\_db}}     = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_a117d04c2db88fdac9e948b25d9d6fa3a}{db}}.\mbox{\hyperlink{structmlx5__db_a2b44107b5ba30379be0c556c16e8b89e}{db}} + 1;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00488}00488         *conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a1feaf10833bbd5fe6686d52108e0fd70}{set\_ci\_db}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00489}00489         *conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a1a441188f2c4f406e29bdc804fea49c3}{arm\_db}}    = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00490}00490         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a551c3d3d22a52da00c5c0b56bd48a4d7}{vector}}     = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00491}00491         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a7fd008e4e7eb4f052083824c0a0d7589}{comp}}       = \mbox{\hyperlink{mlx5fpga__conn_8c_ad560233df1c22cc8eefb616a91e4029c}{mlx5\_fpga\_conn\_cq\_complete}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00492}00492         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a79af75889dbfdd02e154cece0f670a23}{event}}      = \mbox{\hyperlink{mlx5fpga__conn_8c_a3207802ce1d140a6d8f90aa9ec977f17}{mlx5\_fpga\_conn\_cq\_event}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00493}00493         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a11efe15093ea834e41b4c8a217bc7abe}{irqn}}       = irqn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00494}00494         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_ae55e2c6f2eb7fe4e7ff20aeba017bb6d}{uar}}        = fdev-\/>conn\_res.uar;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00495}00495         tasklet\_init(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0e9734dd467ff77cad882f86a6b32bc3}{tasklet}}, \mbox{\hyperlink{mlx5fpga__conn_8c_af80b90dd47b8035b445a1e1efad517f1}{mlx5\_fpga\_conn\_cq\_tasklet}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00496}00496                      (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00498}00498         mlx5\_fpga\_dbg(fdev, \textcolor{stringliteral}{"{}Created CQ \#0x\%x\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00499}00499 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00500}00500         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00501}00501 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00502}00502 err\_cqwq:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00503}00503         mlx5\_cqwq\_destroy(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00504}00504 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00505}00505         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00506}00506 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00508}\mbox{\hyperlink{mlx5fpga__conn_8c_ac043e74ee7975878875ed686e5bfdfed}{00508}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_ac043e74ee7975878875ed686e5bfdfed}{mlx5\_fpga\_conn\_destroy\_cq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00509}00509 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00510}00510         tasklet\_disable(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0e9734dd467ff77cad882f86a6b32bc3}{tasklet}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00511}00511         tasklet\_kill(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0e9734dd467ff77cad882f86a6b32bc3}{tasklet}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00512}00512         \mbox{\hyperlink{cq_8h_ada3ee9d5d56150686d9f6a2ca3a7af84}{mlx5\_core\_destroy\_cq}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00513}00513         mlx5\_cqwq\_destroy(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00514}00514 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00516}\mbox{\hyperlink{mlx5fpga__conn_8c_a9be3b9948de31596f3b7ceab75237060}{00516}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a9be3b9948de31596f3b7ceab75237060}{mlx5\_fpga\_conn\_create\_wq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn, \textcolor{keywordtype}{void} *qpc)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00517}00517 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00518}00518         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00519}00519         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00520}00520         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__wq__param}{mlx5\_wq\_param}} wqp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00521}00521 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00522}00522         wqp.buf\_numa\_node = mdev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a253fce7daa40bf4d6fdc9a7b5ee289d1}{numa\_node}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00523}00523         wqp.db\_numa\_node  = mdev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a253fce7daa40bf4d6fdc9a7b5ee289d1}{numa\_node}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00525}00525         \textcolor{keywordflow}{return} mlx5\_wq\_qp\_create(mdev, \&wqp, qpc, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_aec970823bb779ec3f5191b7d44e0d7ae}{wq}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00526}00526                                  \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00527}00527 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00529}\mbox{\hyperlink{mlx5fpga__conn_8c_aa7ad8dd5c619fab84c806a23dc0892fc}{00529}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_aa7ad8dd5c619fab84c806a23dc0892fc}{mlx5\_fpga\_conn\_create\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00530}00530                                     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} tx\_size, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} rx\_size)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00531}00531 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00532}00532         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00533}00533         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00534}00534         u32 temp\_qpc[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qpc)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00535}00535         \textcolor{keywordtype}{void} *in = NULL, *qpc;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00536}00536         \textcolor{keywordtype}{int} err, inlen;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00538}00538         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00539}00539         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00540}00540         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} = roundup\_pow\_of\_two(rx\_size);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00541}00541         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a32a70ab649c025795890cc8ef9aab41d}{pc}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00542}00542         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a383e71232dcde410f6b27bbd4d481054}{cc}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00543}00543         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}} = roundup\_pow\_of\_two(tx\_size);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00545}00545         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, temp\_qpc, log\_rq\_stride, ilog2(\mbox{\hyperlink{qp_8h_ae4c20810de6abebbd0c6b246bba0d8c9}{MLX5\_SEND\_WQE\_DS}}) -\/ 4);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00546}00546         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, temp\_qpc, log\_rq\_size, ilog2(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00547}00547         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, temp\_qpc, log\_sq\_size, ilog2(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00548}00548         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a9be3b9948de31596f3b7ceab75237060}{mlx5\_fpga\_conn\_create\_wq}}(conn, temp\_qpc);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00549}00549         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00550}00550                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00552}00552         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}} = kvzalloc(\textcolor{keyword}{sizeof}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[0]) *}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00553}00553                                     conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00554}00554         \textcolor{keywordflow}{if} (!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00555}00555                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00556}00556                 \textcolor{keywordflow}{goto} err\_wq;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00557}00557         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00559}00559         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}} = kvzalloc(\textcolor{keyword}{sizeof}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[0]) *}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00560}00560                                     conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00561}00561         \textcolor{keywordflow}{if} (!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00562}00562                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00563}00563                 \textcolor{keywordflow}{goto} err\_rq\_bufs;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00564}00564         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00566}00566         inlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(create\_qp\_in) +}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00567}00567                 \mbox{\hyperlink{device_8h_aaf5b7017c184daa12a71900facaf9b93}{MLX5\_FLD\_SZ\_BYTES}}(create\_qp\_in, pas[0]) *}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00568}00568                 conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.buf.npages;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00569}00569         in = kvzalloc(inlen, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00570}00570         \textcolor{keywordflow}{if} (!in) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00571}00571                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00572}00572                 \textcolor{keywordflow}{goto} err\_sq\_bufs;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00573}00573         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00575}00575         qpc = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(create\_qp\_in, in, qpc);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00576}00576         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, uar\_page, fdev-\/>conn\_res.uar-\/>index);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00577}00577         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_page\_size,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00578}00578                  conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.buf.page\_shift -\/ \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa4614720009368aaf55770e64acced36}{MLX5\_ADAPTER\_PAGE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00579}00579         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, fre, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00580}00580         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, rlky, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00581}00581         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, st, \mbox{\hyperlink{qp_8h_a4102b7202de3a76d40f5c3cd7a8696dfad2b8ae88f78632d28176d08944bc5f5b}{MLX5\_QP\_ST\_RC}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00582}00582         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, pm\_state, \mbox{\hyperlink{mlx5__ifc_8h_afb9b21dcb0b6eb4e9e0c9cb090e774beabe33547188c4c3f5b02d432d1013d303}{MLX5\_QP\_PM\_MIGRATED}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00583}00583         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, pd, fdev-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00584}00584         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_rq\_stride, ilog2(\mbox{\hyperlink{qp_8h_ae4c20810de6abebbd0c6b246bba0d8c9}{MLX5\_SEND\_WQE\_DS}}) -\/ 4);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00585}00585         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_rq\_size, ilog2(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00586}00586         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, \mbox{\hyperlink{mlx5__ifc_8h_adc96c71896dbd2b9d967978ddc59a3d5}{rq\_type}}, \mbox{\hyperlink{qp_8h_a6a6e9760871cfeaccfb8950c5573d890ac71bf972902f4816fe30f6990f3e300f}{MLX5\_NON\_ZERO\_RQ}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00587}00587         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_sq\_size, ilog2(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00588}00588         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, cqn\_snd, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00589}00589         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, cqn\_rcv, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00590}00590         \mbox{\hyperlink{device_8h_a6e7776ca1e3178584753950058580eb6}{MLX5\_SET64}}(qpc, qpc, dbr\_addr, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_a117d04c2db88fdac9e948b25d9d6fa3a}{db}}.\mbox{\hyperlink{structmlx5__db_a67fa49352985a2e13bc57bed6740471d}{dma}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00591}00591         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, cqe\_version) == 1)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00592}00592                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, user\_index, 0xFFFFFF);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00593}00593 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00594}00594         \mbox{\hyperlink{driver_8h_adbd58dd0790cfdfce0e245704e92deec}{mlx5\_fill\_page\_array}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.buf,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00595}00595                              (\_\_be64 *)\mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(create\_qp\_in, in, pas));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00596}00596 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00597}00597         err = \mbox{\hyperlink{mlx5__qp_8c_a2776574337dc9ab445d7c47f6cca22d0}{mlx5\_core\_create\_qp}}(mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}, in, inlen);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00598}00598         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00599}00599                 \textcolor{keywordflow}{goto} err\_sq\_bufs;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00600}00600 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00601}00601         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5a77e83499dd8868b1f4431f6a1a5343}{event}} = \mbox{\hyperlink{mlx5fpga__conn_8c_abc7210bb448dba43a2d813c4488f7ab9}{mlx5\_fpga\_conn\_event}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00602}00602         mlx5\_fpga\_dbg(fdev, \textcolor{stringliteral}{"{}Created QP \#0x\%x\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00604}00604         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00606}00606 err\_sq\_bufs:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00607}00607         kvfree(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00608}00608 err\_rq\_bufs:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00609}00609         kvfree(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00610}00610 err\_wq:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00611}00611         \mbox{\hyperlink{mlx5__wq_8c_a49551f7d5d4eaab85b551255676b527e}{mlx5\_wq\_destroy}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00612}00612 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00613}00613         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00614}00614         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00615}00615 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00617}\mbox{\hyperlink{mlx5fpga__conn_8c_ab4cbcf3be627b2297f6dc25397aec717}{00617}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_ab4cbcf3be627b2297f6dc25397aec717}{mlx5\_fpga\_conn\_free\_recv\_bufs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00618}00618 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00619}00619         \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00621}00621         \textcolor{keywordflow}{for} (\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = 0; \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} < conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}; \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}++) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00622}00622                 \textcolor{keywordflow}{if} (!conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}])}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00623}00623                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00624}00624                 \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}]);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00625}00625                 kfree(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}]);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00626}00626                 conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00627}00627         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00628}00628 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00629}00629 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00630}\mbox{\hyperlink{mlx5fpga__conn_8c_a8ce4af4fe4d203592ebf494199027f9d}{00630}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a8ce4af4fe4d203592ebf494199027f9d}{mlx5\_fpga\_conn\_flush\_send\_bufs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00631}00631 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00632}00632         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__dma__buf}{mlx5\_fpga\_dma\_buf}} *buf, *temp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00633}00633         \textcolor{keywordtype}{int} \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00634}00634 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00635}00635         \textcolor{keywordflow}{for} (\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} = 0; \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}} < conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ab2ed601ff6d94235722947303a0505e7}{size}}; \mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}++) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00636}00636                 buf = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}];}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00637}00637                 \textcolor{keywordflow}{if} (!buf)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00638}00638                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00639}00639                 conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}}[\mbox{\hyperlink{en_8h_a61990b7f5388ef0010c75a5d80f58da9}{ix}}] = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00640}00640                 \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00641}00641                 \textcolor{keywordflow}{if} (!buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00642}00642                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00643}00643                 buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}}(conn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, buf, \mbox{\hyperlink{cq_8h_a06fc87d81c62e9abb8790b6e5713c55ba194f282fd1045d8fd1caca58888269f4}{MLX5\_CQE\_SYNDROME\_WR\_FLUSH\_ERR}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00644}00644         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00645}00645         list\_for\_each\_entry\_safe(buf, temp, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a351e6575f9bdfa06994d215b20e2af48}{backlog}}, \mbox{\hyperlink{structmlx5__fpga__dma__buf_aeb7afbbf748d7f5aa82e8a3d3fd9d027}{list}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00646}00646                 \mbox{\hyperlink{mlx5fpga__conn_8c_ae96ae20a315bfe4d37c658171a532d60}{mlx5\_fpga\_conn\_unmap\_buf}}(conn, buf);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00647}00647                 \textcolor{keywordflow}{if} (!buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00648}00648                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00649}00649                 buf-\/>\mbox{\hyperlink{structmlx5__fpga__dma__buf_aa65861ed8524a509f5b1e01f103c83de}{complete}}(conn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, buf, \mbox{\hyperlink{cq_8h_a06fc87d81c62e9abb8790b6e5713c55ba194f282fd1045d8fd1caca58888269f4}{MLX5\_CQE\_SYNDROME\_WR\_FLUSH\_ERR}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00650}00650         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00651}00651 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00652}00652 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00653}\mbox{\hyperlink{mlx5fpga__conn_8c_a5b9b2cae9740cd02c4d14f40927c9ed0}{00653}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a5b9b2cae9740cd02c4d14f40927c9ed0}{mlx5\_fpga\_conn\_destroy\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00654}00654 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00655}00655         \mbox{\hyperlink{mlx5__qp_8c_ac878520cc271b03726d5964d838fb68a}{mlx5\_core\_destroy\_qp}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00656}00656         \mbox{\hyperlink{mlx5fpga__conn_8c_ab4cbcf3be627b2297f6dc25397aec717}{mlx5\_fpga\_conn\_free\_recv\_bufs}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00657}00657         \mbox{\hyperlink{mlx5fpga__conn_8c_a8ce4af4fe4d203592ebf494199027f9d}{mlx5\_fpga\_conn\_flush\_send\_bufs}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00658}00658         kvfree(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00659}00659         kvfree(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a010f06d953f5022c09b2cc8cfcbb9196}{rq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a2a5210b9483a8c7e0bea23597a8cd521}{bufs}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00660}00660         \mbox{\hyperlink{mlx5__wq_8c_a49551f7d5d4eaab85b551255676b527e}{mlx5\_wq\_destroy}}(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00661}00661 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00663}\mbox{\hyperlink{mlx5fpga__conn_8c_ac30d213d1f6e39d56038f00b9876d6d2}{00663}} \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_ac30d213d1f6e39d56038f00b9876d6d2}{mlx5\_fpga\_conn\_reset\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00664}00664 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00665}00665         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00666}00666 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00667}00667         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Modifying QP \%u to RST\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00668}00668 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00669}00669         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__qp_8c_a85fc437dc284abc0d7d88c9f039a7701}{mlx5\_core\_qp\_modify}}(mdev, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2e3268ef4cf852853a5bbcbd823a7810}{MLX5\_CMD\_OP\_2RST\_QP}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00670}00670                                    \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00671}00671 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00673}\mbox{\hyperlink{mlx5fpga__conn_8c_a402092e9da5a8abe204dea6f0269dad2}{00673}} \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a402092e9da5a8abe204dea6f0269dad2}{mlx5\_fpga\_conn\_init\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00674}00674 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00675}00675         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00676}00676         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00677}00677         u32 *qpc = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00678}00678         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00679}00679 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00680}00680         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Modifying QP \%u to INIT\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00682}00682         qpc = kzalloc(\mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qpc), GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00683}00683         \textcolor{keywordflow}{if} (!qpc) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00684}00684                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00685}00685                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00686}00686         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00687}00687 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00688}00688         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, st, \mbox{\hyperlink{qp_8h_a4102b7202de3a76d40f5c3cd7a8696dfad2b8ae88f78632d28176d08944bc5f5b}{MLX5\_QP\_ST\_RC}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00689}00689         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, pm\_state, \mbox{\hyperlink{mlx5__ifc_8h_afb9b21dcb0b6eb4e9e0c9cb090e774beabe33547188c4c3f5b02d432d1013d303}{MLX5\_QP\_PM\_MIGRATED}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00690}00690         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.pkey\_index, \mbox{\hyperlink{mlx5fpga__conn_8c_a298a5c44781bf54b93286ebf111d8624}{MLX5\_FPGA\_PKEY\_INDEX}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00691}00691         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.port, \mbox{\hyperlink{mlx5fpga__conn_8c_a10ec220cdbeb78d5ba29c45f25522611}{MLX5\_FPGA\_PORT\_NUM}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00692}00692         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, pd, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00693}00693         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, cqn\_snd, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00694}00694         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, cqn\_rcv, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_aa4a997291e120b040c7a95d59639e62a}{cqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00695}00695         \mbox{\hyperlink{device_8h_a6e7776ca1e3178584753950058580eb6}{MLX5\_SET64}}(qpc, qpc, dbr\_addr, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a4f8c2b3dbdac9eba85dcf7c9fc21fb3c}{wq\_ctrl}}.\mbox{\hyperlink{structmlx5__frag__wq__ctrl_a117d04c2db88fdac9e948b25d9d6fa3a}{db}}.\mbox{\hyperlink{structmlx5__db_a67fa49352985a2e13bc57bed6740471d}{dma}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00696}00696 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00697}00697         err = \mbox{\hyperlink{mlx5__qp_8c_a85fc437dc284abc0d7d88c9f039a7701}{mlx5\_core\_qp\_modify}}(mdev, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aeaf86cbb5c495b4cc31c1b70d8b218fc}{MLX5\_CMD\_OP\_RST2INIT\_QP}}, 0, qpc,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00698}00698                                   \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00699}00699         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00700}00700                 mlx5\_fpga\_warn(fdev, \textcolor{stringliteral}{"{}qp\_modify RST2INIT failed: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00701}00701                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00702}00702         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00703}00703 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00704}00704 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00705}00705         kfree(qpc);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00706}00706         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00707}00707 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00709}\mbox{\hyperlink{mlx5fpga__conn_8c_af764ec7215b938de099b3a34ad3bd2b5}{00709}} \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_af764ec7215b938de099b3a34ad3bd2b5}{mlx5\_fpga\_conn\_rtr\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00710}00710 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00711}00711         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00712}00712         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00713}00713         u32 *qpc = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00714}00714         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00715}00715 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00716}00716         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}QP RTR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00717}00717 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00718}00718         qpc = kzalloc(\mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qpc), GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00719}00719         \textcolor{keywordflow}{if} (!qpc) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00720}00720                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00721}00721                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00722}00722         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00723}00723 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00724}00724         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, mtu, \mbox{\hyperlink{mlx5__ifc_8h_aff3701dfcc246bf08b07f25a2cfd9e6dae6b5c05a1e27ecfecfe13586e4865e5b}{MLX5\_QPC\_MTU\_1K\_BYTES}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00725}00725         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_msg\_max, (u8)\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, log\_max\_msg));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00726}00726         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, remote\_qpn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00727}00727         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, next\_rcv\_psn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00728}00728                  \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, next\_send\_psn));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00729}00729         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.pkey\_index, \mbox{\hyperlink{mlx5fpga__conn_8c_a298a5c44781bf54b93286ebf111d8624}{MLX5\_FPGA\_PKEY\_INDEX}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00730}00730         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.port, \mbox{\hyperlink{mlx5fpga__conn_8c_a10ec220cdbeb78d5ba29c45f25522611}{MLX5\_FPGA\_PORT\_NUM}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00731}00731         ether\_addr\_copy(\mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qpc, qpc, primary\_address\_path.rmac\_47\_32),}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00732}00732                         \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, fpga\_mac\_47\_32));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00733}00733         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.udp\_sport,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00734}00734                  \mbox{\hyperlink{device_8h_abb3a60f881889fe61a749759d05357ecaae754c888760acdfe051642a7619c9f8}{MLX5\_CAP\_ROCE}}(mdev, r\_roce\_min\_src\_udp\_port));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00735}00735         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.src\_addr\_index,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00736}00736                  conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00737}00737         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.hop\_limit, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00738}00738         memcpy(\mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qpc, qpc, primary\_address\_path.rgid\_rip),}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00739}00739                \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, fpga\_ip),}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00740}00740                \mbox{\hyperlink{device_8h_aaf5b7017c184daa12a71900facaf9b93}{MLX5\_FLD\_SZ\_BYTES}}(qpc, primary\_address\_path.rgid\_rip));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00741}00741 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00742}00742         err = \mbox{\hyperlink{mlx5__qp_8c_a85fc437dc284abc0d7d88c9f039a7701}{mlx5\_core\_qp\_modify}}(mdev, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a387223d6eef7fb7e5bb7eebef319217b}{MLX5\_CMD\_OP\_INIT2RTR\_QP}}, 0, qpc,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00743}00743                                   \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00744}00744         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00745}00745                 mlx5\_fpga\_warn(fdev, \textcolor{stringliteral}{"{}qp\_modify RST2INIT failed: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00746}00746                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00747}00747         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00748}00748 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00749}00749 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00750}00750         kfree(qpc);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00751}00751         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00752}00752 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00754}\mbox{\hyperlink{mlx5fpga__conn_8c_a98a9980773bbc403ca1dde3d8ad3ad03}{00754}} \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a98a9980773bbc403ca1dde3d8ad3ad03}{mlx5\_fpga\_conn\_rts\_qp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00755}00755 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00756}00756         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00757}00757         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00758}00758         u32 *qpc = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00759}00759         u32 \mbox{\hyperlink{mlx5__ib__qp_8c_a02b4b1760b0b4871afc4017d4810c6b4}{opt\_mask}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00760}00760         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00761}00761 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00762}00762         mlx5\_fpga\_dbg(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}QP RTS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00763}00763 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00764}00764         qpc = kzalloc(\mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qpc), GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00765}00765         \textcolor{keywordflow}{if} (!qpc) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00766}00766                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00767}00767                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00768}00768         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00769}00769 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00770}00770         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, log\_ack\_req\_freq, 8);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00771}00771         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, min\_rnr\_nak, 0x12);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00772}00772         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, primary\_address\_path.ack\_timeout, 0x12); \textcolor{comment}{/* \string~1.07s */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00773}00773         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, next\_send\_psn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00774}00774                  \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, next\_rcv\_psn));}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00775}00775         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, retry\_count, 7);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00776}00776         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpc, qpc, rnr\_retry, 7); \textcolor{comment}{/* Infinite retry if RNR NACK */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00777}00777 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00778}00778         \mbox{\hyperlink{mlx5__ib__qp_8c_a02b4b1760b0b4871afc4017d4810c6b4}{opt\_mask}} = \mbox{\hyperlink{qp_8h_a727da74bdca35feec17e321a18dee453af494b207002438a35e1f387c7f03d212}{MLX5\_QP\_OPTPAR\_RNR\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00779}00779         err = \mbox{\hyperlink{mlx5__qp_8c_a85fc437dc284abc0d7d88c9f039a7701}{mlx5\_core\_qp\_modify}}(mdev, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1be97ac5ef366b071bec44e9f737ae58}{MLX5\_CMD\_OP\_RTR2RTS\_QP}}, \mbox{\hyperlink{mlx5__ib__qp_8c_a02b4b1760b0b4871afc4017d4810c6b4}{opt\_mask}}, qpc,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00780}00780                                   \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00781}00781         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00782}00782                 mlx5\_fpga\_warn(fdev, \textcolor{stringliteral}{"{}qp\_modify RST2INIT failed: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00783}00783                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00784}00784         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00786}00786 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00787}00787         kfree(qpc);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00788}00788         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00789}00789 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00791}\mbox{\hyperlink{mlx5fpga__conn_8c_aef7da7a10c4b5070da155dcbb854e03d}{00791}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_aef7da7a10c4b5070da155dcbb854e03d}{mlx5\_fpga\_conn\_connect}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00792}00792 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00793}00793         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00794}00794         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00796}00796         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, \mbox{\hyperlink{en__hw__tls_8h_a1b0c7bd4d79798ef4e0ce23894c9aeb2}{state}}, \mbox{\hyperlink{mlx5__ifc__fpga_8h_a0a7450a1bc555944d413c0b4375268c5a947e9f28f30867f89573911006fb96e3}{MLX5\_FPGA\_QPC\_STATE\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00797}00797         err = \mbox{\hyperlink{mlx5__fpga_2cmd_8h_a2a7138b86f2643d49bd1bc9be5857a1b}{mlx5\_fpga\_modify\_qp}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00798}00798                                   \mbox{\hyperlink{mlx5__fpga_2cmd_8h_a0b6133228fc055b3a2957f68bea1b949a7a85996283e4ea516890307ec5c8d6db}{MLX5\_FPGA\_QPC\_STATE}}, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00799}00799         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00800}00800                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to activate FPGA RC QP: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00801}00801                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00802}00802         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00804}00804         err = \mbox{\hyperlink{mlx5fpga__conn_8c_ac30d213d1f6e39d56038f00b9876d6d2}{mlx5\_fpga\_conn\_reset\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00805}00805         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00806}00806                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to change QP state to reset\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00807}00807                 \textcolor{keywordflow}{goto} err\_fpga\_qp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00808}00808         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00809}00809 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00810}00810         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a402092e9da5a8abe204dea6f0269dad2}{mlx5\_fpga\_conn\_init\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00811}00811         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00812}00812                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to modify QP from RESET to INIT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00813}00813                 \textcolor{keywordflow}{goto} err\_fpga\_qp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00814}00814         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00815}00815         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00817}00817         \textcolor{keywordflow}{while} (!\mbox{\hyperlink{mlx5fpga__conn_8c_a23371e136587bdd0eb83a3cbf6319589}{mlx5\_fpga\_conn\_post\_recv\_buf}}(conn))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00818}00818                 ;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00820}00820         err = \mbox{\hyperlink{mlx5fpga__conn_8c_af764ec7215b938de099b3a34ad3bd2b5}{mlx5\_fpga\_conn\_rtr\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00821}00821         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00822}00822                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to change QP state from INIT to RTR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00823}00823                 \textcolor{keywordflow}{goto} err\_recv\_bufs;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00824}00824         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00826}00826         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a98a9980773bbc403ca1dde3d8ad3ad03}{mlx5\_fpga\_conn\_rts\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00827}00827         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00828}00828                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to change QP state from RTR to RTS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00829}00829                 \textcolor{keywordflow}{goto} err\_recv\_bufs;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00830}00830         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00831}00831         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00833}00833 err\_recv\_bufs:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00834}00834         \mbox{\hyperlink{mlx5fpga__conn_8c_ab4cbcf3be627b2297f6dc25397aec717}{mlx5\_fpga\_conn\_free\_recv\_bufs}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00835}00835 err\_fpga\_qp:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00836}00836         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(fpga\_qpc, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, \mbox{\hyperlink{en__hw__tls_8h_a1b0c7bd4d79798ef4e0ce23894c9aeb2}{state}}, \mbox{\hyperlink{mlx5__ifc__fpga_8h_a0a7450a1bc555944d413c0b4375268c5a3568e0131117a62b4774e102c878b556}{MLX5\_FPGA\_QPC\_STATE\_INIT}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00837}00837         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__fpga_2cmd_8h_a2a7138b86f2643d49bd1bc9be5857a1b}{mlx5\_fpga\_modify\_qp}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00838}00838                                 \mbox{\hyperlink{mlx5__fpga_2cmd_8h_a0b6133228fc055b3a2957f68bea1b949a7a85996283e4ea516890307ec5c8d6db}{MLX5\_FPGA\_QPC\_STATE}}, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}))}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00839}00839                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to revert FPGA QP to INIT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00840}00840 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00841}00841         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00842}00842 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00843}00843 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00844}\mbox{\hyperlink{conn_8h_a63fd1ba8f592da8ac3ab98d89803de02}{00844}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *\mbox{\hyperlink{mlx5fpga__conn_8c_a63fd1ba8f592da8ac3ab98d89803de02}{mlx5\_fpga\_conn\_create}}(\textcolor{keyword}{struct} mlx5\_fpga\_device *\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00845}00845                                              \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn__attr}{mlx5\_fpga\_conn\_attr}} *attr,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00846}00846                                              \textcolor{keyword}{enum} \mbox{\hyperlink{mlx5__ifc__fpga_8h_a58f3b94a7634bd57550c109f15980f86}{mlx5\_ifc\_fpga\_qp\_type}} qp\_type)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00847}00847 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00848}00848         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *ret, *conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00849}00849         u8 *remote\_mac, *remote\_ip;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00850}00850         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00851}00851 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00852}00852         \textcolor{keywordflow}{if} (!attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_a573128ce1f3beed6045ee6c559cfa7ec}{recv\_cb}})}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00853}00853                 \textcolor{keywordflow}{return} ERR\_PTR(-\/EINVAL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00854}00854 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00855}00855         conn = kzalloc(\textcolor{keyword}{sizeof}(*conn), GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00856}00856         \textcolor{keywordflow}{if} (!conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00857}00857                 \textcolor{keywordflow}{return} ERR\_PTR(-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00859}00859         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}} = \mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00860}00860         INIT\_LIST\_HEAD(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a351e6575f9bdfa06994d215b20e2af48}{backlog}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00862}00862         spin\_lock\_init(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a9434130f25eb817fb8bbc1990f1a1867}{sq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad713136de225f5cd8ac3db195c2f86f3}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00863}00863 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00864}00864         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ae69e6ffe164c87d1ddafa4707ea90842}{recv\_cb}} = attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_a573128ce1f3beed6045ee6c559cfa7ec}{recv\_cb}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00865}00865         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_aa3348698e168c9070a2dfc71c375c55a}{cb\_arg}} = attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_a8427b443ccddeb08db27335764c83ef3}{cb\_arg}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00867}00867         remote\_mac = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, remote\_mac\_47\_32);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00868}00868         err = \mbox{\hyperlink{mlx5__vport_8c_ad67a4267d8c0e7b052f317c01819063a}{mlx5\_query\_nic\_vport\_mac\_address}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, 0, remote\_mac);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00869}00869         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00870}00870                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to query local MAC: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00871}00871                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00872}00872                 \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00873}00873         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00874}00874 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00875}00875         \textcolor{comment}{/* Build Modified EUI-\/64 IPv6 address from the MAC address */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00876}00876         remote\_ip = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, remote\_ip);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00877}00877         remote\_ip[0] = 0xfe;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00878}00878         remote\_ip[1] = 0x80;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00879}00879         addrconf\_addr\_eui48(\&remote\_ip[8], remote\_mac);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00881}00881         err = \mbox{\hyperlink{mlx5_8h_a12b71ce637d0cef3e73b936725c88bb2}{mlx5\_core\_reserved\_gid\_alloc}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00882}00882         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00883}00883                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to allocate SGID: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00884}00884                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00885}00885                 \textcolor{keywordflow}{goto} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00886}00886         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00887}00887 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00888}00888         err = \mbox{\hyperlink{driver_8h_ab19117189498a618bc1be5ac1f2c4c66}{mlx5\_core\_roce\_gid\_set}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00889}00889                                      \mbox{\hyperlink{device_8h_aac34dfe6c6b73b43a4656c9dce041034a5f9a519a258cefeb2de62b82fc302ba3}{MLX5\_ROCE\_VERSION\_2}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00890}00890                                      \mbox{\hyperlink{device_8h_a0944a4353780132eeab7b06e3e42291da59af73c2635e441b31439a6ffe7b8e6e}{MLX5\_ROCE\_L3\_TYPE\_IPV6}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00891}00891                                      remote\_ip, remote\_mac, \textcolor{keyword}{true}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00892}00892         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00893}00893                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to set SGID: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00894}00894                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00895}00895                 \textcolor{keywordflow}{goto} err\_rsvd\_gid;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00896}00896         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00897}00897         mlx5\_fpga\_dbg(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Reserved SGID index \%u\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00898}00898 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00899}00899         \textcolor{comment}{/* Allow for one cqe per rx/tx wqe, plus one cqe for the next wqe,}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00900}00900 \textcolor{comment}{         * created during processing of the cqe}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00901}00901 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00902}00902         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a919e3a27c69038bdf28405d8395abb73}{mlx5\_fpga\_conn\_create\_cq}}(conn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00903}00903                                        (attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_a61e026cc8ea88929c9215481bce725b8}{tx\_size}} + attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_aa1aaccf7c74124dab05799ca2a5137e6}{rx\_size}}) * 2);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00904}00904         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00905}00905                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to create CQ: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00906}00906                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00907}00907                 \textcolor{keywordflow}{goto} err\_gid;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00908}00908         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00909}00909 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00910}00910         \mbox{\hyperlink{mlx5fpga__conn_8c_a96813844ab07953ab3c3a4dff239ed02}{mlx5\_fpga\_conn\_arm\_cq}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00911}00911 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00912}00912         err = \mbox{\hyperlink{mlx5fpga__conn_8c_aa7ad8dd5c619fab84c806a23dc0892fc}{mlx5\_fpga\_conn\_create\_qp}}(conn, attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_a61e026cc8ea88929c9215481bce725b8}{tx\_size}}, attr-\/>\mbox{\hyperlink{structmlx5__fpga__conn__attr_aa1aaccf7c74124dab05799ca2a5137e6}{rx\_size}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00913}00913         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00914}00914                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to create QP: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00915}00915                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00916}00916                 \textcolor{keywordflow}{goto} err\_cq;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00917}00917         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00919}00919         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, \mbox{\hyperlink{en__hw__tls_8h_a1b0c7bd4d79798ef4e0ce23894c9aeb2}{state}}, \mbox{\hyperlink{mlx5__ifc__fpga_8h_a0a7450a1bc555944d413c0b4375268c5a3568e0131117a62b4774e102c878b556}{MLX5\_FPGA\_QPC\_STATE\_INIT}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00920}00920         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, qp\_type, qp\_type);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00921}00921         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, st, \mbox{\hyperlink{mlx5__ifc__fpga_8h_a4b8c34a63f5369ac3d1ad60cb4282f27a22390e7745f50db45494a4b8c9bdfbd9}{MLX5\_FPGA\_QPC\_ST\_RC}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00922}00922         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, ether\_type, ETH\_P\_8021Q);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00923}00923         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, vid, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00924}00924         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, next\_rcv\_psn, 1);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00925}00925         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, next\_send\_psn, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00926}00926         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, pkey, \mbox{\hyperlink{mlx5fpga__conn_8c_a81c6aac51c4f4ce6250eb3736c5e9540}{MLX5\_FPGA\_PKEY}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00927}00927         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, remote\_qpn, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}}.\mbox{\hyperlink{structmlx5__core__qp_a5def040e5ccb7907be50eb8c91bd5706}{qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00928}00928         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, rnr\_retry, 7);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00929}00929         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}}, retry\_count, 7);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00931}00931         err = \mbox{\hyperlink{mlx5__fpga_2cmd_8h_aaa2d172446e7ef267e0d5cf6461465d6}{mlx5\_fpga\_create\_qp}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a1e054ae2866babc0ca01c5ff638b1de9}{fpga\_qpc}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00932}00932                                   \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00933}00933         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00934}00934                 mlx5\_fpga\_err(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}Failed to create FPGA RC QP: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00935}00935                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00936}00936                 \textcolor{keywordflow}{goto} err\_qp;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00937}00937         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00938}00938 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00939}00939         err = \mbox{\hyperlink{mlx5fpga__conn_8c_aef7da7a10c4b5070da155dcbb854e03d}{mlx5\_fpga\_conn\_connect}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00940}00940         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00941}00941                 ret = ERR\_PTR(err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00942}00942                 \textcolor{keywordflow}{goto} err\_conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00943}00943         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00944}00944 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00945}00945         mlx5\_fpga\_dbg(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}, \textcolor{stringliteral}{"{}FPGA QPN is \%u\(\backslash\)n"{}}, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00946}00946         ret = conn;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00947}00947         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00948}00948 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00949}00949 err\_conn:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00950}00950         \mbox{\hyperlink{mlx5__fpga_2cmd_8h_ad4455b1959566ce7ad0f79c357d8dc39}{mlx5\_fpga\_destroy\_qp}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00951}00951 err\_qp:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00952}00952         \mbox{\hyperlink{mlx5fpga__conn_8c_a5b9b2cae9740cd02c4d14f40927c9ed0}{mlx5\_fpga\_conn\_destroy\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00953}00953 err\_cq:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00954}00954         \mbox{\hyperlink{mlx5fpga__conn_8c_ac043e74ee7975878875ed686e5bfdfed}{mlx5\_fpga\_conn\_destroy\_cq}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00955}00955 err\_gid:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00956}00956         \mbox{\hyperlink{driver_8h_ab19117189498a618bc1be5ac1f2c4c66}{mlx5\_core\_roce\_gid\_set}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}}, 0, 0, NULL,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00957}00957                                NULL, \textcolor{keyword}{false}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00958}00958 err\_rsvd\_gid:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00959}00959         \mbox{\hyperlink{mlx5_8h_ada404341f418bd3c613e7e4b86b807d3}{mlx5\_core\_reserved\_gid\_free}}(\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00960}00960 err:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00961}00961         kfree(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00962}00962 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00963}00963         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00964}00964 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00966}\mbox{\hyperlink{conn_8h_ad9cd84b3213974f31a5d34bae23cca51}{00966}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_ad9cd84b3213974f31a5d34bae23cca51}{mlx5\_fpga\_conn\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__fpga__conn}{mlx5\_fpga\_conn}} *conn)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00967}00967 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00968}00968         \textcolor{keyword}{struct }mlx5\_fpga\_device *fdev = conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00969}00969         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev = fdev-\/>mdev;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00970}00970         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00972}00972         conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_ae639d6ced115d7111f8bb821c7548928}{active}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00973}00973         tasklet\_disable(\&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0e9734dd467ff77cad882f86a6b32bc3}{tasklet}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00974}00974         synchronize\_irq(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a2f475d7b98d5eff0c95c0a59c6719e56}{cq}}.\mbox{\hyperlink{structmlx5__fpga__conn_ad8fac953fec3f217552e98bc3d9679f9}{mcq}}.\mbox{\hyperlink{structmlx5__core__cq_a11efe15093ea834e41b4c8a217bc7abe}{irqn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00975}00975 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00976}00976         \mbox{\hyperlink{mlx5__fpga_2cmd_8h_ad4455b1959566ce7ad0f79c357d8dc39}{mlx5\_fpga\_destroy\_qp}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_acaa1d21858889b89d49374d52ffecfc4}{fpga\_qpn}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00977}00977         err = \mbox{\hyperlink{mlx5__qp_8c_a85fc437dc284abc0d7d88c9f039a7701}{mlx5\_core\_qp\_modify}}(mdev, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad85c8bb740182b92cdc1387bb3b7f8c0}{MLX5\_CMD\_OP\_2ERR\_QP}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00978}00978                                   \&conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0bbd4f585659bec304b49c79b9b67d78}{mqp}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00979}00979         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00980}00980                 mlx5\_fpga\_warn(fdev, \textcolor{stringliteral}{"{}qp\_modify 2ERR failed: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00981}00981         \mbox{\hyperlink{mlx5fpga__conn_8c_a5b9b2cae9740cd02c4d14f40927c9ed0}{mlx5\_fpga\_conn\_destroy\_qp}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00982}00982         \mbox{\hyperlink{mlx5fpga__conn_8c_ac043e74ee7975878875ed686e5bfdfed}{mlx5\_fpga\_conn\_destroy\_cq}}(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00983}00983 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00984}00984         \mbox{\hyperlink{driver_8h_ab19117189498a618bc1be5ac1f2c4c66}{mlx5\_core\_roce\_gid\_set}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00985}00985                                NULL, NULL, \textcolor{keyword}{false}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00986}00986         \mbox{\hyperlink{mlx5_8h_ada404341f418bd3c613e7e4b86b807d3}{mlx5\_core\_reserved\_gid\_free}}(conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_a14fa437bcda564ce45f1a9cf2de195bc}{fdev}}-\/>mdev, conn-\/>\mbox{\hyperlink{structmlx5__fpga__conn_ac26e447c25417be9b9bf068b783fa9af}{qp}}.\mbox{\hyperlink{structmlx5__fpga__conn_a0f962cdf98ee34e811e10ac173c32b16}{sgid\_index}});}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00987}00987         kfree(conn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00988}00988 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00989}00989 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00990}\mbox{\hyperlink{conn_8h_a122591ec67988b99f667d5c151817601}{00990}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5fpga__conn_8c_a122591ec67988b99f667d5c151817601}{mlx5\_fpga\_conn\_device\_init}}(\textcolor{keyword}{struct} mlx5\_fpga\_device *fdev)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00991}00991 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00992}00992         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00994}00994         err = \mbox{\hyperlink{mlx5__vport_8c_af8566a5aca11144770173c575b151cf1}{mlx5\_nic\_vport\_enable\_roce}}(fdev-\/>mdev);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00995}00995         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00996}00996                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}Failed to enable RoCE: \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00997}00997                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00998}00998         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l00999}00999 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01000}01000         fdev-\/>conn\_res.uar = \mbox{\hyperlink{driver_8h_a76b81f015322a7417f58a515b7b6bd60}{mlx5\_get\_uars\_page}}(fdev-\/>mdev);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01001}01001         \textcolor{keywordflow}{if} (IS\_ERR(fdev-\/>conn\_res.uar)) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01002}01002                 err = PTR\_ERR(fdev-\/>conn\_res.uar);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01003}01003                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}get\_uars\_page failed, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01004}01004                 \textcolor{keywordflow}{goto} err\_roce;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01005}01005         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01006}01006         mlx5\_fpga\_dbg(fdev, \textcolor{stringliteral}{"{}Allocated UAR index \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01007}01007                       fdev-\/>conn\_res.uar-\/>index);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01008}01008 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01009}01009         err = \mbox{\hyperlink{driver_8h_a4781845194ba9f0f72b8e627acbc78b8}{mlx5\_core\_alloc\_pd}}(fdev-\/>mdev, \&fdev-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01010}01010         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01011}01011                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}alloc pd failed, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01012}01012                 \textcolor{keywordflow}{goto} err\_uar;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01013}01013         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01014}01014         mlx5\_fpga\_dbg(fdev, \textcolor{stringliteral}{"{}Allocated PD \%u\(\backslash\)n"{}}, fdev-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01016}01016         err = \mbox{\hyperlink{mlx5fpga__conn_8c_a43a0ba0727d2168349b4e32e293a10d2}{mlx5\_fpga\_conn\_create\_mkey}}(fdev-\/>mdev, fdev-\/>conn\_res.pdn,}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01017}01017                                          \&fdev-\/>conn\_res.mkey);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01018}01018         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01019}01019                 mlx5\_fpga\_err(fdev, \textcolor{stringliteral}{"{}create mkey failed, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01020}01020                 \textcolor{keywordflow}{goto} err\_dealloc\_pd;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01022}01022         mlx5\_fpga\_dbg(fdev, \textcolor{stringliteral}{"{}Created mkey 0x\%x\(\backslash\)n"{}}, fdev-\/>conn\_res.mkey.key);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01023}01023 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01024}01024         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01026}01026 err\_dealloc\_pd:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01027}01027         \mbox{\hyperlink{driver_8h_acbbf49b48251096e122a963f59c87055}{mlx5\_core\_dealloc\_pd}}(fdev-\/>mdev, fdev-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01028}01028 err\_uar:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01029}01029         \mbox{\hyperlink{driver_8h_a41357023a1da52f36274d9e307d1b7f4}{mlx5\_put\_uars\_page}}(fdev-\/>mdev, fdev-\/>conn\_res.uar);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01030}01030 err\_roce:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01031}01031         \mbox{\hyperlink{mlx5__vport_8c_aa10e84d4c730728eb1b932d9e991ebd7}{mlx5\_nic\_vport\_disable\_roce}}(fdev-\/>mdev);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01032}01032 out:}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01033}01033         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01034}01034 \}}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01036}\mbox{\hyperlink{conn_8h_a041c7c1adf5e09a399c462afb17e1487}{01036}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5fpga__conn_8c_a041c7c1adf5e09a399c462afb17e1487}{mlx5\_fpga\_conn\_device\_cleanup}}(\textcolor{keyword}{struct} mlx5\_fpga\_device *fdev)}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01037}01037 \{}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01038}01038         \mbox{\hyperlink{driver_8h_a1bb1877ebc3a53b0563d915e4a061178}{mlx5\_core\_destroy\_mkey}}(fdev-\/>mdev, \&fdev-\/>conn\_res.mkey);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01039}01039         \mbox{\hyperlink{driver_8h_acbbf49b48251096e122a963f59c87055}{mlx5\_core\_dealloc\_pd}}(fdev-\/>mdev, fdev-\/>conn\_res.pdn);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01040}01040         \mbox{\hyperlink{driver_8h_a41357023a1da52f36274d9e307d1b7f4}{mlx5\_put\_uars\_page}}(fdev-\/>mdev, fdev-\/>conn\_res.uar);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01041}01041         \mbox{\hyperlink{mlx5__vport_8c_aa10e84d4c730728eb1b932d9e991ebd7}{mlx5\_nic\_vport\_disable\_roce}}(fdev-\/>mdev);}
\DoxyCodeLine{\Hypertarget{mlx5fpga__conn_8c_source_l01042}01042 \}}

\end{DoxyCode}
