Skip to content

Commit 386403a

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from David Miller: "Another merge window, another pull full of stuff: 1) Support alternative names for network devices, from Jiri Pirko. 2) Introduce per-netns netdev notifiers, also from Jiri Pirko. 3) Support MSG_PEEK in vsock/virtio, from Matias Ezequiel Vara Larsen. 4) Allow compiling out the TLS TOE code, from Jakub Kicinski. 5) Add several new tracepoints to the kTLS code, also from Jakub. 6) Support set channels ethtool callback in ena driver, from Sameeh Jubran. 7) New SCTP events SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED, SCTP_ADDR_MADE_PRIM, and SCTP_SEND_FAILED_EVENT. From Xin Long. 8) Add XDP support to mvneta driver, from Lorenzo Bianconi. 9) Lots of netfilter hw offload fixes, cleanups and enhancements, from Pablo Neira Ayuso. 10) PTP support for aquantia chips, from Egor Pomozov. 11) Add UDP segmentation offload support to igb, ixgbe, and i40e. From Josh Hunt. 12) Add smart nagle to tipc, from Jon Maloy. 13) Support L2 field rewrite by TC offloads in bnxt_en, from Venkat Duvvuru. 14) Add a flow mask cache to OVS, from Tonghao Zhang. 15) Add XDP support to ice driver, from Maciej Fijalkowski. 16) Add AF_XDP support to ice driver, from Krzysztof Kazimierczak. 17) Support UDP GSO offload in atlantic driver, from Igor Russkikh. 18) Support it in stmmac driver too, from Jose Abreu. 19) Support TIPC encryption and auth, from Tuong Lien. 20) Introduce BPF trampolines, from Alexei Starovoitov. 21) Make page_pool API more numa friendly, from Saeed Mahameed. 22) Introduce route hints to ipv4 and ipv6, from Paolo Abeni. 23) Add UDP segmentation offload to cxgb4, Rahul Lakkireddy" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1857 commits) libbpf: Fix usage of u32 in userspace code mm: Implement no-MMU variant of vmalloc_user_node_flags slip: Fix use-after-free Read in slip_open net: dsa: sja1105: fix sja1105_parse_rgmii_delays() macvlan: schedule bc_work even if error enetc: add support Credit Based Shaper(CBS) for hardware offload net: phy: add helpers phy_(un)lock_mdio_bus mdio_bus: don't use managed reset-controller ax88179_178a: add ethtool_op_get_ts_info() mlxsw: spectrum_router: Fix use of uninitialized adjacency index mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels bpf: Simplify __bpf_arch_text_poke poke type handling bpf: Introduce BPF_TRACE_x helper for the tracing tests bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT bpf, testing: Add various tail call test cases bpf, x86: Emit patchable direct jump as tail call bpf: Constant map key tracking for prog array pokes bpf: Add poke dependency tracking for prog array maps bpf: Add initial poke descriptor table for jit images bpf: Move owner type, jited info into array auxiliary data ...
2 parents 642356c + 622dc5a commit 386403a

File tree

1,641 files changed

+105243
-30918
lines changed

Some content is hidden

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

1,641 files changed

+105243
-30918
lines changed

Documentation/ABI/testing/sysfs-class-net-statistics

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ Description:
5151
packet processing. See the network driver for the exact
5252
meaning of this value.
5353

54+
What: /sys/class/<iface>/statistics/rx_errors
55+
Date: April 2005
56+
KernelVersion: 2.6.12
57+
58+
Description:
59+
Indicates the number of receive errors on this network device.
60+
See the network driver for the exact meaning of this value.
61+
5462
What: /sys/class/<iface>/statistics/rx_fifo_errors
5563
Date: April 2005
5664
KernelVersion: 2.6.12
@@ -88,6 +96,14 @@ Description:
8896
due to lack of capacity in the receive side. See the network
8997
driver for the exact meaning of this value.
9098

