<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:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Robert,<o:p></o:p></p>
<p class="MsoNormal">I tried your suggestion and it resolved my issue for the E810 NIC in PCI PT.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I also tried checking the port txmod.offloads capability and if supported I set txmod.offloads |= RTE_ETH_TX_OFFLOAD_MULTI_SEGS to see if VMXNET3 supported it, and it did.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Why is this required to explicitly set “RTE_ETH_TX_OFFLOAD_MULTI_SEGS “ bit for the Physical NIC but not really required for VMWARE VMXNET3 vNIC?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Ed<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none">From:</span></b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none"> Sanford, Robert <rsanford@akamai.com>
<br>
<b>Sent:</b> Friday, July 26, 2024 5:52 PM<br>
<b>To:</b> Lombardo, Ed <Ed.Lombardo@netscout.com>; users@dpdk.org<br>
<b>Subject:</b> Re: prepend mbuf to another mbuf<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;background:#97D700">
<tbody>
<tr>
<td style="padding:3.75pt 3.75pt 3.75pt 3.75pt">
<p class="MsoNormal" align="center" style="text-align:center"><strong><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black">External Email:</span></strong><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> This message
originated outside of NETSCOUT. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal">Did you try to set DEV_TX_OFFLOAD_MULTI_SEGS in txmode.offloads ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Robert<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:black;mso-ligatures:none">From:
</span></b><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:black;mso-ligatures:none">"Lombardo, Ed" <</span><a href="mailto:Ed.Lombardo@netscout.com"><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;mso-ligatures:none">Ed.Lombardo@netscout.com</span></a><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:black;mso-ligatures:none">><br>
<b>Date: </b>Friday, July 26, 2024 at 3:30 PM<br>
<b>To: </b>"</span><a href="mailto:users@dpdk.org"><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;mso-ligatures:none">users@dpdk.org</span></a><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:black;mso-ligatures:none">" <</span><a href="mailto:users@dpdk.org"><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;mso-ligatures:none">users@dpdk.org</span></a><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:black;mso-ligatures:none">><br>
<b>Subject: </b>prepend mbuf to another mbuf<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">I have an issue with retransmitting a received packet with encapsulation headers prepended to original received packet when using E810 NIC for transmit.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have received a packet and is stored in one or more mbufs. To do encapsulation I am acquiring a mbuf from free pool. The new mbuf is where I add the L2 Header, IPv4 header and GRE header. I update the mbuf with rte_mbuf_refcnt_set(new_mbuf,
1) and rte_mbuf_refcnt_update(mbuf, 1); and then fill in the new mbuf metadata like (nb_segs, pkt_len, port, mbuf->next, etc) from the original mbuf.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I test this feature in VMWare with VMXNET3 vnic it works perfectly, the packet is transmitted with the encapsulation headers ahead of the original packet seen at the endpoint.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I test same on Intel E810 only the first mbuf of data is transmitted, the original packet data from remaining mbufs is not transmitted.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I compared the mbufs just prior to transmit, byte by byte, in the VMXNET3 and E810 NIC cases and they are identical, the code path is the same.<o:p></o:p></p>
<p class="MsoNormal">I also tried dpdk 17.11 and dpdk 22.11 versions with same results.<o:p></o:p></p>
<p class="MsoNormal">Also same test fails with Intel X710 and X540 NICs similar to way E810 fails.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I modified the code to insert the encapsulation headers in the headroom of the original mbuf and it worked perfectly.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What could be the issue with the Intel NICs when transmitting a chain of mbufs, where the first mbuf has only the L2 header, IPv4 header and GRE header and remaining mbuf(s) contain the original packet data?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Ed<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>