  Let F be a locally compact nonarchimedean field with residue characteristic p
and G the group of F-rational points of a connected split reductive group over
F. For k an arbitrary field, we study the homological properties of the
Iwahori-Hecke k-algebra H' and of the pro-p Iwahori-Hecke k-algebra H of G. We
prove that both of these algebras are Gorenstein rings with self-injective
dimension bounded above by the rank of G. If G is semisimple, we also show that
this upper bound is sharp, that both H and H' are Auslander-Gorenstein and that
there is a duality functor on the finitely generated modules of H (respectively
H'). We obtain the analogous Gorenstein and Auslander-Gorenstein properties for
the graded rings associated to H and H'.
  When k has characteristic p, we prove that in most cases H and H' have
infinite global dimension. In particular, we deduce that the category of smooth
k-representations of G=PGL(2,Q_p) generated by their invariant vectors under
the pro-p-Iwahori subgroup has infinite global dimension (at least if k is
algebraically closed).
