Entanglement and quantum transport in integrable systems