Apply 3rd vmxnet3 patch
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=65ec0bd1c7c14522670a5294de35710fb577a7fd
Remove unneccessary perf patches.
Change-Id: I154a501dacd6602a414f5a80f218580f583342c1
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5099
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
... | ... |
@@ -1,14 +1,14 @@ |
1 | 1 |
Summary: Linux API header files |
2 | 2 |
Name: linux-api-headers |
3 |
-Version: 4.9.94 |
|
4 |
-Release: 2%{?dist} |
|
3 |
+Version: 4.9.97 |
|
4 |
+Release: 1%{?dist} |
|
5 | 5 |
License: GPLv2 |
6 | 6 |
URL: http://www.kernel.org/ |
7 | 7 |
Group: System Environment/Kernel |
8 | 8 |
Vendor: VMware, Inc. |
9 | 9 |
Distribution: Photon |
10 | 10 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz |
11 |
-%define sha1 linux=82437991bdd6284fd3fd1fe21eb13f97abac203b |
|
11 |
+%define sha1 linux=3091c6a679a1d32a5f3e512960069a3ef5a10efb |
|
12 | 12 |
BuildArch: noarch |
13 | 13 |
%description |
14 | 14 |
The Linux API Headers expose the kernel's API for use by Glibc. |
... | ... |
@@ -25,6 +25,8 @@ find /%{buildroot}%{_includedir} \( -name .install -o -name ..install.cmd \) -de |
25 | 25 |
%defattr(-,root,root) |
26 | 26 |
%{_includedir}/* |
27 | 27 |
%changelog |
28 |
+* Mon Apr 30 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.97-1 |
|
29 |
+- Update to version 4.9.97 |
|
28 | 30 |
* Mon Apr 23 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.94-2 |
29 | 31 |
- Add full retpoline support by building with retpoline-enabled gcc. |
30 | 32 |
* Wed Apr 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.94-1 |
... | ... |
@@ -1,15 +1,15 @@ |
1 | 1 |
%global security_hardening none |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-aws |
4 |
-Version: 4.9.94 |
|
5 |
-Release: 2%{?kat_build:.%kat_build}%{?dist} |
|
4 |
+Version: 4.9.97 |
|
5 |
+Release: 1%{?kat_build:.%kat_build}%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
9 | 9 |
Vendor: VMware, Inc. |
10 | 10 |
Distribution: Photon |
11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz |
12 |
-%define sha1 linux=82437991bdd6284fd3fd1fe21eb13f97abac203b |
|
12 |
+%define sha1 linux=3091c6a679a1d32a5f3e512960069a3ef5a10efb |
|
13 | 13 |
Source1: config-aws |
14 | 14 |
Source2: initramfs.trigger |
15 | 15 |
# common |
... | ... |
@@ -45,12 +45,7 @@ Patch28: kvm-dont-accept-wrong-gsi-values.patch |
45 | 45 |
Patch30: vmxnet3-avoid-xmit-reset-due-to-a-race-in-vmxnet3.patch |
46 | 46 |
Patch31: vmxnet3-use-correct-flag-to-indicate-LRO-feature.patch |
47 | 47 |
Patch32: netfilter-ipset-pernet-ops-must-be-unregistered-last.patch |
48 |
- |
|
49 |
-# TODO: remove these patches on update |
|
50 |
-# 4.9.94 has a compile time error. Revert this commit to fix it. |
|
51 |
-# https://www.spinics.net/lists/stable/msg235266.html |
|
52 |
-Patch33: perf-tests-Decompress-kernel-module-before-objdump.patch |
|
53 |
-Patch34: perf-tests-Decompress-kernel-module-when-reading-DSO-data.patch |
|
48 |
+Patch33: vmxnet3-fix-incorrect-dereference-when-rxvlan-is-disabled.patch |
|
54 | 49 |
|
55 | 50 |
# For Spectre |
56 | 51 |
Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch |
... | ... |
@@ -213,8 +208,7 @@ This package contains the 'perf' performance analysis tools for Linux kernel. |
213 | 213 |
%patch30 -p1 |
214 | 214 |
%patch31 -p1 |
215 | 215 |
%patch32 -p1 |
216 |
-%patch33 -p1 -R |
|
217 |
-%patch34 -p1 -R |
|
216 |
+%patch33 -p1 |
|
218 | 217 |
|
219 | 218 |
%patch52 -p1 |
220 | 219 |
%patch53 -p1 |
... | ... |
@@ -434,6 +428,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg |
434 | 434 |
/usr/share/doc/* |
435 | 435 |
|
436 | 436 |
%changelog |
437 |
+* Mon Apr 30 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.97-1 |
|
438 |
+- Update to version 4.9.97. Apply 3rd vmxnet3 patch. |
|
437 | 439 |
* Mon Apr 23 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.94-2 |
438 | 440 |
- Add full retpoline support by building with retpoline-enabled gcc. |
439 | 441 |
* Wed Apr 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.94-1 |
... | ... |
@@ -1,15 +1,15 @@ |
1 | 1 |
%global security_hardening none |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-esx |
4 |
-Version: 4.9.94 |
|
5 |
-Release: 2%{?dist} |
|
4 |
+Version: 4.9.97 |
|
5 |
+Release: 1%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
9 | 9 |
Vendor: VMware, Inc. |
10 | 10 |
Distribution: Photon |
11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz |
12 |
-%define sha1 linux=82437991bdd6284fd3fd1fe21eb13f97abac203b |
|
12 |
+%define sha1 linux=3091c6a679a1d32a5f3e512960069a3ef5a10efb |
|
13 | 13 |
Source1: config-esx |
14 | 14 |
Source2: initramfs.trigger |
15 | 15 |
# common |
... | ... |
@@ -42,6 +42,7 @@ Patch25: init-do_mounts-recreate-dev-root.patch |
42 | 42 |
Patch30: vmxnet3-avoid-xmit-reset-due-to-a-race-in-vmxnet3.patch |
43 | 43 |
Patch31: vmxnet3-use-correct-flag-to-indicate-LRO-feature.patch |
44 | 44 |
Patch32: netfilter-ipset-pernet-ops-must-be-unregistered-last.patch |
45 |
+Patch33: vmxnet3-fix-incorrect-dereference-when-rxvlan-is-disabled.patch |
|
45 | 46 |
# For Spectre |
46 | 47 |
Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch |
47 | 48 |
Patch53: 0142-bpf-prevent-speculative-execution-in-eBPF-interprete.patch |
... | ... |
@@ -121,6 +122,7 @@ The Linux package contains the Linux kernel doc files |
121 | 121 |
%patch30 -p1 |
122 | 122 |
%patch31 -p1 |
123 | 123 |
%patch32 -p1 |
124 |
+%patch33 -p1 |
|
124 | 125 |
|
125 | 126 |
%patch52 -p1 |
126 | 127 |
%patch53 -p1 |
... | ... |
@@ -232,6 +234,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg |
232 | 232 |
/usr/src/linux-headers-%{uname_r} |
233 | 233 |
|
234 | 234 |
%changelog |
235 |
+* Mon Apr 30 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.97-1 |
|
236 |
+- Update to version 4.9.97. Apply 3rd vmxnet3 patch. |
|
235 | 237 |
* Mon Apr 23 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.94-2 |
236 | 238 |
- Add full retpoline support by building with retpoline-enabled gcc. |
237 | 239 |
* Wed Apr 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.94-1 |
... | ... |
@@ -1,15 +1,15 @@ |
1 | 1 |
%global security_hardening none |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-secure |
4 |
-Version: 4.9.94 |
|
5 |
-Release: 2%{?kat_build:.%kat_build}%{?dist} |
|
4 |
+Version: 4.9.97 |
|
5 |
+Release: 1%{?kat_build:.%kat_build}%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
9 | 9 |
Vendor: VMware, Inc. |
10 | 10 |
Distribution: Photon |
11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz |
12 |
-%define sha1 linux=82437991bdd6284fd3fd1fe21eb13f97abac203b |
|
12 |
+%define sha1 linux=3091c6a679a1d32a5f3e512960069a3ef5a10efb |
|
13 | 13 |
Source1: config-secure |
14 | 14 |
Source2: aufs4.9.tar.gz |
15 | 15 |
%define sha1 aufs=ebe716ce4b638a3772c7cd3161abbfe11d584906 |
... | ... |
@@ -51,6 +51,7 @@ Patch31: kvm-dont-accept-wrong-gsi-values.patch |
51 | 51 |
Patch32: vmxnet3-avoid-xmit-reset-due-to-a-race-in-vmxnet3.patch |
52 | 52 |
Patch33: vmxnet3-use-correct-flag-to-indicate-LRO-feature.patch |
53 | 53 |
Patch34: netfilter-ipset-pernet-ops-must-be-unregistered-last.patch |
54 |
+Patch35: vmxnet3-fix-incorrect-dereference-when-rxvlan-is-disabled.patch |
|
54 | 55 |
# For Spectre |
55 | 56 |
Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch |
56 | 57 |
Patch53: 0142-bpf-prevent-speculative-execution-in-eBPF-interprete.patch |
... | ... |
@@ -174,6 +175,7 @@ EOF |
174 | 174 |
%patch32 -p1 |
175 | 175 |
%patch33 -p1 |
176 | 176 |
%patch34 -p1 |
177 |
+%patch35 -p1 |
|
177 | 178 |
|
178 | 179 |
# spectre |
179 | 180 |
%patch52 -p1 |
... | ... |
@@ -321,6 +323,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg |
321 | 321 |
/usr/src/linux-headers-%{uname_r} |
322 | 322 |
|
323 | 323 |
%changelog |
324 |
+* Mon Apr 30 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.97-1 |
|
325 |
+- Update to version 4.9.97. Apply 3rd vmxnet3 patch. |
|
324 | 326 |
* Mon Apr 23 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.94-2 |
325 | 327 |
- Add full retpoline support by building with retpoline-enabled gcc. |
326 | 328 |
* Wed Apr 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.94-1 |
... | ... |
@@ -1,15 +1,15 @@ |
1 | 1 |
%global security_hardening none |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux |
4 |
-Version: 4.9.94 |
|
5 |
-Release: 2%{?kat_build:.%kat_build}%{?dist} |
|
4 |
+Version: 4.9.97 |
|
5 |
+Release: 1%{?kat_build:.%kat_build}%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
9 | 9 |
Vendor: VMware, Inc. |
10 | 10 |
Distribution: Photon |
11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz |
12 |
-%define sha1 linux=82437991bdd6284fd3fd1fe21eb13f97abac203b |
|
12 |
+%define sha1 linux=3091c6a679a1d32a5f3e512960069a3ef5a10efb |
|
13 | 13 |
Source1: config |
14 | 14 |
Source2: initramfs.trigger |
15 | 15 |
%define ena_version 1.1.3 |
... | ... |
@@ -47,13 +47,9 @@ Patch26: add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.pat |
47 | 47 |
Patch28: kvm-dont-accept-wrong-gsi-values.patch |
48 | 48 |
Patch30: vmxnet3-avoid-xmit-reset-due-to-a-race-in-vmxnet3.patch |
49 | 49 |
Patch31: vmxnet3-use-correct-flag-to-indicate-LRO-feature.patch |
50 |
+# To fix kernel PANIC in cascade |
|
50 | 51 |
Patch32: netfilter-ipset-pernet-ops-must-be-unregistered-last.patch |
51 |
- |
|
52 |
-# TODO: remove these patches on update |
|
53 |
-# 4.9.94 has a compile time error. Revert this commit to fix it. |
|
54 |
-# https://www.spinics.net/lists/stable/msg235266.html |
|
55 |
-Patch33: perf-tests-Decompress-kernel-module-before-objdump.patch |
|
56 |
-Patch34: perf-tests-Decompress-kernel-module-when-reading-DSO-data.patch |
|
52 |
+Patch33: vmxnet3-fix-incorrect-dereference-when-rxvlan-is-disabled.patch |
|
57 | 53 |
|
58 | 54 |
# For Spectre |
59 | 55 |
Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch |
... | ... |
@@ -171,8 +167,7 @@ This package contains the 'perf' performance analysis tools for Linux kernel. |
171 | 171 |
%patch30 -p1 |
172 | 172 |
%patch31 -p1 |
173 | 173 |
%patch32 -p1 |
174 |
-%patch33 -p1 -R |
|
175 |
-%patch34 -p1 -R |
|
174 |
+%patch33 -p1 |
|
176 | 175 |
|
177 | 176 |
%patch52 -p1 |
178 | 177 |
%patch53 -p1 |
... | ... |
@@ -355,6 +350,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg |
355 | 355 |
/usr/share/doc/* |
356 | 356 |
|
357 | 357 |
%changelog |
358 |
+* Mon Apr 30 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.97-1 |
|
359 |
+- Update to version 4.9.97. Apply 3rd vmxnet3 patch. |
|
358 | 360 |
* Mon Apr 23 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.94-2 |
359 | 361 |
- Add full retpoline support by building with retpoline-enabled gcc. |
360 | 362 |
* Wed Apr 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.94-1 |
361 | 363 |
deleted file mode 100644 |
... | ... |
@@ -1,65 +0,0 @@ |
1 |
-commit 7525a238be8f46617cdda29d1be5b85ffe3b042d |
|
2 |
-Author: Namhyung Kim <namhyung@kernel.org> |
|
3 |
-Date: Thu Jun 8 16:31:07 2017 +0900 |
|
4 |
- |
|
5 |
- perf tests: Decompress kernel module before objdump |
|
6 |
- |
|
7 |
- |
|
8 |
- [ Upstream commit 94df1040b1e6aacd8dec0ba3c61d7e77cd695f26 ] |
|
9 |
- |
|
10 |
- If a kernel modules is compressed, it should be decompressed before |
|
11 |
- running objdump to parse binary data correctly. This fixes a failure of |
|
12 |
- object code reading test for me. |
|
13 |
- |
|
14 |
- Signed-off-by: Namhyung Kim <namhyung@kernel.org> |
|
15 |
- Acked-by: Adrian Hunter <adrian.hunter@intel.com> |
|
16 |
- Acked-by: Jiri Olsa <jolsa@kernel.org> |
|
17 |
- Cc: David Ahern <dsahern@gmail.com> |
|
18 |
- Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> |
|
19 |
- Cc: Wang Nan <wangnan0@huawei.com> |
|
20 |
- Cc: kernel-team@lge.com |
|
21 |
- Link: http://lkml.kernel.org/r/20170608073109.30699-8-namhyung@kernel.org |
|
22 |
- Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
|
23 |
- Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> |
|
24 |
- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|
25 |
- |
|
26 |
-diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c |
|
27 |
-index ff5bc6363a79..150334064071 100644 |
|
28 |
-+++ b/tools/perf/tests/code-reading.c |
|
29 |
-@@ -224,6 +224,8 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode, |
|
30 |
- unsigned char buf2[BUFSZ]; |
|
31 |
- size_t ret_len; |
|
32 |
- u64 objdump_addr; |
|
33 |
-+ const char *objdump_name; |
|
34 |
-+ char decomp_name[KMOD_DECOMP_LEN]; |
|
35 |
- int ret; |
|
36 |
- |
|
37 |
- pr_debug("Reading object code for memory address: %#"PRIx64"\n", addr); |
|
38 |
-@@ -284,9 +286,25 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode, |
|
39 |
- state->done[state->done_cnt++] = al.map->start; |
|
40 |
- } |
|
41 |
- |
|
42 |
-+ objdump_name = al.map->dso->long_name; |
|
43 |
-+ if (dso__needs_decompress(al.map->dso)) { |
|
44 |
-+ if (dso__decompress_kmodule_path(al.map->dso, objdump_name, |
|
45 |
-+ decomp_name, |
|
46 |
-+ sizeof(decomp_name)) < 0) { |
|
47 |
-+ pr_debug("decompression failed\n"); |
|
48 |
-+ return -1; |
|
49 |
-+ } |
|
50 |
-+ |
|
51 |
-+ objdump_name = decomp_name; |
|
52 |
-+ } |
|
53 |
-+ |
|
54 |
- /* Read the object code using objdump */ |
|
55 |
- objdump_addr = map__rip_2objdump(al.map, al.addr); |
|
56 |
-- ret = read_via_objdump(al.map->dso->long_name, objdump_addr, buf2, len); |
|
57 |
-+ ret = read_via_objdump(objdump_name, objdump_addr, buf2, len); |
|
58 |
-+ |
|
59 |
-+ if (dso__needs_decompress(al.map->dso)) |
|
60 |
-+ unlink(objdump_name); |
|
61 |
-+ |
|
62 |
- if (ret > 0) { |
|
63 |
- /* |
|
64 |
- * The kernel maps are inaccurate - assume objdump is right in |
65 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,52 +0,0 @@ |
1 |
-commit e2d054998b151e85b6305aa72264f67097bd78e9 |
|
2 |
-Author: Namhyung Kim <namhyung@kernel.org> |
|
3 |
-Date: Thu Jun 8 16:31:05 2017 +0900 |
|
4 |
- |
|
5 |
- perf tools: Decompress kernel module when reading DSO data |
|
6 |
- |
|
7 |
- |
|
8 |
- [ Upstream commit 1d6b3c9ba756a5134fd7ad1959acac776d17404b ] |
|
9 |
- |
|
10 |
- Currently perf decompresses kernel modules when loading the symbol table |
|
11 |
- but it missed to do it when reading raw data. |
|
12 |
- |
|
13 |
- Signed-off-by: Namhyung Kim <namhyung@kernel.org> |
|
14 |
- Acked-by: Jiri Olsa <jolsa@kernel.org> |
|
15 |
- Cc: Adrian Hunter <adrian.hunter@intel.com> |
|
16 |
- Cc: David Ahern <dsahern@gmail.com> |
|
17 |
- Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> |
|
18 |
- Cc: Wang Nan <wangnan0@huawei.com> |
|
19 |
- Cc: kernel-team@lge.com |
|
20 |
- Link: http://lkml.kernel.org/r/20170608073109.30699-6-namhyung@kernel.org |
|
21 |
- Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
|
22 |
- Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> |
|
23 |
- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|
24 |
- |
|
25 |
-diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c |
|
26 |
-index d2c6cdd9d42b..4bc58822416c 100644 |
|
27 |
-+++ b/tools/perf/util/dso.c |
|
28 |
-@@ -366,7 +366,23 @@ static int __open_dso(struct dso *dso, struct machine *machine) |
|
29 |
- if (!is_regular_file(name)) |
|
30 |
- return -EINVAL; |
|
31 |
- |
|
32 |
-+ if (dso__needs_decompress(dso)) { |
|
33 |
-+ char newpath[KMOD_DECOMP_LEN]; |
|
34 |
-+ size_t len = sizeof(newpath); |
|
35 |
-+ |
|
36 |
-+ if (dso__decompress_kmodule_path(dso, name, newpath, len) < 0) { |
|
37 |
-+ free(name); |
|
38 |
-+ return -dso->load_errno; |
|
39 |
-+ } |
|
40 |
-+ |
|
41 |
-+ strcpy(name, newpath); |
|
42 |
-+ } |
|
43 |
-+ |
|
44 |
- fd = do_open(name); |
|
45 |
-+ |
|
46 |
-+ if (dso__needs_decompress(dso)) |
|
47 |
-+ unlink(name); |
|
48 |
-+ |
|
49 |
- free(name); |
|
50 |
- return fd; |
|
51 |
- } |
52 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,83 @@ |
0 |
+From 65ec0bd1c7c14522670a5294de35710fb577a7fd Mon Sep 17 00:00:00 2001 |
|
1 |
+From: Ronak Doshi <doshir@vmware.com> |
|
2 |
+Date: Wed, 18 Apr 2018 12:48:04 -0700 |
|
3 |
+Subject: vmxnet3: fix incorrect dereference when rxvlan is disabled |
|
4 |
+ |
|
5 |
+vmxnet3_get_hdr_len() is used to calculate the header length which in |
|
6 |
+turn is used to calculate the gso_size for skb. When rxvlan offload is |
|
7 |
+disabled, vlan tag is present in the header and the function references |
|
8 |
+ip header from sizeof(ethhdr) and leads to incorrect pointer reference. |
|
9 |
+ |
|
10 |
+This patch fixes this issue by taking sizeof(vlan_ethhdr) into account |
|
11 |
+if vlan tag is present and correctly references the ip hdr. |
|
12 |
+ |
|
13 |
+Signed-off-by: Ronak Doshi <doshir@vmware.com> |
|
14 |
+Acked-by: Guolin Yang <gyang@vmware.com> |
|
15 |
+Acked-by: Louis Luo <llouis@vmware.com> |
|
16 |
+Signed-off-by: David S. Miller <davem@davemloft.net> |
|
17 |
+--- |
|
18 |
+ drivers/net/vmxnet3/vmxnet3_drv.c | 17 +++++++++++++---- |
|
19 |
+ drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- |
|
20 |
+ 2 files changed, 15 insertions(+), 6 deletions(-) |
|
21 |
+ |
|
22 |
+diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c |
|
23 |
+index e04937f..9ebe2a6 100644 |
|
24 |
+--- a/drivers/net/vmxnet3/vmxnet3_drv.c |
|
25 |
+@@ -1218,6 +1218,7 @@ vmxnet3_get_hdr_len(struct vmxnet3_adapter *adapter, struct sk_buff *skb, |
|
26 |
+ union { |
|
27 |
+ void *ptr; |
|
28 |
+ struct ethhdr *eth; |
|
29 |
++ struct vlan_ethhdr *veth; |
|
30 |
+ struct iphdr *ipv4; |
|
31 |
+ struct ipv6hdr *ipv6; |
|
32 |
+ struct tcphdr *tcp; |
|
33 |
+@@ -1228,16 +1229,24 @@ vmxnet3_get_hdr_len(struct vmxnet3_adapter *adapter, struct sk_buff *skb, |
|
34 |
+ if (unlikely(sizeof(struct iphdr) + sizeof(struct tcphdr) > maplen)) |
|
35 |
+ return 0; |
|
36 |
+ |
|
37 |
++ if (skb->protocol == cpu_to_be16(ETH_P_8021Q) || |
|
38 |
++ skb->protocol == cpu_to_be16(ETH_P_8021AD)) |
|
39 |
++ hlen = sizeof(struct vlan_ethhdr); |
|
40 |
++ else |
|
41 |
++ hlen = sizeof(struct ethhdr); |
|
42 |
++ |
|
43 |
+ hdr.eth = eth_hdr(skb); |
|
44 |
+ if (gdesc->rcd.v4) { |
|
45 |
+- BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP)); |
|
46 |
+- hdr.ptr += sizeof(struct ethhdr); |
|
47 |
++ BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP) && |
|
48 |
++ hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IP)); |
|
49 |
++ hdr.ptr += hlen; |
|
50 |
+ BUG_ON(hdr.ipv4->protocol != IPPROTO_TCP); |
|
51 |
+ hlen = hdr.ipv4->ihl << 2; |
|
52 |
+ hdr.ptr += hdr.ipv4->ihl << 2; |
|
53 |
+ } else if (gdesc->rcd.v6) { |
|
54 |
+- BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6)); |
|
55 |
+- hdr.ptr += sizeof(struct ethhdr); |
|
56 |
++ BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6) && |
|
57 |
++ hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IPV6)); |
|
58 |
++ hdr.ptr += hlen; |
|
59 |
+ /* Use an estimated value, since we also need to handle |
|
60 |
+ * TSO case. |
|
61 |
+ */ |
|
62 |
+diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h |
|
63 |
+index 59ec340..a332646 100644 |
|
64 |
+--- a/drivers/net/vmxnet3/vmxnet3_int.h |
|
65 |
+@@ -69,10 +69,10 @@ |
|
66 |
+ /* |
|
67 |
+ * Version numbers |
|
68 |
+ */ |
|
69 |
+-#define VMXNET3_DRIVER_VERSION_STRING "1.4.d.0-k" |
|
70 |
++#define VMXNET3_DRIVER_VERSION_STRING "1.4.e.0-k" |
|
71 |
+ |
|
72 |
+ /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ |
|
73 |
+-#define VMXNET3_DRIVER_VERSION_NUM 0x01040d00 |
|
74 |
++#define VMXNET3_DRIVER_VERSION_NUM 0x01040e00 |
|
75 |
+ |
|
76 |
+ #if defined(CONFIG_PCI_MSI) |
|
77 |
+ /* RSS only makes sense if MSI-X is supported. */ |
|
78 |
+-- |
|
79 |
+cgit v1.1 |
|
80 |
+ |