net: checksum: Introduce fine control over checksum type
commitf574633529926697ced51b6865e5c50bbb78bf1b
authorBin Meng <bin.meng@windriver.com>
Fri, 11 Dec 2020 09:35:12 +0000 (11 17:35 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 25 Jan 2021 09:04:56 +0000 (25 17:04 +0800)
tree98d77919083dfcbec0247c6980c479d08bc07d3b
parentd97f11590a0f60cd911ace8bb68180b5a09a068d
net: checksum: Introduce fine control over checksum type

At present net_checksum_calculate() blindly calculates all types of
checksums (IP, TCP, UDP). Some NICs may have a per type setting in
their BDs to control what checksum should be offloaded. To support
such hardware behavior, introduce a 'csum_flag' parameter to the
net_checksum_calculate() API to allow fine control over what type
checksum is calculated.

Existing users of this API are updated accordingly.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/allwinner-sun8i-emac.c
hw/net/cadence_gem.c
hw/net/fsl_etsec/rings.c
hw/net/ftgmac100.c
hw/net/imx_fec.c
hw/net/virtio-net.c
hw/net/xen_nic.c
include/net/checksum.h
net/checksum.c
net/filter-rewriter.c