[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#689429: vmxnet3 driver with package drops on ESXi 5.0



On Tue, Oct 02, 2012 at 04:26:49PM +0200, Patrick Matthäi wrote:
> Using ESXi 5.0 with Linux guests (in this case many amd64 Squeeze
> machines with three vmxnet3 adapter for each VM) could cause package
> drops, here especially on using UDP (name resolving). So I saw that
> some machines produced ~ 20 drops / day.
> This has been fixed by VMware last week:
> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2032587

Vmware published this fix for the problem:

--- 731933/vmxnet3-only//vmxnet3_drv.c  2012-05-29 16:01:52.000000000 +0200
+++ 821615/vmxnet3-only//vmxnet3_drv.c  2012-08-25 16:01:16.000000000 +0200
@@ -986,21 +986,17 @@
                                        ctx->l4_hdr_size =
                                           compat_skb_tcp_header(skb)->doff * 4;
                                else if (iph->protocol == IPPROTO_UDP)
-                                       /*
-                                        * Use TCP header size so that bytes to
-                                        * copied are more than the minimum
-                                        * required by the backend.
-                                        */
                                        ctx->l4_hdr_size =
-                                                       sizeof(struct tcphdr);
+                                                       sizeof(struct udphdr);
                                else
                                        ctx->l4_hdr_size = 0;
                        } else {
                                /* for simplicity, don't copy L4 headers */
                                ctx->l4_hdr_size = 0;
                        }
-                       ctx->copy_size = ctx->eth_ip_hdr_size +
-                                         ctx->l4_hdr_size;
+                       /* make sure that copy size is not exceeding pkt len */
+                       ctx->copy_size = min((ctx->eth_ip_hdr_size +
+                                              ctx->l4_hdr_size), skb->len);

                } else {
                        ctx->eth_ip_hdr_size = 0;

The same changes are done in efead8710aad9e384730ecf25eae0287878840d7
(backported to 3.0 and 3.2; 2.6.32 possibly not affected) and
b203262de63c56393d09e254242b57c002d8619d (applied in 3.3, not
backported).

Please test if 3.5 or 3.6 from experimental fixes the reported problem.

Bastian

-- 
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
		-- Kirk, "The Ultimate Computer", stardate 4731.3


Reply to: