Russia and China were trying to keep a hold on the Communist regime led by Ho-Chi Minh in North Vietnam. The Russians sent at least several hundred troops to Hanoi early during the war to help train the NVAs and China sent troops and aircraft in as well. The Soviets supplied the North Vietnamese with SAMs, guns, and many other weapons. Although their weaponry was inferior to American technology, the SAMs caused problems; we lost many bombers and escort fighters.
In the end, the U.S. lost our objective due to litigation in Congress, but we certainly were not defeated in a military sense. Johnson's Rolling Thunder did nothing to slow down the NVA, yet Nixon's Linebacker & Linebacker II caused serious damage to the North Vietnamese; again, due to debate and public unrest, the U.S. pulled out of Vietnam. Had the U.S. stayed the course, we would have liberated North Vietnam from Communism...much like the Iraq scenario in the present.