Hello,
Yes it is possible, the DPSW component provides VLAN filtering.
take a look in the DPAA2 user manual, DPSW_CREATE command takes a 16bit MAX_VLANS.
You can also find examples of Setting up Ethernet Switch Capability in the LSDK 21.08 USER GUIDE