mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
f0b1df5c45
commit
2f0fa232b8
7 changed files with 34 additions and 30 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue