Skip to content

Commit b29794e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Made TCP congestion control documentation match current reality, from Anmol Sarma. 2) Various build warning and failure fixes from Arnd Bergmann. 3) Fix SKB list leak in ipv6_gso_segment(). 4) Use after free in ravb driver, from Eugeniu Rosca. 5) Don't use udp_poll() in ping protocol driver, from Eric Dumazet. 6) Don't crash in PCI error recovery of cxgb4 driver, from Guilherme Piccoli. 7) _SRC_NAT_DONE_BIT needs to be cleared using atomics, from Liping Zhang. 8) Use after free in vxlan deletion, from Mark Bloch. 9) Fix ordering of NAPI poll enabled in ethoc driver, from Max Filippov. 10) Fix stmmac hangs with TSO, from Niklas Cassel. 11) Fix crash in CALIPSO ipv6, from Richard Haines. 12) Clear nh_flags properly on mpls link up. From Roopa Prabhu. 13) Fix regression in sk_err socket error queue handling, noticed by ping applications. From Soheil Hassas Yeganeh. 14) Update mlx4/mlx5 MAINTAINERS information. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits) net: stmmac: fix a broken u32 less than zero check net: stmmac: fix completely hung TX when using TSO net: ethoc: enable NAPI before poll may be scheduled net: bridge: fix a null pointer dereference in br_afspec ravb: Fix use-after-free on `ifconfig eth0 down` net/ipv6: Fix CALIPSO causing GPF with datagram support net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value Revert "sit: reload iphdr in ipip6_rcv" i40e/i40evf: proper update of the page_offset field i40e: Fix state flags for bit set and clean operations of PF iwlwifi: fix host command memory leaks iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265 iwlwifi: mvm: clear new beacon command template struct iwlwifi: mvm: don't fail when removing a key from an inexisting sta iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3 iwlwifi: mvm: fix firmware debug restart recording iwlwifi: tt: move ucode_loaded check under mutex iwlwifi: mvm: support ibss in dqa mode iwlwifi: mvm: Fix command queue number on d0i3 flow iwlwifi: mvm: rs: start using LQ command color ...
2 parents e87f327 + 1d3028f commit b29794e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+781
-486
lines changed

Documentation/devicetree/bindings/net/dsa/marvell.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Optional properties:
2626
- interrupt-controller : Indicates the switch is itself an interrupt
2727
controller. This is used for the PHY interrupts.
2828
#interrupt-cells = <2> : Controller uses two cells, number and flag
29+
- eeprom-length : Set to the length of an EEPROM connected to the
30+
switch. Must be set if the switch can not detect
31+
the presence and/or size of a connected EEPROM,
32+
otherwise optional.
2933
- mdio : Container of PHY and devices on the switches MDIO
3034
bus.
3135
- mdio? : Container of PHYs and devices on the external MDIO

