summaryrefslogtreecommitdiff
path: root/fs/jfs/Kconfig
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-07-18 10:55:16 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-28 16:30:05 -0700
commit7d9e6dd88cdea6c3d62a795ef69e6cc47b6dca2d (patch)
tree2c9898d30a6256c608f96091c211c7630d1fd62d /fs/jfs/Kconfig
parent05464d21faec5e37e5b0fca58a5201408d6aab31 (diff)
macvtap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS
[ Upstream commit ece793fcfc417b3925844be88a6a6dc82ae8f7c6 ] We try to linearize part of the skb when the number of iov is greater than MAX_SKB_FRAGS. This is not enough since each single vector may occupy more than one pages, so zerocopy_sg_fromiovec() may still fail and may break the guest network. Solve this problem by calculate the pages needed for iov before trying to do zerocopy and switch to use copy instead of zerocopy if it needs more than MAX_SKB_FRAGS. This is done through introducing a new helper to count the pages for iov, and call uarg->callback() manually when switching from zerocopy to copy to notify vhost. We can do further optimization on top. This bug were introduced from b92946e2919134ebe2a4083e4302236295ea2a73 (macvtap: zerocopy: validate vectors before building skb). Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jfs/Kconfig')
0 files changed, 0 insertions, 0 deletions