mvpp2: refactor the HW checksum setup
authorMatteo Croce <mcroce@redhat.com>
Sun, 28 Jul 2019 17:35:49 +0000 (19:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 18:08:43 +0000 (11:08 -0700)
commitd66503c43c0036d8db526d6c47c149bb971ac0b9
tree502271a53ba3f161e17a72796ada6dcbdcd04ba3
parent55b40dbf0e76b4bfb9d8b3a16a0208640a9a45df
mvpp2: refactor the HW checksum setup

The hardware can only offload checksum calculation on first port due to
the Tx FIFO size limitation, and has a maximum L3 offset of 128 bytes.
Document this in a comment and move duplicated code in a function.

Fixes: 576193f2d579 ("net: mvpp2: jumbo frames support")
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c