<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin: 0;">Hi <a href="https://patchwork.dpdk.org/project/dpdk/list/?submitter=2660" style="box-sizing: border-box; background: 0px 0px rgb(240, 240, 240); color: rgb(66, 139, 202); text-decoration-line: none; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Konstantin</a>£¬</div><div style="margin: 0;"><br></div><div style="margin: 0;"><span style="font-size: 14px;"> I've been busy lately, sorry to reply to you late.</span></div><div style="margin: 0;"><br></div><div style="margin: 0;"> <span style="color: rgb(0, 127, 0); font-size: 12px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; white-space: pre-wrap;">> </span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; white-space: pre-wrap;">Instead of implicitly assuming that output mbufs will be allocated</span></div><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; color: rgb(51, 51, 51); word-break: break-all; border: 0px; border-radius: 0px;"><span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>from pkt_in pool, it would be better to have output_pool as explicit
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>parameter for that function.
<div><span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>In a same way we have it for rte_ipv4_fragment_packet().</div><div><br></div><div><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>If I understand correctly, here you assume that out_pkt will always
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>be big enough to hold entire fragment, right?
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>But that can not always be the case and probably we shouldn't assume
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>that for generic function.
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>I suppose safest way would be either use rte_pktmbuf_copy() here
<span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>directly or do something similar to what that function doing ourselves here.</pre><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="font-size: 14px;">reply: Thanks for the reminder, I will use explicit parameters and </span>rte_pktmbuf_copy();</pre><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="color: rgb(0, 127, 0); font-size: 12px;">> </span>Forgot to mention, new API has to be experimental.</pre><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="font-size: 14px;" class="">reply: Does this mean adding _rte_experimental when declaring a function?</span></pre><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="font-size: 14px;" class=""><br></span></pre><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 14.3px; word-break: break-all; border: 0px; border-radius: 0px;"><span style="font-size: 14px;" class="">Huichao,Cai</span></pre></div></pre></div>