I am writing a USDPAA application on T2080RDB, for which one of my router's ports is connected to a switch's trunk port. In the USDPAA application, I would like to filter packets with unknown vlan tags. While I can so this in software, is there a way to do it dynamically in hardware using the FMan driver API?
Since DPAA2 provides hardware vlan filtering by exposing an API, how do you do it in DPAA1 inside USDPAA?
Hello Heena S,
You could do vlan filter in the XML FMC PCD policy file, please refer to the following section in src/fragmentation_demo/fragmentation_demo_policy.xml in usdpaa-apps source code.
<!--Distribution -->
<distribution name="fman_eth_dist_ipv4">
<protocols>
<protocolref name="vlan"/>
<protocolref name="ipv4"/>
</protocols>
<key>
<fieldref name="vlan.tci"/>
<fieldref name="ipv4.src"/>
</key>
<queue count="4" base="0x1778"/>
<action type="classification" name="fman_eth_classif_ipv4"/>
</distribution>
<!--Distribution -->
<distribution name="fman_eth_dist_ipv6">
<protocols>
<protocolref name="vlan"/>
<protocolref name="ipv6"/>
</protocols>
<key>
<fieldref name="vlan.tci"/>
<fieldref name="ipv6.dst"/>
</key>
<queue count="4" base="0x177c"/>
<action type="classification" name="fman_eth_classif_ipv6"/>
</distribution>
In file src/fragmentation_demo/fragmentation_demo.c the following API is invoked.
/* Parse the input XML files and create the FMC Model */
err = fmc_compile(&cmodel,
cfg_path,
pcd_path,
pdl_path,
NULL,
0,
0,
NULL);
if (err != 0) {
error(0, err, "Failed to create the FMC Model\n");
return -err;
}
Running fragmentation_demo as the following
export DEF_CFG_PATH=/usr/etc/fragmentation_demo_config-b4860.xml
export DEF_PCD_PATH=/usr/etc/fragmentation_demo_policy.xml
export DEF_PDL_PATH=/etc/fmc/config/hxs_pdl_v3.xml
/usr/bin/fragmentation_demo -f 0 -t 6 -o 2
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------