99+
What: /sys/class/<iface>/statistics/rx_nohandler
100+
Date: February 2016
101+
KernelVersion: 4.6
102+
103+
Description:
104+
Indicates the number of received packets that were dropped on
105+
an inactive device by the network core.
106+
91107
What: /sys/class/<iface>/statistics/rx_over_errors
92108
Date: April 2005
93109
KernelVersion: 2.6.12

Documentation/bpf/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ Program types
4747
prog_flow_dissector
4848

4949

50+
Testing BPF
51+
===========
52+
53+
.. toctree::
54+
:maxdepth: 1
55+
56+
s390
57+
58+
5059
.. Links:
5160
.. _Documentation/networking/filter.txt: ../networking/filter.txt
5261
.. _man-pages: https://www.kernel.org/doc/man-pages/

Documentation/bpf/prog_flow_dissector.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,6 @@ BPF flow dissector doesn't support exporting all the metadata that in-kernel
142142
C-based implementation can export. Notable example is single VLAN (802.1Q)
143143
and double VLAN (802.1AD) tags. Please refer to the ``struct bpf_flow_keys``
144144
for a set of information that's currently can be exported from the BPF context.
145+
146+
When BPF flow dissector is attached to the root network namespace (machine-wide
147+
policy), users can't override it in their child network namespaces.

