Sorry Rai !
But the HP Procurve 5300xl Series product does not support enabling routing and meshing concurrently. If you have meshing enabled (no matter on how many ports) the system will not allow you to enable routing until you disable meshing and vice versa.
I assume you mean routing when you mention L3 function ?
BR,
Dmitry