This Linux kernel change "vhost_net: disable zerocopy by default" is included in the Linux 4.9.187 release. This change is authored by Jason Wang <jasowang [at] redhat.com> on Mon Jun 17 05:20:54 2019 -0400. The commit for this change in Linux stable tree is e2c2891 (patch) which is from upstream commit 098eadc. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 098eadc.
vhost_net: disable zerocopy by default [ Upstream commit 098eadce3c622c07b328d0a43dda379b38cf7c5e ] Vhost_net was known to suffer from HOL issues which is not easy to fix. Several downstream disable the feature by default. What's more, the datapath was split and datacopy path got the support of batching and XDP support recently which makes it faster than zerocopy part for small packets transmission. It looks to me that disable zerocopy by default is more appropriate. It cold be enabled by default again in the future if we fix the above issues.  https://patchwork.kernel.org/patch/3787671/ Signed-off-by: Jason Wang <email@example.com> Acked-by: Michael S. Tsirkin <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com> Signed-off-by: Sasha Levin <firstname.lastname@example.org>
There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
drivers/vhost/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 681d0ea..75e1089 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -30,7 +30,7 @@ #include "vhost.h" -static int experimental_zcopytx = 1; +static int experimental_zcopytx = 0; module_param(experimental_zcopytx, int, 0444); MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;" " 1 -Enable; 0 - Disable");