aboutsummaryrefslogtreecommitdiff
path: root/hw/net/igb_core.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-05-23 11:42:58 +0900
committerJason Wang <jasowang@redhat.com>2023-05-23 15:20:15 +0800
commit2f0fa232b8c330df029120a6824c8be3d4eb5cae (patch)
tree072462baff849b057cf4521ad724edee2f8de6ae /hw/net/igb_core.c
parentf0b1df5c4502b5ec89f83417924935ab201511d0 (diff)
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>
Diffstat (limited to 'hw/net/igb_core.c')
-rw-r--r--hw/net/igb_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index eaca5bd2b6..21a8d9ada4 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -1650,7 +1650,7 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt,
ehdr = PKT_GET_ETH_HDR(filter_buf);
net_rx_pkt_set_packet_type(core->rx_pkt, get_eth_packet_type(ehdr));
- net_rx_pkt_set_protocols(core->rx_pkt, filter_buf, size);
+ net_rx_pkt_set_protocols(core->rx_pkt, iov, iovcnt, iov_ofs);
queues = igb_receive_assign(core, ehdr, size, &rss_info, external_tx);
if (!queues) {