summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2015-08-27 14:53:06 +0800
committerDavid S. Miller <davem@davemloft.net>2015-08-27 15:51:45 -0700
commit547c890cfd26010e01b3faf98f29ca9b2252c8d8 (patch)
tree9d4c1428dff69ecf799eeb0e313a72257551a3b1 /net/core
parent5e0aa59728854837a7256e21644596f21a16ce0f (diff)
downloadlinux-547c890cfd26010e01b3faf98f29ca9b2252c8d8.tar.gz
linux-547c890cfd26010e01b3faf98f29ca9b2252c8d8.tar.bz2
linux-547c890cfd26010e01b3faf98f29ca9b2252c8d8.zip
virtio-net: avoid unnecessary sg initialzation
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 <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions