Let Y --> X be a branched G-covering of curves over a field k. The genus of X and the genus of Y are related by the famous Hurwitz genus formula. When k is perfect of characteristic p and G is a p-group, one also has the Deuring-Shafarevich formula which relates the p-rank of X to that of Y. In this talk, we will discuss our attempts to find a "motivic" generalization of the Deuring-Shafarevich formula by studying how the p-torsion group schemes of the Jacobians of X and Y are related. In particular, we will explain how to promote the numerical Deuring-Shafarevich formula to an isomorphism of (etale) group schemes. This is ongoing joint work with Rachel Pries.