Update packet size calculation.