Documentation/bpf/s390.rst

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
===================
2+
Testing BPF on s390
3+
===================
4+
5+
1. Introduction
6+
***************
7+
8+
IBM Z are mainframe computers, which are descendants of IBM System/360 from
9+
year 1964. They are supported by the Linux kernel under the name "s390". This
10+
document describes how to test BPF in an s390 QEMU guest.
11+
12+
2. One-time setup
13+
*****************
14+
15+
The following is required to build and run the test suite:
16+
17+
* s390 GCC
18+
* s390 development headers and libraries
19+
* Clang with BPF support
20+
* QEMU with s390 support
21+
* Disk image with s390 rootfs
22+
23+
Debian supports installing compiler and libraries for s390 out of the box.
24+
Users of other distros may use debootstrap in order to set up a Debian chroot::
25+
26+
sudo debootstrap \
27+
--variant=minbase \
28+
--include=sudo \
29+
testing \
30+
./s390-toolchain
31+
sudo mount --rbind /dev ./s390-toolchain/dev
32+
sudo mount --rbind /proc ./s390-toolchain/proc
33+
sudo mount --rbind /sys ./s390-toolchain/sys
34+
sudo chroot ./s390-toolchain
35+
36+
Once on Debian, the build prerequisites can be installed as follows::
37+
38+
sudo dpkg --add-architecture s390x
39+
sudo apt-get update
40+
sudo apt-get install \
41+
bc \
42+
bison \
43+
cmake \
44+
debootstrap \
45+
dwarves \
46+
flex \
47+
g++ \
48+
gcc \
49+
g++-s390x-linux-gnu \
50+
gcc-s390x-linux-gnu \
51+
gdb-multiarch \
52+
git \
53+
make \
54+
python3 \
55+
qemu-system-misc \
56+
qemu-utils \
57+
rsync \
58+
libcap-dev:s390x \
59+
libelf-dev:s390x \
60+
libncurses-dev
61+
62+
Latest Clang targeting BPF can be installed as follows::
63+
64+
git clone https://github.com/llvm/llvm-project.git
65+
ln -s ../../clang llvm-project/llvm/tools/
66+
mkdir llvm-project-build
67+
cd llvm-project-build
68+
cmake \
69+
-DLLVM_TARGETS_TO_BUILD=BPF \
70+
-DCMAKE_BUILD_TYPE=Release \
71+
-DCMAKE_INSTALL_PREFIX=/opt/clang-bpf \
72+
../llvm-project/llvm
73+
make
74+
sudo make install
75+
export PATH=/opt/clang-bpf/bin:$PATH
76+
77+
The disk image can be prepared using a loopback mount and debootstrap::
78+
79+
qemu-img create -f raw ./s390.img 1G
80+
sudo losetup -f ./s390.img
81+
sudo mkfs.ext4 /dev/loopX
82+
mkdir ./s390.rootfs
83+
sudo mount /dev/loopX ./s390.rootfs
84+
sudo debootstrap \
85+
--foreign \
86+
--arch=s390x \
87+
--variant=minbase \
88+
--include=" \
89+
iproute2, \
90+
iputils-ping, \
91+
isc-dhcp-client, \
92+
kmod, \
93+
libcap2, \
94+
libelf1, \
95+
netcat, \
96+
procps" \
97+
testing \
98+
./s390.rootfs
99+
sudo umount ./s390.rootfs
100+
sudo losetup -d /dev/loopX
101+
102+
3. Compilation
103+
**************
104+
105+
In addition to the usual Kconfig options required to run the BPF test suite, it
106+
is also helpful to select::
107+
108+
CONFIG_NET_9P=y
109+
CONFIG_9P_FS=y
110+
CONFIG_NET_9P_VIRTIO=y
111+
CONFIG_VIRTIO_PCI=y
112+
113+
as that would enable a very easy way to share files with the s390 virtual
114+
machine.
115+
116+
Compiling kernel, modules and testsuite, as well as preparing gdb scripts to
117+
simplify debugging, can be done using the following commands::
118+
119+
make ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- menuconfig
120+
make ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- bzImage modules scripts_gdb
121+
make ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- \
122+
-C tools/testing/selftests \
123+
TARGETS=bpf \
124+
INSTALL_PATH=$PWD/tools/testing/selftests/kselftest_install \
125+
install
126+
127+
4. Running the test suite
128+
*************************
129+
130+
The virtual machine can be started as follows::
131+
132+
qemu-system-s390x \
133+
-cpu max,zpci=on \
134+
-smp 2 \
135+
-m 4G \
136+
-kernel linux/arch/s390/boot/compressed/vmlinux \
137+
-drive file=./s390.img,if=virtio,format=raw \
138+
-nographic \
139+
-append 'root=/dev/vda rw console=ttyS1' \
140+
-virtfs local,path=./linux,security_model=none,mount_tag=linux \
141+
-object rng-random,filename=/dev/urandom,id=rng0 \
142+
-device virtio-rng-ccw,rng=rng0 \
143+
-netdev user,id=net0 \
144+
-device virtio-net-ccw,netdev=net0
145+
146+
When using this on a real IBM Z, ``-enable-kvm`` may be added for better
147+
performance. When starting the virtual machine for the first time, disk image
148+
setup must be finalized using the following command::
149+
150+
/debootstrap/debootstrap --second-stage
151+
152+
Directory with the code built on the host as well as ``/proc`` and ``/sys``
153+
need to be mounted as follows::
154+
155+
mkdir -p /linux
156+
mount -t 9p linux /linux
157+
mount -t proc proc /proc
158+
mount -t sysfs sys /sys
159+
160+
After that, the test suite can be run using the following commands::
161+
162+
cd /linux/tools/testing/selftests/kselftest_install
163+
./run_kselftest.sh
164+
165+
As usual, tests can be also run individually::
166+
167+
cd /linux/tools/testing/selftests/bpf
168+
./test_verifier
169+
170+
5. Debugging
171+
************
172+
173+
It is possible to debug the s390 kernel using QEMU GDB stub, which is activated
174+
by passing ``-s`` to QEMU.
175+
176+
It is preferable to turn KASLR off, so that gdb would know where to find the
177+
kernel image in memory, by building the kernel with::
178+
179+
RANDOMIZE_BASE=n
180+
181+
GDB can then be attached using the following command::
182+
183+
gdb-multiarch -ex 'target remote localhost:1234' ./vmlinux
184+
185+
6. Network
186+
**********
187+
188+
In case one needs to use the network in the virtual machine in order to e.g.
189+
install additional packages, it can be configured using::
190+
191+
dhclient eth0
192+
193+
7. Links
194+
********
195+
196+
This document is a compilation of techniques, whose more comprehensive
197+
descriptions can be found by following these links:
198+
199+
- `Debootstrap <https://wiki.debian.org/EmDebian/CrossDebootstrap>`_
200+
- `Multiarch <https://wiki.debian.org/Multiarch/HOWTO>`_
201+
- `Building LLVM <https://llvm.org/docs/CMake.html>`_
202+
- `Cross-compiling the kernel <https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Cross-compiling_the_kernel>`_
203+
- `QEMU s390x Guest Support <https://wiki.qemu.org/Documentation/Platforms/S390X>`_
204+
- `Plan 9 folder sharing over Virtio <https://wiki.qemu.org/Documentation/9psetup>`_
205+
- `Using GDB with QEMU <https://wiki.osdev.org/Kernel_Debugging#Use_GDB_with_QEMU>`_

Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ Optional properties:
4444
Admission Control Block supports reporting the number of packets in-flight in a
4545
switch queue
4646