Documentation/networking/dpaa.txt

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
The QorIQ DPAA Ethernet Driver
2+
==============================
3+
4+
Authors:
5+
Madalin Bucur <[email protected]>
6+
Camelia Groza <[email protected]>
7+
8+
Contents
9+
========
10+
11+
- DPAA Ethernet Overview
12+
- DPAA Ethernet Supported SoCs
13+
- Configuring DPAA Ethernet in your kernel
14+
- DPAA Ethernet Frame Processing
15+
- DPAA Ethernet Features
16+
- Debugging
17+
18+
DPAA Ethernet Overview
19+
======================
20+
21+
DPAA stands for Data Path Acceleration Architecture and it is a
22+
set of networking acceleration IPs that are available on several
23+
generations of SoCs, both on PowerPC and ARM64.
24+
25+
The Freescale DPAA architecture consists of a series of hardware blocks
26+
that support Ethernet connectivity. The Ethernet driver depends upon the
27+
following drivers in the Linux kernel:
28+
29+
- Peripheral Access Memory Unit (PAMU) (* needed only for PPC platforms)
30+
drivers/iommu/fsl_*
31+
- Frame Manager (FMan)
32+
drivers/net/ethernet/freescale/fman
33+
- Queue Manager (QMan), Buffer Manager (BMan)
34+
drivers/soc/fsl/qbman
35+
36+
A simplified view of the dpaa_eth interfaces mapped to FMan MACs:
37+
38+
dpaa_eth /eth0\ ... /ethN\
39+
driver | | | |
40+
------------- ---- ----------- ---- -------------
41+
-Ports / Tx Rx \ ... / Tx Rx \
42+
FMan | | | |
43+
-MACs | MAC0 | | MACN |
44+
/ dtsec0 \ ... / dtsecN \ (or tgec)
45+
/ \ / \(or memac)
46+
--------- -------------- --- -------------- ---------
47+
FMan, FMan Port, FMan SP, FMan MURAM drivers
48+
---------------------------------------------------------
49+
FMan HW blocks: MURAM, MACs, Ports, SP
50+
---------------------------------------------------------
51+
52+
The dpaa_eth relation to the QMan, BMan and FMan:
53+
________________________________
54+
dpaa_eth / eth0 \
55+
driver / \
56+
--------- -^- -^- -^- --- ---------
57+
QMan driver / \ / \ / \ \ / | BMan |
58+
|Rx | |Rx | |Tx | |Tx | | driver |
59+
--------- |Dfl| |Err| |Cnf| |FQs| | |
60+
QMan HW |FQ | |FQ | |FQs| | | | |
61+
/ \ / \ / \ \ / | |
62+
--------- --- --- --- -v- ---------
63+
| FMan QMI | |
64+
| FMan HW FMan BMI | BMan HW |
65+
----------------------- --------
66+
67+
where the acronyms used above (and in the code) are:
68+
DPAA = Data Path Acceleration Architecture
69+
FMan = DPAA Frame Manager
70+
QMan = DPAA Queue Manager
71+
BMan = DPAA Buffers Manager
72+
QMI = QMan interface in FMan
73+
BMI = BMan interface in FMan
74+
FMan SP = FMan Storage Profiles
75+
MURAM = Multi-user RAM in FMan
76+
FQ = QMan Frame Queue
77+
Rx Dfl FQ = default reception FQ
78+
Rx Err FQ = Rx error frames FQ
79+
Tx Cnf FQ = Tx confirmation FQs
80+
Tx FQs = transmission frame queues
81+
dtsec = datapath three speed Ethernet controller (10/100/1000 Mbps)
82+
tgec = ten gigabit Ethernet controller (10 Gbps)
83+
memac = multirate Ethernet MAC (10/100/1000/10000)
84+
85+
DPAA Ethernet Supported SoCs
86+
============================
87+
88+
The DPAA drivers enable the Ethernet controllers present on the following SoCs:
89+
90+
# PPC
91+
P1023
92+
P2041
93+
P3041
94+
P4080
95+
P5020
96+
P5040
97+
T1023
98+
T1024
99+
T1040
100+
T1042
101+
T2080
102+
T4240
103+
B4860
104+
105+
# ARM
106+
LS1043A
107+
LS1046A
108+
109+
Configuring DPAA Ethernet in your kernel
110+
========================================
111+
112+
To enable the DPAA Ethernet driver, the following Kconfig options are required:
113+
114+
# common for arch/arm64 and arch/powerpc platforms
115+
CONFIG_FSL_DPAA=y
116+
CONFIG_FSL_FMAN=y
117+
CONFIG_FSL_DPAA_ETH=y
118+
CONFIG_FSL_XGMAC_MDIO=y
119+
120+
# for arch/powerpc only
121+
CONFIG_FSL_PAMU=y
122+
123+
# common options needed for the PHYs used on the RDBs
124+
CONFIG_VITESSE_PHY=y
125+
CONFIG_REALTEK_PHY=y
126+
CONFIG_AQUANTIA_PHY=y
127+
128+
DPAA Ethernet Frame Processing
129+
==============================
130+
131+
On Rx, buffers for the incoming frames are retrieved from one of the three
132+
existing buffers pools. The driver initializes and seeds these, each with
133+
buffers of different sizes: 1KB, 2KB and 4KB.
134+
135+
On Tx, all transmitted frames are returned to the driver through Tx
136+
confirmation frame queues. The driver is then responsible for freeing the
137+
buffers. In order to do this properly, a backpointer is added to the buffer
138+
before transmission that points to the skb. When the buffer returns to the
139+
driver on a confirmation FQ, the skb can be correctly consumed.
140+
141+
DPAA Ethernet Features
142+
======================
143+
144+
Currently the DPAA Ethernet driver enables the basic features required for
145+
a Linux Ethernet driver. The support for advanced features will be added
146+
gradually.
147+
148+
The driver has Rx and Tx checksum offloading for UDP and TCP. Currently the Rx
149+
checksum offload feature is enabled by default and cannot be controlled through
150+
ethtool.
151+
152+
The driver has support for multiple prioritized Tx traffic classes. Priorities
153+
range from 0 (lowest) to 3 (highest). These are mapped to HW workqueues with
154+
strict priority levels. Each traffic class contains NR_CPU TX queues. By
155+
default, only one traffic class is enabled and the lowest priority Tx queues
156+
are used. Higher priority traffic classes can be enabled with the mqprio
157+
qdisc. For example, all four traffic classes are enabled on an interface with
158+
the following command. Furthermore, skb priority levels are mapped to traffic
159+
classes as follows:
160+
161+
* priorities 0 to 3 - traffic class 0 (low priority)
162+
* priorities 4 to 7 - traffic class 1 (medium-low priority)
163+
* priorities 8 to 11 - traffic class 2 (medium-high priority)
164+
* priorities 12 to 15 - traffic class 3 (high priority)
165+
166+
tc qdisc add dev <int> root handle 1: \
167+
mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1
168+
169+
Debugging
170+
=========
171+
172+
The following statistics are exported for each interface through ethtool:
173+
174+
- interrupt count per CPU
175+
- Rx packets count per CPU
176+
- Tx packets count per CPU
177+
- Tx confirmed packets count per CPU
178+
- Tx S/G frames count per CPU
179+
- Tx error count per CPU
180+
- Rx error count per CPU
181+
- Rx error count per type
182+
- congestion related statistics:
183+
- congestion status
184+
- time spent in congestion
185+
- number of time the device entered congestion
186+
- dropped packets count per cause
187+
188+
The driver also exports the following information in sysfs:
189+
190+
- the FQ IDs for each FQ type
191+
/sys/devices/platform/dpaa-ethernet.0/net/<int>/fqids
192+
193+
- the IDs of the buffer pools in use
194+
/sys/devices/platform/dpaa-ethernet.0/net/<int>/bpids

