<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0mm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.acked-by
        {mso-style-name:acked-by;}
span.EmailStyle23
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0mm 0mm 0mm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0mm 0mm 0mm">
<p class="MsoNormal"><b>From:</b> Singh, Aman Deep <aman.deep.singh@intel.com> <br>
<b>Sent:</b> Friday, March 11, 2022 15:35<br>
<b>To:</b> Gregory Etelson <getelson@nvidia.com>; dev@dpdk.org<br>
<b>Cc:</b> Matan Azrad <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; stable@dpdk.org; Xiaoyun Li <xiaoyun.li@intel.com>; Yuying Zhang <yuying.zhang@intel.com>; Ting Xu <ting.xu@intel.com>; Ferruh Yigit <ferruh.yigit@intel.com><br>
<b>Subject:</b> Re: [PATCH] app/testpmd: fix GTP header parsing in csum FWD engine<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="1" cellspacing="3" cellpadding="0" style="background:#FFEB9C">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">
</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p>Looks good to me.<o:p></o:p></p>
<div>
<p class="MsoNormal">On 3/10/2022 7:50 PM, Gregory Etelson wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>GTP header can be followed by an optional 32 bits extension.<o:p></o:p></pre>
<pre>GTP notifies about the extension presence through the E, S or PN<o:p></o:p></pre>
<pre>header bits.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Csum GTP header parser did not check the extension bits value.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The patch updates GTP header length if header extension bits are set.<o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-family:"Courier New"">Can we rephrase above line "if at-least one of the extension bit is set."<br>
To make it more clear.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#548235;mso-style-textfill-fill-color:#548235;mso-style-textfill-fill-alpha:100.0%">[Gregory]
</span>I’ll post v2 with updated comment.<o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Cc: <a href="mailto:stable@dpdk.org">stable@dpdk.org</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")<o:p></o:p></pre>
<pre>Signed-off-by: Gregory Etelson <a href="mailto:getelson@nvidia.com"><getelson@nvidia.com></a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span class="acked-by">Acked-by: Aman Singh <a href="mailto:aman.deep.singh@intel.com">
<aman.deep.singh@intel.com></a></span> <o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre>---<o:p></o:p></pre>
<pre> app/test-pmd/csumonly.c | 7 +++----<o:p></o:p></pre>
<pre> 1 file changed, 3 insertions(+), 4 deletions(-)<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c<o:p></o:p></pre>
<pre>index 5274d498ee..f8abcded2b 100644<o:p></o:p></pre>
<pre>--- a/app/test-pmd/csumonly.c<o:p></o:p></pre>
<pre>+++ b/app/test-pmd/csumonly.c<o:p></o:p></pre>
<pre>@@ -223,15 +223,14 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>        gtp_hdr = (struct rte_gtp_hdr *)((char *)udp_hdr +<o:p></o:p></pre>
<pre>                  sizeof(struct rte_udp_hdr));<o:p></o:p></pre>
<pre>-<o:p></o:p></pre>
<pre>+       if (gtp_hdr->e || gtp_hdr->s || gtp_hdr->pn)<o:p></o:p></pre>
<pre>+               gtp_len += sizeof(struct rte_gtp_hdr_ext_word);<o:p></o:p></pre>
<pre>        /*<o:p></o:p></pre>
<pre>         * Check message type. If message type is 0xff, it is<o:p></o:p></pre>
<pre>         * a GTP data packet. If not, it is a GTP control packet<o:p></o:p></pre>
<pre>         */<o:p></o:p></pre>
<pre>        if (gtp_hdr->msg_type == 0xff) {<o:p></o:p></pre>
<pre>-               ip_ver = *(uint8_t *)((char *)udp_hdr +<o:p></o:p></pre>
<pre>-                        sizeof(struct rte_udp_hdr) +<o:p></o:p></pre>
<pre>-                        sizeof(struct rte_gtp_hdr));<o:p></o:p></pre>
<pre>+               ip_ver = *(uint8_t *)((char *)gtp_hdr + gtp_len);<o:p></o:p></pre>
<pre>                ip_ver = (ip_ver) & 0xf0;<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>                if (ip_ver == RTE_GTP_TYPE_IPV4) {<o:p></o:p></pre>
</blockquote>
</div>
</div>
</div>
</body>
</html>