What Makes Ethnic Humor Funny?

Try, if you can, to see this movie trailer of Mike Myers' forthcoming flick The Love Guru through the eyes of an Indian-American teen with Hindu parents:

I'm a bit befuddled by my own responses to ethnic humor. Why does the Love Guru trailer strike me as not-so-funny and racially offensive, while bits of this trailer (warning: iffy content) of Harold and Kumar at Guantanamo Bay made me smile (although I'm pretty sure I'd find a lot in this flick offensive for other reasons)?