The peripheral should be set to a DMA buffer size covering the packet and matching the peripheral (DMA) requirements. For STM32F4 I found 1536 is a good size (as far as I remember) supporting std. MTU size of 1500.
Edit: Found one of the helpful posts from @htibosch