We have a system based on the T1024 chip. I have 2 ports across which I would like to process the headers and classify them and process them accordingly.
I am using MPLS headers on both sides. One was an access side and the other side is the trunk side facing the network.
I am able to classify based on the MPLS labels and use the dpa_cls_hm_insert_params parameters to replace the header i.e the full 22 bytes with another header based on trunk facing network i.e the DA, SA and MPLS headers. I set the replace bit to 1 which in the linux kernel sets the replace field to 1. This seems to work fine.
But if I have the trunk side as a VLAN network then I would like to insert 4 extra bytes into the header going towards the trunk side and vice versa remove 4 bytes in the reverse direction.
In the direction going to the trunk I use the dpa_classif_set_insert_hm() api and chain two operations. One to insert 4 bytes for which I set the replace field to false. The other to replace 26 bytes of the header and include the vlan header for which I set the replace field to true.
I am not able to figure why but if I have the insertion of extra bytes I get junk on the network. Mostly it is packets with "deadface". In some cases it is junk from other packets on the node (some have indications of HTTP ssdp:discover packets).
I went thru the fman section in the SDK 2.0 document and I am not sure where to start debugging this issue. I would appreciate it if you could point me to more example in peforming dpa_classif_set_insert_hm() operations. In the usdpaa-apps code the example are only update operations.
Please let me know if you need any more information.