net/eth: Report if headers are actually present
commit69ff5ef8474575556997dbe7f7f9bd28c4aee5de
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 23 Feb 2023 10:20:17 +0000 (23 19:20 +0900)
committerJason Wang <jasowang@redhat.com>
Fri, 10 Mar 2023 07:35:38 +0000 (10 15:35 +0800)
treecd4749e26ddd2b791574e4e3d2a21e8d2d50b570
parent47399506dcda52b03b6991c57ca2a426ba8e291f
net/eth: Report if headers are actually present

The values returned by eth_get_protocols() are used to perform RSS,
checksumming and segmentation. Even when a packet signals the use of the
protocols which these operations can be applied to, the headers for them
may not be present because of too short packet or fragmentation, for
example. In such a case, the operations cannot be applied safely.

Report the presence of headers instead of whether the use of the
protocols are indicated with eth_get_protocols(). This also makes
corresponding changes to the callers of eth_get_protocols() to match
with its new signature and to remove redundant checks for fragmentation.

Fixes: 75020a7021 ("Common definitions for VMWARE devices")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/e1000e_core.c
hw/net/net_rx_pkt.c
hw/net/net_rx_pkt.h
hw/net/trace-events
hw/net/virtio-net.c
hw/net/vmxnet3.c
include/net/eth.h
net/eth.c