aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2018-12-06 17:59:07 +0100
committerJason Wang <jasowang@redhat.com>2019-03-05 11:27:40 +0800
commit4875bf140662b214ad9f94b0d566354977d8c01d (patch)
tree9d989767f0ba5826e12492234446034febbf1000 /qapi
parentc7cbb6b48fc2dbfeeb4c126ee4b909220a418fb0 (diff)
downloadqemu-4875bf140662b214ad9f94b0d566354977d8c01d.zip
qemu-4875bf140662b214ad9f94b0d566354977d8c01d.tar.gz
qemu-4875bf140662b214ad9f94b0d566354977d8c01d.tar.bz2
net: netmap: improve netmap_receive_iov()
Changes: - Save CPU cycles by computing the return value while scanning the input iovec, rather than calling iov_size() at the end. - Remove check for s->tx != NULL, because it cannot happen. - Cache ring->tail in a local variable and use it to check for space in the TX ring. The use of nm_ring_empty() was invalid, because nobody is updating ring->cur and ring->head at that point. - In case we run out of netmap slots in the middle of a packet, move the wake-up point by advancing ring->cur, but do not expose the incomplete packet (i.e., by updating also ring->head). Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions