As I understand the rules, the official has to determine if the shoving was intentional. If it was intentional, by rule the player has to be ejected.
Here is a video clip of the incident:
Justin Smith says he didn't see the ref, and his shove was more defensive in nature (like one used to shoving off blocks of the OL). On the other hand, he did intend to shove somebody (it isn't like he backed into the ref), and the refs black cap was in his face.
I really could go either way on this.
The one thing that I thought was inappropriate was the behavior of the ref. He stuck his elbow into Justin Smith's chest. That wasn't necessary, and was encouraging a violent response back. I imagine that if the ref had just used his hands to push Smith back, he wouldnt have got shoved back either. But since he behaved in a violent manner, he got a violent response.