Re: [PATCH net-next] virtio-net: avoid unnecessary sg initialzation

From
David Miller <davem@davemloft.net>
Date
2015-08-27 22:52:13
Also in
lkml, virtualization
Reply to
Jason Wang, 2015-08-27
From: Jason Wang <redacted>
Date: Thu, 27 Aug 2015 14:53:06 +0800
Usually an skb does not have up to MAX_SKB_FRAGS frags. So no need to
initialize the unuse part of sg. This patch initialize the sg based on
the real number it will used:

- during xmit, it could be inferred from nr_frags and can_push.
- for small receive buffer, it will also be 2.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <redacted>
This looks fine, thanks Jason.
Thread (2 messages) 2 messages, 2 authors, last reply 2015-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help