[PATCH v3 12/18] tcp: Consolidate calculation of total frame size