As early as 1945 Ho Chi Minh approached the US government asking for help keeping the French and Chinese out of Vietnam, offering to be a de facto US Ally. The Vietnamese resistance through the war had been assisting US OSS agents in gathering intelligence and resisting the Japanese occupation. We ignored these feelers and instead provided military assistance in the form of several billion dollars to the French in their vain and bloody attempt to retain their colony.
We then supported the South Vietnamese junta in refusing to allow nation wide elections in 1956, as had been negotiated at Geneva. Eisenhower stated quite plainly in his memoir that this was done to prevent Ho Chi Minh from winning such an election and re-unifying the country under his government.
In 1964 there was an opportunity--again--to reach some kind of negotiated settlement, as Kennedy had done with Laos in 1962, but LBJ didn't want to appear "weak on communism" in his race against Goldwater.
In 1968 there was yet another chance for an end to the conflict, but Nixon undermined this by promising--behind the back of American negotiators--to make a better deal for the South Vietnamese military junta, all the while promising he had "a secret plan to end the war." This plan turned out to be to prolong US involvement for another four years, and spread the conflict to Cambodia and Laos. His secret bombing of Cambodia destabilized that country, destroyed its infrastructure, created hundreds of thousands of refugees, and paved the way for the victory of the Khmer Rouge and the killing fields that followed.
All of it could have been avoided had we not been locked into an anti-communist fever combined with an arrogance that insisted we could defeat Vietnamese nationalists when Chinese, French, and Japanese efforts to do so were in vain.
I have family whose lives were devastated by this war, and the Vietnamese are still grappling with the aftereffects of our use of chemical warfare--Agent Orange--and so much else.
The whole "domino theory" that said if Vietnam "fell" to the communists it would become a satellite of Red China was almost immediately disproved when Vietnam and China went to war almost as soon as Vietnam had been re-unified. Vietnam is now a major trading partner of the US and a lynch pin in efforts to contain Chinese influence in the South China Sea.
What we might have done with all the treasure we wasted fighting that war. How many millions of lives--Vietnamese, American, even French--might have been saved had we listened to Ho Chi Minh in 1945. Alas, as David Halberstam notes in The Best and the Brightest, there wasn't a single person in the US State Dept. who spoke Vietnamese, and the whole issue of "French Indochina" was handled by the French division of its European desk.
The combination of ignorance and arrogance has been and always will be deadly.