Documentation/networking/tcp.txt

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TCP protocol
22
============
33

4-
Last updated: 9 February 2008
4+
Last updated: 3 June 2017
55

66
Contents
77
========
@@ -29,18 +29,19 @@ As of 2.6.13, Linux supports pluggable congestion control algorithms.
2929
A congestion control mechanism can be registered through functions in
3030
tcp_cong.c. The functions used by the congestion control mechanism are
3131
registered via passing a tcp_congestion_ops struct to
32-
tcp_register_congestion_control. As a minimum name, ssthresh,
33-
cong_avoid must be valid.
32+
tcp_register_congestion_control. As a minimum, the congestion control
33+
mechanism must provide a valid name and must implement either ssthresh,
34+
cong_avoid and undo_cwnd hooks or the "omnipotent" cong_control hook.
3435

3536
Private data for a congestion control mechanism is stored in tp->ca_priv.
3637
tcp_ca(tp) returns a pointer to this space. This is preallocated space - it
3738
is important to check the size of your private data will fit this space, or
38-
alternatively space could be allocated elsewhere and a pointer to it could
39+
alternatively, space could be allocated elsewhere and a pointer to it could
3940
be stored here.
4041

4142
There are three kinds of congestion control algorithms currently: The
4243
simplest ones are derived from TCP reno (highspeed, scalable) and just
43-
provide an alternative the congestion window calculation. More complex
44+
provide an alternative congestion window calculation. More complex
4445
ones like BIC try to look at other events to provide better
4546
heuristics. There are also round trip time based algorithms like
4647
Vegas and Westwood+.
@@ -49,21 +50,15 @@ Good TCP congestion control is a complex problem because the algorithm
4950
needs to maintain fairness and performance. Please review current
5051
research and RFC's before developing new modules.
5152

