More can (and should) be said, but I have an earlier answer on Sino-Vietnamese relations pre-1979 here.