Packet Forward from RGMII-1 to RGMII-2 on ls1043 with IP address and port modification

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Packet Forward from RGMII-1 to RGMII-2 on ls1043 with IP address and port modification

713 Views
bhargavjayswal
Contributor III

As per attached screenshot I wanted to send RTP packet from PC1 to PC2 with help of FMC policy.

For POC ,initially I'm only trying to route RGMII-1 UDP packets , where i wanted to change source IPv4 , destination IPv4 , source port and destination port before it goes in to TX frame queue of RGMII-2. 

I have written policy where i am unable to figure out how to change those parameter. Could you please point out how it can be done in attached policy .

Below are debugs

>> cat /sys/class/net/eth2/fqids

Rx error: 331
Rx default: 332
Rx PCD: 14592- 14719
Tx confirmation (mq): 333- 348
Tx error: 349
Tx default confirmation: 350
Tx: 351- 366

>> cat /sys/class/net/eth3/fqids

Rx error: 367
Rx default: 368
Rx PCD: 14720- 14847
Tx confirmation (mq): 369- 384
Tx error: 385
Tx default confirmation: 386
Tx: 387- 402

-----------------------------------------------------------------------------------------------------------------------------------------

<!--
This fmc configuration file sets the 6x1G and 1x10G on LS1043 to use the
policies indicated below.
-->

<cfgdata>
    <config>
<engine name="fm0">
<port type="MAC" number="2" policy="nxp_ls1043_policy_mac2"/>
<port type="MAC" number="3" policy="nxp_ls1043_policy_mac3"/>
</engine>
    </config>
</cfgdata>

-----------------------------------------------------------------------------------------------------------------------------------------

 

<?xml version="1.0" encoding="utf-8"?>

<netpcd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xmlProject/pcd.xsd" name="example"
description="route configuration">

<!-- xxxxxxxxxxxxxxxxxxxxxxxx Distributions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

<distribution name="nxp_ls1043_eth2_ipv4_udp_dist">
<!-- frame match rule -->
<protocols>
<protocolref name="udp"/>
</protocols>
<!-- frame handling rule -->
<action type="classification" name="eth2_udp_classif"/>
</distribution>

<distribution name="nxp_ls1043_eth2_default_dist">
<queue count="1" base="0x3900"/>
</distribution>

<distribution name="nxp_ls1043_eth3_default_dist">
<queue count="1" base="0x3980"/>
</distribution>


<!--    xxxxxxxxxxxxxxxxxxxxxxxx classification xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

<classification name="eth2_udp_classif">
<key>
<fieldref name="ipv4.src"/>
</key>
<entry>
<!-- If source IP is 192.168.2.70 then route packatet to RGMII-2 to send to PC2 -->
<data>0xC0A80246</data>

<!-- TODO :  CODE FOR UDP PACKET's PARAM UPDATE (src.ip, dest.ip, dest.port, src.port) -->
<!-- TX frame queue of RGMII-2 -->
<queue  count="15" base="387"/>
</entry>
</classification>

<!-- xxxxxxxxxxxxxxxxxxxxxxxxxx Policies xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

<policy name="nxp_ls1043_policy_mac2">
<dist_order>
<distributionref name="nxp_ls1043_eth2_ipv4_udp_dist"/>
<distributionref name="nxp_ls1043_eth2_default_dist"/>
</dist_order>
</policy>

<policy name="nxp_ls1043_policy_mac3">
<dist_order>
<distributionref name="nxp_ls1043_eth3_default_dist"/>
</dist_order>
</policy>

</netpcd>


-----------------------------------------------------------------------------------------------------------------------------------------

Note : I am not using DPDK, so please do not drag conversion in that direction, I wanted to route and modified packet from kernel space using DPAA engine and without cpu(core) intervention or process on that packets. .

 

Regards,

Bhargav J

0 Kudos
Reply
1 Reply

655 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to "8.2.6 Frame Manager Configuration Tool User Guide" in LSDK 21.08 user manual.

0 Kudos
Reply