\hypertarget{mlx5__ib__ah_8c_source}{}\doxysection{mlx5\+\_\+ib\+\_\+ah.\+c}
\label{mlx5__ib__ah_8c_source}\index{dev/mlx5/mlx5\_ib/mlx5\_ib\_ah.c@{dev/mlx5/mlx5\_ib/mlx5\_ib\_ah.c}}
\mbox{\hyperlink{mlx5__ib__ah_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2013-\/2020, Mellanox Technologies, Ltd.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00004}00004 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00005}00005 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00006}00006 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00007}00007 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00008}00008 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00009}00009 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00011}00011 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00013}00013 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00014}00014 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00015}00015 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00016}00016 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00017}00017 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00018}00018 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00019}00019 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00020}00020 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00021}00021 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00022}00022 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00023}00023 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00025}00025 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_ratelimit.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mlx5__ib_8h}{dev/mlx5/mlx5\_ib/mlx5\_ib.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00033}\mbox{\hyperlink{mlx5__ib__ah_8c_a0c60ccae63b77245cddbe47248d1360e}{00033}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__ib__ah_8c_a0c60ccae63b77245cddbe47248d1360e}{create\_ib\_ah}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__ib__dev}{mlx5\_ib\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00034}00034                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__ib__ah}{mlx5\_ib\_ah}} *ah,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00035}00035                                   \textcolor{keyword}{struct} ib\_ah\_attr *ah\_attr,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00036}00036                                   \textcolor{keyword}{enum} rdma\_link\_layer ll)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00037}00037 \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00038}00038         \textcolor{keywordflow}{if} (ah\_attr-\/>ah\_flags \& IB\_AH\_GRH) \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00039}00039                 memcpy(ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a0995f42f418eff6a9c9eb90b368322d0}{rgid}}, \&ah\_attr-\/>grh.dgid, 16);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00040}00040                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a3af5b834d7172ed93db8605adbf82849}{grh\_gid\_fl}} = cpu\_to\_be32(ah\_attr-\/>grh.flow\_label |}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00041}00041                                                 (1 << 30) |}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00042}00042                                                 ah\_attr-\/>grh.sgid\_index << 20);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00043}00043                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_aaac9615328e97a3f8756dacfb04ca033}{hop\_limit}} = ah\_attr-\/>grh.hop\_limit;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00044}00044                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a558c324587b6a36bab7dafecd5570a3c}{tclass}} = ah\_attr-\/>grh.traffic\_class;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00045}00045         \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00047}00047         ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a839deabd8d098d97912ad102fcc14660}{stat\_rate\_sl}} = (ah\_attr-\/>static\_rate << 4);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00049}00049         \textcolor{keywordflow}{if} (ll == IB\_LINK\_LAYER\_ETHERNET) \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00050}00050                 memcpy(ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_ab1e78a75a5ec43f6c13785bdb328c3ab}{rmac}}, ah\_attr-\/>dmac, \textcolor{keyword}{sizeof}(ah\_attr-\/>dmac));}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00051}00051                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a5f87fb88437fe6bb584e4bd1fe3218ea}{udp\_sport}} =}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00052}00052                         \mbox{\hyperlink{mlx5__ib_8h_ad0737e46bd0e7c2a9ab3cceaa4ca4483}{mlx5\_get\_roce\_udp\_sport}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00053}00053                                                 ah\_attr-\/>port\_num,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00054}00054                                                 ah\_attr-\/>grh.sgid\_index);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00055}00055                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a839deabd8d098d97912ad102fcc14660}{stat\_rate\_sl}} |= (ah\_attr-\/>sl \& 0x7) << 1;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00056}00056         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00057}00057                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_ac20134b322805e2263dbb54145f7ced9}{rlid}} = cpu\_to\_be16(ah\_attr-\/>dlid);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00058}00058                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_aad853544a9a932690ed589c9176ecc99}{fl\_mlid}} = ah\_attr-\/>src\_path\_bits \& 0x7f;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00059}00059                 ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a839deabd8d098d97912ad102fcc14660}{stat\_rate\_sl}} |= (ah\_attr-\/>sl \& 0xf);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00060}00060         \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00061}00061 \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00063}\mbox{\hyperlink{mlx5__ib_8h_a20fd0a26bc292c0b7ae997e422bc374c}{00063}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__ib__ah_8c_afccc3ec8120d1163117cdf798ef23fef}{mlx5\_ib\_create\_ah}}(\textcolor{keyword}{struct} ib\_ah *ibah, \textcolor{keyword}{struct} ib\_ah\_attr *ah\_attr,}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00064}00064                       u32 flags, \textcolor{keyword}{struct} ib\_udata *udata)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00066}00066 \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00067}00067         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__ib__ah}{mlx5\_ib\_ah}} *ah = \mbox{\hyperlink{mlx5__ib_8h_a4b424667b11614574f9c335d4f231890}{to\_mah}}(\mbox{\hyperlink{structmlx5__ib__ah_a4414ec3788994f5f70c9d6ce1f9777af}{ibah}});}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00068}00068         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__ib__dev}{mlx5\_ib\_dev}} *dev = \mbox{\hyperlink{mlx5__ib_8h_a1806639f13e6865f0fa7aab4dd3ec6c7}{to\_mdev}}(ibah-\/>device);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00069}00069         \textcolor{keyword}{enum} rdma\_link\_layer ll;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00071}00071         ll = dev-\/>\mbox{\hyperlink{structmlx5__ib__dev_ad6e3ba2b9a0e5ae708df08538ef40b45}{ib\_dev}}.get\_link\_layer(\&dev-\/>\mbox{\hyperlink{structmlx5__ib__dev_ad6e3ba2b9a0e5ae708df08538ef40b45}{ib\_dev}}, ah\_attr-\/>port\_num);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00073}00073         \textcolor{keywordflow}{if} (ll == IB\_LINK\_LAYER\_ETHERNET \&\& !(ah\_attr-\/>ah\_flags \& IB\_AH\_GRH))}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00074}00074                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00076}00076         \textcolor{keywordflow}{if} (ll == IB\_LINK\_LAYER\_ETHERNET \&\& udata) \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00077}00077                 \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00078}00078                 \textcolor{keyword}{struct }mlx5\_ib\_create\_ah\_resp resp = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00079}00079                 u32 min\_resp\_len = offsetof(typeof(resp), dmac) +}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00080}00080                                    \textcolor{keyword}{sizeof}(resp.dmac);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00082}00082                 \textcolor{keywordflow}{if} (udata-\/>outlen < min\_resp\_len)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00083}00083                         \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00085}00085                 resp.response\_length = min\_resp\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00087}00087                 err = ib\_resolve\_eth\_dmac(\&dev-\/>\mbox{\hyperlink{structmlx5__ib__dev_ad6e3ba2b9a0e5ae708df08538ef40b45}{ib\_dev}}, ah\_attr);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00088}00088                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00089}00089                         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00091}00091                 memcpy(resp.dmac, ah\_attr-\/>dmac, ETH\_ALEN);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00092}00092                 err = ib\_copy\_to\_udata(udata, \&resp, resp.response\_length);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00093}00093                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00094}00094                         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00095}00095         \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00097}00097         \mbox{\hyperlink{mlx5__ib__ah_8c_a0c60ccae63b77245cddbe47248d1360e}{create\_ib\_ah}}(dev, ah, ah\_attr, ll);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00098}00098         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00099}00099 \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00101}\mbox{\hyperlink{mlx5__ib_8h_a5c2172afb3c321666b6371a65bcf7806}{00101}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__ib__ah_8c_a5c2172afb3c321666b6371a65bcf7806}{mlx5\_ib\_query\_ah}}(\textcolor{keyword}{struct} ib\_ah *ibah, \textcolor{keyword}{struct} ib\_ah\_attr *ah\_attr)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00102}00102 \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00103}00103         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__ib__ah}{mlx5\_ib\_ah}} *ah = \mbox{\hyperlink{mlx5__ib_8h_a4b424667b11614574f9c335d4f231890}{to\_mah}}(\mbox{\hyperlink{structmlx5__ib__ah_a4414ec3788994f5f70c9d6ce1f9777af}{ibah}});}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00104}00104         u32 tmp;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00106}00106         memset(ah\_attr, 0, \textcolor{keyword}{sizeof}(*ah\_attr));}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00108}00108         tmp = be32\_to\_cpu(ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a3af5b834d7172ed93db8605adbf82849}{grh\_gid\_fl}});}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00109}00109         \textcolor{keywordflow}{if} (tmp \& (1 << 30)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00110}00110                 ah\_attr-\/>ah\_flags = IB\_AH\_GRH;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00111}00111                 ah\_attr-\/>grh.sgid\_index = (tmp >> 20) \& 0xff;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00112}00112                 ah\_attr-\/>grh.flow\_label = tmp \& 0xfffff;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00113}00113                 memcpy(\&ah\_attr-\/>grh.dgid, ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a0995f42f418eff6a9c9eb90b368322d0}{rgid}}, 16);}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00114}00114                 ah\_attr-\/>grh.hop\_limit = ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_aaac9615328e97a3f8756dacfb04ca033}{hop\_limit}};}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00115}00115                 ah\_attr-\/>grh.traffic\_class = ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a558c324587b6a36bab7dafecd5570a3c}{tclass}};}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00116}00116         \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00117}00117         ah\_attr-\/>dlid = be16\_to\_cpu(ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_ac20134b322805e2263dbb54145f7ced9}{rlid}});}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00118}00118         ah\_attr-\/>static\_rate = ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a839deabd8d098d97912ad102fcc14660}{stat\_rate\_sl}} >> 4;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00119}00119         ah\_attr-\/>sl = ah-\/>\mbox{\hyperlink{structmlx5__ib__ah_a94aeeda69386ef44033e40e617f06a76}{av}}.\mbox{\hyperlink{structmlx5__av_a839deabd8d098d97912ad102fcc14660}{stat\_rate\_sl}} \& 0xf;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00121}00121         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00124}\mbox{\hyperlink{mlx5__ib_8h_a5413697e2f3c7786d8f952be39714478}{00124}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__ib__ah_8c_a5413697e2f3c7786d8f952be39714478}{mlx5\_ib\_destroy\_ah}}(\textcolor{keyword}{struct} ib\_ah *ah, u32 flags)}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00125}00125 \{}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00126}00126         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__ib__ah_8c_source_l00127}00127 \}}

\end{DoxyCode}