52-
The method that is used to determine which congestion control mechanism is
53-
determined by the setting of the sysctl net.ipv4.tcp_congestion_control.
54-
The default congestion control will be the last one registered (LIFO);
55-
so if you built everything as modules, the default will be reno. If you
56-
build with the defaults from Kconfig, then CUBIC will be builtin (not a
57-
module) and it will end up the default.
53+
The default congestion control mechanism is chosen based on the
54+
DEFAULT_TCP_CONG Kconfig parameter. If you really want a particular default
55+
value then you can set it using sysctl net.ipv4.tcp_congestion_control. The
56+
module will be autoloaded if needed and you will get the expected protocol. If
57+
you ask for an unknown congestion method, then the sysctl attempt will fail.
5858

59-
If you really want a particular default value then you will need
60-
to set it with the sysctl. If you use a sysctl, the module will be autoloaded
61-
if needed and you will get the expected protocol. If you ask for an
62-
unknown congestion method, then the sysctl attempt will fail.
63-
64-
If you remove a tcp congestion control module, then you will get the next
59+
If you remove a TCP congestion control module, then you will get the next
6560
available one. Since reno cannot be built as a module, and cannot be
66-
deleted, it will always be available.
61+
removed, it will always be available.
6762

6863
How the new TCP output machine [nyi] works.
6964
===========================================

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8508,15 +8508,14 @@ S: Odd Fixes
85088508
F: drivers/media/radio/radio-miropcm20*
85098509

85108510
MELLANOX MLX4 core VPI driver
8511-
M: Yishai Hadas <yishaih@mellanox.com>
8511+
M: Tariq Toukan <tariqt@mellanox.com>
85128512
85138513
85148514
W: http://www.mellanox.com
85158515
Q: http://patchwork.ozlabs.org/project/netdev/list/
85168516
S: Supported
85178517
F: drivers/net/ethernet/mellanox/mlx4/
85188518
F: include/linux/mlx4/
8519-
F: include/uapi/rdma/mlx4-abi.h
85208519

85218520
MELLANOX MLX4 IB driver
85228521
M: Yishai Hadas <[email protected]>
@@ -8526,6 +8525,7 @@ Q: http://patchwork.kernel.org/project/linux-rdma/list/
85268525
S: Supported
85278526
F: drivers/infiniband/hw/mlx4/
85288527
F: include/linux/mlx4/
8528+
F: include/uapi/rdma/mlx4-abi.h
85298529

85308530
MELLANOX MLX5 core VPI driver
85318531
M: Saeed Mahameed <[email protected]>
@@ -8538,7 +8538,6 @@ Q: http://patchwork.ozlabs.org/project/netdev/list/
85388538
S: Supported
85398539
F: drivers/net/ethernet/mellanox/mlx5/core/
85408540
F: include/linux/mlx5/
8541-
F: include/uapi/rdma/mlx5-abi.h
85428541

85438542
MELLANOX MLX5 IB driver
85448543
M: Matan Barak <[email protected]>
@@ -8549,6 +8548,7 @@ Q: http://patchwork.kernel.org/project/linux-rdma/list/
85498548
S: Supported
85508549
F: drivers/infiniband/hw/mlx5/
85518550
F: include/linux/mlx5/
8551+
F: include/uapi/rdma/mlx5-abi.h
85528552

