Oil gains on US Iran tensions and port halts