I think that you could've just set tx_bytes to the desc->len as this is being set in all scenarios... tx_bytes += desc->len;