47+
- resets: a single phandle and reset identifier pair. See
48+
Documentation/devicetree/binding/reset/reset.txt for details.
49+
50+
- reset-names: If the "reset" property is specified, this property should have
51+
the value "switch" to denote the switch reset line.
52+
4753
Port subnodes:
4854

4955
Optional properties:

Documentation/devicetree/bindings/net/brcm,bcmgenet.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Required properties:
44
- compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2",
5-
"brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5".
5+
"brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5".
66
- reg: address and length of the register set for the device
77
- interrupts and/or interrupts-extended: must be two cells, the first cell
88
is the general purpose interrupt line, while the second cell is the

Documentation/devicetree/bindings/net/broadcom-bluetooth.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Required properties:
1414
* "brcm,bcm4330-bt"
1515
* "brcm,bcm43438-bt"
1616
* "brcm,bcm4345c5"
17+
* "brcm,bcm43540-bt"
18+
* "brcm,bcm4335a0"
1719

1820
Optional properties:
1921

Documentation/devicetree/bindings/net/ethernet-controller.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ properties:
121121
and is useful for determining certain configuration settings
122122
such as flow control thresholds.
123123

124+
sfp:
125+
$ref: /schemas/types.yaml#definitions/phandle
126+
description:
127+
Specifies a reference to a node representing a SFP cage.
128+
124129
tx-fifo-depth:
125130
$ref: /schemas/types.yaml#definitions/uint32
126131
description:

Documentation/devicetree/bindings/net/ethernet-phy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ properties:
153153
Delay after the reset was deasserted in microseconds. If
154154
this property is missing the delay will be skipped.
155155

156+
sfp:
157+
$ref: /schemas/types.yaml#definitions/phandle
158+
description:
159+
Specifies a reference to a node representing a SFP cage.
160+
156161
required:
157162
- reg
158163

Documentation/devicetree/bindings/net/ftgmac100.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Required properties:
99

1010
- "aspeed,ast2400-mac"
1111
- "aspeed,ast2500-mac"
12+
- "aspeed,ast2600-mac"
1213

1314
- reg: Address and length of the register set for the device
1415
- interrupts: Should contain ethernet controller interrupt
@@ -23,6 +24,13 @@ Optional properties:
2324
- no-hw-checksum: Used to disable HW checksum support. Here for backward
2425
compatibility as the driver now should have correct defaults based on
2526
the SoC.
27+
- clocks: In accordance with the generic clock bindings. Must describe the MAC
28+
IP clock, and optionally an RMII RCLK gate for the AST2500/AST2600. The
29+
required MAC clock must be the first cell.
30+
- clock-names:
31+
32+
- "MACCLK": The MAC IP clock
33+
- "RCLK": Clock gate for the RMII RCLK
2634

2735
Example:
2836

0 commit comments

Comments
 (0)