<html 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:"Apple Color Emoji";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Hi Andrew,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Packet type was not set for fragmented packets so we are trying to set it in all possible scenarios.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">I believe TCP packets can be fragmented.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Courier New"">Thanks,<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Courier New"">Pankaj</span><span style="font-size:11.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru><br>
<b>Date: </b>Wednesday, May 4, 2022 at 8:08 AM<br>
<b>To: </b>Pankaj Gupta <pagupta@vmware.com>, Jochen Behrens <jbehrens@vmware.com>, Yong Wang <yongwang@vmware.com><br>
<b>Cc: </b>dev@dpdk.org <dev@dpdk.org><br>
<b>Subject: </b>Re: [PATCH 7/8] vmxnet3: Set packet for fragmented packet<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Apple Color Emoji"">⚠</span><span style="font-size:11.0pt"> External Email<br>
<br>
On 5/3/22 07:22, Pankaj Gupta wrote:<br>
> The packet type is set even if it is a fragmented packet<br>
<br>
I'm wondering if is really IPv4/IPv6 fragmented packets or just<br>
scattered on Rx across many Rx buffers.<br>
I'm asking since fragmented sounds weird with TCP, since TCP<br>
spec forbids fragmentation.<br>
<br>
><br>
> Tested, using testpmd, for different hardware versions on<br>
> ESXi 7.0 Update 2.<br>
><br>
> Signed-off-by: Pankaj Gupta <pagupta@vmware.com><br>
> ---<br>
>   drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++<br>
>   1 file changed, 17 insertions(+)<br>
><br>
> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c<br>
> index a6665fbf70..5e177400c0 100644<br>
> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c<br>
> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c<br>
> @@ -759,6 +759,23 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,<br>
>               /* Check packet type, checksum errors, etc. */<br>
>               if (rcd->cnc) {<br>
>                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;<br>
> +<br>
> +                     if (rcd->v4) {<br>
> +                             packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;<br>
> +                             if (rcd->tcp)<br>
> +                                     packet_type |= RTE_PTYPE_L4_TCP;<br>
> +                             else if (rcd->udp)<br>
> +                                     packet_type |= RTE_PTYPE_L4_UDP;<br>
> +                     } else if (rcd->v6) {<br>
> +                             packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;<br>
> +                             if (rcd->tcp)<br>
> +                                     packet_type |= RTE_PTYPE_L4_TCP;<br>
> +                             else if (rcd->udp)<br>
> +                                     packet_type |= RTE_PTYPE_L4_UDP;<br>
> +                     } else {<br>
> +                             packet_type |= RTE_PTYPE_UNKNOWN;<br>
> +                     }<br>
> +<br>
>               } else {<br>
>                       if (rcd->v4) {<br>
>                               packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;<br>
<br>
<br>
________________________________<br>
<br>
</span><span style="font-size:11.0pt;font-family:"Apple Color Emoji"">⚠</span><span style="font-size:11.0pt"> External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>