OSDN Git Service

net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 23 May 2023 02:42:58 +0000 (11:42 +0900)
committerJason Wang <jasowang@redhat.com>
Tue, 23 May 2023 07:20:15 +0000 (15:20 +0800)
commit2f0fa232b8c330df029120a6824c8be3d4eb5cae
tree072462baff849b057cf4521ad724edee2f8de6ae
parentf0b1df5c4502b5ec89f83417924935ab201511d0
net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()

igb does not properly ensure the buffer passed to
net_rx_pkt_set_protocols() is contiguous for the entire L2/L3/L4 header.
Allow it to pass scattered data to net_rx_pkt_set_protocols().

Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/igb_core.c
hw/net/net_rx_pkt.c
hw/net/net_rx_pkt.h
hw/net/virtio-net.c
hw/net/vmxnet3.c
include/net/eth.h
net/eth.c