<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:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 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=us-ascii">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.ik-banner
        {mso-style-name:ik-banner;
        background:#E2E3E5;}
span.ik-footer
        {mso-style-name:ik-footer;
        background:#E2E3E5;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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><!--[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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Courier New";color:#1F497D">struct rte_mbuf</span><span style="color:#1F497D"> in DPDK 19.11 has a field called
</span><span style="font-family:"Courier New";color:#1F497D">port</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">When packets are received using </span>
<span style="font-family:"Courier New";color:#1F497D">rte_eth_rx_burst</span><span style="color:#1F497D"> API,
</span><span style="font-family:"Courier New";color:#1F497D">struct rte_mbuf::port</span><span style="color:#1F497D"> will be filled with index value of the ethernet port on which the packet was received.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">This works with MLX ConnectX4. Hope this helps.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Purnima<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
<br>
<b>Sent:</b> July 19, 2022 10:40 AM<br>
<b>To:</b> users@dpdk.org<br>
<b>Subject:</b> track the physical port in the pipeline <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt;background:white"></p></div><!--removed inky banner--><p class="MsoNormal"><span lang="EN-IN"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal">    Is there any configuration or struct store the physical port where the packet is comes in.<o:p></o:p></p>
<p class="MsoNormal">Trying below scenario:<o:p></o:p></p>
<p class="MsoNormal">I have two pipeline in pipeline1 reading the packets from two links.<o:p></o:p></p>
<p class="MsoNormal">Link 0 bound to port 0 and link 1 bound to port 1.<o:p></o:p></p>
<p class="MsoNormal">After reading the packets in the pipeline 1 doing the packets match and action using tables.<o:p></o:p></p>
<p class="MsoNormal">Finally, it will be sent to pipeline2.<o:p></o:p></p>
<p class="MsoNormal">Pipeline2 forward the packets to another physical port.<o:p></o:p></p>
<p class="MsoNormal">If packets received in physical port 0 need to forward the traffic to port 2.<o:p></o:p></p>
<p class="MsoNormal">If the packets received in physical port 1 need to forward the traffic to port3.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am unable to decide the out port because packets doesn’t info about the port in.<o:p></o:p></p>
<p class="MsoNormal">Is there any option available to track the physical port_in?<o:p></o:p></p>
<p class="MsoNormal">Any help would be appreciated.<o:p></o:p></p>
<p class="MsoNormal"><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">Bala <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>