The average person cannot distinguish between patriotism, nationalism and racism, and it is a mistake to assume they are degrees of the same order. Patriotism and racism are parts of the current political system, where nationalism is an order that has come both before and will come after the current order. It is a worldview and type of civilization that is irreconciliably opposed to the type of society we call "modern," and is equally opposed to both patriotism and racism.
Nationalism is understanding of each society as an organic entity. It is neither individualist nor collectivist, but is founded upon the belief that in the mathematics of the universe there are incentives to live according to a certain design, and that we as individuals fulfill this design, which includes but is not limited to the collective or the individual. The individual both serves this design and is served by it, for it provides a more stable and nourishing society than modernity can.
See, capitalism is not fundamentally racist -- it can exploit racism for its purposes, but racism isn't built into it. Capitalism basically wants people to be interchangable cogs, and differences among them, such as on the basis of race, usually are not functional. I mean, they may be functional for a period, like if you want a super exploited workforce or something, but those situations are kind of anomalous. Over the long term, you can expect capitalism to be anti-racist -- just because its anti-human. And race is in fact a human characterstic -- there's no reason why it should be a negative characteristic, but it is a human characteristic. So therefore identifications based on race interfere with the basic ideal that people should be available just as consumers and producers, interchangable cogs who will purchase all the junk that's produced -- that's their ultimate function, and any other properties they might have are kind of irrelevent, and usually a nuisance.
[Noam Chomsky, Understanding Power: The Indispensable Chomsky (New York: The New York Press, 2002), pp.88-89]