Versions of this question have been much studied, but it's not obvious what the correct keywords are. In this case you want to look at algebraic geometry, particularly the study of algebraic curves, over finite fields. The relevant theorem in this subject is the Hasse-Weil bound, which in turn massively generalizes to the Weil conjectures.
The Hasse-Weil bound implies that if $f$ is irreducible and a certain nonsingularity condition is met (actually I am not sure if this is necessary), the number of solutions is something like (but not quite)
$p \pm 2g \sqrt{p}$
where $g = \frac{(r-1)(r-2)}{2}$ by the genus-degree formula. This gives a bound which is worse than your bound if $r$ is large compared to $p$ but which is substantially better if $p$ is large compared to $r$, so which bound is better depends on which regime you care about.
Of course, if $r > p$ then an even better bound than $rp$ is $p^2$...
The Hasse-Weil bound should conjecturally be tight in a suitable sense (in particular, asymptotically in $p$) by a suitable generalization of the Sato-Tate conjecture. On the other hand, in general your bound can be tight, since $f$ may be a product of distinct linear factors. If $f$ is reducible then you should factor $f$ and apply the Hasse-Weil bound separately to each of its factors.