85538553
MELEXIS MLX90614 DRIVER
85548554
M: Crt Mori <[email protected]>

arch/arm/boot/dts/imx6ul-14x14-evk.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,16 @@
120120

121121
ethphy0: ethernet-phy@2 {
122122
reg = <2>;
123+
micrel,led-mode = <1>;
124+
clocks = <&clks IMX6UL_CLK_ENET_REF>;
125+
clock-names = "rmii-ref";
123126
};
124127

125128
ethphy1: ethernet-phy@1 {
126129
reg = <1>;
130+
micrel,led-mode = <1>;
131+
clocks = <&clks IMX6UL_CLK_ENET2_REF>;
132+
clock-names = "rmii-ref";
127133
};
128134
};
129135
};

drivers/isdn/i4l/isdn_ppp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
23642364
id);
23652365
return NULL;
23662366
} else {
2367-
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_KERNEL);
2367+
rs = kzalloc(sizeof(struct ippp_ccp_reset_state), GFP_ATOMIC);
23682368
if (!rs)
23692369
return NULL;
23702370
rs->state = CCPResetIdle;

drivers/isdn/mISDN/stack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ send_socklist(struct mISDN_sock_list *sl, struct sk_buff *skb)
7575
if (sk->sk_state != MISDN_BOUND)
7676
continue;
7777
if (!cskb)
78-
cskb = skb_copy(skb, GFP_KERNEL);
78+
cskb = skb_copy(skb, GFP_ATOMIC);
7979
if (!cskb) {
8080
printk(KERN_WARNING "%s no skb\n", __func__);
8181
break;

drivers/net/dsa/mv88e6xxx/global2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ static inline int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
114114
return -EOPNOTSUPP;
115115
}
116116

117-
int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, int src_dev,
118-
int src_port, u16 data)
117+
static inline int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip,
118+
int src_dev, int src_port, u16 data)
119119
{
120120
return -EOPNOTSUPP;
121121
}
122122

123-
int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
123+
static inline int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
124124
{
125125
return -EOPNOTSUPP;
126126
}

drivers/net/ethernet/amd/xgbe/xgbe-desc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdata,
324324
struct xgbe_ring *ring,
325325
struct xgbe_ring_data *rdata)
326326
{
327-
int order, ret;
327+
int ret;
328328

329329
if (!ring->rx_hdr_pa.pages) {
330330
ret = xgbe_alloc_pages(pdata, &ring->rx_hdr_pa, GFP_ATOMIC, 0);
@@ -333,9 +333,8 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdata,
333333
}
334334

335335
if (!ring->rx_buf_pa.pages) {
336-
order = max_t(int, PAGE_ALLOC_COSTLY_ORDER - 1, 0);
337336
ret = xgbe_alloc_pages(pdata, &ring->rx_buf_pa, GFP_ATOMIC,
338-
order);
337+
PAGE_ALLOC_COSTLY_ORDER);
339338
if (ret)
340339
return ret;
341340
}

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,9 +2026,12 @@ static int bcm_sysport_probe(struct platform_device *pdev)
20262026
priv->num_rx_desc_words = params->num_rx_desc_words;
20272027

20282028
priv->irq0 = platform_get_irq(pdev, 0);
2029-
if (!priv->is_lite)
2029+
if (!priv->is_lite) {
20302030
priv->irq1 = platform_get_irq(pdev, 1);
2031-
priv->wol_irq = platform_get_irq(pdev, 2);
2031+
priv->wol_irq = platform_get_irq(pdev, 2);
2032+
} else {
2033+
priv->wol_irq = platform_get_irq(pdev, 1);
2034+
}
20322035
if (priv->irq0 <= 0 || (priv->irq1 <= 0 && !priv->is_lite)) {
20332036
dev_err(&pdev->dev, "invalid interrupts\n");
20342037
ret = -EINVAL;

0 commit comments

Comments
 (0)