How gNB figures out padding in the UL?

Thanks!

Does NR have similar mechanism?

So the MAC PDU will contain a MAC CE that has padding amount?