aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-25 03:58:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-25 03:58:17 -0400
commit6f0d349d922ba44e4348a17a78ea51b7135965b1 (patch)
treede8423e550fcbb3aea7fc34074472c8ec628df48
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff)
parent829eb05365ff06e8adc23f2541597d0cc3c18348 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix netpoll OOPS in r8169, from Ville Syrjälä. 2) Fix bpf instruction alignment on powerpc et al., from Eric Dumazet. 3) Don't ignore IFLA_MTU attribute when creating new ipvlan links. From Xin Long. 4) Fix use after free in AF_PACKET, from Eric Dumazet. 5) Mis-matched RTNL unlock in xen-netfront, from Ross Lagerwall. 6) Fix VSOCK loopback on big-endian, from Claudio Imbrenda. 7) Missing RX buffer offset correction when computing DMA addresses in mvneta driver, from Antoine Tenart. 8) Fix crashes in DCCP's ccid3_hc_rx_send_feedback, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits) sfc: make function efx_rps_hash_bucket static strparser: Corrected typo in documentation. qmi_wwan: add support for the Dell Wireless 5821e module cxgb4: when disabling dcb set txq dcb priority to 0 net_sched: remove a bogus warning in hfsc net: dccp: switch rx_tstamp_last_feedback to monotonic clock net: dccp: avoid crash in ccid3_hc_rx_send_feedback() net: Remove depends on HAS_DMA in case of platform dependency MAINTAINERS: Add file patterns for dsa device tree bindings net: mscc: make sparse happy net: mvneta: fix the Rx desc DMA address in the Rx path Documentation: e1000: Fix docs build error Documentation: e100: Fix docs build error Documentation: e1000: Use correct heading adornment Documentation: e100: Use correct heading adornment ipv6: mcast: fix unsolicited report interval after receiving querys vhost_net: validate sock before trying to put its fd VSOCK: fix loopback on big-endian systems net: ethernet: ti: davinci_cpdma: make function cpdma_desc_pool_create static xen-netfront: Update features after registering netdev ...
-rw-r--r--Documentation/networking/e100.rst112
-rw-r--r--Documentation/networking/e1000.rst76
-rw-r--r--Documentation/networking/strparser.txt2
-rw-r--r--MAINTAINERS1
-rw-r--r--drivers/net/ethernet/amd/Kconfig2
-rw-r--r--drivers/net/ethernet/apm/xgene-v2/Kconfig1
-rw-r--r--drivers/net/ethernet/apm/xgene/Kconfig1
-rw-r--r--drivers/net/ethernet/arc/Kconfig6
-rw-r--r--drivers/net/ethernet/broadcom/Kconfig2
-rw-r--r--drivers/net/ethernet/cadence/macb_ptp.c5
-rw-r--r--drivers/net/ethernet/calxeda/Kconfig2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c2
-rw-r--r--drivers/net/ethernet/hisilicon/Kconfig2
-rw-r--r--drivers/net/ethernet/marvell/Kconfig8
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/Kconfig2
-rw-r--r--drivers/net/ethernet/mscc/ocelot.c11
-rw-r--r--drivers/net/ethernet/realtek/r8169.c2
-rw-r--r--drivers/net/ethernet/renesas/Kconfig2
-rw-r--r--drivers/net/ethernet/sfc/efx.c1
-rw-r--r--drivers/net/ethernet/ti/davinci_cpdma.c2
-rw-r--r--drivers/net/ethernet/ti/davinci_emac.c4
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c3
-rw-r--r--drivers/net/usb/qmi_wwan.c1
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/Kconfig1
-rw-r--r--drivers/net/wireless/quantenna/qtnfmac/Kconfig2
-rw-r--r--drivers/net/xen-netfront.c11
-rw-r--r--drivers/vhost/net.c3
-rw-r--r--include/linux/filter.h4
-rw-r--r--net/bpfilter/Makefile2
-rw-r--r--net/dccp/ccids/ccid3.c16
-rw-r--r--net/ipv6/mcast.c9
-rw-r--r--net/packet/af_packet.c16
-rw-r--r--net/sched/cls_flower.c21
-rw-r--r--net/sched/sch_hfsc.c4
-rw-r--r--net/sctp/chunk.c4
-rw-r--r--net/strparser/strparser.c5
-rw-r--r--net/vmw_vsock/virtio_transport.c2
-rw-r--r--tools/testing/selftests/net/.gitignore1
-rw-r--r--tools/testing/selftests/net/config2
40 files changed, 190 insertions, 165 deletions
diff --git a/Documentation/networking/e100.rst b/Documentation/networking/e100.rst
index d4d837027925..9708f5fa76de 100644
--- a/Documentation/networking/e100.rst
+++ b/Documentation/networking/e100.rst
@@ -1,3 +1,4 @@
1==============================================================
1Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters 2Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
2============================================================== 3==============================================================
3 4
@@ -86,83 +87,84 @@ Event Log Message Level: The driver uses the message level flag to log events
86Additional Configurations 87Additional Configurations
87========================= 88=========================
88 89
89 Configuring the Driver on Different Distributions 90Configuring the Driver on Different Distributions
90 ------------------------------------------------- 91-------------------------------------------------
91 92
92 Configuring a network driver to load properly when the system is started is 93Configuring a network driver to load properly when the system is started
93 distribution dependent. Typically, the configuration process involves adding 94is distribution dependent. Typically, the configuration process involves
94 an alias line to /etc/modprobe.d/*.conf as well as editing other system 95adding an alias line to /etc/modprobe.d/*.conf as well as editing other
95 startup scripts and/or configuration files. Many popular Linux 96system startup scripts and/or configuration files. Many popular Linux
96 distributions ship with tools to make these changes for you. To learn the 97distributions ship with tools to make these changes for you. To learn
97 proper way to configure a network device for your system, refer to your 98the proper way to configure a network device for your system, refer to
98 distribution documentation. If during this process you are asked for the 99your distribution documentation. If during this process you are asked
99 driver or module name, the name for the Linux Base Driver for the Intel 100for the driver or module name, the name for the Linux Base Driver for
100 PRO/100 Family of Adapters is e100. 101the Intel PRO/100 Family of Adapters is e100.
101 102
102 As an example, if you install the e100 driver for two PRO/100 adapters 103As an example, if you install the e100 driver for two PRO/100 adapters
103 (eth0 and eth1), add the following to a configuration file in /etc/modprobe.d/ 104(eth0 and eth1), add the following to a configuration file in
105/etc/modprobe.d/::
104 106
105 alias eth0 e100 107 alias eth0 e100
106 alias eth1 e100 108 alias eth1 e100
107 109
108 Viewing Link Messages 110Viewing Link Messages
109 --------------------- 111---------------------
110 In order to see link messages and other Intel driver information on your
111 console, you must set the dmesg level up to six. This can be done by
112 entering the following on the command line before loading the e100 driver::
113
114 dmesg -n 6
115 112
116 If you wish to see all messages issued by the driver, including debug 113In order to see link messages and other Intel driver information on your
117 messages, set the dmesg level to eight. 114console, you must set the dmesg level up to six. This can be done by
115entering the following on the command line before loading the e100
116driver::
118 117
119 NOTE: This setting is not saved across reboots. 118 dmesg -n 6
120 119
120If you wish to see all messages issued by the driver, including debug
121messages, set the dmesg level to eight.
121 122
122 ethtool 123NOTE: This setting is not saved across reboots.
123 -------
124 124
125 The driver utilizes the ethtool interface for driver configuration and 125ethtool
126 diagnostics, as well as displaying statistical information. The ethtool 126-------
127 version 1.6 or later is required for this functionality.
128 127
129 The latest release of ethtool can be found from 128The driver utilizes the ethtool interface for driver configuration and
130 https://www.kernel.org/pub/software/network/ethtool/ 129diagnostics, as well as displaying statistical information. The ethtool
130version 1.6 or later is required for this functionality.
131 131
132 Enabling Wake on LAN* (WoL) 132The latest release of ethtool can be found from
133 --------------------------- 133https://www.kernel.org/pub/software/network/ethtool/
134 WoL is provided through the ethtool* utility. For instructions on enabling
135 WoL with ethtool, refer to the ethtool man page.
136 134
137 WoL will be enabled on the system during the next shut down or reboot. For 135Enabling Wake on LAN* (WoL)
138 this driver version, in order to enable WoL, the e100 driver must be 136---------------------------
139 loaded when shutting down or rebooting the system. 137WoL is provided through the ethtool* utility. For instructions on
138enabling WoL with ethtool, refer to the ethtool man page. WoL will be
139enabled on the system during the next shut down or reboot. For this
140driver version, in order to enable WoL, the e100 driver must be loaded
141when shutting down or rebooting the system.
140 142
141 NAPI 143NAPI
142 ---- 144----
143 145
144 NAPI (Rx polling mode) is supported in the e100 driver. 146NAPI (Rx polling mode) is supported in the e100 driver.
145 147
146 See https://wiki.linuxfoundation.org/networking/napi for more information 148See https://wiki.linuxfoundation.org/networking/napi for more
147 on NAPI. 149information on NAPI.
148 150
149 Multiple Interfaces on Same Ethernet Broadcast Network 151Multiple Interfaces on Same Ethernet Broadcast Network
150 ------------------------------------------------------ 152------------------------------------------------------
151 153
152 Due to the default ARP behavior on Linux, it is not possible to have 154Due to the default ARP behavior on Linux, it is not possible to have one
153 one system on two IP networks in the same Ethernet broadcast domain 155system on two IP networks in the same Ethernet broadcast domain
154 (non-partitioned switch) behave as expected. All Ethernet interfaces 156(non-partitioned switch) behave as expected. All Ethernet interfaces
155 will respond to IP traffic for any IP address assigned to the system. 157will respond to IP traffic for any IP address assigned to the system.
156 This results in unbalanced receive traffic. 158This results in unbalanced receive traffic.
157 159
158 If you have multiple interfaces in a server, either turn on ARP 160If you have multiple interfaces in a server, either turn on ARP
159 filtering by 161filtering by
160 162
161 (1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter 163(1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
162 (this only works if your kernel's version is higher than 2.4.5), or 164 (this only works if your kernel's version is higher than 2.4.5), or
163 165
164 (2) installing the interfaces in separate broadcast domains (either 166(2) installing the interfaces in separate broadcast domains (either
165 in different switches or in a switch partitioned to VLANs). 167 in different switches or in a switch partitioned to VLANs).
166 168
167 169
168Support 170Support
diff --git a/Documentation/networking/e1000.rst b/Documentation/networking/e1000.rst
index 616848940e63..144b87eef153 100644
--- a/Documentation/networking/e1000.rst
+++ b/Documentation/networking/e1000.rst
@@ -1,3 +1,4 @@
1===========================================================
1Linux* Base Driver for Intel(R) Ethernet Network Connection 2Linux* Base Driver for Intel(R) Ethernet Network Connection
2=========================================================== 3===========================================================
3 4
@@ -354,57 +355,58 @@ previously mentioned to force the adapter to the same speed and duplex.
354Additional Configurations 355Additional Configurations
355========================= 356=========================
356 357
357 Jumbo Frames 358Jumbo Frames
358 ------------ 359------------
359 Jumbo Frames support is enabled by changing the MTU to a value larger than 360Jumbo Frames support is enabled by changing the MTU to a value larger
360 the default of 1500. Use the ifconfig command to increase the MTU size. 361than the default of 1500. Use the ifconfig command to increase the MTU
361 For example:: 362size. For example::
362 363
363 ifconfig eth<x> mtu 9000 up 364 ifconfig eth<x> mtu 9000 up
364 365
365 This setting is not saved across reboots. It can be made permanent if 366This setting is not saved across reboots. It can be made permanent if
366 you add:: 367you add::
367 368
368 MTU=9000 369 MTU=9000
369 370
370 to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example 371to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
371 applies to the Red Hat distributions; other distributions may store this 372applies to the Red Hat distributions; other distributions may store this
372 setting in a different location. 373setting in a different location.
374
375Notes: Degradation in throughput performance may be observed in some
376Jumbo frames environments. If this is observed, increasing the
377application's socket buffer size and/or increasing the
378/proc/sys/net/ipv4/tcp_*mem entry values may help. See the specific
379application manual and /usr/src/linux*/Documentation/
380networking/ip-sysctl.txt for more details.
373 381
374 Notes: 382- The maximum MTU setting for Jumbo Frames is 16110. This value
375 Degradation in throughput performance may be observed in some Jumbo frames 383 coincides with the maximum Jumbo Frames size of 16128.
376 environments. If this is observed, increasing the application's socket buffer
377 size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
378 See the specific application manual and /usr/src/linux*/Documentation/
379 networking/ip-sysctl.txt for more details.
380 384
381 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides 385- Using Jumbo frames at 10 or 100 Mbps is not supported and may result
382 with the maximum Jumbo Frames size of 16128. 386 in poor performance or loss of link.
383 387
384 - Using Jumbo frames at 10 or 100 Mbps is not supported and may result in 388- Adapters based on the Intel(R) 82542 and 82573V/E controller do not
385 poor performance or loss of link. 389 support Jumbo Frames. These correspond to the following product names:
390 Intel(R) PRO/1000 Gigabit Server Adapter Intel(R) PRO/1000 PM Network
391 Connection
386 392
387 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not 393ethtool
388 support Jumbo Frames. These correspond to the following product names: 394-------
389 Intel(R) PRO/1000 Gigabit Server Adapter 395The driver utilizes the ethtool interface for driver configuration and
390 Intel(R) PRO/1000 PM Network Connection 396diagnostics, as well as displaying statistical information. The ethtool
397version 1.6 or later is required for this functionality.
391 398
392 ethtool 399The latest release of ethtool can be found from
393 ------- 400https://www.kernel.org/pub/software/network/ethtool/
394 The driver utilizes the ethtool interface for driver configuration and
395 diagnostics, as well as displaying statistical information. The ethtool
396 version 1.6 or later is required for this functionality.
397 401
398 The latest release of ethtool can be found from 402Enabling Wake on LAN* (WoL)
399 https://www.kernel.org/pub/software/network/ethtool/ 403---------------------------
404WoL is configured through the ethtool* utility.
400 405
401 Enabling Wake on LAN* (WoL) 406WoL will be enabled on the system during the next shut down or reboot.
402 --------------------------- 407For this driver version, in order to enable WoL, the e1000 driver must be
403 WoL is configured through the ethtool* utility. 408loaded when shutting down or rebooting the system.
404 409
405 WoL will be enabled on the system during the next shut down or reboot.
406 For this driver version, in order to enable WoL, the e1000 driver must be
407 loaded when shutting down or rebooting the system.
408 410
409Support 411Support
410======= 412=======
diff --git a/Documentation/networking/strparser.txt b/Documentation/networking/strparser.txt
index 13081b3decef..a7d354ddda7b 100644
--- a/Documentation/networking/strparser.txt
+++ b/Documentation/networking/strparser.txt
@@ -48,7 +48,7 @@ void strp_pause(struct strparser *strp)
48 Temporarily pause a stream parser. Message parsing is suspended 48 Temporarily pause a stream parser. Message parsing is suspended
49 and no new messages are delivered to the upper layer. 49 and no new messages are delivered to the upper layer.
50 50
51void strp_pause(struct strparser *strp) 51void strp_unpause(struct strparser *strp)
52 52
53 Unpause a paused stream parser. 53 Unpause a paused stream parser.
54 54
diff --git a/MAINTAINERS b/MAINTAINERS
index 6cfd16790add..e19ec6d90a44 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9882,6 +9882,7 @@ M: Andrew Lunn <andrew@lunn.ch>
9882M: Vivien Didelot <vivien.didelot@savoirfairelinux.com> 9882M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
9883M: Florian Fainelli <f.fainelli@gmail.com> 9883M: Florian Fainelli <f.fainelli@gmail.com>
9884S: Maintained 9884S: Maintained
9885F: Documentation/devicetree/bindings/net/dsa/
9885F: net/dsa/ 9886F: net/dsa/
9886F: include/net/dsa.h 9887F: include/net/dsa.h
9887F: include/linux/dsa/ 9888F: include/linux/dsa/
diff --git a/drivers/net/ethernet/amd/Kconfig b/drivers/net/ethernet/amd/Kconfig
index d5c15e8bb3de..f273af136fc7 100644
--- a/drivers/net/ethernet/amd/Kconfig
+++ b/drivers/net/ethernet/amd/Kconfig
@@ -173,7 +173,7 @@ config SUNLANCE
173 173
174config AMD_XGBE 174config AMD_XGBE
175 tristate "AMD 10GbE Ethernet driver" 175 tristate "AMD 10GbE Ethernet driver"
176 depends on ((OF_NET && OF_ADDRESS) || ACPI || PCI) && HAS_IOMEM && HAS_DMA 176 depends on ((OF_NET && OF_ADDRESS) || ACPI || PCI) && HAS_IOMEM
177 depends on X86 || ARM64 || COMPILE_TEST 177 depends on X86 || ARM64 || COMPILE_TEST
178 select BITREVERSE 178 select BITREVERSE
179 select CRC32 179 select CRC32
diff --git a/drivers/net/ethernet/apm/xgene-v2/Kconfig b/drivers/net/ethernet/apm/xgene-v2/Kconfig
index 1205861b6318..eedd3f3dd22e 100644
--- a/drivers/net/ethernet/apm/xgene-v2/Kconfig
+++ b/drivers/net/ethernet/apm/xgene-v2/Kconfig
@@ -1,6 +1,5 @@
1config NET_XGENE_V2 1config NET_XGENE_V2
2 tristate "APM X-Gene SoC Ethernet-v2 Driver" 2 tristate "APM X-Gene SoC Ethernet-v2 Driver"
3 depends on HAS_DMA
4 depends on ARCH_XGENE || COMPILE_TEST 3 depends on ARCH_XGENE || COMPILE_TEST
5 help 4 help
6 This is the Ethernet driver for the on-chip ethernet interface 5 This is the Ethernet driver for the on-chip ethernet interface
diff --git a/drivers/net/ethernet/apm/xgene/Kconfig b/drivers/net/ethernet/apm/xgene/Kconfig
index afccb033177b..e4e33c900b57 100644
--- a/drivers/net/ethernet/apm/xgene/Kconfig
+++ b/drivers/net/ethernet/apm/xgene/Kconfig
@@ -1,6 +1,5 @@
1config NET_XGENE 1config NET_XGENE
2 tristate "APM X-Gene SoC Ethernet Driver" 2 tristate "APM X-Gene SoC Ethernet Driver"
3 depends on HAS_DMA
4 depends on ARCH_XGENE || COMPILE_TEST 3 depends on ARCH_XGENE || COMPILE_TEST
5 select PHYLIB 4 select PHYLIB
6 select MDIO_XGENE 5 select MDIO_XGENE
diff --git a/drivers/net/ethernet/arc/Kconfig b/drivers/net/ethernet/arc/Kconfig
index e743ddf46343..5d0ab8e74b68 100644
--- a/drivers/net/ethernet/arc/Kconfig
+++ b/drivers/net/ethernet/arc/Kconfig
@@ -24,7 +24,8 @@ config ARC_EMAC_CORE
24config ARC_EMAC 24config ARC_EMAC
25 tristate "ARC EMAC support" 25 tristate "ARC EMAC support"
26 select ARC_EMAC_CORE 26 select ARC_EMAC_CORE
27 depends on OF_IRQ && OF_NET && HAS_DMA && (ARC || COMPILE_TEST) 27 depends on OF_IRQ && OF_NET
28 depends on ARC || COMPILE_TEST
28 ---help--- 29 ---help---
29 On some legacy ARC (Synopsys) FPGA boards such as ARCAngel4/ML50x 30 On some legacy ARC (Synopsys) FPGA boards such as ARCAngel4/ML50x
30 non-standard on-chip ethernet device ARC EMAC 10/100 is used. 31 non-standard on-chip ethernet device ARC EMAC 10/100 is used.
@@ -33,7 +34,8 @@ config ARC_EMAC
33config EMAC_ROCKCHIP 34config EMAC_ROCKCHIP
34 tristate "Rockchip EMAC support" 35 tristate "Rockchip EMAC support"
35 select ARC_EMAC_CORE 36 select ARC_EMAC_CORE
36 depends on OF_IRQ && OF_NET && REGULATOR && HAS_DMA && (ARCH_ROCKCHIP || COMPILE_TEST) 37 depends on OF_IRQ && OF_NET && REGULATOR
38 depends on ARCH_ROCKCHIP || COMPILE_TEST
37 ---help--- 39 ---help---
38 Support for Rockchip RK3036/RK3066/RK3188 EMAC ethernet controllers. 40 Support for Rockchip RK3036/RK3066/RK3188 EMAC ethernet controllers.
39 This selects Rockchip SoC glue layer support for the 41 This selects Rockchip SoC glue layer support for the
diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index af75156919ed..4c3bfde6e8de 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -157,7 +157,6 @@ config BGMAC
157config BGMAC_BCMA 157config BGMAC_BCMA
158 tristate "Broadcom iProc GBit BCMA support" 158 tristate "Broadcom iProc GBit BCMA support"
159 depends on BCMA && BCMA_HOST_SOC 159 depends on BCMA && BCMA_HOST_SOC
160 depends on HAS_DMA
161 depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST 160 depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST
162 select BGMAC 161 select BGMAC
163 select PHYLIB 162 select PHYLIB
@@ -170,7 +169,6 @@ config BGMAC_BCMA
170 169
171config BGMAC_PLATFORM 170config BGMAC_PLATFORM
172 tristate "Broadcom iProc GBit platform support" 171 tristate "Broadcom iProc GBit platform support"
173 depends on HAS_DMA
174 depends on ARCH_BCM_IPROC || COMPILE_TEST 172 depends on ARCH_BCM_IPROC || COMPILE_TEST
175 depends on OF 173 depends on OF
176 select BGMAC 174 select BGMAC
diff --git a/drivers/net/ethernet/cadence/macb_ptp.c b/drivers/net/ethernet/cadence/macb_ptp.c
index 2220c771092b..678835136bf8 100644
--- a/drivers/net/ethernet/cadence/macb_ptp.c
+++ b/drivers/net/ethernet/cadence/macb_ptp.c
@@ -170,10 +170,7 @@ static int gem_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
170 170
171 if (delta > TSU_NSEC_MAX_VAL) { 171 if (delta > TSU_NSEC_MAX_VAL) {
172 gem_tsu_get_time(&bp->ptp_clock_info, &now); 172 gem_tsu_get_time(&bp->ptp_clock_info, &now);
173 if (sign) 173 now = timespec64_add(now, then);
174 now = timespec64_sub(now, then);
175 else
176 now = timespec64_add(now, then);
177 174
178 gem_tsu_set_time(&bp->ptp_clock_info, 175 gem_tsu_set_time(&bp->ptp_clock_info,
179 (const struct timespec64 *)&now); 176 (const struct timespec64 *)&now);
diff --git a/drivers/net/ethernet/calxeda/Kconfig b/drivers/net/ethernet/calxeda/Kconfig
index 07d2201530d2..9fdd496b90ff 100644
--- a/drivers/net/ethernet/calxeda/Kconfig
+++ b/drivers/net/ethernet/calxeda/Kconfig
@@ -1,6 +1,6 @@
1config NET_CALXEDA_XGMAC 1config NET_CALXEDA_XGMAC
2 tristate "Calxeda 1G/10G XGMAC Ethernet driver" 2 tristate "Calxeda 1G/10G XGMAC Ethernet driver"
3 depends on HAS_IOMEM && HAS_DMA 3 depends on HAS_IOMEM
4 depends on ARCH_HIGHBANK || COMPILE_TEST 4 depends on ARCH_HIGHBANK || COMPILE_TEST
5 select CRC32 5 select CRC32
6 help 6 help
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index dd04a2f89ce6..bc03c175a3cd 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -263,7 +263,7 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable)
263 "Can't %s DCB Priority on port %d, TX Queue %d: err=%d\n", 263 "Can't %s DCB Priority on port %d, TX Queue %d: err=%d\n",
264 enable ? "set" : "unset", pi->port_id, i, -err); 264 enable ? "set" : "unset", pi->port_id, i, -err);
265 else 265 else
266 txq->dcb_prio = value; 266 txq->dcb_prio = enable ? value : 0;
267 } 267 }
268} 268}
269 269
diff --git a/drivers/net/ethernet/hisilicon/Kconfig b/drivers/net/ethernet/hisilicon/Kconfig
index 8bcf470ff5f3..fb1a7251f45d 100644
--- a/drivers/net/ethernet/hisilicon/Kconfig
+++ b/drivers/net/ethernet/hisilicon/Kconfig
@@ -5,7 +5,7 @@
5config NET_VENDOR_HISILICON 5config NET_VENDOR_HISILICON
6 bool "Hisilicon devices" 6 bool "Hisilicon devices"
7 default y 7 default y
8 depends on (OF || ACPI) && HAS_DMA 8 depends on OF || ACPI
9 depends on ARM || ARM64 || COMPILE_TEST 9 depends on ARM || ARM64 || COMPILE_TEST
10 ---help--- 10 ---help---
11 If you have a network (Ethernet) card belonging to this class, say Y. 11 If you have a network (Ethernet) card belonging to this class, say Y.
diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
index cc2f7701e71e..f33fd22b351c 100644
--- a/drivers/net/ethernet/marvell/Kconfig
+++ b/drivers/net/ethernet/marvell/Kconfig
@@ -18,8 +18,8 @@ if NET_VENDOR_MARVELL
18 18
19config MV643XX_ETH 19config MV643XX_ETH
20 tristate "Marvell Discovery (643XX) and Orion ethernet support" 20 tristate "Marvell Discovery (643XX) and Orion ethernet support"
21 depends on (MV64X60 || PPC32 || PLAT_ORION || COMPILE_TEST) && INET 21 depends on MV64X60 || PPC32 || PLAT_ORION || COMPILE_TEST
22 depends on HAS_DMA 22 depends on INET
23 select PHYLIB 23 select PHYLIB
24 select MVMDIO 24 select MVMDIO
25 ---help--- 25 ---help---
@@ -58,7 +58,6 @@ config MVNETA_BM_ENABLE
58config MVNETA 58config MVNETA
59 tristate "Marvell Armada 370/38x/XP/37xx network interface support" 59 tristate "Marvell Armada 370/38x/XP/37xx network interface support"
60 depends on ARCH_MVEBU || COMPILE_TEST 60 depends on ARCH_MVEBU || COMPILE_TEST
61 depends on HAS_DMA
62 select MVMDIO 61 select MVMDIO
63 select PHYLINK 62 select PHYLINK
64 ---help--- 63 ---help---
@@ -84,7 +83,6 @@ config MVNETA_BM
84config MVPP2 83config MVPP2
85 tristate "Marvell Armada 375/7K/8K network interface support" 84 tristate "Marvell Armada 375/7K/8K network interface support"
86 depends on ARCH_MVEBU || COMPILE_TEST 85 depends on ARCH_MVEBU || COMPILE_TEST
87 depends on HAS_DMA
88 select MVMDIO 86 select MVMDIO
89 select PHYLINK 87 select PHYLINK
90 ---help--- 88 ---help---
@@ -93,7 +91,7 @@ config MVPP2
93 91
94config PXA168_ETH 92config PXA168_ETH
95 tristate "Marvell pxa168 ethernet support" 93 tristate "Marvell pxa168 ethernet support"
96 depends on HAS_IOMEM && HAS_DMA 94 depends on HAS_IOMEM
97 depends on CPU_PXA168 || ARCH_BERLIN || COMPILE_TEST 95 depends on CPU_PXA168 || ARCH_BERLIN || COMPILE_TEST
98 select PHYLIB 96 select PHYLIB
99 ---help--- 97 ---help---
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 17a904cc6a5e..0ad2f3f7da85 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1932,7 +1932,7 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,
1932 rx_bytes = rx_desc->data_size - (ETH_FCS_LEN + MVNETA_MH_SIZE); 1932 rx_bytes = rx_desc->data_size - (ETH_FCS_LEN + MVNETA_MH_SIZE);
1933 index = rx_desc - rxq->descs; 1933 index = rx_desc - rxq->descs;
1934 data = rxq->buf_virt_addr[index]; 1934 data = rxq->buf_virt_addr[index];
1935 phys_addr = rx_desc->buf_phys_addr; 1935 phys_addr = rx_desc->buf_phys_addr - pp->rx_offset_correction;
1936 1936
1937 if (!mvneta_rxq_desc_is_first_last(rx_status) || 1937 if (!mvneta_rxq_desc_is_first_last(rx_status) ||
1938 (rx_status & MVNETA_RXD_ERR_SUMMARY)) { 1938 (rx_status & MVNETA_RXD_ERR_SUMMARY)) {
diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
index f4d9c9975ac3..82827a8d3d67 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
@@ -30,7 +30,7 @@ config MLXSW_CORE_THERMAL
30 30
31config MLXSW_PCI 31config MLXSW_PCI
32 tristate "PCI bus implementation for Mellanox Technologies Switch ASICs" 32 tristate "PCI bus implementation for Mellanox Technologies Switch ASICs"
33 depends on PCI && HAS_DMA && HAS_IOMEM && MLXSW_CORE 33 depends on PCI && HAS_IOMEM && MLXSW_CORE
34 default m 34 default m
35 ---help--- 35 ---help---
36 This is PCI bus implementation for Mellanox Technologies Switch ASICs. 36 This is PCI bus implementation for Mellanox Technologies Switch ASICs.
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index fb2c8f8071e6..776a8a9be8e3 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -344,10 +344,9 @@ static int ocelot_port_stop(struct net_device *dev)
344static int ocelot_gen_ifh(u32 *ifh, struct frame_info *info) 344static int ocelot_gen_ifh(u32 *ifh, struct frame_info *info)
345{ 345{
346 ifh[0] = IFH_INJ_BYPASS; 346 ifh[0] = IFH_INJ_BYPASS;
347 ifh[1] = (0xff00 & info->port) >> 8; 347 ifh[1] = (0xf00 & info->port) >> 8;
348 ifh[2] = (0xff & info->port) << 24; 348 ifh[2] = (0xff & info->port) << 24;
349 ifh[3] = IFH_INJ_POP_CNT_DISABLE | (info->cpuq << 20) | 349 ifh[3] = (info->tag_type << 16) | info->vid;
350 (info->tag_type << 16) | info->vid;
351 350
352 return 0; 351 return 0;
353} 352}
@@ -370,11 +369,13 @@ static int ocelot_port_xmit(struct sk_buff *skb, struct net_device *dev)
370 QS_INJ_CTRL_SOF, QS_INJ_CTRL, grp); 369 QS_INJ_CTRL_SOF, QS_INJ_CTRL, grp);
371 370
372 info.port = BIT(port->chip_port); 371 info.port = BIT(port->chip_port);
373 info.cpuq = 0xff; 372 info.tag_type = IFH_TAG_TYPE_C;
373 info.vid = skb_vlan_tag_get(skb);
374 ocelot_gen_ifh(ifh, &info); 374 ocelot_gen_ifh(ifh, &info);
375 375
376 for (i = 0; i < IFH_LEN; i++) 376 for (i = 0; i < IFH_LEN; i++)
377 ocelot_write_rix(ocelot, ifh[i], QS_INJ_WR, grp); 377 ocelot_write_rix(ocelot, (__force u32)cpu_to_be32(ifh[i]),
378 QS_INJ_WR, grp);
378 379
379 count = (skb->len + 3) / 4; 380 count = (skb->len + 3) / 4;
380 last = skb->len % 4; 381 last = skb->len % 4;
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 75dfac0248f4..f4cae2be0fda 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7148,7 +7148,7 @@ static void rtl8169_netpoll(struct net_device *dev)
7148{ 7148{
7149 struct rtl8169_private *tp = netdev_priv(dev); 7149 struct rtl8169_private *tp = netdev_priv(dev);
7150 7150
7151 rtl8169_interrupt(pci_irq_vector(tp->pci_dev, 0), dev); 7151 rtl8169_interrupt(pci_irq_vector(tp->pci_dev, 0), tp);
7152} 7152}
7153#endif 7153#endif
7154 7154
diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
index 27be51f0a421..f3f7477043ce 100644
--- a/drivers/net/ethernet/renesas/Kconfig
+++ b/drivers/net/ethernet/renesas/Kconfig
@@ -17,7 +17,6 @@ if NET_VENDOR_RENESAS
17 17
18config SH_ETH 18config SH_ETH
19 tristate "Renesas SuperH Ethernet support" 19 tristate "Renesas SuperH Ethernet support"
20 depends on HAS_DMA
21 depends on ARCH_RENESAS || SUPERH || COMPILE_TEST 20 depends on ARCH_RENESAS || SUPERH || COMPILE_TEST
22 select CRC32 21 select CRC32
23 select MII 22 select MII
@@ -31,7 +30,6 @@ config SH_ETH
31 30
32config RAVB 31config RAVB
33 tristate "Renesas Ethernet AVB support" 32 tristate "Renesas Ethernet AVB support"
34 depends on HAS_DMA
35 depends on ARCH_RENESAS || COMPILE_TEST 33 depends on ARCH_RENESAS || COMPILE_TEST
36 select CRC32 34 select CRC32
37 select MII 35 select MII
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index ad4a354ce570..570ec72266f3 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -3180,6 +3180,7 @@ bool efx_rps_check_rule(struct efx_arfs_rule *rule, unsigned int filter_idx,
3180 return true; 3180 return true;
3181} 3181}
3182 3182
3183static
3183struct hlist_head *efx_rps_hash_bucket(struct efx_nic *efx, 3184struct hlist_head *efx_rps_hash_bucket(struct efx_nic *efx,
3184 const struct efx_filter_spec *spec) 3185 const struct efx_filter_spec *spec)
3185{ 3186{
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index cdbddf16dd29..4f1267477aa4 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -205,7 +205,7 @@ static void cpdma_desc_pool_destroy(struct cpdma_ctlr *ctlr)
205 * devices (e.g. cpsw switches) use plain old memory. Descriptor pools 205 * devices (e.g. cpsw switches) use plain old memory. Descriptor pools
206 * abstract out these details 206 * abstract out these details
207 */ 207 */
208int cpdma_desc_pool_create(struct cpdma_ctlr *ctlr) 208static int cpdma_desc_pool_create(struct cpdma_ctlr *ctlr)
209{ 209{
210 struct cpdma_params *cpdma_params = &ctlr->params; 210 struct cpdma_params *cpdma_params = &ctlr->params;
211 struct cpdma_desc_pool *pool; 211 struct cpdma_desc_pool *pool;
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index a1a6445b5a7e..f270beebb428 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1387,6 +1387,10 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
1387 1387
1388static int match_first_device(struct device *dev, void *data) 1388static int match_first_device(struct device *dev, void *data)
1389{ 1389{
1390 if (dev->parent && dev->parent->of_node)
1391 return of_device_is_compatible(dev->parent->of_node,
1392 "ti,davinci_mdio");
1393
1390 return !strncmp(dev_name(dev), "davinci_mdio", 12); 1394 return !strncmp(dev_name(dev), "davinci_mdio", 12);
1391} 1395}
1392 1396
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index d02f0a7c534e..23c1d6600241 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -594,7 +594,8 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev,
594 ipvlan->phy_dev = phy_dev; 594 ipvlan->phy_dev = phy_dev;
595 ipvlan->dev = dev; 595 ipvlan->dev = dev;
596 ipvlan->sfeatures = IPVLAN_FEATURES; 596 ipvlan->sfeatures = IPVLAN_FEATURES;
597 ipvlan_adjust_mtu(ipvlan, phy_dev); 597 if (!tb[IFLA_MTU])
598 ipvlan_adjust_mtu(ipvlan, phy_dev);
598 INIT_LIST_HEAD(&ipvlan->addrs); 599 INIT_LIST_HEAD(&ipvlan->addrs);
599 spin_lock_init(&ipvlan->addrs_lock); 600 spin_lock_init(&ipvlan->addrs_lock);
600 601
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 8e8b51f171f4..8fac8e132c5b 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1246,6 +1246,7 @@ static const struct usb_device_id products[] = {
1246 {QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ 1246 {QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
1247 {QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */ 1247 {QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */
1248 {QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */ 1248 {QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */
1249 {QMI_FIXED_INTF(0x413c, 0x81d7, 1)}, /* Dell Wireless 5821e */
1249 {QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */ 1250 {QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */
1250 {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ 1251 {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */
1251 {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ 1252 {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
index 9d99eb42d917..6acba67bca07 100644
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
@@ -60,7 +60,6 @@ config BRCMFMAC_PCIE
60 bool "PCIE bus interface support for FullMAC driver" 60 bool "PCIE bus interface support for FullMAC driver"
61 depends on BRCMFMAC 61 depends on BRCMFMAC
62 depends on PCI 62 depends on PCI
63 depends on HAS_DMA
64 select BRCMFMAC_PROTO_MSGBUF 63 select BRCMFMAC_PROTO_MSGBUF
65 select FW_LOADER 64 select FW_LOADER
66 ---help--- 65 ---help---
diff --git a/drivers/net/wireless/quantenna/qtnfmac/Kconfig b/drivers/net/wireless/quantenna/qtnfmac/Kconfig
index 025fa6018550..8d1492a90bd1 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/Kconfig
+++ b/drivers/net/wireless/quantenna/qtnfmac/Kconfig
@@ -7,7 +7,7 @@ config QTNFMAC
7config QTNFMAC_PEARL_PCIE 7config QTNFMAC_PEARL_PCIE
8 tristate "Quantenna QSR10g PCIe support" 8 tristate "Quantenna QSR10g PCIe support"
9 default n 9 default n
10 depends on HAS_DMA && PCI && CFG80211 10 depends on PCI && CFG80211
11 select QTNFMAC 11 select QTNFMAC
12 select FW_LOADER 12 select FW_LOADER
13 select CRC32 13 select CRC32
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 922ce0abf5cf..a57daecf1d57 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1810,7 +1810,7 @@ static int talk_to_netback(struct xenbus_device *dev,
1810 err = xen_net_read_mac(dev, info->netdev->dev_addr); 1810 err = xen_net_read_mac(dev, info->netdev->dev_addr);
1811 if (err) { 1811 if (err) {
1812 xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename); 1812 xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
1813 goto out; 1813 goto out_unlocked;
1814 } 1814 }
1815 1815
1816 rtnl_lock(); 1816 rtnl_lock();
@@ -1925,6 +1925,7 @@ abort_transaction_no_dev_fatal:
1925 xennet_destroy_queues(info); 1925 xennet_destroy_queues(info);
1926 out: 1926 out:
1927 rtnl_unlock(); 1927 rtnl_unlock();
1928out_unlocked:
1928 device_unregister(&dev->dev); 1929 device_unregister(&dev->dev);
1929 return err; 1930 return err;
1930} 1931}
@@ -1950,10 +1951,6 @@ static int xennet_connect(struct net_device *dev)
1950 /* talk_to_netback() sets the correct number of queues */ 1951 /* talk_to_netback() sets the correct number of queues */
1951 num_queues = dev->real_num_tx_queues; 1952 num_queues = dev->real_num_tx_queues;
1952 1953
1953 rtnl_lock();
1954 netdev_update_features(dev);
1955 rtnl_unlock();
1956
1957 if (dev->reg_state == NETREG_UNINITIALIZED) { 1954 if (dev->reg_state == NETREG_UNINITIALIZED) {
1958 err = register_netdev(dev); 1955 err = register_netdev(dev);
1959 if (err) { 1956 if (err) {
@@ -1963,6 +1960,10 @@ static int xennet_connect(struct net_device *dev)
1963 } 1960 }
1964 } 1961 }
1965 1962
1963 rtnl_lock();
1964 netdev_update_features(dev);
1965 rtnl_unlock();
1966
1966 /* 1967 /*
1967 * All public and private state should now be sane. Get 1968 * All public and private state should now be sane. Get
1968 * ready to start sending and receiving packets and give the driver 1969 * ready to start sending and receiving packets and give the driver
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 686dc670fd29..29756d88799b 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -1226,7 +1226,8 @@ err_used:
1226 if (ubufs) 1226 if (ubufs)
1227 vhost_net_ubuf_put_wait_and_free(ubufs); 1227 vhost_net_ubuf_put_wait_and_free(ubufs);
1228err_ubufs: 1228err_ubufs:
1229 sockfd_put(sock); 1229 if (sock)
1230 sockfd_put(sock);
1230err_vq: 1231err_vq:
1231 mutex_unlock(&vq->mutex); 1232 mutex_unlock(&vq->mutex);
1232err: 1233err:
diff --git a/include/linux/filter.h b/include/linux/filter.h
index b615df57b7d5..20f2659dd829 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -472,7 +472,9 @@ struct sock_fprog_kern {
472struct bpf_binary_header { 472struct bpf_binary_header {
473 u16 pages; 473 u16 pages;
474 u16 locked:1; 474 u16 locked:1;
475 u8 image[]; 475
476 /* Some arches need word alignment for their instructions */
477 u8 image[] __aligned(4);
476}; 478};
477 479
478struct bpf_prog { 480struct bpf_prog {
diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile
index dd86b022eff0..051dc18b8ccb 100644
--- a/net/bpfilter/Makefile
+++ b/net/bpfilter/Makefile
@@ -22,7 +22,7 @@ endif
22quiet_cmd_copy_umh = GEN $@ 22quiet_cmd_copy_umh = GEN $@
23 cmd_copy_umh = echo ':' > $(obj)/.bpfilter_umh.o.cmd; \ 23 cmd_copy_umh = echo ':' > $(obj)/.bpfilter_umh.o.cmd; \
24 $(OBJCOPY) -I binary \ 24 $(OBJCOPY) -I binary \
25 `LC_ALL=C objdump -f net/bpfilter/bpfilter_umh \ 25 `LC_ALL=C $(OBJDUMP) -f net/bpfilter/bpfilter_umh \
26 |awk -F' |,' '/file format/{print "-O",$$NF} \ 26 |awk -F' |,' '/file format/{print "-O",$$NF} \
27 /^architecture:/{print "-B",$$2}'` \ 27 /^architecture:/{print "-B",$$2}'` \
28 --rename-section .data=.init.rodata $< $@ 28 --rename-section .data=.init.rodata $< $@
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 8b5ba6dffac7..12877a1514e7 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -600,7 +600,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk,
600{ 600{
601 struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk); 601 struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk);
602 struct dccp_sock *dp = dccp_sk(sk); 602 struct dccp_sock *dp = dccp_sk(sk);
603 ktime_t now = ktime_get_real(); 603 ktime_t now = ktime_get();
604 s64 delta = 0; 604 s64 delta = 0;
605 605
606 switch (fbtype) { 606 switch (fbtype) {
@@ -625,15 +625,14 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk,
625 case CCID3_FBACK_PERIODIC: 625 case CCID3_FBACK_PERIODIC:
626 delta = ktime_us_delta(now, hc->rx_tstamp_last_feedback); 626 delta = ktime_us_delta(now, hc->rx_tstamp_last_feedback);
627 if (delta <= 0) 627 if (delta <= 0)
628 DCCP_BUG("delta (%ld) <= 0", (long)delta); 628 delta = 1;
629 else 629 hc->rx_x_recv = scaled_div32(hc->rx_bytes_recv, delta);
630 hc->rx_x_recv = scaled_div32(hc->rx_bytes_recv, delta);
631 break; 630 break;
632 default: 631 default:
633 return; 632 return;
634 } 633 }
635 634
636 ccid3_pr_debug("Interval %ldusec, X_recv=%u, 1/p=%u\n", (long)delta, 635 ccid3_pr_debug("Interval %lldusec, X_recv=%u, 1/p=%u\n", delta,
637 hc->rx_x_recv, hc->rx_pinv); 636 hc->rx_x_recv, hc->rx_pinv);
638 637
639 hc->rx_tstamp_last_feedback = now; 638 hc->rx_tstamp_last_feedback = now;
@@ -680,7 +679,8 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
680static u32 ccid3_first_li(struct sock *sk) 679static u32 ccid3_first_li(struct sock *sk)
681{ 680{
682 struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk); 681 struct ccid3_hc_rx_sock *hc = ccid3_hc_rx_sk(sk);
683 u32 x_recv, p, delta; 682 u32 x_recv, p;
683 s64 delta;
684 u64 fval; 684 u64 fval;
685 685
686 if (hc->rx_rtt == 0) { 686 if (hc->rx_rtt == 0) {
@@ -688,7 +688,9 @@ static u32 ccid3_first_li(struct sock *sk)
688 hc->rx_rtt = DCCP_FALLBACK_RTT; 688 hc->rx_rtt = DCCP_FALLBACK_RTT;
689 } 689 }
690 690
691 delta = ktime_to_us(net_timedelta(hc->rx_tstamp_last_feedback)); 691 delta = ktime_us_delta(ktime_get(), hc->rx_tstamp_last_feedback);
692 if (delta <= 0)
693 delta = 1;
692 x_recv = scaled_div32(hc->rx_bytes_recv, delta); 694 x_recv = scaled_div32(hc->rx_bytes_recv, delta);
693 if (x_recv == 0) { /* would also trigger divide-by-zero */ 695 if (x_recv == 0) { /* would also trigger divide-by-zero */
694 DCCP_WARN("X_recv==0\n"); 696 DCCP_WARN("X_recv==0\n");
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 975021df7c1c..c0c74088f2af 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2082,7 +2082,8 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev)
2082 mld_send_initial_cr(idev); 2082 mld_send_initial_cr(idev);
2083 idev->mc_dad_count--; 2083 idev->mc_dad_count--;
2084 if (idev->mc_dad_count) 2084 if (idev->mc_dad_count)
2085 mld_dad_start_timer(idev, idev->mc_maxdelay); 2085 mld_dad_start_timer(idev,
2086 unsolicited_report_interval(idev));
2086 } 2087 }
2087} 2088}
2088 2089
@@ -2094,7 +2095,8 @@ static void mld_dad_timer_expire(struct timer_list *t)
2094 if (idev->mc_dad_count) { 2095 if (idev->mc_dad_count) {
2095 idev->mc_dad_count--; 2096 idev->mc_dad_count--;
2096 if (idev->mc_dad_count) 2097 if (idev->mc_dad_count)
2097 mld_dad_start_timer(idev, idev->mc_maxdelay); 2098 mld_dad_start_timer(idev,
2099 unsolicited_report_interval(idev));
2098 } 2100 }
2099 in6_dev_put(idev); 2101 in6_dev_put(idev);
2100} 2102}
@@ -2452,7 +2454,8 @@ static void mld_ifc_timer_expire(struct timer_list *t)
2452 if (idev->mc_ifc_count) { 2454 if (idev->mc_ifc_count) {
2453 idev->mc_ifc_count--; 2455 idev->mc_ifc_count--;
2454 if (idev->mc_ifc_count) 2456 if (idev->mc_ifc_count)
2455 mld_ifc_start_timer(idev, idev->mc_maxdelay); 2457 mld_ifc_start_timer(idev,
2458 unsolicited_report_interval(idev));
2456 } 2459 }
2457 in6_dev_put(idev); 2460 in6_dev_put(idev);
2458} 2461}
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 50809748c127..ff8e7e245c37 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2262,6 +2262,13 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
2262 if (po->stats.stats1.tp_drops) 2262 if (po->stats.stats1.tp_drops)
2263 status |= TP_STATUS_LOSING; 2263 status |= TP_STATUS_LOSING;
2264 } 2264 }
2265
2266 if (do_vnet &&
2267 virtio_net_hdr_from_skb(skb, h.raw + macoff -
2268 sizeof(struct virtio_net_hdr),
2269 vio_le(), true, 0))
2270 goto drop_n_account;
2271
2265 po->stats.stats1.tp_packets++; 2272 po->stats.stats1.tp_packets++;
2266 if (copy_skb) { 2273 if (copy_skb) {
2267 status |= TP_STATUS_COPY; 2274 status |= TP_STATUS_COPY;
@@ -2269,15 +2276,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
2269 } 2276 }
2270 spin_unlock(&sk->sk_receive_queue.lock); 2277 spin_unlock(&sk->sk_receive_queue.lock);
2271 2278
2272 if (do_vnet) {
2273 if (virtio_net_hdr_from_skb(skb, h.raw + macoff -
2274 sizeof(struct virtio_net_hdr),
2275 vio_le(), true, 0)) {
2276 spin_lock(&sk->sk_receive_queue.lock);
2277 goto drop_n_account;
2278 }
2279 }
2280
2281 skb_copy_bits(skb, 0, h.raw + macoff, snaplen); 2279 skb_copy_bits(skb, 0, h.raw + macoff, snaplen);
2282 2280
2283 if (!(ts_status = tpacket_get_timestamp(skb, &ts, po->tp_tstamp))) 2281 if (!(ts_status = tpacket_get_timestamp(skb, &ts, po->tp_tstamp)))
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 2b5be42a9f1c..9e8b26a80fb3 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -66,7 +66,7 @@ struct fl_flow_mask {
66 struct rhashtable_params filter_ht_params; 66 struct rhashtable_params filter_ht_params;
67 struct flow_dissector dissector; 67 struct flow_dissector dissector;
68 struct list_head filters; 68 struct list_head filters;
69 struct rcu_head rcu; 69 struct rcu_work rwork;
70 struct list_head list; 70 struct list_head list;
71}; 71};
72 72
@@ -203,6 +203,20 @@ static int fl_init(struct tcf_proto *tp)
203 return rhashtable_init(&head->ht, &mask_ht_params); 203 return rhashtable_init(&head->ht, &mask_ht_params);
204} 204}
205 205
206static void fl_mask_free(struct fl_flow_mask *mask)
207{
208 rhashtable_destroy(&mask->ht);
209 kfree(mask);
210}
211
212static void fl_mask_free_work(struct work_struct *work)
213{
214 struct fl_flow_mask *mask = container_of(to_rcu_work(work),
215 struct fl_flow_mask, rwork);
216
217 fl_mask_free(mask);
218}
219
206static bool fl_mask_put(struct cls_fl_head *head, struct fl_flow_mask *mask, 220static bool fl_mask_put(struct cls_fl_head *head, struct fl_flow_mask *mask,
207 bool async) 221 bool async)
208{ 222{
@@ -210,12 +224,11 @@ static bool fl_mask_put(struct cls_fl_head *head, struct fl_flow_mask *mask,
210 return false; 224 return false;
211 225
212 rhashtable_remove_fast(&head->ht, &mask->ht_node, mask_ht_params); 226 rhashtable_remove_fast(&head->ht, &mask->ht_node, mask_ht_params);
213 rhashtable_destroy(&mask->ht);
214 list_del_rcu(&mask->list); 227 list_del_rcu(&mask->list);
215 if (async) 228 if (async)
216 kfree_rcu(mask, rcu); 229 tcf_queue_work(&mask->rwork, fl_mask_free_work);
217 else 230 else
218 kfree(mask); 231 fl_mask_free(mask);
219 232
220 return true; 233 return true;
221} 234}
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 3ae9877ea205..3278a76f6861 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1385,8 +1385,8 @@ hfsc_schedule_watchdog(struct Qdisc *sch)
1385 if (next_time == 0 || next_time > q->root.cl_cfmin) 1385 if (next_time == 0 || next_time > q->root.cl_cfmin)
1386 next_time = q->root.cl_cfmin; 1386 next_time = q->root.cl_cfmin;
1387 } 1387 }
1388 WARN_ON(next_time == 0); 1388 if (next_time)
1389 qdisc_watchdog_schedule(&q->watchdog, next_time); 1389 qdisc_watchdog_schedule(&q->watchdog, next_time);
1390} 1390}
1391 1391
1392static int 1392static int
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index 79daa98208c3..bfb9f812e2ef 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -237,7 +237,9 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
237 /* Account for a different sized first fragment */ 237 /* Account for a different sized first fragment */
238 if (msg_len >= first_len) { 238 if (msg_len >= first_len) {
239 msg->can_delay = 0; 239 msg->can_delay = 0;
240 SCTP_INC_STATS(sock_net(asoc->base.sk), SCTP_MIB_FRAGUSRMSGS); 240 if (msg_len > first_len)
241 SCTP_INC_STATS(sock_net(asoc->base.sk),
242 SCTP_MIB_FRAGUSRMSGS);
241 } else { 243 } else {
242 /* Which may be the only one... */ 244 /* Which may be the only one... */
243 first_len = msg_len; 245 first_len = msg_len;
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index 1a9695183599..373836615c57 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -392,7 +392,7 @@ static int strp_read_sock(struct strparser *strp)
392/* Lower sock lock held */ 392/* Lower sock lock held */
393void strp_data_ready(struct strparser *strp) 393void strp_data_ready(struct strparser *strp)
394{ 394{
395 if (unlikely(strp->stopped)) 395 if (unlikely(strp->stopped) || strp->paused)
396 return; 396 return;
397 397
398 /* This check is needed to synchronize with do_strp_work. 398 /* This check is needed to synchronize with do_strp_work.
@@ -407,9 +407,6 @@ void strp_data_ready(struct strparser *strp)
407 return; 407 return;
408 } 408 }
409 409
410 if (strp->paused)
411 return;
412
413 if (strp->need_bytes) { 410 if (strp->need_bytes) {
414 if (strp_peek_len(strp) < strp->need_bytes) 411 if (strp_peek_len(strp) < strp->need_bytes)
415 return; 412 return;
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 8e03bd3f3668..5d3cce9e8744 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -201,7 +201,7 @@ virtio_transport_send_pkt(struct virtio_vsock_pkt *pkt)
201 return -ENODEV; 201 return -ENODEV;
202 } 202 }
203 203
204 if (le32_to_cpu(pkt->hdr.dst_cid) == vsock->guest_cid) 204 if (le64_to_cpu(pkt->hdr.dst_cid) == vsock->guest_cid)
205 return virtio_transport_send_pkt_loopback(vsock, pkt); 205 return virtio_transport_send_pkt_loopback(vsock, pkt);
206 206
207 if (pkt->reply) 207 if (pkt->reply)
diff --git a/tools/testing/selftests/net/.gitignore b/tools/testing/selftests/net/.gitignore
index 128e548aa377..1a0ac3a29ec5 100644
--- a/tools/testing/selftests/net/.gitignore
+++ b/tools/testing/selftests/net/.gitignore
@@ -12,3 +12,4 @@ tcp_mmap
12udpgso 12udpgso
13udpgso_bench_rx 13udpgso_bench_rx
14udpgso_bench_tx 14udpgso_bench_tx
15tcp_inq
diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config
index 7ba089b33e8b..cd3a2f1545b5 100644
--- a/tools/testing/selftests/net/config
+++ b/tools/testing/selftests/net/config
@@ -12,3 +12,5 @@ CONFIG_NET_IPVTI=y
12CONFIG_INET6_XFRM_MODE_TUNNEL=y 12CONFIG_INET6_XFRM_MODE_TUNNEL=y
13CONFIG_IPV6_VTI=y 13CONFIG_IPV6_VTI=y
14CONFIG_DUMMY=y 14CONFIG_DUMMY=y
15CONFIG_BRIDGE=y
16CONFIG_VLAN_8021Q=y