Home
last modified time | relevance | path

Searched hist:"4875 bf140662b214ad9f94b0d566354977d8c01d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/net/
H A Dnetmap.cdiff 4875bf140662b214ad9f94b0d566354977d8c01d Thu Dec 06 10:59:07 CST 2018 Vincenzo Maffione <v.maffione@gmail.com> 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>