Usually soldiers who are used as [fodder] during an attack to use up enemy fire before [launching] an attack. [Cannon Fodder] is usually made up of useless units that are in-expensive.
If you describe soldiers as cannon fodder, you mean that they are not considered important by their officers and are sent into war without their leaders worrying if they die.