mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
Add a function named packet_new_nocopy for COLO.
Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao <lei.rao@intel.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
@ -270,8 +270,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
|
||||
vnet_hdr_len = nf->netdev->vnet_hdr_len;
|
||||
}
|
||||
|
||||
pkt = packet_new(buf, size, vnet_hdr_len);
|
||||
g_free(buf);
|
||||
pkt = packet_new_nocopy(buf, size, vnet_hdr_len);
|
||||
|
||||
/*
|
||||
* if we get tcp packet
|
||||
|
Reference in New Issue
Block a user