mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 00:35:01 +00:00
Networking changes for 6.13.
The most significant set of changes is the per netns RTNL. The new behavior is disabled by default, regression risk should be contained. Notably the new config knob PTP_1588_CLOCK_VMCLOCK will inherit its default value from PTP_1588_CLOCK_KVM, as the first is intended to be a more reliable replacement for the latter. Core ---- - Started a very large, in-progress, effort to make the RTNL lock scope per network-namespace, thus reducing the lock contention significantly in the containerized use-case, comprising: - RCU-ified some relevant slices of the FIB control path - introduce basic per netns locking helpers - namespacified the IPv4 address hash table - remove rtnl_register{,_module}() in favour of rtnl_register_many() - refactor rtnl_{new,del,set}link() moving as much validation as possible out of RTNL lock - convert all phonet doit() and dumpit() handlers to RCU - convert IPv4 addresses manipulation to per-netns RTNL - convert virtual interface creation to per-netns RTNL the per-netns lock infra is guarded by the CONFIG_DEBUG_NET_SMALL_RTNL knob, disabled by default ad interim. - Introduce NAPI suspension, to efficiently switching between busy polling (NAPI processing suspended) and normal processing. - Migrate the IPv4 routing input, output and control path from direct ToS usage to DSCP macros. This is a work in progress to make ECN handling consistent and reliable. - Add drop reasons support to the IPv4 rotue input path, allowing better introspection in case of packets drop. - Make FIB seqnum lockless, dropping RTNL protection for read access. - Make inet{,v6} addresses hashing less predicable. - Allow providing timestamp OPT_ID via cmsg, to correlate TX packets and timestamps Things we sprinkled into general kernel code -------------------------------------------- - Add small file operations for debugfs, to reduce the struct ops size. - Refactoring and optimization for the implementation of page_frag API, This is a preparatory work to consolidate the page_frag implementation. Netfilter --------- - Optimize set element transactions to reduce memory consumption - Extended netlink error reporting for attribute parser failure. - Make legacy xtables configs user selectable, giving users the option to configure iptables without enabling any other config. - Address a lot of false-positive RCU issues, pointed by recent CI improvements. BPF --- - Put xsk sockets on a struct diet and add various cleanups. Overall, this helps to bump performance by 12% for some workloads. - Extend BPF selftests to increase coverage of XDP features in combination with BPF cpumap. - Optimize and homogenize bpf_csum_diff helper for all archs and also add a batch of new BPF selftests for it. - Extend netkit with an option to delegate skb->{mark,priority} scrubbing to its BPF program. - Make the bpf_get_netns_cookie() helper available also to tc(x) BPF programs. Protocols --------- - Introduces 4-tuple hash for connected udp sockets, speeding-up significantly connected sockets lookup. - Add a fastpath for some TCP timers that usually expires after close, the socket lock contention. - Add inbound and outbound xfrm state caches to speed up state lookups. - Avoid sending MPTCP advertisements on stale subflows, reducing risks on loosing them. - Make neighbours table flushing more scalable, maintaining per device neigh lists. Driver API ---------- - Introduce a unified interface to configure transmission H/W shaping, and expose it to user-space via generic-netlink. - Add support for per-NAPI config via netlink. This makes napi configuration persistent across queues removal and re-creation. Requires driver updates, currently supported drivers are: nVidia/Mellanox mlx4 and mlx5, Broadcom brcm and Intel ice. - Add ethtool support for writing SFP / PHY firmware blocks. - Track RSS context allocation from ethtool core. - Implement support for mirroring to DSA CPU port, via TC mirror offload. - Consolidate FDB updates notification, to avoid duplicates on device-specific entries. - Expose DPLL clock quality level to the user-space. - Support master-slave PHY config via device tree. Tests and tooling ----------------- - forwarding: introduce deferred commands, to simplify the cleanup phase Drivers ------- - Updated several drivers - Amazon vNic, Google vNic, Microsoft vNic, Intel e1000e and Broadcom Tigon3 - to use netdev-genl to link the IRQs and queues to NAPI IDs, allowing busy polling and better introspection. - Ethernet high-speed NICs: - nVidia/Mellanox: - mlx5: - a large refactor to implement support for cross E-Switch scheduling - refactor H/W conter management to let it scale better - H/W GRO cleanups - Intel (100G, ice):: - adds support for ethtool reset - implement support for per TX queue H/W shaping - AMD/Solarflare: - implement per device queue stats support - Broadcom (bnxt): - improve wildcard l4proto on IPv4/IPv6 ntuple rules - Marvell Octeon: - Adds representor support for each Resource Virtualization Unit (RVU) device. - Hisilicon: - adds support for the BMC Gigabit Ethernet - IBM (EMAC): - driver cleanup and modernization - Cisco (VIC): - raise the queues number limit to 256 - Ethernet virtual: - Google vNIC: - implements page pool support - macsec: - inherit lower device's features and TSO limits when offloading - virtio_net: - enable premapped mode by default - support for XDP socket(AF_XDP) zerocopy TX - wireguard: - set the TSO max size to be GSO_MAX_SIZE, to aggregate larger packets. - Ethernet NICs embedded and virtual: - Broadcom ASP: - enable software timestamping - Freescale: - add enetc4 PF driver - MediaTek: Airoha SoC: - implement BQL support - RealTek r8169: - enable TSO by default on r8168/r8125 - implement extended ethtool stats - Renesas AVB: - enable TX checksum offload - Synopsys (stmmac): - support header splitting for vlan tagged packets - move common code for DWMAC4 and DWXGMAC into a separate FPE module. - Add the dwmac driver support for T-HEAD TH1520 SoC - Synopsys (xpcs): - driver refactor and cleanup - TI: - icssg_prueth: add VLAN offload support - Xilinx emaclite: - adds clock support - Ethernet switches: - Microchip: - implement support for the lan969x Ethernet switch family - add LAN9646 switch support to KSZ DSA driver - Ethernet PHYs: - Marvel: 88q2x: enable auto negotiation - Microchip: add support for LAN865X Rev B1 and LAN867X Rev C1/C2 - PTP: - Add support for the Amazon virtual clock device - Add PtP driver for s390 clocks - WiFi: - mac80211 - EHT 1024 aggregation size for transmissions - new operation to indicate that a new interface is to be added - support radio separation of multi-band devices - move wireless extension spy implementation to libiw - Broadcom: - brcmfmac: optional LPO clock support - Microchip: - add support for Atmel WILC3000 - Qualcomm (ath12k): - firmware coredump collection support - add debugfs support for a multitude of statistics - Qualcomm (ath5k): - Arcadyan ARV45XX AR2417 & Gigaset SX76[23] AR241[34]A support - Realtek: - rtw88: 8821au and 8812au USB adapters support - rtw89: add thermal protection - rtw89: fine tune BT-coexsitence to improve user experience - rtw89: firmware secure boot for WiFi 6 chip - Bluetooth - add Qualcomm WCN785x support for ids Foxconn 0xe0fc/0xe0f3 and 0x13d3:0x3623 - add Realtek RTL8852BE support for id Foxconn 0xe123 - add MediaTek MT7920 support for wireless module ids - btintel_pcie: add handshake between driver and firmware - btintel_pcie: add recovery mechanism - btnxpuart: add GPIO support to power save feature Signed-off-by: Paolo Abeni <pabeni@redhat.com> -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmc8sukSHHBhYmVuaUBy ZWRoYXQuY29tAAoJECkkeY3MjxOkLEYQAIMM6Qjh0bh3Byr3gOS1xZzXG+APLjP4 9Jr0p3i+X53i90jvVqzeVO5FTc95MVHSKZ3kvPkDMXSLUaEJxocNHCI5Dzl/2/qL wWdpUB6/ou+jKB4Bn6Z8OvVODT7qrr0tVa9M2/fuKWrIsOU/ntIhG8EhnGddk5U/ vKPSf5PUIb81uNRnF58VusY3wrT1dEoh9VfJYxL+ST+inPxjEAMy6Y+lmlsjGaSX jrS+Pp9KYiUwl3Qt0AQs+cG4OHkJdjbnChrfosWwpkiyddO8klVq06+wX/TiSzfF b9VZtBfy/GZs3lkE1mQkcILdtX5pP3YHQdpsuxFfVI0JHVszx2ck7WdoRux/8F0v kKZsYcO7bH9I1wMFP66Ff9hIbdEQaeucK+KdDkXyPNMfP91Vzmfjii8IBxOC36Ie BbOeFUrXyTxxJ2u0vf/X9JtIq8bcrkNrSd1n1jlGPMqG3FVzsY95+Oi4qfsyeUbl lS1PlVTqPMPFdX54HnxM3y2rJjhd7iXhkvmtuXNjRFThXlOiK3maAPWlM1aZ3b8u Vjs4JFUsW0tleZG+RzANjsGjXbf7AiPUGLZt+acem0K+fcjG4i5aGIAJrxwa/ORx eG74IZRt5cOI371W7gNLGHjwnuge8tFPgOWcRP2eozNm7jvMYALBejYS7eWUTvaf THcvVM+bupEZ =GzPr -----END PGP SIGNATURE----- Merge tag 'net-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "The most significant set of changes is the per netns RTNL. The new behavior is disabled by default, regression risk should be contained. Notably the new config knob PTP_1588_CLOCK_VMCLOCK will inherit its default value from PTP_1588_CLOCK_KVM, as the first is intended to be a more reliable replacement for the latter. Core: - Started a very large, in-progress, effort to make the RTNL lock scope per network-namespace, thus reducing the lock contention significantly in the containerized use-case, comprising: - RCU-ified some relevant slices of the FIB control path - introduce basic per netns locking helpers - namespacified the IPv4 address hash table - remove rtnl_register{,_module}() in favour of rtnl_register_many() - refactor rtnl_{new,del,set}link() moving as much validation as possible out of RTNL lock - convert all phonet doit() and dumpit() handlers to RCU - convert IPv4 addresses manipulation to per-netns RTNL - convert virtual interface creation to per-netns RTNL the per-netns lock infrastructure is guarded by the CONFIG_DEBUG_NET_SMALL_RTNL knob, disabled by default ad interim. - Introduce NAPI suspension, to efficiently switching between busy polling (NAPI processing suspended) and normal processing. - Migrate the IPv4 routing input, output and control path from direct ToS usage to DSCP macros. This is a work in progress to make ECN handling consistent and reliable. - Add drop reasons support to the IPv4 rotue input path, allowing better introspection in case of packets drop. - Make FIB seqnum lockless, dropping RTNL protection for read access. - Make inet{,v6} addresses hashing less predicable. - Allow providing timestamp OPT_ID via cmsg, to correlate TX packets and timestamps Things we sprinkled into general kernel code: - Add small file operations for debugfs, to reduce the struct ops size. - Refactoring and optimization for the implementation of page_frag API, This is a preparatory work to consolidate the page_frag implementation. Netfilter: - Optimize set element transactions to reduce memory consumption - Extended netlink error reporting for attribute parser failure. - Make legacy xtables configs user selectable, giving users the option to configure iptables without enabling any other config. - Address a lot of false-positive RCU issues, pointed by recent CI improvements. BPF: - Put xsk sockets on a struct diet and add various cleanups. Overall, this helps to bump performance by 12% for some workloads. - Extend BPF selftests to increase coverage of XDP features in combination with BPF cpumap. - Optimize and homogenize bpf_csum_diff helper for all archs and also add a batch of new BPF selftests for it. - Extend netkit with an option to delegate skb->{mark,priority} scrubbing to its BPF program. - Make the bpf_get_netns_cookie() helper available also to tc(x) BPF programs. Protocols: - Introduces 4-tuple hash for connected udp sockets, speeding-up significantly connected sockets lookup. - Add a fastpath for some TCP timers that usually expires after close, the socket lock contention. - Add inbound and outbound xfrm state caches to speed up state lookups. - Avoid sending MPTCP advertisements on stale subflows, reducing risks on loosing them. - Make neighbours table flushing more scalable, maintaining per device neigh lists. Driver API: - Introduce a unified interface to configure transmission H/W shaping, and expose it to user-space via generic-netlink. - Add support for per-NAPI config via netlink. This makes napi configuration persistent across queues removal and re-creation. Requires driver updates, currently supported drivers are: nVidia/Mellanox mlx4 and mlx5, Broadcom brcm and Intel ice. - Add ethtool support for writing SFP / PHY firmware blocks. - Track RSS context allocation from ethtool core. - Implement support for mirroring to DSA CPU port, via TC mirror offload. - Consolidate FDB updates notification, to avoid duplicates on device-specific entries. - Expose DPLL clock quality level to the user-space. - Support master-slave PHY config via device tree. Tests and tooling: - forwarding: introduce deferred commands, to simplify the cleanup phase Drivers: - Updated several drivers - Amazon vNic, Google vNic, Microsoft vNic, Intel e1000e and Broadcom Tigon3 - to use netdev-genl to link the IRQs and queues to NAPI IDs, allowing busy polling and better introspection. - Ethernet high-speed NICs: - nVidia/Mellanox: - mlx5: - a large refactor to implement support for cross E-Switch scheduling - refactor H/W conter management to let it scale better - H/W GRO cleanups - Intel (100G, ice):: - add support for ethtool reset - implement support for per TX queue H/W shaping - AMD/Solarflare: - implement per device queue stats support - Broadcom (bnxt): - improve wildcard l4proto on IPv4/IPv6 ntuple rules - Marvell Octeon: - Add representor support for each Resource Virtualization Unit (RVU) device. - Hisilicon: - add support for the BMC Gigabit Ethernet - IBM (EMAC): - driver cleanup and modernization - Cisco (VIC): - raise the queues number limit to 256 - Ethernet virtual: - Google vNIC: - implement page pool support - macsec: - inherit lower device's features and TSO limits when offloading - virtio_net: - enable premapped mode by default - support for XDP socket(AF_XDP) zerocopy TX - wireguard: - set the TSO max size to be GSO_MAX_SIZE, to aggregate larger packets. - Ethernet NICs embedded and virtual: - Broadcom ASP: - enable software timestamping - Freescale: - add enetc4 PF driver - MediaTek: Airoha SoC: - implement BQL support - RealTek r8169: - enable TSO by default on r8168/r8125 - implement extended ethtool stats - Renesas AVB: - enable TX checksum offload - Synopsys (stmmac): - support header splitting for vlan tagged packets - move common code for DWMAC4 and DWXGMAC into a separate FPE module. - add dwmac driver support for T-HEAD TH1520 SoC - Synopsys (xpcs): - driver refactor and cleanup - TI: - icssg_prueth: add VLAN offload support - Xilinx emaclite: - add clock support - Ethernet switches: - Microchip: - implement support for the lan969x Ethernet switch family - add LAN9646 switch support to KSZ DSA driver - Ethernet PHYs: - Marvel: 88q2x: enable auto negotiation - Microchip: add support for LAN865X Rev B1 and LAN867X Rev C1/C2 - PTP: - Add support for the Amazon virtual clock device - Add PtP driver for s390 clocks - WiFi: - mac80211 - EHT 1024 aggregation size for transmissions - new operation to indicate that a new interface is to be added - support radio separation of multi-band devices - move wireless extension spy implementation to libiw - Broadcom: - brcmfmac: optional LPO clock support - Microchip: - add support for Atmel WILC3000 - Qualcomm (ath12k): - firmware coredump collection support - add debugfs support for a multitude of statistics - Qualcomm (ath5k): - Arcadyan ARV45XX AR2417 & Gigaset SX76[23] AR241[34]A support - Realtek: - rtw88: 8821au and 8812au USB adapters support - rtw89: add thermal protection - rtw89: fine tune BT-coexsitence to improve user experience - rtw89: firmware secure boot for WiFi 6 chip - Bluetooth - add Qualcomm WCN785x support for ids Foxconn 0xe0fc/0xe0f3 and 0x13d3:0x3623 - add Realtek RTL8852BE support for id Foxconn 0xe123 - add MediaTek MT7920 support for wireless module ids - btintel_pcie: add handshake between driver and firmware - btintel_pcie: add recovery mechanism - btnxpuart: add GPIO support to power save feature" * tag 'net-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1475 commits) mm: page_frag: fix a compile error when kernel is not compiled Documentation: tipc: fix formatting issue in tipc.rst selftests: nic_performance: Add selftest for performance of NIC driver selftests: nic_link_layer: Add selftest case for speed and duplex states selftests: nic_link_layer: Add link layer selftest for NIC driver bnxt_en: Add FW trace coredump segments to the coredump bnxt_en: Add a new ethtool -W dump flag bnxt_en: Add 2 parameters to bnxt_fill_coredump_seg_hdr() bnxt_en: Add functions to copy host context memory bnxt_en: Do not free FW log context memory bnxt_en: Manage the FW trace context memory bnxt_en: Allocate backing store memory for FW trace logs bnxt_en: Add a 'force' parameter to bnxt_free_ctx_mem() bnxt_en: Refactor bnxt_free_ctx_mem() bnxt_en: Add mem_valid bit to struct bnxt_ctx_mem_type bnxt_en: Update firmware interface spec to 1.10.3.85 selftests/bpf: Add some tests with sockmap SK_PASS bpf: fix recursive lock when verdict program return SK_PASS wireguard: device: support big tcp GSO wireguard: selftests: load nf_conntrack if not present ...
This commit is contained in:
commit
fcc79e1714
@ -1553,6 +1553,7 @@
|
||||
failslab=
|
||||
fail_usercopy=
|
||||
fail_page_alloc=
|
||||
fail_skb_realloc=
|
||||
fail_make_request=[KNL]
|
||||
General fault injection mechanism.
|
||||
Format: <interval>,<probability>,<space>,<times>
|
||||
|
@ -151,6 +151,77 @@ the more significant 4-byte word.
|
||||
We always think of our offsets as if there were no quirk, and we translate
|
||||
them afterwards, before accessing the memory region.
|
||||
|
||||
Note on buffer lengths not multiple of 4
|
||||
----------------------------------------
|
||||
|
||||
To deal with memory layout quirks where groups of 4 bytes are laid out "little
|
||||
endian" relative to each other, but "big endian" within the group itself, the
|
||||
concept of groups of 4 bytes is intrinsic to the packing API (not to be
|
||||
confused with the memory access, which is performed byte by byte, though).
|
||||
|
||||
With buffer lengths not multiple of 4, this means one group will be incomplete.
|
||||
Depending on the quirks, this may lead to discontinuities in the bit fields
|
||||
accessible through the buffer. The packing API assumes discontinuities were not
|
||||
the intention of the memory layout, so it avoids them by effectively logically
|
||||
shortening the most significant group of 4 octets to the number of octets
|
||||
actually available.
|
||||
|
||||
Example with a 31 byte sized buffer given below. Physical buffer offsets are
|
||||
implicit, and increase from left to right within a group, and from top to
|
||||
bottom within a column.
|
||||
|
||||
No quirks:
|
||||
|
||||
::
|
||||
|
||||
31 29 28 | Group 7 (most significant)
|
||||
27 26 25 24 | Group 6
|
||||
23 22 21 20 | Group 5
|
||||
19 18 17 16 | Group 4
|
||||
15 14 13 12 | Group 3
|
||||
11 10 9 8 | Group 2
|
||||
7 6 5 4 | Group 1
|
||||
3 2 1 0 | Group 0 (least significant)
|
||||
|
||||
QUIRK_LSW32_IS_FIRST:
|
||||
|
||||
::
|
||||
|
||||
3 2 1 0 | Group 0 (least significant)
|
||||
7 6 5 4 | Group 1
|
||||
11 10 9 8 | Group 2
|
||||
15 14 13 12 | Group 3
|
||||
19 18 17 16 | Group 4
|
||||
23 22 21 20 | Group 5
|
||||
27 26 25 24 | Group 6
|
||||
30 29 28 | Group 7 (most significant)
|
||||
|
||||
QUIRK_LITTLE_ENDIAN:
|
||||
|
||||
::
|
||||
|
||||
30 28 29 | Group 7 (most significant)
|
||||
24 25 26 27 | Group 6
|
||||
20 21 22 23 | Group 5
|
||||
16 17 18 19 | Group 4
|
||||
12 13 14 15 | Group 3
|
||||
8 9 10 11 | Group 2
|
||||
4 5 6 7 | Group 1
|
||||
0 1 2 3 | Group 0 (least significant)
|
||||
|
||||
QUIRK_LITTLE_ENDIAN | QUIRK_LSW32_IS_FIRST:
|
||||
|
||||
::
|
||||
|
||||
0 1 2 3 | Group 0 (least significant)
|
||||
4 5 6 7 | Group 1
|
||||
8 9 10 11 | Group 2
|
||||
12 13 14 15 | Group 3
|
||||
16 17 18 19 | Group 4
|
||||
20 21 22 23 | Group 5
|
||||
24 25 26 27 | Group 6
|
||||
28 29 30 | Group 7 (most significant)
|
||||
|
||||
Intended use
|
||||
------------
|
||||
|
||||
|
@ -34,6 +34,12 @@ properties:
|
||||
firmware-name:
|
||||
maxItems: 1
|
||||
|
||||
device-wakeup-gpios:
|
||||
maxItems: 1
|
||||
description:
|
||||
Host-To-Chip power save mechanism is driven by this GPIO
|
||||
connected to BT_WAKE_IN pin of the NXP chipset.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@ -41,10 +47,12 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
serial {
|
||||
bluetooth {
|
||||
compatible = "nxp,88w8987-bt";
|
||||
fw-init-baudrate = <3000000>;
|
||||
firmware-name = "uartuart8987_bt_v0.bin";
|
||||
device-wakeup-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
@ -34,6 +34,7 @@ properties:
|
||||
- microchip,ksz9563
|
||||
- microchip,ksz8563
|
||||
- microchip,ksz8567
|
||||
- microchip,lan9646
|
||||
|
||||
reset-gpios:
|
||||
description:
|
||||
@ -81,6 +82,26 @@ properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
mdio:
|
||||
$ref: /schemas/net/mdio.yaml#
|
||||
unevaluatedProperties: false
|
||||
properties:
|
||||
mdio-parent-bus:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
Phandle pointing to the MDIO bus controller connected to the
|
||||
secondary MDIO interface. This property should be used when
|
||||
the internal MDIO bus is accessed via a secondary MDIO
|
||||
interface rather than the primary management interface.
|
||||
|
||||
patternProperties:
|
||||
"^ethernet-phy@[0-9a-f]$":
|
||||
type: object
|
||||
$ref: /schemas/net/ethernet-phy.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
Integrated PHY node
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@ -138,7 +159,6 @@ examples:
|
||||
|
||||
pinctrl-0 = <&pinctrl_spi_ksz>;
|
||||
cs-gpios = <&pioC 25 0>;
|
||||
id = <1>;
|
||||
|
||||
ksz9477: switch@0 {
|
||||
compatible = "microchip,ksz9477";
|
||||
|
@ -147,7 +147,7 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
platform {
|
||||
switch {
|
||||
ethernet-switch {
|
||||
compatible = "realtek,rtl8366rb";
|
||||
/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
|
||||
mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
||||
@ -163,35 +163,35 @@ examples:
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
|
||||
ports {
|
||||
ethernet-ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
ethernet-port@0 {
|
||||
reg = <0>;
|
||||
label = "lan0";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
port@1 {
|
||||
ethernet-port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
phy-handle = <&phy1>;
|
||||
};
|
||||
port@2 {
|
||||
ethernet-port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
phy-handle = <&phy2>;
|
||||
};
|
||||
port@3 {
|
||||
ethernet-port@3 {
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
phy-handle = <&phy3>;
|
||||
};
|
||||
port@4 {
|
||||
ethernet-port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
phy-handle = <&phy4>;
|
||||
};
|
||||
port@5 {
|
||||
ethernet-port@5 {
|
||||
reg = <5>;
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "rgmii";
|
||||
@ -241,7 +241,7 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
platform {
|
||||
switch {
|
||||
ethernet-switch {
|
||||
compatible = "realtek,rtl8365mb";
|
||||
mdc-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
|
||||
mdio-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
|
||||
@ -255,30 +255,30 @@ examples:
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
|
||||
ports {
|
||||
ethernet-ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
ethernet-port@0 {
|
||||
reg = <0>;
|
||||
label = "swp0";
|
||||
phy-handle = <ðphy0>;
|
||||
};
|
||||
port@1 {
|
||||
ethernet-port@1 {
|
||||
reg = <1>;
|
||||
label = "swp1";
|
||||
phy-handle = <ðphy1>;
|
||||
};
|
||||
port@2 {
|
||||
ethernet-port@2 {
|
||||
reg = <2>;
|
||||
label = "swp2";
|
||||
phy-handle = <ðphy2>;
|
||||
};
|
||||
port@3 {
|
||||
ethernet-port@3 {
|
||||
reg = <3>;
|
||||
label = "swp3";
|
||||
phy-handle = <ðphy3>;
|
||||
};
|
||||
port@6 {
|
||||
ethernet-port@6 {
|
||||
reg = <6>;
|
||||
ethernet = <&fec1>;
|
||||
phy-mode = "rgmii";
|
||||
@ -330,7 +330,7 @@ examples:
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch@29 {
|
||||
ethernet-switch@29 {
|
||||
compatible = "realtek,rtl8365mb";
|
||||
reg = <29>;
|
||||
|
||||
@ -344,36 +344,36 @@ examples:
|
||||
#interrupt-cells = <1>;
|
||||
};
|
||||
|
||||
ports {
|
||||
ethernet-ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
ethernet-port@0 {
|
||||
reg = <0>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
ethernet-port@1 {
|
||||
reg = <1>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
ethernet-port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
ethernet-port@3 {
|
||||
reg = <3>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
ethernet-port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@7 {
|
||||
ethernet-port@7 {
|
||||
reg = <7>;
|
||||
ethernet = <ðernet>;
|
||||
phy-mode = "rgmii";
|
||||
|
@ -158,6 +158,27 @@ properties:
|
||||
Mark the corresponding energy efficient ethernet mode as
|
||||
broken and request the ethernet to stop advertising it.
|
||||
|
||||
timing-role:
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
enum:
|
||||
- forced-master
|
||||
- forced-slave
|
||||
- preferred-master
|
||||
- preferred-slave
|
||||
description: |
|
||||
Specifies the timing role of the PHY in the network link. This property is
|
||||
required for setups where the role must be explicitly assigned via the
|
||||
device tree due to limitations in hardware strapping or incorrect strap
|
||||
configurations.
|
||||
It is applicable to Single Pair Ethernet (1000/100/10Base-T1) and other
|
||||
PHY types, including 1000Base-T, where it controls whether the PHY should
|
||||
be a master (clock source) or a slave (clock receiver).
|
||||
|
||||
- 'forced-master': The PHY is forced to operate as a master.
|
||||
- 'forced-slave': The PHY is forced to operate as a slave.
|
||||
- 'preferred-master': Prefer the PHY to be master but allow negotiation.
|
||||
- 'preferred-slave': Prefer the PHY to be slave but allow negotiation.
|
||||
|
||||
pses:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
maxItems: 1
|
||||
|
@ -20,10 +20,13 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- pci1957,ee01
|
||||
- const: fsl,enetc-mdio
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- pci1957,ee01
|
||||
- const: fsl,enetc-mdio
|
||||
- items:
|
||||
- const: pci1131,ee00
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -20,14 +20,25 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- pci1957,e100
|
||||
- const: fsl,enetc
|
||||
- enum:
|
||||
- pci1957,e100
|
||||
- const: fsl,enetc
|
||||
- pci1131,e101
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: MAC transmit/receive reference clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
|
||||
mdio:
|
||||
$ref: mdio.yaml
|
||||
unevaluatedProperties: false
|
||||
@ -40,6 +51,17 @@ required:
|
||||
allOf:
|
||||
- $ref: /schemas/pci/pci-device.yaml
|
||||
- $ref: ethernet-controller.yaml
|
||||
- if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- pci1131,e101
|
||||
then:
|
||||
properties:
|
||||
clocks: false
|
||||
clock-names: false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
@ -183,6 +183,13 @@ properties:
|
||||
description:
|
||||
Register bits of stop mode control, the format is <&gpr req_gpr req_bit>.
|
||||
|
||||
fsl,pps-channel:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
default: 0
|
||||
description:
|
||||
Specifies to which timer instance the PPS signal is routed.
|
||||
enum: [0, 1, 2, 3]
|
||||
|
||||
mdio:
|
||||
$ref: mdio.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
@ -48,6 +48,12 @@ properties:
|
||||
firmware-name:
|
||||
description: specify the name of PHY firmware to load
|
||||
|
||||
marvell,mdi-cfg-order:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1]
|
||||
description:
|
||||
force normal (0) or reverse (1) order of MDI pairs, overriding MDI_CFG bootstrap pin.
|
||||
|
||||
nvmem-cells:
|
||||
description: phandle to the firmware nvmem cell
|
||||
maxItems: 1
|
||||
|
@ -53,37 +53,21 @@ examples:
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <10 8>; /* Pin 10, active low */
|
||||
};
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <10 8>; /* Pin 10, active low */
|
||||
};
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <10 8>; /* Pin 10, active low */
|
||||
};
|
||||
ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <10 8>; /* Pin 10, active low */
|
||||
};
|
||||
@ -96,37 +80,21 @@ examples:
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <12 8>; /* Pin 12, active low */
|
||||
};
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <12 8>; /* Pin 12, active low */
|
||||
};
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <12 8>; /* Pin 12, active low */
|
||||
};
|
||||
ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
marvell,reg-init = <3 0x10 0 0x5777>,
|
||||
<3 0x11 0 0x00aa>,
|
||||
<3 0x12 0 0x4105>,
|
||||
<3 0x13 0 0x0a60>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <12 8>; /* Pin 12, active low */
|
||||
};
|
||||
|
@ -9,6 +9,7 @@ title: Microchip Sparx5 Ethernet switch controller
|
||||
maintainers:
|
||||
- Steen Hegelund <steen.hegelund@microchip.com>
|
||||
- Lars Povlsen <lars.povlsen@microchip.com>
|
||||
- Daniel Machon <daniel.machon@microchip.com>
|
||||
|
||||
description: |
|
||||
The SparX-5 Enterprise Ethernet switch family provides a rich set of
|
||||
@ -34,7 +35,24 @@ properties:
|
||||
pattern: "^switch@[0-9a-f]+$"
|
||||
|
||||
compatible:
|
||||
const: microchip,sparx5-switch
|
||||
oneOf:
|
||||
- enum:
|
||||
- microchip,lan9691-switch
|
||||
- microchip,sparx5-switch
|
||||
- items:
|
||||
- enum:
|
||||
- microchip,lan969c-switch
|
||||
- microchip,lan969b-switch
|
||||
- microchip,lan969a-switch
|
||||
- microchip,lan9699-switch
|
||||
- microchip,lan9698-switch
|
||||
- microchip,lan9697-switch
|
||||
- microchip,lan9696-switch
|
||||
- microchip,lan9695-switch
|
||||
- microchip,lan9694-switch
|
||||
- microchip,lan9693-switch
|
||||
- microchip,lan9692-switch
|
||||
- const: microchip,lan9691-switch
|
||||
|
||||
reg:
|
||||
items:
|
||||
|
@ -17,6 +17,7 @@ properties:
|
||||
- enum:
|
||||
- nxp,nq310
|
||||
- nxp,pn547
|
||||
- nxp,pn553
|
||||
- const: nxp,nxp-nci-i2c
|
||||
|
||||
enable-gpios:
|
||||
|
104
Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
Normal file
104
Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
Normal file
@ -0,0 +1,104 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/nxp,netc-blk-ctrl.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NETC Blocks Control
|
||||
|
||||
description:
|
||||
Usually, NETC has 2 blocks of 64KB registers, integrated endpoint register
|
||||
block (IERB) and privileged register block (PRB). IERB is used for pre-boot
|
||||
initialization for all NETC devices, such as ENETC, Timer, EMIDO and so on.
|
||||
And PRB controls global reset and global error handling for NETC. Moreover,
|
||||
for the i.MX platform, there is also a NETCMIX block for link configuration,
|
||||
such as MII protocol, PCS protocol, etc.
|
||||
|
||||
maintainers:
|
||||
- Wei Fang <wei.fang@nxp.com>
|
||||
- Clark Wang <xiaoning.wang@nxp.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- nxp,imx95-netc-blk-ctrl
|
||||
|
||||
reg:
|
||||
maxItems: 3
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: ierb
|
||||
- const: prb
|
||||
- const: netcmix
|
||||
|
||||
"#address-cells":
|
||||
const: 2
|
||||
|
||||
"#size-cells":
|
||||
const: 2
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ipg
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^pcie@[0-9a-f]+$":
|
||||
$ref: /schemas/pci/host-generic-pci.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
bus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
system-controller@4cde0000 {
|
||||
compatible = "nxp,imx95-netc-blk-ctrl";
|
||||
reg = <0x0 0x4cde0000 0x0 0x10000>,
|
||||
<0x0 0x4cdf0000 0x0 0x10000>,
|
||||
<0x0 0x4c81000c 0x0 0x18>;
|
||||
reg-names = "ierb", "prb", "netcmix";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
clocks = <&scmi_clk 98>;
|
||||
clock-names = "ipg";
|
||||
power-domains = <&scmi_devpd 18>;
|
||||
|
||||
pcie@4cb00000 {
|
||||
compatible = "pci-host-ecam-generic";
|
||||
reg = <0x0 0x4cb00000 0x0 0x100000>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
bus-range = <0x1 0x1>;
|
||||
ranges = <0x82000000 0x0 0x4cce0000 0x0 0x4cce0000 0x0 0x20000
|
||||
0xc2000000 0x0 0x4cd10000 0x0 0x4cd10000 0x0 0x10000>;
|
||||
|
||||
mdio@0,0 {
|
||||
compatible = "pci1131,ee00";
|
||||
reg = <0x010000 0 0 0 0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -62,6 +62,22 @@ allOf:
|
||||
reference clock output when RMII mode enabled.
|
||||
Only supported on TJA1100 and TJA1101.
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ethernet-phy-id001b.b010
|
||||
- ethernet-phy-id001b.b013
|
||||
- ethernet-phy-id001b.b030
|
||||
- ethernet-phy-id001b.b031
|
||||
|
||||
then:
|
||||
properties:
|
||||
nxp,rmii-refclk-out:
|
||||
type: boolean
|
||||
description: Enable 50MHz RMII reference clock output on REF_CLK pin.
|
||||
|
||||
patternProperties:
|
||||
"^ethernet-phy@[0-9a-f]+$":
|
||||
type: object
|
||||
|
@ -18,11 +18,20 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,qcs404-ethqos
|
||||
- qcom,sa8775p-ethqos
|
||||
- qcom,sc8280xp-ethqos
|
||||
- qcom,sm8150-ethqos
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,qcs8300-ethqos
|
||||
- const: qcom,sa8775p-ethqos
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,qcs615-ethqos
|
||||
- const: qcom,sm8150-ethqos
|
||||
- enum:
|
||||
- qcom,qcs404-ethqos
|
||||
- qcom,sa8775p-ethqos
|
||||
- qcom,sc8280xp-ethqos
|
||||
- qcom,sm8150-ethqos
|
||||
|
||||
reg:
|
||||
maxItems: 2
|
||||
|
@ -59,6 +59,9 @@ properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
@ -123,7 +126,6 @@ examples:
|
||||
reg = <1>;
|
||||
interrupt-parent = <&irqc0>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
micrel,led-mode = <1>;
|
||||
reset-gpios = <&gpio5 31 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
@ -132,7 +132,7 @@ examples:
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;
|
||||
reg = <0>;
|
||||
interrupt = <&cpm_gpio2 18 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
|
||||
sfp = <&sfp2>;
|
||||
};
|
||||
};
|
||||
|
@ -26,6 +26,7 @@ select:
|
||||
- snps,dwmac-3.610
|
||||
- snps,dwmac-3.70a
|
||||
- snps,dwmac-3.710
|
||||
- snps,dwmac-3.72a
|
||||
- snps,dwmac-4.00
|
||||
- snps,dwmac-4.10a
|
||||
- snps,dwmac-4.20a
|
||||
@ -90,6 +91,7 @@ properties:
|
||||
- snps,dwmac-3.610
|
||||
- snps,dwmac-3.70a
|
||||
- snps,dwmac-3.710
|
||||
- snps,dwmac-3.72a
|
||||
- snps,dwmac-4.00
|
||||
- snps,dwmac-4.10a
|
||||
- snps,dwmac-4.20a
|
||||
@ -99,6 +101,7 @@ properties:
|
||||
- snps,dwxgmac-2.10
|
||||
- starfive,jh7100-dwmac
|
||||
- starfive,jh7110-dwmac
|
||||
- thead,th1520-gmac
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
@ -560,7 +563,7 @@ properties:
|
||||
max read outstanding req. limit
|
||||
|
||||
snps,kbbe:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
do not cross 1KiB boundary.
|
||||
|
||||
|
110
Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml
Normal file
110
Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml
Normal file
@ -0,0 +1,110 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/thead,th1520-gmac.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: T-HEAD TH1520 GMAC Ethernet controller
|
||||
|
||||
maintainers:
|
||||
- Drew Fustini <dfustini@tenstorrent.com>
|
||||
|
||||
description: |
|
||||
The TH1520 GMAC is described in the TH1520 Peripheral Interface User Manual
|
||||
https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs
|
||||
|
||||
Features include
|
||||
- Compliant with IEEE802.3 Specification
|
||||
- IEEE 1588-2008 standard for precision networked clock synchronization
|
||||
- Supports 10/100/1000Mbps data transfer rate
|
||||
- Supports RGMII/MII interface
|
||||
- Preamble and start of frame data (SFD) insertion in Transmit path
|
||||
- Preamble and SFD deletion in the Receive path
|
||||
- Automatic CRC and pad generation options for receive frames
|
||||
- MDIO master interface for PHY device configuration and management
|
||||
|
||||
The GMAC Registers consists of two parts
|
||||
- APB registers are used to configure clock frequency/clock enable/clock
|
||||
direction/PHY interface type.
|
||||
- AHB registers are use to configure GMAC core (DesignWare Core part).
|
||||
GMAC core register consists of DMA registers and GMAC registers.
|
||||
|
||||
select:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- thead,th1520-gmac
|
||||
required:
|
||||
- compatible
|
||||
|
||||
allOf:
|
||||
- $ref: snps,dwmac.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- thead,th1520-gmac
|
||||
- const: snps,dwmac-3.70a
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: DesignWare GMAC IP core registers
|
||||
- description: GMAC APB registers
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: dwmac
|
||||
- const: apb
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: GMAC main clock
|
||||
- description: Peripheral registers interface clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: stmmaceth
|
||||
- const: pclk
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: Combined signal for various interrupt events
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: macirq
|
||||
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
gmac0: ethernet@e7070000 {
|
||||
compatible = "thead,th1520-gmac", "snps,dwmac-3.70a";
|
||||
reg = <0xe7070000 0x2000>, <0xec003000 0x1000>;
|
||||
reg-names = "dwmac", "apb";
|
||||
clocks = <&clk 1>, <&clk 2>;
|
||||
clock-names = "stmmaceth", "pclk";
|
||||
interrupts = <66>;
|
||||
interrupt-names = "macirq";
|
||||
phy-mode = "rgmii-id";
|
||||
snps,fixed-burst;
|
||||
snps,axi-config = <&stmmac_axi_setup>;
|
||||
snps,pbl = <32>;
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -53,6 +53,7 @@ properties:
|
||||
- pci14e4,4488 # BCM4377
|
||||
- pci14e4,4425 # BCM4378
|
||||
- pci14e4,4433 # BCM4387
|
||||
- pci14e4,449d # BCM43752
|
||||
|
||||
reg:
|
||||
description: SDIO function number for the device (for most cases
|
||||
@ -121,6 +122,14 @@ properties:
|
||||
NVRAM. This would normally be filled in by the bootloader from platform
|
||||
configuration data.
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: External Low Power Clock input (32.768KHz)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: lpo
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -16,7 +16,11 @@ description:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: microchip,wilc1000
|
||||
oneOf:
|
||||
- items:
|
||||
- const: microchip,wilc3000
|
||||
- const: microchip,wilc1000
|
||||
- const: microchip,wilc1000
|
||||
|
||||
reg: true
|
||||
|
||||
|
@ -50,6 +50,9 @@ properties:
|
||||
vddrfa1p7-supply:
|
||||
description: VDD_RFA_1P7 supply regulator handle
|
||||
|
||||
vddrfa1p8-supply:
|
||||
description: VDD_RFA_1P8 supply regulator handle
|
||||
|
||||
vddpcie0p9-supply:
|
||||
description: VDD_PCIE_0P9 supply regulator handle
|
||||
|
||||
@ -77,6 +80,22 @@ allOf:
|
||||
- vddrfa1p7-supply
|
||||
- vddpcie0p9-supply
|
||||
- vddpcie1p8-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: pci17cb,1103
|
||||
then:
|
||||
required:
|
||||
- vddrfacmn-supply
|
||||
- vddaon-supply
|
||||
- vddwlcx-supply
|
||||
- vddwlmx-supply
|
||||
- vddrfa0p8-supply
|
||||
- vddrfa1p2-supply
|
||||
- vddrfa1p8-supply
|
||||
- vddpcie0p9-supply
|
||||
- vddpcie1p8-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@ -99,6 +118,16 @@ examples:
|
||||
compatible = "pci17cb,1103";
|
||||
reg = <0x10000 0x0 0x0 0x0 0x0>;
|
||||
|
||||
vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
|
||||
vddaon-supply = <&vreg_pmu_aon_0p8>;
|
||||
vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
|
||||
vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
|
||||
vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
|
||||
vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
|
||||
vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
|
||||
vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
|
||||
vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
|
||||
|
||||
qcom,ath11k-calibration-variant = "LE_X13S";
|
||||
};
|
||||
};
|
||||
|
@ -29,6 +29,9 @@ properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
phy-handle: true
|
||||
|
||||
local-mac-address: true
|
||||
@ -45,6 +48,7 @@ required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- phy-handle
|
||||
|
||||
additionalProperties: false
|
||||
@ -56,6 +60,7 @@ examples:
|
||||
reg = <0x40e00000 0x10000>;
|
||||
interrupt-parent = <&axi_intc_1>;
|
||||
interrupts = <1>;
|
||||
clocks = <&dummy>;
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
phy-handle = <&phy0>;
|
||||
xlnx,rx-ping-pong;
|
||||
|
@ -45,6 +45,32 @@ Available fault injection capabilities
|
||||
ALLOW_ERROR_INJECTION() macro, by setting debugfs entries
|
||||
under /sys/kernel/debug/fail_function. No boot option supported.
|
||||
|
||||
- fail_skb_realloc
|
||||
|
||||
inject skb (socket buffer) reallocation events into the network path. The
|
||||
primary goal is to identify and prevent issues related to pointer
|
||||
mismanagement in the network subsystem. By forcing skb reallocation at
|
||||
strategic points, this feature creates scenarios where existing pointers to
|
||||
skb headers become invalid.
|
||||
|
||||
When the fault is injected and the reallocation is triggered, cached pointers
|
||||
to skb headers and data no longer reference valid memory locations. This
|
||||
deliberate invalidation helps expose code paths where proper pointer updating
|
||||
is neglected after a reallocation event.
|
||||
|
||||
By creating these controlled fault scenarios, the system can catch instances
|
||||
where stale pointers are used, potentially leading to memory corruption or
|
||||
system instability.
|
||||
|
||||
To select the interface to act on, write the network name to
|
||||
/sys/kernel/debug/fail_skb_realloc/devname.
|
||||
If this field is left empty (which is the default value), skb reallocation
|
||||
will be forced on all network interfaces.
|
||||
|
||||
The effectiveness of this fault detection is enhanced when KASAN is
|
||||
enabled, as it helps identify invalid memory references and use-after-free
|
||||
(UAF) issues.
|
||||
|
||||
- NVMe fault injection
|
||||
|
||||
inject NVMe status code and retry flag on devices permitted by setting
|
||||
@ -216,6 +242,19 @@ configuration of fault-injection capabilities.
|
||||
use a negative errno, you better use 'printf' instead of 'echo', e.g.:
|
||||
$ printf %#x -12 > retval
|
||||
|
||||
- /sys/kernel/debug/fail_skb_realloc/devname:
|
||||
|
||||
Specifies the network interface on which to force SKB reallocation. If
|
||||
left empty, SKB reallocation will be applied to all network interfaces.
|
||||
|
||||
Example usage::
|
||||
|
||||
# Force skb reallocation on eth0
|
||||
echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname
|
||||
|
||||
# Clear the selection and force skb reallocation on all interfaces
|
||||
echo "" > /sys/kernel/debug/fail_skb_realloc/devname
|
||||
|
||||
Boot option
|
||||
^^^^^^^^^^^
|
||||
|
||||
@ -227,6 +266,7 @@ use the boot option::
|
||||
fail_usercopy=
|
||||
fail_make_request=
|
||||
fail_futex=
|
||||
fail_skb_realloc=
|
||||
mmc_core.fail_request=<interval>,<probability>,<space>,<times>
|
||||
|
||||
proc entries
|
||||
|
@ -85,6 +85,36 @@ definitions:
|
||||
This may happen for example if dpll device was previously
|
||||
locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT.
|
||||
render-max: true
|
||||
-
|
||||
type: enum
|
||||
name: clock-quality-level
|
||||
doc: |
|
||||
level of quality of a clock device. This mainly applies when
|
||||
the dpll lock-status is DPLL_LOCK_STATUS_HOLDOVER.
|
||||
The current list is defined according to the table 11-7 contained
|
||||
in ITU-T G.8264/Y.1364 document. One may extend this list freely
|
||||
by other ITU-T defined clock qualities, or different ones defined
|
||||
by another standardization body (for those, please use
|
||||
different prefix).
|
||||
entries:
|
||||
-
|
||||
name: itu-opt1-prc
|
||||
value: 1
|
||||
-
|
||||
name: itu-opt1-ssu-a
|
||||
-
|
||||
name: itu-opt1-ssu-b
|
||||
-
|
||||
name: itu-opt1-eec1
|
||||
-
|
||||
name: itu-opt1-prtc
|
||||
-
|
||||
name: itu-opt1-eprtc
|
||||
-
|
||||
name: itu-opt1-eeec
|
||||
-
|
||||
name: itu-opt1-eprc
|
||||
render-max: true
|
||||
-
|
||||
type: const
|
||||
name: temp-divider
|
||||
@ -252,6 +282,17 @@ attribute-sets:
|
||||
name: lock-status-error
|
||||
type: u32
|
||||
enum: lock-status-error
|
||||
-
|
||||
name: clock-quality-level
|
||||
type: u32
|
||||
enum: clock-quality-level
|
||||
multi-attr: true
|
||||
doc: |
|
||||
Level of quality of a clock device. This mainly applies when
|
||||
the dpll lock-status is DPLL_LOCK_STATUS_HOLDOVER. This could
|
||||
be put to message multiple times to indicate possible parallel
|
||||
quality levels (e.g. one specified by ITU option 1 and another
|
||||
one specified by option 2).
|
||||
-
|
||||
name: pin
|
||||
enum-name: dpll_a_pin
|
||||
|
@ -96,7 +96,12 @@ attribute-sets:
|
||||
name: bits
|
||||
type: nest
|
||||
nested-attributes: bitset-bits
|
||||
|
||||
-
|
||||
name: value
|
||||
type: binary
|
||||
-
|
||||
name: mask
|
||||
type: binary
|
||||
-
|
||||
name: string
|
||||
attributes:
|
||||
@ -1951,3 +1956,7 @@ operations:
|
||||
- upstream-sfp-name
|
||||
- downstream-sfp-name
|
||||
dump: *phy-get-op
|
||||
-
|
||||
name: phy-ntf
|
||||
doc: Notification for change in PHY devices.
|
||||
notify: phy-get
|
||||
|
362
Documentation/netlink/specs/net_shaper.yaml
Normal file
362
Documentation/netlink/specs/net_shaper.yaml
Normal file
@ -0,0 +1,362 @@
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
name: net-shaper
|
||||
|
||||
doc: |
|
||||
Networking HW rate limiting configuration.
|
||||
|
||||
This API allows configuring HW shapers available on the network
|
||||
devices at different levels (queues, network device) and allows
|
||||
arbitrary manipulation of the scheduling tree of the involved
|
||||
shapers.
|
||||
|
||||
Each @shaper is identified within the given device, by a @handle,
|
||||
comprising both a @scope and an @id.
|
||||
|
||||
Depending on the @scope value, the shapers are attached to specific
|
||||
HW objects (queues, devices) or, for @node scope, represent a
|
||||
scheduling group, that can be placed in an arbitrary location of
|
||||
the scheduling tree.
|
||||
|
||||
Shapers can be created with two different operations: the @set
|
||||
operation, to create and update a single "attached" shaper, and
|
||||
the @group operation, to create and update a scheduling
|
||||
group. Only the @group operation can create @node scope shapers.
|
||||
|
||||
Existing shapers can be deleted/reset via the @delete operation.
|
||||
|
||||
The user can query the running configuration via the @get operation.
|
||||
|
||||
Different devices can provide different feature sets, e.g. with no
|
||||
support for complex scheduling hierarchy, or for some shaping
|
||||
parameters. The user can introspect the HW capabilities via the
|
||||
@cap-get operation.
|
||||
|
||||
definitions:
|
||||
-
|
||||
type: enum
|
||||
name: scope
|
||||
doc: Defines the shaper @id interpretation.
|
||||
render-max: true
|
||||
entries:
|
||||
- name: unspec
|
||||
doc: The scope is not specified.
|
||||
-
|
||||
name: netdev
|
||||
doc: The main shaper for the given network device.
|
||||
-
|
||||
name: queue
|
||||
doc: |
|
||||
The shaper is attached to the given device queue,
|
||||
the @id represents the queue number.
|
||||
-
|
||||
name: node
|
||||
doc: |
|
||||
The shaper allows grouping of queues or other
|
||||
node shapers; can be nested in either @netdev
|
||||
shapers or other @node shapers, allowing placement
|
||||
in any location of the scheduling tree, except
|
||||
leaves and root.
|
||||
-
|
||||
type: enum
|
||||
name: metric
|
||||
doc: Different metric supported by the shaper.
|
||||
entries:
|
||||
-
|
||||
name: bps
|
||||
doc: Shaper operates on a bits per second basis.
|
||||
-
|
||||
name: pps
|
||||
doc: Shaper operates on a packets per second basis.
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: net-shaper
|
||||
attributes:
|
||||
-
|
||||
name: handle
|
||||
type: nest
|
||||
nested-attributes: handle
|
||||
doc: Unique identifier for the given shaper inside the owning device.
|
||||
-
|
||||
name: metric
|
||||
type: u32
|
||||
enum: metric
|
||||
doc: Metric used by the given shaper for bw-min, bw-max and burst.
|
||||
-
|
||||
name: bw-min
|
||||
type: uint
|
||||
doc: Guaranteed bandwidth for the given shaper.
|
||||
-
|
||||
name: bw-max
|
||||
type: uint
|
||||
doc: Maximum bandwidth for the given shaper or 0 when unlimited.
|
||||
-
|
||||
name: burst
|
||||
type: uint
|
||||
doc: |
|
||||
Maximum burst-size for shaping. Should not be interpreted
|
||||
as a quantum.
|
||||
-
|
||||
name: priority
|
||||
type: u32
|
||||
doc: |
|
||||
Scheduling priority for the given shaper. The priority
|
||||
scheduling is applied to sibling shapers.
|
||||
-
|
||||
name: weight
|
||||
type: u32
|
||||
doc: |
|
||||
Relative weight for round robin scheduling of the
|
||||
given shaper.
|
||||
The scheduling is applied to all sibling shapers
|
||||
with the same priority.
|
||||
-
|
||||
name: ifindex
|
||||
type: u32
|
||||
doc: Interface index owning the specified shaper.
|
||||
-
|
||||
name: parent
|
||||
type: nest
|
||||
nested-attributes: handle
|
||||
doc: |
|
||||
Identifier for the parent of the affected shaper.
|
||||
Only needed for @group operation.
|
||||
-
|
||||
name: leaves
|
||||
type: nest
|
||||
multi-attr: true
|
||||
nested-attributes: leaf-info
|
||||
doc: |
|
||||
Describes a set of leaves shapers for a @group operation.
|
||||
-
|
||||
name: handle
|
||||
attributes:
|
||||
-
|
||||
name: scope
|
||||
type: u32
|
||||
enum: scope
|
||||
doc: Defines the shaper @id interpretation.
|
||||
-
|
||||
name: id
|
||||
type: u32
|
||||
doc: |
|
||||
Numeric identifier of a shaper. The id semantic depends on
|
||||
the scope. For @queue scope it's the queue id and for @node
|
||||
scope it's the node identifier.
|
||||
-
|
||||
name: leaf-info
|
||||
subset-of: net-shaper
|
||||
attributes:
|
||||
-
|
||||
name: handle
|
||||
-
|
||||
name: priority
|
||||
-
|
||||
name: weight
|
||||
-
|
||||
name: caps
|
||||
attributes:
|
||||
-
|
||||
name: ifindex
|
||||
type: u32
|
||||
doc: Interface index queried for shapers capabilities.
|
||||
-
|
||||
name: scope
|
||||
type: u32
|
||||
enum: scope
|
||||
doc: The scope to which the queried capabilities apply.
|
||||
-
|
||||
name: support-metric-bps
|
||||
type: flag
|
||||
doc: The device accepts 'bps' metric for bw-min, bw-max and burst.
|
||||
-
|
||||
name: support-metric-pps
|
||||
type: flag
|
||||
doc: The device accepts 'pps' metric for bw-min, bw-max and burst.
|
||||
-
|
||||
name: support-nesting
|
||||
type: flag
|
||||
doc: |
|
||||
The device supports nesting shaper belonging to this scope
|
||||
below 'node' scoped shapers. Only 'queue' and 'node'
|
||||
scope can have flag 'support-nesting'.
|
||||
-
|
||||
name: support-bw-min
|
||||
type: flag
|
||||
doc: The device supports a minimum guaranteed B/W.
|
||||
-
|
||||
name: support-bw-max
|
||||
type: flag
|
||||
doc: The device supports maximum B/W shaping.
|
||||
-
|
||||
name: support-burst
|
||||
type: flag
|
||||
doc: The device supports a maximum burst size.
|
||||
-
|
||||
name: support-priority
|
||||
type: flag
|
||||
doc: The device supports priority scheduling.
|
||||
-
|
||||
name: support-weight
|
||||
type: flag
|
||||
doc: The device supports weighted round robin scheduling.
|
||||
|
||||
operations:
|
||||
list:
|
||||
-
|
||||
name: get
|
||||
doc: |
|
||||
Get information about a shaper for a given device.
|
||||
attribute-set: net-shaper
|
||||
|
||||
do:
|
||||
pre: net-shaper-nl-pre-doit
|
||||
post: net-shaper-nl-post-doit
|
||||
request:
|
||||
attributes: &ns-binding
|
||||
- ifindex
|
||||
- handle
|
||||
reply:
|
||||
attributes: &ns-attrs
|
||||
- ifindex
|
||||
- parent
|
||||
- handle
|
||||
- metric
|
||||
- bw-min
|
||||
- bw-max
|
||||
- burst
|
||||
- priority
|
||||
- weight
|
||||
|
||||
dump:
|
||||
pre: net-shaper-nl-pre-dumpit
|
||||
post: net-shaper-nl-post-dumpit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
reply:
|
||||
attributes: *ns-attrs
|
||||
-
|
||||
name: set
|
||||
doc: |
|
||||
Create or update the specified shaper.
|
||||
The set operation can't be used to create a @node scope shaper,
|
||||
use the @group operation instead.
|
||||
attribute-set: net-shaper
|
||||
flags: [ admin-perm ]
|
||||
|
||||
do:
|
||||
pre: net-shaper-nl-pre-doit
|
||||
post: net-shaper-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- handle
|
||||
- metric
|
||||
- bw-min
|
||||
- bw-max
|
||||
- burst
|
||||
- priority
|
||||
- weight
|
||||
|
||||
-
|
||||
name: delete
|
||||
doc: |
|
||||
Clear (remove) the specified shaper. When deleting
|
||||
a @node shaper, reattach all the node's leaves to the
|
||||
deleted node's parent.
|
||||
If, after the removal, the parent shaper has no more
|
||||
leaves and the parent shaper scope is @node, the parent
|
||||
node is deleted, recursively.
|
||||
When deleting a @queue shaper or a @netdev shaper,
|
||||
the shaper disappears from the hierarchy, but the
|
||||
queue/device can still send traffic: it has an implicit
|
||||
node with infinite bandwidth. The queue's implicit node
|
||||
feeds an implicit RR node at the root of the hierarchy.
|
||||
attribute-set: net-shaper
|
||||
flags: [ admin-perm ]
|
||||
|
||||
do:
|
||||
pre: net-shaper-nl-pre-doit
|
||||
post: net-shaper-nl-post-doit
|
||||
request:
|
||||
attributes: *ns-binding
|
||||
|
||||
-
|
||||
name: group
|
||||
doc: |
|
||||
Create or update a scheduling group, attaching the specified
|
||||
@leaves shapers under the specified node identified by @handle.
|
||||
The @leaves shapers scope must be @queue and the node shaper
|
||||
scope must be either @node or @netdev.
|
||||
When the node shaper has @node scope, if the @handle @id is not
|
||||
specified, a new shaper of such scope is created, otherwise the
|
||||
specified node must already exist.
|
||||
When updating an existing node shaper, the specified @leaves are
|
||||
added to the existing node; such node will also retain any preexisting
|
||||
leave.
|
||||
The @parent handle for a new node shaper defaults to the parent
|
||||
of all the leaves, provided all the leaves share the same parent.
|
||||
Otherwise @parent handle must be specified.
|
||||
The user can optionally provide shaping attributes for the node
|
||||
shaper.
|
||||
The operation is atomic, on failure no change is applied to
|
||||
the device shaping configuration, otherwise the @node shaper
|
||||
full identifier, comprising @binding and @handle, is provided
|
||||
as the reply.
|
||||
attribute-set: net-shaper
|
||||
flags: [ admin-perm ]
|
||||
|
||||
do:
|
||||
pre: net-shaper-nl-pre-doit
|
||||
post: net-shaper-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- parent
|
||||
- handle
|
||||
- metric
|
||||
- bw-min
|
||||
- bw-max
|
||||
- burst
|
||||
- priority
|
||||
- weight
|
||||
- leaves
|
||||
reply:
|
||||
attributes: *ns-binding
|
||||
|
||||
-
|
||||
name: cap-get
|
||||
doc: |
|
||||
Get the shaper capabilities supported by the given device
|
||||
for the specified scope.
|
||||
attribute-set: caps
|
||||
|
||||
do:
|
||||
pre: net-shaper-nl-cap-pre-doit
|
||||
post: net-shaper-nl-cap-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- scope
|
||||
reply:
|
||||
attributes: &cap-attrs
|
||||
- ifindex
|
||||
- scope
|
||||
- support-metric-bps
|
||||
- support-metric-pps
|
||||
- support-nesting
|
||||
- support-bw-min
|
||||
- support-bw-max
|
||||
- support-burst
|
||||
- support-priority
|
||||
- support-weight
|
||||
|
||||
dump:
|
||||
pre: net-shaper-nl-cap-pre-dumpit
|
||||
post: net-shaper-nl-cap-post-dumpit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
reply:
|
||||
attributes: *cap-attrs
|
@ -248,6 +248,26 @@ attribute-sets:
|
||||
threaded mode. If NAPI is not in threaded mode (i.e. uses normal
|
||||
softirq context), the attribute will be absent.
|
||||
type: u32
|
||||
-
|
||||
name: defer-hard-irqs
|
||||
doc: The number of consecutive empty polls before IRQ deferral ends
|
||||
and hardware IRQs are re-enabled.
|
||||
type: u32
|
||||
checks:
|
||||
max: s32-max
|
||||
-
|
||||
name: gro-flush-timeout
|
||||
doc: The timeout, in nanoseconds, of when to trigger the NAPI watchdog
|
||||
timer which schedules NAPI processing. Additionally, a non-zero
|
||||
value will also prevent GRO from flushing recent super-frames at
|
||||
the end of a NAPI cycle. This may add receive latency in exchange
|
||||
for reducing the number of frames processed by the network stack.
|
||||
type: uint
|
||||
-
|
||||
name: irq-suspend-timeout
|
||||
doc: The timeout, in nanoseconds, of how long to suspend irq
|
||||
processing, if event polling finds events
|
||||
type: uint
|
||||
-
|
||||
name: queue
|
||||
attributes:
|
||||
@ -636,6 +656,9 @@ operations:
|
||||
- ifindex
|
||||
- irq
|
||||
- pid
|
||||
- defer-hard-irqs
|
||||
- gro-flush-timeout
|
||||
- irq-suspend-timeout
|
||||
dump:
|
||||
request:
|
||||
attributes:
|
||||
@ -676,6 +699,18 @@ operations:
|
||||
reply:
|
||||
attributes:
|
||||
- id
|
||||
-
|
||||
name: napi-set
|
||||
doc: Set configurable NAPI instance settings.
|
||||
attribute-set: napi
|
||||
flags: [ admin-perm ]
|
||||
do:
|
||||
request:
|
||||
attributes:
|
||||
- id
|
||||
- defer-hard-irqs
|
||||
- gro-flush-timeout
|
||||
- irq-suspend-timeout
|
||||
|
||||
kernel-family:
|
||||
headers: [ "linux/list.h"]
|
||||
|
@ -920,6 +920,13 @@ definitions:
|
||||
- name: l2
|
||||
- name: l3
|
||||
|
||||
-
|
||||
name: netkit-scrub
|
||||
type: enum
|
||||
entries:
|
||||
- name: none
|
||||
- name: default
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: link-attrs
|
||||
@ -1137,6 +1144,10 @@ attribute-sets:
|
||||
name: dpll-pin
|
||||
type: nest
|
||||
nested-attributes: link-dpll-pin-attrs
|
||||
-
|
||||
name: max-pacing-offload-horizon
|
||||
type: uint
|
||||
doc: EDT offload horizon supported by the device (in nsec).
|
||||
-
|
||||
name: af-spec-attrs
|
||||
attributes:
|
||||
@ -2147,6 +2158,14 @@ attribute-sets:
|
||||
name: mode
|
||||
type: u32
|
||||
enum: netkit-mode
|
||||
-
|
||||
name: scrub
|
||||
type: u32
|
||||
enum: netkit-scrub
|
||||
-
|
||||
name: peer-scrub
|
||||
type: u32
|
||||
enum: netkit-scrub
|
||||
|
||||
sub-messages:
|
||||
-
|
||||
|
442
Documentation/netlink/specs/rt_neigh.yaml
Normal file
442
Documentation/netlink/specs/rt_neigh.yaml
Normal file
@ -0,0 +1,442 @@
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
|
||||
name: rt-neigh
|
||||
protocol: netlink-raw
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
IP neighbour management over rtnetlink.
|
||||
|
||||
definitions:
|
||||
-
|
||||
name: ndmsg
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: family
|
||||
type: u8
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
len: 3
|
||||
-
|
||||
name: ifindex
|
||||
type: s32
|
||||
-
|
||||
name: state
|
||||
type: u16
|
||||
enum: nud-state
|
||||
-
|
||||
name: flags
|
||||
type: u8
|
||||
enum: ntf-flags
|
||||
-
|
||||
name: type
|
||||
type: u8
|
||||
enum: rtm-type
|
||||
-
|
||||
name: ndtmsg
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: family
|
||||
type: u8
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
len: 3
|
||||
-
|
||||
name: nud-state
|
||||
type: flags
|
||||
entries:
|
||||
- incomplete
|
||||
- reachable
|
||||
- stale
|
||||
- delay
|
||||
- probe
|
||||
- failed
|
||||
- noarp
|
||||
- permanent
|
||||
-
|
||||
name: ntf-flags
|
||||
type: flags
|
||||
entries:
|
||||
- use
|
||||
- self
|
||||
- master
|
||||
- proxy
|
||||
- ext-learned
|
||||
- offloaded
|
||||
- sticky
|
||||
- router
|
||||
-
|
||||
name: ntf-ext-flags
|
||||
type: flags
|
||||
entries:
|
||||
- managed
|
||||
- locked
|
||||
-
|
||||
name: rtm-type
|
||||
type: enum
|
||||
entries:
|
||||
- unspec
|
||||
- unicast
|
||||
- local
|
||||
- broadcast
|
||||
- anycast
|
||||
- multicast
|
||||
- blackhole
|
||||
- unreachable
|
||||
- prohibit
|
||||
- throw
|
||||
- nat
|
||||
- xresolve
|
||||
-
|
||||
name: nda-cacheinfo
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: confirmed
|
||||
type: u32
|
||||
-
|
||||
name: used
|
||||
type: u32
|
||||
-
|
||||
name: updated
|
||||
type: u32
|
||||
-
|
||||
name: refcnt
|
||||
type: u32
|
||||
-
|
||||
name: ndt-config
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: key-len
|
||||
type: u16
|
||||
-
|
||||
name: entry-size
|
||||
type: u16
|
||||
-
|
||||
name: entries
|
||||
type: u32
|
||||
-
|
||||
name: last-flush
|
||||
type: u32
|
||||
-
|
||||
name: last-rand
|
||||
type: u32
|
||||
-
|
||||
name: hash-rnd
|
||||
type: u32
|
||||
-
|
||||
name: hash-mask
|
||||
type: u32
|
||||
-
|
||||
name: hash-chain-gc
|
||||
type: u32
|
||||
-
|
||||
name: proxy-qlen
|
||||
type: u32
|
||||
-
|
||||
name: ndt-stats
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: allocs
|
||||
type: u64
|
||||
-
|
||||
name: destroys
|
||||
type: u64
|
||||
-
|
||||
name: hash-grows
|
||||
type: u64
|
||||
-
|
||||
name: res-failed
|
||||
type: u64
|
||||
-
|
||||
name: lookups
|
||||
type: u64
|
||||
-
|
||||
name: hits
|
||||
type: u64
|
||||
-
|
||||
name: rcv-probes-mcast
|
||||
type: u64
|
||||
-
|
||||
name: rcv-probes-ucast
|
||||
type: u64
|
||||
-
|
||||
name: periodic-gc-runs
|
||||
type: u64
|
||||
-
|
||||
name: forced-gc-runs
|
||||
type: u64
|
||||
-
|
||||
name: table-fulls
|
||||
type: u64
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: neighbour-attrs
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: binary
|
||||
value: 0
|
||||
-
|
||||
name: dst
|
||||
type: binary
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: lladr
|
||||
type: binary
|
||||
display-hint: mac
|
||||
-
|
||||
name: cacheinfo
|
||||
type: binary
|
||||
struct: nda-cacheinfo
|
||||
-
|
||||
name: probes
|
||||
type: u32
|
||||
-
|
||||
name: vlan
|
||||
type: u16
|
||||
-
|
||||
name: port
|
||||
type: u16
|
||||
-
|
||||
name: vni
|
||||
type: u32
|
||||
-
|
||||
name: ifindex
|
||||
type: u32
|
||||
-
|
||||
name: master
|
||||
type: u32
|
||||
-
|
||||
name: link-netnsid
|
||||
type: s32
|
||||
-
|
||||
name: src-vni
|
||||
type: u32
|
||||
-
|
||||
name: protocol
|
||||
type: u8
|
||||
-
|
||||
name: nh-id
|
||||
type: u32
|
||||
-
|
||||
name: fdb-ext-attrs
|
||||
type: binary
|
||||
-
|
||||
name: flags-ext
|
||||
type: u32
|
||||
enum: ntf-ext-flags
|
||||
-
|
||||
name: ndm-state-mask
|
||||
type: u16
|
||||
-
|
||||
name: ndm-flags-mask
|
||||
type: u8
|
||||
-
|
||||
name: ndt-attrs
|
||||
attributes:
|
||||
-
|
||||
name: name
|
||||
type: string
|
||||
-
|
||||
name: thresh1
|
||||
type: u32
|
||||
-
|
||||
name: thresh2
|
||||
type: u32
|
||||
-
|
||||
name: thresh3
|
||||
type: u32
|
||||
-
|
||||
name: config
|
||||
type: binary
|
||||
struct: ndt-config
|
||||
-
|
||||
name: parms
|
||||
type: nest
|
||||
nested-attributes: ndtpa-attrs
|
||||
-
|
||||
name: stats
|
||||
type: binary
|
||||
struct: ndt-stats
|
||||
-
|
||||
name: gc-interval
|
||||
type: u64
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
-
|
||||
name: ndtpa-attrs
|
||||
attributes:
|
||||
-
|
||||
name: ifindex
|
||||
type: u32
|
||||
-
|
||||
name: refcnt
|
||||
type: u32
|
||||
-
|
||||
name: reachable-time
|
||||
type: u64
|
||||
-
|
||||
name: base-reachable-time
|
||||
type: u64
|
||||
-
|
||||
name: retrans-time
|
||||
type: u64
|
||||
-
|
||||
name: gc-staletime
|
||||
type: u64
|
||||
-
|
||||
name: delay-probe-time
|
||||
type: u64
|
||||
-
|
||||
name: queue-len
|
||||
type: u32
|
||||
-
|
||||
name: app-probes
|
||||
type: u32
|
||||
-
|
||||
name: ucast-probes
|
||||
type: u32
|
||||
-
|
||||
name: mcast-probes
|
||||
type: u32
|
||||
-
|
||||
name: anycast-delay
|
||||
type: u64
|
||||
-
|
||||
name: proxy-delay
|
||||
type: u64
|
||||
-
|
||||
name: proxy-qlen
|
||||
type: u32
|
||||
-
|
||||
name: locktime
|
||||
type: u64
|
||||
-
|
||||
name: queue-lenbytes
|
||||
type: u32
|
||||
-
|
||||
name: mcast-reprobes
|
||||
type: u32
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
-
|
||||
name: interval-probe-time-ms
|
||||
type: u64
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
list:
|
||||
-
|
||||
name: newneigh
|
||||
doc: Add new neighbour entry
|
||||
fixed-header: ndmsg
|
||||
attribute-set: neighbour-attrs
|
||||
do:
|
||||
request:
|
||||
value: 28
|
||||
attributes: &neighbour-all
|
||||
- dst
|
||||
- lladdr
|
||||
- probes
|
||||
- vlan
|
||||
- port
|
||||
- vni
|
||||
- ifindex
|
||||
- master
|
||||
- protocol
|
||||
- nh-id
|
||||
- flags-ext
|
||||
- fdb-ext-attrs
|
||||
-
|
||||
name: delneigh
|
||||
doc: Remove an existing neighbour entry
|
||||
fixed-header: ndmsg
|
||||
attribute-set: neighbour-attrs
|
||||
do:
|
||||
request:
|
||||
value: 29
|
||||
attributes:
|
||||
- dst
|
||||
- ifindex
|
||||
-
|
||||
name: delneigh-ntf
|
||||
doc: Notify a neighbour deletion
|
||||
value: 29
|
||||
notify: delneigh
|
||||
fixed-header: ndmsg
|
||||
-
|
||||
name: getneigh
|
||||
doc: Get or dump neighbour entries
|
||||
fixed-header: ndmsg
|
||||
attribute-set: neighbour-attrs
|
||||
do:
|
||||
request:
|
||||
value: 30
|
||||
attributes:
|
||||
- dst
|
||||
reply:
|
||||
value: 28
|
||||
attributes: *neighbour-all
|
||||
dump:
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- master
|
||||
reply:
|
||||
attributes: *neighbour-all
|
||||
-
|
||||
name: newneigh-ntf
|
||||
doc: Notify a neighbour creation
|
||||
value: 28
|
||||
notify: getneigh
|
||||
fixed-header: ndmsg
|
||||
-
|
||||
name: getneightbl
|
||||
doc: Get or dump neighbour tables
|
||||
fixed-header: ndtmsg
|
||||
attribute-set: ndt-attrs
|
||||
dump:
|
||||
request:
|
||||
value: 66
|
||||
reply:
|
||||
value: 64
|
||||
attributes:
|
||||
- name
|
||||
- thresh1
|
||||
- thresh2
|
||||
- thresh3
|
||||
- config
|
||||
- parms
|
||||
- stats
|
||||
- gc-interval
|
||||
-
|
||||
name: setneightbl
|
||||
doc: Set neighbour tables
|
||||
fixed-header: ndtmsg
|
||||
attribute-set: ndt-attrs
|
||||
do:
|
||||
request:
|
||||
value: 67
|
||||
attributes:
|
||||
- name
|
||||
- thresh1
|
||||
- thresh2
|
||||
- thresh3
|
||||
- parms
|
||||
- gc-interval
|
||||
|
||||
mcast-groups:
|
||||
list:
|
||||
-
|
||||
name: rtnlgrp-neigh
|
||||
value: 3
|
242
Documentation/netlink/specs/rt_rule.yaml
Normal file
242
Documentation/netlink/specs/rt_rule.yaml
Normal file
@ -0,0 +1,242 @@
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
|
||||
name: rt-rule
|
||||
protocol: netlink-raw
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
FIB rule management over rtnetlink.
|
||||
|
||||
definitions:
|
||||
-
|
||||
name: rtgenmsg
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: family
|
||||
type: u8
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
len: 3
|
||||
-
|
||||
name: fib-rule-hdr
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: family
|
||||
type: u8
|
||||
-
|
||||
name: dst-len
|
||||
type: u8
|
||||
-
|
||||
name: src-len
|
||||
type: u8
|
||||
-
|
||||
name: tos
|
||||
type: u8
|
||||
-
|
||||
name: table
|
||||
type: u8
|
||||
-
|
||||
name: res1
|
||||
type: pad
|
||||
len: 1
|
||||
-
|
||||
name: res2
|
||||
type: pad
|
||||
len: 1
|
||||
-
|
||||
name: action
|
||||
type: u8
|
||||
enum: fr-act
|
||||
-
|
||||
name: flags
|
||||
type: u32
|
||||
-
|
||||
name: fr-act
|
||||
type: enum
|
||||
entries:
|
||||
- unspec
|
||||
- to-tbl
|
||||
- goto
|
||||
- nop
|
||||
- res3
|
||||
- res4
|
||||
- blackhole
|
||||
- unreachable
|
||||
- prohibit
|
||||
-
|
||||
name: fib-rule-port-range
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: start
|
||||
type: u16
|
||||
-
|
||||
name: end
|
||||
type: u16
|
||||
-
|
||||
name: fib-rule-uid-range
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: start
|
||||
type: u32
|
||||
-
|
||||
name: end
|
||||
type: u32
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: fib-rule-attrs
|
||||
attributes:
|
||||
-
|
||||
name: dst
|
||||
type: u32
|
||||
-
|
||||
name: src
|
||||
type: u32
|
||||
-
|
||||
name: iifname
|
||||
type: string
|
||||
-
|
||||
name: goto
|
||||
type: u32
|
||||
-
|
||||
name: unused2
|
||||
type: pad
|
||||
-
|
||||
name: priority
|
||||
type: u32
|
||||
-
|
||||
name: unused3
|
||||
type: pad
|
||||
-
|
||||
name: unused4
|
||||
type: pad
|
||||
-
|
||||
name: unused5
|
||||
type: pad
|
||||
-
|
||||
name: fwmark
|
||||
type: u32
|
||||
display-hint: hex
|
||||
-
|
||||
name: flow
|
||||
type: u32
|
||||
-
|
||||
name: tun-id
|
||||
type: u64
|
||||
-
|
||||
name: suppress-ifgroup
|
||||
type: u32
|
||||
-
|
||||
name: suppress-prefixlen
|
||||
type: u32
|
||||
display-hint: hex
|
||||
-
|
||||
name: table
|
||||
type: u32
|
||||
-
|
||||
name: fwmask
|
||||
type: u32
|
||||
display-hint: hex
|
||||
-
|
||||
name: oifname
|
||||
type: string
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
-
|
||||
name: l3mdev
|
||||
type: u8
|
||||
-
|
||||
name: uid-range
|
||||
type: binary
|
||||
struct: fib-rule-uid-range
|
||||
-
|
||||
name: protocol
|
||||
type: u8
|
||||
-
|
||||
name: ip-proto
|
||||
type: u8
|
||||
-
|
||||
name: sport-range
|
||||
type: binary
|
||||
struct: fib-rule-port-range
|
||||
-
|
||||
name: dport-range
|
||||
type: binary
|
||||
struct: fib-rule-port-range
|
||||
-
|
||||
name: dscp
|
||||
type: u8
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
fixed-header: fib-rule-hdr
|
||||
list:
|
||||
-
|
||||
name: newrule
|
||||
doc: Add new FIB rule
|
||||
attribute-set: fib-rule-attrs
|
||||
do:
|
||||
request:
|
||||
value: 32
|
||||
attributes: &fib-rule-all
|
||||
- iifname
|
||||
- oifname
|
||||
- priority
|
||||
- fwmark
|
||||
- flow
|
||||
- tun-id
|
||||
- fwmask
|
||||
- table
|
||||
- suppress-prefixlen
|
||||
- suppress-ifgroup
|
||||
- goto
|
||||
- l3mdev
|
||||
- uid-range
|
||||
- protocol
|
||||
- ip-proto
|
||||
- sport-range
|
||||
- dport-range
|
||||
- dscp
|
||||
-
|
||||
name: newrule-ntf
|
||||
doc: Notify a rule creation
|
||||
value: 32
|
||||
notify: newrule
|
||||
-
|
||||
name: delrule
|
||||
doc: Remove an existing FIB rule
|
||||
attribute-set: fib-rule-attrs
|
||||
do:
|
||||
request:
|
||||
value: 33
|
||||
attributes: *fib-rule-all
|
||||
-
|
||||
name: delrule-ntf
|
||||
doc: Notify a rule deletion
|
||||
value: 33
|
||||
notify: delrule
|
||||
-
|
||||
name: getrule
|
||||
doc: Dump all FIB rules
|
||||
attribute-set: fib-rule-attrs
|
||||
dump:
|
||||
request:
|
||||
value: 34
|
||||
reply:
|
||||
value: 32
|
||||
attributes: *fib-rule-all
|
||||
|
||||
mcast-groups:
|
||||
list:
|
||||
-
|
||||
name: rtnlgrp-ipv4-rule
|
||||
value: 8
|
||||
-
|
||||
name: rtnlgrp-ipv6-rule
|
||||
value: 19
|
@ -622,7 +622,7 @@ definitions:
|
||||
-
|
||||
name: max-P
|
||||
type: u32
|
||||
doc: probabilty, high resolution
|
||||
doc: probability, high resolution
|
||||
-
|
||||
name: stats
|
||||
type: binary
|
||||
|
@ -2916,6 +2916,17 @@ from the bond (``ifenslave -d bond0 eth0``). The bonding driver will
|
||||
then restore the MAC addresses that the slaves had before they were
|
||||
enslaved.
|
||||
|
||||
9. What bonding modes support native XDP?
|
||||
------------------------------------------
|
||||
|
||||
* balance-rr (0)
|
||||
* active-backup (1)
|
||||
* balance-xor (2)
|
||||
* 802.3ad (4)
|
||||
|
||||
Note that the vlan+srcmac hash policy does not support native XDP.
|
||||
For other bonding modes, the XDP program must be loaded with generic mode.
|
||||
|
||||
16. Resources and Links
|
||||
=======================
|
||||
|
||||
|
@ -101,6 +101,37 @@ example, if Rx packets are 10 and Netdev (software statistics) displays
|
||||
rx_bytes as "X", then ethtool (hardware statistics) will display rx_bytes as
|
||||
"X+40" (4 bytes CRC x 10 packets).
|
||||
|
||||
ethtool reset
|
||||
-------------
|
||||
The driver supports 3 types of resets:
|
||||
|
||||
- PF reset - resets only components associated with the given PF, does not
|
||||
impact other PFs
|
||||
|
||||
- CORE reset - whole adapter is affected, reset all PFs
|
||||
|
||||
- GLOBAL reset - same as CORE but mac and phy components are also reinitialized
|
||||
|
||||
These are mapped to ethtool reset flags as follow:
|
||||
|
||||
- PF reset:
|
||||
|
||||
# ethtool --reset <ethX> irq dma filter offload
|
||||
|
||||
- CORE reset:
|
||||
|
||||
# ethtool --reset <ethX> irq-shared dma-shared filter-shared offload-shared \
|
||||
ram-shared
|
||||
|
||||
- GLOBAL reset:
|
||||
|
||||
# ethtool --reset <ethX> irq-shared dma-shared filter-shared offload-shared \
|
||||
mac-shared phy-shared ram-shared
|
||||
|
||||
In switchdev mode you can reset a VF using port representor:
|
||||
|
||||
# ethtool --reset <repr> irq dma filter offload
|
||||
|
||||
|
||||
Viewing Link Messages
|
||||
---------------------
|
||||
|
@ -14,6 +14,7 @@ Contents
|
||||
- `Basic packet flow`_
|
||||
- `Devlink health reporters`_
|
||||
- `Quality of service`_
|
||||
- `RVU representors`_
|
||||
|
||||
Overview
|
||||
========
|
||||
@ -340,3 +341,93 @@ Setup HTB offload
|
||||
# tc class add dev <interface> parent 1: classid 1:2 htb rate 10Gbit prio 2 quantum 188416
|
||||
|
||||
# tc class add dev <interface> parent 1: classid 1:3 htb rate 10Gbit prio 2 quantum 32768
|
||||
|
||||
|
||||
RVU Representors
|
||||
================
|
||||
|
||||
RVU representor driver adds support for creation of representor devices for
|
||||
RVU PFs' VFs in the system. Representor devices are created when user enables
|
||||
the switchdev mode.
|
||||
Switchdev mode can be enabled either before or after setting up SRIOV numVFs.
|
||||
All representor devices share a single NIXLF but each has a dedicated Rx/Tx
|
||||
queues. RVU PF representor driver registers a separate netdev for each
|
||||
Rx/Tx queue pair.
|
||||
|
||||
Current HW does not support built-in switch which can do L2 learning and
|
||||
forwarding packets between representee and representor. Hence, packet path
|
||||
between representee and it's representor is achieved by setting up appropriate
|
||||
NPC MCAM filters.
|
||||
Transmit packets matching these filters will be loopbacked through hardware
|
||||
loopback channel/interface (i.e, instead of sending them out of MAC interface).
|
||||
Which will again match the installed filters and will be forwarded.
|
||||
This way representee => representor and representor => representee packet
|
||||
path is achieved. These rules get installed when representors are created
|
||||
and gets active/deactivate based on the representor/representee interface state.
|
||||
|
||||
Usage example:
|
||||
|
||||
- Change device to switchdev mode::
|
||||
|
||||
# devlink dev eswitch set pci/0002:1c:00.0 mode switchdev
|
||||
|
||||
- List of representor devices on the system::
|
||||
|
||||
# ip link show
|
||||
Rpf1vf0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether f6:43:83:ee:26:21 brd ff:ff:ff:ff:ff:ff
|
||||
Rpf1vf1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 12:b2:54:0e:24:54 brd ff:ff:ff:ff:ff:ff
|
||||
Rpf1vf2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 4a:12:c4:4c:32:62 brd ff:ff:ff:ff:ff:ff
|
||||
Rpf1vf3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether ca:cb:68:0e:e2:6e brd ff:ff:ff:ff:ff:ff
|
||||
Rpf2vf0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 06:cc:ad:b4:f0:93 brd ff:ff:ff:ff:ff:ff
|
||||
|
||||
|
||||
To delete the representors devices from the system. Change the device to legacy mode.
|
||||
|
||||
- Change device to legacy mode::
|
||||
|
||||
# devlink dev eswitch set pci/0002:1c:00.0 mode legacy
|
||||
|
||||
RVU representors can be managed using devlink ports
|
||||
(see :ref:`Documentation/networking/devlink/devlink-port.rst <devlink_port>`) interface.
|
||||
|
||||
- Show devlink ports of representors::
|
||||
|
||||
# devlink port
|
||||
pci/0002:1c:00.0/0: type eth netdev Rpf1vf0 flavour physical port 0 splittable false
|
||||
pci/0002:1c:00.0/1: type eth netdev Rpf1vf1 flavour pcivf controller 0 pfnum 1 vfnum 1 external false splittable false
|
||||
pci/0002:1c:00.0/2: type eth netdev Rpf1vf2 flavour pcivf controller 0 pfnum 1 vfnum 2 external false splittable false
|
||||
pci/0002:1c:00.0/3: type eth netdev Rpf1vf3 flavour pcivf controller 0 pfnum 1 vfnum 3 external false splittable false
|
||||
|
||||
Function attributes
|
||||
===================
|
||||
|
||||
The RVU representor support function attributes for representors.
|
||||
Port function configuration of the representors are supported through devlink eswitch port.
|
||||
|
||||
MAC address setup
|
||||
-----------------
|
||||
|
||||
RVU representor driver support devlink port function attr mechanism to setup MAC
|
||||
address. (refer to Documentation/networking/devlink/devlink-port.rst)
|
||||
|
||||
- To setup MAC address for port 2::
|
||||
|
||||
# devlink port function set pci/0002:1c:00.0/2 hw_addr 5c:a1:1b:5e:43:11
|
||||
# devlink port show pci/0002:1c:00.0/2
|
||||
pci/0002:1c:00.0/2: type eth netdev Rpf1vf2 flavour pcivf controller 0 pfnum 1 vfnum 2 external false splittable false
|
||||
function:
|
||||
hw_addr 5c:a1:1b:5e:43:11
|
||||
|
||||
|
||||
TC offload
|
||||
==========
|
||||
|
||||
The rvu representor driver implements support for offloading tc rules using port representors.
|
||||
|
||||
- Drop packets with vlan id 3::
|
||||
|
||||
# tc filter add dev Rpf1vf0 protocol 802.1Q parent ffff: flower vlan_id 3 vlan_ethtype ipv4 skip_sw action drop
|
||||
|
||||
- Redirect packets with vlan id 5 and IPv4 packets to eth1, after stripping vlan header.::
|
||||
|
||||
# tc filter add dev Rpf1vf0 ingress protocol 802.1Q flower vlan_id 5 vlan_ethtype ipv4 skip_sw action vlan pop action mirred ingress redirect dev eth1
|
||||
|
@ -27,3 +27,46 @@ driver takes over.
|
||||
devlink dev info provides version information for all three components. In
|
||||
addition to the version the hg commit hash of the build is included as a
|
||||
separate entry.
|
||||
|
||||
Statistics
|
||||
----------
|
||||
|
||||
RPC (Rx parser)
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
- ``rpc_unkn_etype``: frames containing unknown EtherType
|
||||
- ``rpc_unkn_ext_hdr``: frames containing unknown IPv6 extension header
|
||||
- ``rpc_ipv4_frag``: frames containing IPv4 fragment
|
||||
- ``rpc_ipv6_frag``: frames containing IPv6 fragment
|
||||
- ``rpc_ipv4_esp``: frames with IPv4 ESP encapsulation
|
||||
- ``rpc_ipv6_esp``: frames with IPv6 ESP encapsulation
|
||||
- ``rpc_tcp_opt_err``: frames which encountered TCP option parsing error
|
||||
- ``rpc_out_of_hdr_err``: frames where header was larger than parsable region
|
||||
- ``ovr_size_err``: oversized frames
|
||||
|
||||
PCIe
|
||||
~~~~
|
||||
|
||||
The fbnic driver exposes PCIe hardware performance statistics through debugfs
|
||||
(``pcie_stats``). These statistics provide insights into PCIe transaction
|
||||
behavior and potential performance bottlenecks.
|
||||
|
||||
1. PCIe Transaction Counters:
|
||||
|
||||
These counters track PCIe transaction activity:
|
||||
- ``pcie_ob_rd_tlp``: Outbound read Transaction Layer Packets count
|
||||
- ``pcie_ob_rd_dword``: DWORDs transferred in outbound read transactions
|
||||
- ``pcie_ob_wr_tlp``: Outbound write Transaction Layer Packets count
|
||||
- ``pcie_ob_wr_dword``: DWORDs transferred in outbound write
|
||||
transactions
|
||||
- ``pcie_ob_cpl_tlp``: Outbound completion TLP count
|
||||
- ``pcie_ob_cpl_dword``: DWORDs transferred in outbound completion TLPs
|
||||
|
||||
2. PCIe Resource Monitoring:
|
||||
|
||||
These counters indicate PCIe resource exhaustion events:
|
||||
- ``pcie_ob_rd_no_tag``: Read requests dropped due to tag unavailability
|
||||
- ``pcie_ob_rd_no_cpl_cred``: Read requests dropped due to completion
|
||||
credit exhaustion
|
||||
- ``pcie_ob_rd_no_np_cred``: Read requests dropped due to non-posted
|
||||
credit exhaustion
|
||||
|
@ -7,12 +7,13 @@
|
||||
============================================
|
||||
t7xx driver for MTK PCIe based T700 5G modem
|
||||
============================================
|
||||
The t7xx driver is a WWAN PCIe host driver developed for linux or Chrome OS platforms
|
||||
for data exchange over PCIe interface between Host platform & MediaTek's T700 5G modem.
|
||||
The driver exposes an interface conforming to the MBIM protocol [1]. Any front end
|
||||
application (e.g. Modem Manager) could easily manage the MBIM interface to enable
|
||||
data communication towards WWAN. The driver also provides an interface to interact
|
||||
with the MediaTek's modem via AT commands.
|
||||
The t7xx driver is a WWAN PCIe host driver developed for linux or Chrome OS
|
||||
platforms for data exchange over PCIe interface between Host platform &
|
||||
MediaTek's T700 5G modem.
|
||||
The driver exposes an interface conforming to the MBIM protocol [1]. Any front
|
||||
end application (e.g. Modem Manager) could easily manage the MBIM interface to
|
||||
enable data communication towards WWAN. The driver also provides an interface
|
||||
to interact with the MediaTek's modem via AT commands.
|
||||
|
||||
Basic usage
|
||||
===========
|
||||
@ -45,8 +46,8 @@ The driver provides sysfs interfaces to userspace.
|
||||
|
||||
t7xx_mode
|
||||
---------
|
||||
The sysfs interface provides userspace with access to the device mode, this interface
|
||||
supports read and write operations.
|
||||
The sysfs interface provides userspace with access to the device mode, this
|
||||
interface supports read and write operations.
|
||||
|
||||
Device mode:
|
||||
|
||||
@ -67,6 +68,28 @@ Write from userspace to set the device mode.
|
||||
::
|
||||
$ echo fastboot_switching > /sys/bus/pci/devices/${bdf}/t7xx_mode
|
||||
|
||||
t7xx_debug_ports
|
||||
----------------
|
||||
The sysfs interface provides userspace with access to enable/disable the debug
|
||||
ports, this interface supports read and write operations.
|
||||
|
||||
Debug port status:
|
||||
|
||||
- ``1`` represents enable debug ports
|
||||
- ``0`` represents disable debug ports
|
||||
|
||||
Currently supported debug ports (ADB/MIPC).
|
||||
|
||||
Read from userspace to get the current debug ports status.
|
||||
|
||||
::
|
||||
$ cat /sys/bus/pci/devices/${bdf}/t7xx_debug_ports
|
||||
|
||||
Write from userspace to set the debug ports status.
|
||||
|
||||
::
|
||||
$ echo 1 > /sys/bus/pci/devices/${bdf}/t7xx_debug_ports
|
||||
|
||||
Management application development
|
||||
==================================
|
||||
The driver and userspace interfaces are described below. The MBIM protocol is
|
||||
@ -139,6 +162,25 @@ Please note that driver needs to be reloaded to export /dev/wwan0fastboot0
|
||||
port, because device needs a cold reset after enter ``fastboot_switching``
|
||||
mode.
|
||||
|
||||
ADB port userspace ABI
|
||||
----------------------
|
||||
|
||||
/dev/wwan0adb0 character device
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The driver exposes a ADB protocol interface by implementing ADB WWAN Port.
|
||||
The userspace end of the ADB channel pipe is a /dev/wwan0adb0 character device.
|
||||
Application shall use this interface for ADB protocol communication.
|
||||
|
||||
MIPC port userspace ABI
|
||||
-----------------------
|
||||
|
||||
/dev/wwan0mipc0 character device
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The driver exposes a diagnostic interface by implementing MIPC (Modem
|
||||
Information Process Center) WWAN Port. The userspace end of the MIPC channel
|
||||
pipe is a /dev/wwan0mipc0 character device.
|
||||
Application shall use this interface for MTK modem diagnostic communication.
|
||||
|
||||
The MediaTek's T700 modem supports the 3GPP TS 27.007 [4] specification.
|
||||
|
||||
References
|
||||
@ -164,3 +206,9 @@ speak the Mobile Interface Broadband Model (MBIM) protocol"*
|
||||
[5] *fastboot "a mechanism for communicating with bootloaders"*
|
||||
|
||||
- https://android.googlesource.com/platform/system/core/+/refs/heads/main/fastboot/README.md
|
||||
|
||||
[6] *ADB (Android Debug Bridge) "a mechanism to keep track of Android devices
|
||||
and emulators instances connected to or running on a given host developer
|
||||
machine with ADB protocol"*
|
||||
|
||||
- https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/README.md
|
||||
|
@ -40,6 +40,27 @@ The ``octeontx2 AF`` driver implements the following driver-specific parameters.
|
||||
- runtime
|
||||
- Use to set the quantum which hardware uses for scheduling among transmit queues.
|
||||
Hardware uses weighted DWRR algorithm to schedule among all transmit queues.
|
||||
* - ``npc_mcam_high_zone_percent``
|
||||
- u8
|
||||
- runtime
|
||||
- Use to set the number of high priority zone entries in NPC MCAM that can be allocated
|
||||
by a user, out of the three priority zone categories high, mid and low.
|
||||
* - ``npc_def_rule_cntr``
|
||||
- bool
|
||||
- runtime
|
||||
- Use to enable or disable hit counters for the default rules in NPC MCAM.
|
||||
Its not guaranteed that counters gets enabled and mapped to all the default rules,
|
||||
since the counters are scarce and driver follows a best effort approach.
|
||||
The default rule serves as the primary packet steering rule for a specific PF or VF,
|
||||
based on its DMAC address which is installed by AF driver as part of its initialization.
|
||||
Sample command to read hit counters for default rule from debugfs is as follows,
|
||||
cat /sys/kernel/debug/cn10k/npc/mcam_rules
|
||||
* - ``nix_maxlf``
|
||||
- u16
|
||||
- runtime
|
||||
- Use to set the maximum number of LFs in NIX hardware block. This would be useful
|
||||
to increase the availability of default resources allocated to enabled LFs like
|
||||
MCAM entries for example.
|
||||
|
||||
The ``octeontx2 PF`` driver implements the following driver-specific parameters.
|
||||
|
||||
|
17
Documentation/networking/diagnostic/index.rst
Normal file
17
Documentation/networking/diagnostic/index.rst
Normal file
@ -0,0 +1,17 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
======================
|
||||
Networking Diagnostics
|
||||
======================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
twisted_pair_layer1_diagnostics.rst
|
||||
|
||||
.. only:: subproject and html
|
||||
|
||||
Indices
|
||||
=======
|
||||
|
||||
* :ref:`genindex`
|
@ -0,0 +1,767 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
Diagnostic Concept for Investigating Twisted Pair Ethernet Variants at OSI Layer 1
|
||||
==================================================================================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This documentation is designed for two primary audiences:
|
||||
|
||||
1. **Users and System Administrators**: For those dealing with real-world
|
||||
Ethernet issues, this guide provides a practical, step-by-step
|
||||
troubleshooting flow to help identify and resolve common problems in Twisted
|
||||
Pair Ethernet at OSI Layer 1. If you're facing unstable links, speed drops,
|
||||
or mysterious network issues, jump right into the step-by-step guide and
|
||||
follow it through to find your solution.
|
||||
|
||||
2. **Kernel Developers**: For developers working with network drivers and PHY
|
||||
support, this documentation outlines the diagnostic process and highlights
|
||||
areas where the Linux kernel’s diagnostic interfaces could be extended or
|
||||
improved. By understanding the diagnostic flow, developers can better
|
||||
prioritize future enhancements.
|
||||
|
||||
Step-by-Step Diagnostic Guide from Linux (General Ethernet)
|
||||
-----------------------------------------------------------
|
||||
|
||||
This diagnostic guide covers common Ethernet troubleshooting scenarios,
|
||||
focusing on **link stability and detection** across different Ethernet
|
||||
environments, including **Single-Pair Ethernet (SPE)** and **Multi-Pair
|
||||
Ethernet (MPE)**, as well as power delivery technologies like **PoDL** (Power
|
||||
over Data Line) and **PoE** (Clause 33 PSE).
|
||||
|
||||
The guide is designed to help users diagnose physical layer (Layer 1) issues on
|
||||
systems running **Linux kernel version 6.11 or newer**, utilizing **ethtool
|
||||
version 6.10 or later** and **iproute2 version 6.4.0 or later**.
|
||||
|
||||
In this guide, we assume that users may have **limited or no access to the link
|
||||
partner** and will focus on diagnosing issues locally.
|
||||
|
||||
Diagnostic Scenarios
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Link is up and stable, but no data transfer**: If the link is stable but
|
||||
there are issues with data transmission, refer to the **OSI Layer 2
|
||||
Troubleshooting Guide**.
|
||||
|
||||
- **Link is unstable**: Link resets, speed drops, or other fluctuations
|
||||
indicate potential issues at the hardware or physical layer.
|
||||
|
||||
- **No link detected**: The interface is up, but no link is established.
|
||||
|
||||
Verify Interface Status
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Begin by verifying the status of the Ethernet interface to check if it is
|
||||
administratively up. Unlike `ethtool`, which provides information on the link
|
||||
and PHY status, it does not show the **administrative state** of the interface.
|
||||
To check this, you should use the `ip` command, which describes the interface
|
||||
state within the angle brackets `"<>"` in its output.
|
||||
|
||||
For example, in the output `<NO-CARRIER,BROADCAST,MULTICAST,UP>`, the important
|
||||
keywords are:
|
||||
|
||||
- **UP**: The interface is in the administrative "UP" state.
|
||||
- **NO-CARRIER**: The interface is administratively up, but no physical link is
|
||||
detected.
|
||||
|
||||
If the output shows `<BROADCAST,MULTICAST>`, this indicates the interface is in
|
||||
the administrative "DOWN" state.
|
||||
|
||||
- **Command:** `ip link show dev <interface>`
|
||||
|
||||
- **Expected Output:**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
|
||||
link/ether 88:14:2b:00:96:f2 brd ff:ff:ff:ff:ff:ff
|
||||
|
||||
- **Interpreting the Output:**
|
||||
|
||||
- **Administrative UP State**:
|
||||
|
||||
- If the output contains **"UP"**, the interface is administratively up,
|
||||
and the system is trying to establish a physical link.
|
||||
|
||||
- If you also see **"NO-CARRIER"**, it means the physical link has not been
|
||||
detected, indicating potential Layer 1 issues like a cable fault,
|
||||
misconfiguration, or no connection at the link partner. In this case,
|
||||
proceed to the **Inspect Link Status and PHY Configuration** section.
|
||||
|
||||
- **Administrative DOWN State**:
|
||||
|
||||
- If the output lacks **"UP"** and shows only states like
|
||||
**"<BROADCAST,MULTICAST>"**, it means the interface is administratively
|
||||
down. In this case, bring the interface up using the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ip link set dev <interface> up
|
||||
|
||||
- **Next Steps**:
|
||||
|
||||
- If the interface is **administratively up** but shows **NO-CARRIER**,
|
||||
proceed to the **Inspect Link Status and PHY Configuration** section to
|
||||
troubleshoot potential physical layer issues.
|
||||
|
||||
- If the interface was **administratively down** and you have brought it up,
|
||||
ensure to **repeat this verification step** to confirm the new state of the
|
||||
interface before proceeding
|
||||
|
||||
- **If the interface is up and the link is detected**:
|
||||
|
||||
- If the output shows **"UP"** and there is **no `NO-CARRIER`**, the
|
||||
interface is administratively up, and the physical link has been
|
||||
successfully established. If everything is working as expected, the Layer
|
||||
1 diagnostics are complete, and no further action is needed.
|
||||
|
||||
- If the interface is up and the link is detected but **no data is being
|
||||
transferred**, the issue is likely beyond Layer 1, and you should proceed
|
||||
with diagnosing the higher layers of the OSI model. This may involve
|
||||
checking Layer 2 configurations (such as VLANs or MAC address issues),
|
||||
Layer 3 settings (like IP addresses, routing, or ARP), or Layer 4 and
|
||||
above (firewalls, services, etc.).
|
||||
|
||||
- If the **link is unstable** or **frequently resetting or dropping**, this
|
||||
may indicate a physical layer issue such as a faulty cable, interference,
|
||||
or power delivery problems. In this case, proceed with the next step in
|
||||
this guide.
|
||||
|
||||
Inspect Link Status and PHY Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use `ethtool -I` to check the link status, PHY configuration, supported link
|
||||
modes, and additional statistics such as the **Link Down Events** counter. This
|
||||
step is essential for diagnosing Layer 1 problems such as speed mismatches,
|
||||
duplex issues, and link instability.
|
||||
|
||||
For both **Single-Pair Ethernet (SPE)** and **Multi-Pair Ethernet (MPE)**
|
||||
devices, you will use this step to gather key details about the link. **SPE**
|
||||
links generally support a single speed and mode without autonegotiation (with
|
||||
the exception of **10BaseT1L**), while **MPE** devices typically support
|
||||
multiple link modes and autonegotiation.
|
||||
|
||||
- **Command:** `ethtool -I <interface>`
|
||||
|
||||
- **Example Output for SPE Interface (Non-autonegotiation)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Settings for spe4:
|
||||
Supported ports: [ TP ]
|
||||
Supported link modes: 100baseT1/Full
|
||||
Supported pause frame use: No
|
||||
Supports auto-negotiation: No
|
||||
Supported FEC modes: Not reported
|
||||
Advertised link modes: Not applicable
|
||||
Advertised pause frame use: No
|
||||
Advertised auto-negotiation: No
|
||||
Advertised FEC modes: Not reported
|
||||
Speed: 100Mb/s
|
||||
Duplex: Full
|
||||
Auto-negotiation: off
|
||||
master-slave cfg: forced slave
|
||||
master-slave status: slave
|
||||
Port: Twisted Pair
|
||||
PHYAD: 6
|
||||
Transceiver: external
|
||||
MDI-X: Unknown
|
||||
Supports Wake-on: d
|
||||
Wake-on: d
|
||||
Link detected: yes
|
||||
SQI: 7/7
|
||||
Link Down Events: 2
|
||||
|
||||
- **Example Output for MPE Interface (Autonegotiation)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Settings for eth1:
|
||||
Supported ports: [ TP MII ]
|
||||
Supported link modes: 10baseT/Half 10baseT/Full
|
||||
100baseT/Half 100baseT/Full
|
||||
Supported pause frame use: Symmetric Receive-only
|
||||
Supports auto-negotiation: Yes
|
||||
Supported FEC modes: Not reported
|
||||
Advertised link modes: 10baseT/Half 10baseT/Full
|
||||
100baseT/Half 100baseT/Full
|
||||
Advertised pause frame use: Symmetric Receive-only
|
||||
Advertised auto-negotiation: Yes
|
||||
Advertised FEC modes: Not reported
|
||||
Link partner advertised link modes: 10baseT/Half 10baseT/Full
|
||||
100baseT/Half 100baseT/Full
|
||||
Link partner advertised pause frame use: Symmetric Receive-only
|
||||
Link partner advertised auto-negotiation: Yes
|
||||
Link partner advertised FEC modes: Not reported
|
||||
Speed: 100Mb/s
|
||||
Duplex: Full
|
||||
Auto-negotiation: on
|
||||
Port: Twisted Pair
|
||||
PHYAD: 10
|
||||
Transceiver: internal
|
||||
MDI-X: Unknown
|
||||
Supports Wake-on: pg
|
||||
Wake-on: p
|
||||
Link detected: yes
|
||||
Link Down Events: 1
|
||||
|
||||
- **Next Steps**:
|
||||
|
||||
- Record the output provided by `ethtool`, particularly noting the
|
||||
**master-slave status**, **speed**, **duplex**, and other relevant fields.
|
||||
This information will be useful for further analysis or troubleshooting.
|
||||
Once the **ethtool** output has been collected and stored, move on to the
|
||||
next diagnostic step.
|
||||
|
||||
Check Power Delivery (PoDL or PoE)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If it is known that **PoDL** or **PoE** is **not implemented** on the system,
|
||||
or the **PSE** (Power Sourcing Equipment) is managed by proprietary user-space
|
||||
software or external tools, you can skip this step. In such cases, verify power
|
||||
delivery through alternative methods, such as checking hardware indicators
|
||||
(LEDs), using multimeters, or consulting vendor-specific software for
|
||||
monitoring power status.
|
||||
|
||||
If **PoDL** or **PoE** is implemented and managed directly by Linux, follow
|
||||
these steps to ensure power is being delivered correctly:
|
||||
|
||||
- **Command:** `ethtool --show-pse <interface>`
|
||||
|
||||
- **Expected Output Examples**:
|
||||
|
||||
1. **PSE Not Supported**:
|
||||
|
||||
If no PSE is attached or the interface does not support PSE, the following
|
||||
output is expected:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
netlink error: No PSE is attached
|
||||
netlink error: Operation not supported
|
||||
|
||||
2. **PoDL (Single-Pair Ethernet)**:
|
||||
|
||||
When PoDL is implemented, you might see the following attributes:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
PSE attributes for eth1:
|
||||
PoDL PSE Admin State: enabled
|
||||
PoDL PSE Power Detection Status: delivering power
|
||||
|
||||
3. **PoE (Clause 33 PSE)**:
|
||||
|
||||
For standard PoE, the output may look like this:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
PSE attributes for eth1:
|
||||
Clause 33 PSE Admin State: enabled
|
||||
Clause 33 PSE Power Detection Status: delivering power
|
||||
Clause 33 PSE Available Power Limit: 18000
|
||||
|
||||
- **Adjust Power Limit (if needed)**:
|
||||
|
||||
- Sometimes, the available power limit may not be sufficient for the link
|
||||
partner. You can increase the power limit as needed.
|
||||
|
||||
- **Command:** `ethtool --set-pse <interface> c33-pse-avail-pw-limit <limit>`
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool --set-pse eth1 c33-pse-avail-pw-limit 18000
|
||||
ethtool --show-pse eth1
|
||||
|
||||
**Expected Output** after adjusting the power limit:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Clause 33 PSE Available Power Limit: 18000
|
||||
|
||||
|
||||
- **Next Steps**:
|
||||
|
||||
- **PoE or PoDL Not Used**: If **PoE** or **PoDL** is not implemented or used
|
||||
on the system, proceed to the next diagnostic step, as power delivery is
|
||||
not relevant for this setup.
|
||||
|
||||
- **PoE or PoDL Controlled Externally**: If **PoE** or **PoDL** is used but
|
||||
is not managed by the Linux kernel's **PSE-PD** framework (i.e., it is
|
||||
controlled by proprietary user-space software or external tools), this part
|
||||
is out of scope for this documentation. Please consult vendor-specific
|
||||
documentation or external tools for monitoring and managing power delivery.
|
||||
|
||||
- **PSE Admin State Disabled**:
|
||||
|
||||
- If the `PSE Admin State:` is **disabled**, enable it by running one of
|
||||
the following commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool --set-pse <devname> podl-pse-admin-control enable
|
||||
|
||||
or, for Clause 33 PSE (PoE):
|
||||
|
||||
ethtool --set-pse <devname> c33-pse-admin-control enable
|
||||
|
||||
- After enabling the PSE Admin State, return to the start of the **Check
|
||||
Power Delivery (PoDL or PoE)** step to recheck the power delivery status.
|
||||
|
||||
- **Power Not Delivered**: If the `Power Detection Status` shows something
|
||||
other than "delivering power" (e.g., `over current`), troubleshoot the
|
||||
**PSE**. Check for potential issues such as a short circuit in the cable,
|
||||
insufficient power delivery, or a fault in the PSE itself.
|
||||
|
||||
- **Power Delivered but No Link**: If power is being delivered but no link is
|
||||
established, proceed with further diagnostics by performing **Cable
|
||||
Diagnostics** or reviewing the **Inspect Link Status and PHY
|
||||
Configuration** steps to identify any underlying issues with the physical
|
||||
link or settings.
|
||||
|
||||
Cable Diagnostics
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use `ethtool` to test for physical layer issues such as cable faults. The test
|
||||
results can vary depending on the cable's condition, the technology in use, and
|
||||
the state of the link partner. The results from the cable test will help in
|
||||
diagnosing issues like open circuits, shorts, impedance mismatches, and
|
||||
noise-related problems.
|
||||
|
||||
- **Command:** `ethtool --cable-test <interface>`
|
||||
|
||||
The following are the typical outputs for **Single-Pair Ethernet (SPE)** and
|
||||
**Multi-Pair Ethernet (MPE)**:
|
||||
|
||||
- **For Single-Pair Ethernet (SPE)**:
|
||||
- **Expected Output (SPE)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Cable test completed for device eth1.
|
||||
Pair A, fault length: 25.00m
|
||||
Pair A code Open Circuit
|
||||
|
||||
This indicates an open circuit or cable fault at the reported distance, but
|
||||
results can be influenced by the link partner's state. Refer to the
|
||||
**"Troubleshooting Based on Cable Test Results"** section for further
|
||||
interpretation of these results.
|
||||
|
||||
- **For Multi-Pair Ethernet (MPE)**:
|
||||
- **Expected Output (MPE)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Cable test completed for device eth0.
|
||||
Pair A code OK
|
||||
Pair B code OK
|
||||
Pair C code Open Circuit
|
||||
|
||||
Here, Pair C is reported as having an open circuit, while Pairs A and B are
|
||||
functioning correctly. However, if autonegotiation is in use on Pairs A and
|
||||
B, the cable test may be disrupted. Refer to the **"Troubleshooting Based on
|
||||
Cable Test Results"** section for a detailed explanation of these issues and
|
||||
how to resolve them.
|
||||
|
||||
For detailed descriptions of the different possible cable test results, please
|
||||
refer to the **"Troubleshooting Based on Cable Test Results"** section.
|
||||
|
||||
Troubleshooting Based on Cable Test Results
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
After running the cable test, the results can help identify specific issues in
|
||||
the physical connection. However, it is important to note that **cable testing
|
||||
results heavily depend on the capabilities and characteristics of both the
|
||||
local hardware and the link partner**. The accuracy and reliability of the
|
||||
results can vary significantly between different hardware implementations.
|
||||
|
||||
In some cases, this can introduce **blind spots** in the current cable testing
|
||||
implementation, where certain results may not accurately reflect the actual
|
||||
physical state of the cable. For example:
|
||||
|
||||
- An **Open Circuit** result might not only indicate a damaged or disconnected
|
||||
cable but also occur if the cable is properly attached to a powered-down link
|
||||
partner.
|
||||
|
||||
- Some PHYs may report a **Short within Pair** if the link partner is in
|
||||
**forced slave mode**, even though there is no actual short in the cable.
|
||||
|
||||
To help users interpret the results more effectively, it could be beneficial to
|
||||
extend the **kernel UAPI** (User API) to provide additional context or
|
||||
**possible variants** of issues based on the hardware’s characteristics. Since
|
||||
these quirks are often hardware-specific, the **kernel driver** would be an
|
||||
ideal source of such information. By providing flags or hints related to
|
||||
potential false positives for each test result, users would have a better
|
||||
understanding of what to verify and where to investigate further.
|
||||
|
||||
Until such improvements are made, users should be aware of these limitations
|
||||
and manually verify cable issues as needed. Physical inspections may help
|
||||
resolve uncertainties related to false positive results.
|
||||
|
||||
The results can be one of the following:
|
||||
|
||||
- **OK**:
|
||||
|
||||
- The cable is functioning correctly, and no issues were detected.
|
||||
|
||||
- **Next Steps**: If you are still experiencing issues, it might be related
|
||||
to higher-layer problems, such as duplex mismatches or speed negotiation,
|
||||
which are not physical-layer issues.
|
||||
|
||||
- **Special Case for `BaseT1` (1000/100/10BaseT1)**: In `BaseT1` systems, an
|
||||
"OK" result typically also means that the link is up and likely in **slave
|
||||
mode**, since cable tests usually only pass in this mode. For some
|
||||
**10BaseT1L** PHYs, an "OK" result may occur even if the cable is too long
|
||||
for the PHY's configured range (for example, when the range is configured
|
||||
for short-distance mode).
|
||||
|
||||
- **Open Circuit**:
|
||||
|
||||
- An **Open Circuit** result typically indicates that the cable is damaged or
|
||||
disconnected at the reported fault length. Consider these possibilities:
|
||||
|
||||
- If the link partner is in **admin down** state or powered off, you might
|
||||
still get an "Open Circuit" result even if the cable is functional.
|
||||
|
||||
- **Next Steps**: Inspect the cable at the fault length for visible damage
|
||||
or loose connections. Verify the link partner is powered on and in the
|
||||
correct mode.
|
||||
|
||||
- **Short within Pair**:
|
||||
|
||||
- A **Short within Pair** indicates an unintended connection within the same
|
||||
pair of wires, typically caused by physical damage to the cable.
|
||||
|
||||
- **Next Steps**: Replace or repair the cable and check for any physical
|
||||
damage or improperly crimped connectors.
|
||||
|
||||
- **Short to Another Pair**:
|
||||
|
||||
- A **Short to Another Pair** means the wires from different pairs are
|
||||
shorted, which could occur due to physical damage or incorrect wiring.
|
||||
|
||||
- **Next Steps**: Replace or repair the damaged cable. Inspect the cable for
|
||||
incorrect terminations or pinched wiring.
|
||||
|
||||
- **Impedance Mismatch**:
|
||||
|
||||
- **Impedance Mismatch** indicates a reflection caused by an impedance
|
||||
discontinuity in the cable. This can happen when a part of the cable has
|
||||
abnormal impedance (e.g., when different cable types are spliced together
|
||||
or when there is a defect in the cable).
|
||||
|
||||
- **Next Steps**: Check the cable quality and ensure consistent impedance
|
||||
throughout its length. Replace any sections of the cable that do not meet
|
||||
specifications.
|
||||
|
||||
- **Noise**:
|
||||
|
||||
- **Noise** means that the Time Domain Reflectometry (TDR) test could not
|
||||
complete due to excessive noise on the cable, which can be caused by
|
||||
interference from electromagnetic sources.
|
||||
|
||||
- **Next Steps**: Identify and eliminate sources of electromagnetic
|
||||
interference (EMI) near the cable. Consider using shielded cables or
|
||||
rerouting the cable away from noise sources.
|
||||
|
||||
- **Resolution Not Possible**:
|
||||
|
||||
- **Resolution Not Possible** means that the TDR test could not detect the
|
||||
issue due to the resolution limitations of the test or because the fault is
|
||||
beyond the distance that the test can measure.
|
||||
|
||||
- **Next Steps**: Inspect the cable manually if possible, or use alternative
|
||||
diagnostic tools that can handle greater distances or higher resolution.
|
||||
|
||||
- **Unknown**:
|
||||
|
||||
- An **Unknown** result may occur when the test cannot classify the fault or
|
||||
when a specific issue is outside the scope of the tool's detection
|
||||
capabilities.
|
||||
|
||||
- **Next Steps**: Re-run the test, verify the link partner's state, and inspect
|
||||
the cable manually if necessary.
|
||||
|
||||
Verify Link Partner PHY Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If the cable test passes but the link is still not functioning correctly, it’s
|
||||
essential to verify the configuration of the link partner’s PHY. Mismatches in
|
||||
speed, duplex settings, or master-slave roles can cause connection issues.
|
||||
|
||||
Autonegotiation Mismatch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- If both link partners support autonegotiation, ensure that autonegotiation is
|
||||
enabled on both sides and that all supported link modes are advertised. A
|
||||
mismatch can lead to connectivity problems or sub optimal performance.
|
||||
|
||||
- **Quick Fix:** Reset autonegotiation to the default settings, which will
|
||||
advertise all default link modes:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool -s <interface> autoneg on
|
||||
|
||||
- **Command to check configuration:** `ethtool <interface>`
|
||||
|
||||
- **Expected Output:** Ensure that both sides advertise compatible link modes.
|
||||
If autonegotiation is off, verify that both link partners are configured for
|
||||
the same speed and duplex.
|
||||
|
||||
The following example shows a case where the local PHY advertises fewer link
|
||||
modes than it supports. This will reduce the number of overlapping link modes
|
||||
with the link partner. In the worst case, there will be no common link modes,
|
||||
and the link will not be created:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Settings for eth0:
|
||||
Supported link modes: 1000baseT/Full, 100baseT/Full
|
||||
Advertised link modes: 1000baseT/Full
|
||||
Speed: 1000Mb/s
|
||||
Duplex: Full
|
||||
Auto-negotiation: on
|
||||
|
||||
Combined Mode Mismatch (Autonegotiation on One Side, Forced on the Other)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- One possible issue occurs when one side is using **autonegotiation** (as in
|
||||
most modern systems), and the other side is set to a **forced link mode**
|
||||
(e.g., older hardware with single-speed hubs). In such cases, modern PHYs
|
||||
will attempt to detect the forced mode on the other side. If the link is
|
||||
established, you may notice:
|
||||
|
||||
- **No or empty "Link partner advertised link modes"**.
|
||||
|
||||
- **"Link partner advertised auto-negotiation:"** will be **"no"** or not
|
||||
present.
|
||||
|
||||
- This type of detection does not always work reliably:
|
||||
|
||||
- Typically, the modern PHY will default to **Half Duplex**, even if the link
|
||||
partner is actually configured for **Full Duplex**.
|
||||
|
||||
- Some PHYs may not work reliably if the link partner switches from one
|
||||
forced mode to another. In this case, only a down/up cycle may help.
|
||||
|
||||
- **Next Steps**: Set both sides to the same fixed speed and duplex mode to
|
||||
avoid potential detection issues.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool -s <interface> speed 1000 duplex full autoneg off
|
||||
|
||||
Master/Slave Role Mismatch (BaseT1 and 1000BaseT PHYs)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- In **BaseT1** systems (e.g., 1000BaseT1, 100BaseT1), link establishment
|
||||
requires that one device is configured as **master** and the other as
|
||||
**slave**. A mismatch in this master-slave configuration can prevent the link
|
||||
from being established. However, **1000BaseT** also supports configurable
|
||||
master/slave roles and can face similar issues.
|
||||
|
||||
- **Role Preference in 1000BaseT**: The **1000BaseT** specification allows link
|
||||
partners to negotiate master-slave roles or role preferences during
|
||||
autonegotiation. Some PHYs have hardware limitations or bugs that prevent
|
||||
them from functioning properly in certain roles. In such cases, drivers may
|
||||
force these PHYs into a specific role (e.g., **forced master** or **forced
|
||||
slave**) or try a weaker option by setting preferences. If both link partners
|
||||
have the same issue and are forced into the same mode (e.g., both forced into
|
||||
master mode), they will not be able to establish a link.
|
||||
|
||||
- **Next Steps**: Ensure that one side is configured as **master** and the
|
||||
other as **slave** to avoid this issue, particularly when hardware
|
||||
limitations are involved, or try the weaker **preferred** option instead of
|
||||
**forced**. Check for any driver-related restrictions or forced modes.
|
||||
|
||||
- **Command to force master/slave mode**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool -s <interface> master-slave forced-master
|
||||
|
||||
or:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool -s <interface> master-slave forced-master speed 1000 duplex full autoneg off
|
||||
|
||||
|
||||
- **Check the current master/slave status**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool <interface>
|
||||
|
||||
Example Output:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
master-slave cfg: forced-master
|
||||
master-slave status: master
|
||||
|
||||
- **Hardware Bugs and Driver Forcing**: If a known hardware issue forces the
|
||||
PHY into a specific mode, it’s essential to check the driver source code or
|
||||
hardware documentation for details. Ensure that the roles are compatible
|
||||
across both link partners, and if both PHYs are forced into the same mode,
|
||||
adjust one side accordingly to resolve the mismatch.
|
||||
|
||||
Monitor Link Resets and Speed Drops
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If the link is unstable, showing frequent resets or speed drops, this may
|
||||
indicate issues with the cable, PHY configuration, or environmental factors.
|
||||
While there is still no completely unified way in Linux to directly monitor
|
||||
downshift events or link speed changes via user space tools, both the Linux
|
||||
kernel logs and `ethtool` can provide valuable insights, especially if the
|
||||
driver supports reporting such events.
|
||||
|
||||
- **Monitor Kernel Logs for Link Resets and Speed Drops**:
|
||||
|
||||
- The Linux kernel will print link status changes, including downshift
|
||||
events, in the system logs. These messages typically include speed changes,
|
||||
duplex mode, and downshifted link speed (if the driver supports it).
|
||||
|
||||
- **Command to monitor kernel logs in real-time:**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
dmesg -w | grep "Link is Up\|Link is Down"
|
||||
|
||||
- Example Output (if a downshift occurs):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
eth0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
|
||||
eth0: Link is Down
|
||||
|
||||
This indicates that the link has been established but has downshifted from
|
||||
a higher speed.
|
||||
|
||||
- **Note**: Not all drivers or PHYs support downshift reporting, so you may
|
||||
not see this information for all devices.
|
||||
|
||||
- **Monitor Link Down Events Using `ethtool`**:
|
||||
|
||||
- Starting with the latest kernel and `ethtool` versions, you can track
|
||||
**Link Down Events** using the `ethtool -I` command. This will provide
|
||||
counters for link drops, helping to diagnose link instability issues if
|
||||
supported by the driver.
|
||||
|
||||
- **Command to monitor link down events:**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool -I <interface>
|
||||
|
||||
- Example Output (if supported):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
PSE attributes for eth1:
|
||||
Link Down Events: 5
|
||||
|
||||
This indicates that the link has dropped 5 times. Frequent link down events
|
||||
may indicate cable or environmental issues that require further
|
||||
investigation.
|
||||
|
||||
- **Check Link Status and Speed**:
|
||||
|
||||
- Even though downshift counts or events are not easily tracked, you can
|
||||
still use `ethtool` to manually check the current link speed and status.
|
||||
|
||||
- **Command:** `ethtool <interface>`
|
||||
|
||||
- **Expected Output:**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Speed: 1000Mb/s
|
||||
Duplex: Full
|
||||
Auto-negotiation: on
|
||||
Link detected: yes
|
||||
|
||||
Any inconsistencies in the expected speed or duplex setting could indicate
|
||||
an issue.
|
||||
|
||||
- **Disable Energy-Efficient Ethernet (EEE) for Diagnostics**:
|
||||
|
||||
- **EEE** (Energy-Efficient Ethernet) can be a source of link instability due
|
||||
to transitions in and out of low-power states. For diagnostic purposes, it
|
||||
may be useful to **temporarily** disable EEE to determine if it is
|
||||
contributing to link instability. This is **not a generic recommendation**
|
||||
for disabling power management.
|
||||
|
||||
- **Next Steps**: Disable EEE and monitor if the link becomes stable. If
|
||||
disabling EEE resolves the issue, report the bug so that the driver can be
|
||||
fixed.
|
||||
|
||||
- **Command:**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ethtool --set-eee <interface> eee off
|
||||
|
||||
- **Important**: If disabling EEE resolves the instability, the issue should
|
||||
be reported to the maintainers as a bug, and the driver should be corrected
|
||||
to handle EEE properly without causing instability. Disabling EEE
|
||||
permanently should not be seen as a solution.
|
||||
|
||||
- **Monitor Error Counters**:
|
||||
|
||||
- While some NIC drivers and PHYs provide error counters, there is no unified
|
||||
set of PHY-specific counters across all hardware. Additionally, not all
|
||||
PHYs provide useful information related to errors like CRC errors, frame
|
||||
drops, or link flaps. Therefore, this step is dependent on the specific
|
||||
hardware and driver support.
|
||||
|
||||
- **Next Steps**: Use `ethtool -S <interface>` to check if your driver
|
||||
provides useful error counters. In some cases, counters may provide
|
||||
information about errors like link flaps or physical layer problems (e.g.,
|
||||
excessive CRC errors), but results can vary significantly depending on the
|
||||
PHY.
|
||||
|
||||
- **Command:** `ethtool -S <interface>`
|
||||
|
||||
- **Example Output (if supported)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
rx_crc_errors: 123
|
||||
tx_errors: 45
|
||||
rx_frame_errors: 78
|
||||
|
||||
- **Note**: If no meaningful error counters are available or if counters are
|
||||
not supported, you may need to rely on physical inspections (e.g., cable
|
||||
condition) or kernel log messages (e.g., link up/down events) to further
|
||||
diagnose the issue.
|
||||
|
||||
When All Else Fails...
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
So you've checked the cables, monitored the logs, disabled EEE, and still...
|
||||
nothing? Don’t worry, you’re not alone. Sometimes, Ethernet gremlins just don’t
|
||||
want to cooperate.
|
||||
|
||||
But before you throw in the towel (or the Ethernet cable), take a deep breath.
|
||||
It’s always possible that:
|
||||
|
||||
1. Your PHY has a unique, undocumented personality.
|
||||
|
||||
2. The problem is lying dormant, waiting for just the right moment to magically
|
||||
resolve itself (hey, it happens!).
|
||||
|
||||
3. Or, it could be that the ultimate solution simply hasn’t been invented yet.
|
||||
|
||||
If none of the above bring you comfort, there’s one final step: contribute! If
|
||||
you've uncovered new or unusual issues, or have creative diagnostic methods,
|
||||
feel free to share your findings and extend this documentation. Together, we
|
||||
can hunt down every elusive network issue - one twisted pair at a time.
|
||||
|
||||
Remember: sometimes the solution is just a reboot away, but if not, it’s time to
|
||||
dig deeper - or report that bug!
|
||||
|
@ -236,6 +236,7 @@ Userspace to kernel:
|
||||
``ETHTOOL_MSG_MM_GET`` get MAC merge layer state
|
||||
``ETHTOOL_MSG_MM_SET`` set MAC merge layer parameters
|
||||
``ETHTOOL_MSG_MODULE_FW_FLASH_ACT`` flash transceiver module firmware
|
||||
``ETHTOOL_MSG_PHY_GET`` get Ethernet PHY information
|
||||
===================================== =================================
|
||||
|
||||
Kernel to userspace:
|
||||
@ -283,6 +284,8 @@ Kernel to userspace:
|
||||
``ETHTOOL_MSG_PLCA_NTF`` PLCA RS parameters
|
||||
``ETHTOOL_MSG_MM_GET_REPLY`` MAC merge layer status
|
||||
``ETHTOOL_MSG_MODULE_FW_FLASH_NTF`` transceiver module flash updates
|
||||
``ETHTOOL_MSG_PHY_GET_REPLY`` Ethernet PHY information
|
||||
``ETHTOOL_MSG_PHY_NTF`` Ethernet PHY information change
|
||||
======================================== =================================
|
||||
|
||||
``GET`` requests are sent by userspace applications to retrieve device
|
||||
|
@ -14,6 +14,7 @@ Contents:
|
||||
can
|
||||
can_ucan_protocol
|
||||
device_drivers/index
|
||||
diagnostic/index
|
||||
dsa/index
|
||||
devlink/index
|
||||
caif/index
|
||||
|
@ -104,6 +104,9 @@ Driver Support
|
||||
.. kernel-doc:: include/linux/netdevice.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: include/net/net_shaper.h
|
||||
:internal:
|
||||
|
||||
PHY Support
|
||||
-----------
|
||||
|
||||
|
@ -192,6 +192,33 @@ is reused to control the delay of the timer, while
|
||||
``napi_defer_hard_irqs`` controls the number of consecutive empty polls
|
||||
before NAPI gives up and goes back to using hardware IRQs.
|
||||
|
||||
The above parameters can also be set on a per-NAPI basis using netlink via
|
||||
netdev-genl. When used with netlink and configured on a per-NAPI basis, the
|
||||
parameters mentioned above use hyphens instead of underscores:
|
||||
``gro-flush-timeout`` and ``napi-defer-hard-irqs``.
|
||||
|
||||
Per-NAPI configuration can be done programmatically in a user application
|
||||
or by using a script included in the kernel source tree:
|
||||
``tools/net/ynl/cli.py``.
|
||||
|
||||
For example, using the script:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ kernel-source/tools/net/ynl/cli.py \
|
||||
--spec Documentation/netlink/specs/netdev.yaml \
|
||||
--do napi-set \
|
||||
--json='{"id": 345,
|
||||
"defer-hard-irqs": 111,
|
||||
"gro-flush-timeout": 11111}'
|
||||
|
||||
Similarly, the parameter ``irq-suspend-timeout`` can be set using netlink
|
||||
via netdev-genl. There is no global sysfs parameter for this value.
|
||||
|
||||
``irq-suspend-timeout`` is used to determine how long an application can
|
||||
completely suspend IRQs. It is used in combination with SO_PREFER_BUSY_POLL,
|
||||
which can be set on a per-epoll context basis with ``EPIOCSPARAMS`` ioctl.
|
||||
|
||||
.. _poll:
|
||||
|
||||
Busy polling
|
||||
@ -207,6 +234,46 @@ selected sockets or using the global ``net.core.busy_poll`` and
|
||||
``net.core.busy_read`` sysctls. An io_uring API for NAPI busy polling
|
||||
also exists.
|
||||
|
||||
epoll-based busy polling
|
||||
------------------------
|
||||
|
||||
It is possible to trigger packet processing directly from calls to
|
||||
``epoll_wait``. In order to use this feature, a user application must ensure
|
||||
all file descriptors which are added to an epoll context have the same NAPI ID.
|
||||
|
||||
If the application uses a dedicated acceptor thread, the application can obtain
|
||||
the NAPI ID of the incoming connection using SO_INCOMING_NAPI_ID and then
|
||||
distribute that file descriptor to a worker thread. The worker thread would add
|
||||
the file descriptor to its epoll context. This would ensure each worker thread
|
||||
has an epoll context with FDs that have the same NAPI ID.
|
||||
|
||||
Alternatively, if the application uses SO_REUSEPORT, a bpf or ebpf program can
|
||||
be inserted to distribute incoming connections to threads such that each thread
|
||||
is only given incoming connections with the same NAPI ID. Care must be taken to
|
||||
carefully handle cases where a system may have multiple NICs.
|
||||
|
||||
In order to enable busy polling, there are two choices:
|
||||
|
||||
1. ``/proc/sys/net/core/busy_poll`` can be set with a time in useconds to busy
|
||||
loop waiting for events. This is a system-wide setting and will cause all
|
||||
epoll-based applications to busy poll when they call epoll_wait. This may
|
||||
not be desirable as many applications may not have the need to busy poll.
|
||||
|
||||
2. Applications using recent kernels can issue an ioctl on the epoll context
|
||||
file descriptor to set (``EPIOCSPARAMS``) or get (``EPIOCGPARAMS``) ``struct
|
||||
epoll_params``:, which user programs can define as follows:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
struct epoll_params {
|
||||
uint32_t busy_poll_usecs;
|
||||
uint16_t busy_poll_budget;
|
||||
uint8_t prefer_busy_poll;
|
||||
|
||||
/* pad the struct to a multiple of 64bits */
|
||||
uint8_t __pad;
|
||||
};
|
||||
|
||||
IRQ mitigation
|
||||
---------------
|
||||
|
||||
@ -222,12 +289,111 @@ Such applications can pledge to the kernel that they will perform a busy
|
||||
polling operation periodically, and the driver should keep the device IRQs
|
||||
permanently masked. This mode is enabled by using the ``SO_PREFER_BUSY_POLL``
|
||||
socket option. To avoid system misbehavior the pledge is revoked
|
||||
if ``gro_flush_timeout`` passes without any busy poll call.
|
||||
if ``gro_flush_timeout`` passes without any busy poll call. For epoll-based
|
||||
busy polling applications, the ``prefer_busy_poll`` field of ``struct
|
||||
epoll_params`` can be set to 1 and the ``EPIOCSPARAMS`` ioctl can be issued to
|
||||
enable this mode. See the above section for more details.
|
||||
|
||||
The NAPI budget for busy polling is lower than the default (which makes
|
||||
sense given the low latency intention of normal busy polling). This is
|
||||
not the case with IRQ mitigation, however, so the budget can be adjusted
|
||||
with the ``SO_BUSY_POLL_BUDGET`` socket option.
|
||||
with the ``SO_BUSY_POLL_BUDGET`` socket option. For epoll-based busy polling
|
||||
applications, the ``busy_poll_budget`` field can be adjusted to the desired value
|
||||
in ``struct epoll_params`` and set on a specific epoll context using the ``EPIOCSPARAMS``
|
||||
ioctl. See the above section for more details.
|
||||
|
||||
It is important to note that choosing a large value for ``gro_flush_timeout``
|
||||
will defer IRQs to allow for better batch processing, but will induce latency
|
||||
when the system is not fully loaded. Choosing a small value for
|
||||
``gro_flush_timeout`` can cause interference of the user application which is
|
||||
attempting to busy poll by device IRQs and softirq processing. This value
|
||||
should be chosen carefully with these tradeoffs in mind. epoll-based busy
|
||||
polling applications may be able to mitigate how much user processing happens
|
||||
by choosing an appropriate value for ``maxevents``.
|
||||
|
||||
Users may want to consider an alternate approach, IRQ suspension, to help deal
|
||||
with these tradeoffs.
|
||||
|
||||
IRQ suspension
|
||||
--------------
|
||||
|
||||
IRQ suspension is a mechanism wherein device IRQs are masked while epoll
|
||||
triggers NAPI packet processing.
|
||||
|
||||
While application calls to epoll_wait successfully retrieve events, the kernel will
|
||||
defer the IRQ suspension timer. If the kernel does not retrieve any events
|
||||
while busy polling (for example, because network traffic levels subsided), IRQ
|
||||
suspension is disabled and the IRQ mitigation strategies described above are
|
||||
engaged.
|
||||
|
||||
This allows users to balance CPU consumption with network processing
|
||||
efficiency.
|
||||
|
||||
To use this mechanism:
|
||||
|
||||
1. The per-NAPI config parameter ``irq-suspend-timeout`` should be set to the
|
||||
maximum time (in nanoseconds) the application can have its IRQs
|
||||
suspended. This is done using netlink, as described above. This timeout
|
||||
serves as a safety mechanism to restart IRQ driver interrupt processing if
|
||||
the application has stalled. This value should be chosen so that it covers
|
||||
the amount of time the user application needs to process data from its
|
||||
call to epoll_wait, noting that applications can control how much data
|
||||
they retrieve by setting ``max_events`` when calling epoll_wait.
|
||||
|
||||
2. The sysfs parameter or per-NAPI config parameters ``gro_flush_timeout``
|
||||
and ``napi_defer_hard_irqs`` can be set to low values. They will be used
|
||||
to defer IRQs after busy poll has found no data.
|
||||
|
||||
3. The ``prefer_busy_poll`` flag must be set to true. This can be done using
|
||||
the ``EPIOCSPARAMS`` ioctl as described above.
|
||||
|
||||
4. The application uses epoll as described above to trigger NAPI packet
|
||||
processing.
|
||||
|
||||
As mentioned above, as long as subsequent calls to epoll_wait return events to
|
||||
userland, the ``irq-suspend-timeout`` is deferred and IRQs are disabled. This
|
||||
allows the application to process data without interference.
|
||||
|
||||
Once a call to epoll_wait results in no events being found, IRQ suspension is
|
||||
automatically disabled and the ``gro_flush_timeout`` and
|
||||
``napi_defer_hard_irqs`` mitigation mechanisms take over.
|
||||
|
||||
It is expected that ``irq-suspend-timeout`` will be set to a value much larger
|
||||
than ``gro_flush_timeout`` as ``irq-suspend-timeout`` should suspend IRQs for
|
||||
the duration of one userland processing cycle.
|
||||
|
||||
While it is not stricly necessary to use ``napi_defer_hard_irqs`` and
|
||||
``gro_flush_timeout`` to use IRQ suspension, their use is strongly
|
||||
recommended.
|
||||
|
||||
IRQ suspension causes the system to alternate between polling mode and
|
||||
irq-driven packet delivery. During busy periods, ``irq-suspend-timeout``
|
||||
overrides ``gro_flush_timeout`` and keeps the system busy polling, but when
|
||||
epoll finds no events, the setting of ``gro_flush_timeout`` and
|
||||
``napi_defer_hard_irqs`` determine the next step.
|
||||
|
||||
There are essentially three possible loops for network processing and
|
||||
packet delivery:
|
||||
|
||||
1) hardirq -> softirq -> napi poll; basic interrupt delivery
|
||||
2) timer -> softirq -> napi poll; deferred irq processing
|
||||
3) epoll -> busy-poll -> napi poll; busy looping
|
||||
|
||||
Loop 2 can take control from Loop 1, if ``gro_flush_timeout`` and
|
||||
``napi_defer_hard_irqs`` are set.
|
||||
|
||||
If ``gro_flush_timeout`` and ``napi_defer_hard_irqs`` are set, Loops 2
|
||||
and 3 "wrestle" with each other for control.
|
||||
|
||||
During busy periods, ``irq-suspend-timeout`` is used as timer in Loop 2,
|
||||
which essentially tilts network processing in favour of Loop 3.
|
||||
|
||||
If ``gro_flush_timeout`` and ``napi_defer_hard_irqs`` are not set, Loop 3
|
||||
cannot take control from Loop 1.
|
||||
|
||||
Therefore, setting ``gro_flush_timeout`` and ``napi_defer_hard_irqs`` is
|
||||
the recommended usage, because otherwise setting ``irq-suspend-timeout``
|
||||
might not have any discernible effect.
|
||||
|
||||
.. _threaded:
|
||||
|
||||
|
@ -5,46 +5,48 @@
|
||||
inet_connection_sock struct fast path usage breakdown
|
||||
=====================================================
|
||||
|
||||
=================================== ====================== =================== =================== ========================================================================================================================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access comment
|
||||
..struct ..inet_connection_sock
|
||||
struct_inet_sock icsk_inet read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
|
||||
struct_request_sock_queue icsk_accept_queue - -
|
||||
struct_inet_bind_bucket icsk_bind_hash read_mostly - tcp_set_state
|
||||
struct_inet_bind2_bucket icsk_bind2_hash read_mostly - tcp_set_state,inet_put_port
|
||||
unsigned_long icsk_timeout read_mostly - inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct_timer_list icsk_retransmit_timer read_mostly - inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct_timer_list icsk_delack_timer read_mostly - inet_csk_reset_xmit_timer,tcp_connect
|
||||
u32 icsk_rto read_write - tcp_cwnd_validate,tcp_schedule_loss_probe,tcp_connect_init,tcp_connect,tcp_write_xmit,tcp_push_one
|
||||
u32 icsk_rto_min - -
|
||||
u32 icsk_delack_max - -
|
||||
u32 icsk_pmtu_cookie read_write - tcp_sync_mss,tcp_current_mss,tcp_send_syn_data,tcp_connect_init,tcp_connect
|
||||
struct_tcp_congestion_ops icsk_ca_ops read_write - tcp_cwnd_validate,tcp_tso_segs,tcp_ca_dst_init,tcp_connect_init,tcp_connect,tcp_write_xmit
|
||||
struct_inet_connection_sock_af_ops icsk_af_ops read_mostly - tcp_finish_connect,tcp_send_syn_data,tcp_mtup_init,tcp_mtu_check_reprobe,tcp_mtu_probe,tcp_connect_init,tcp_connect,__tcp_transmit_skb
|
||||
struct_tcp_ulp_ops* icsk_ulp_ops - -
|
||||
void* icsk_ulp_data - -
|
||||
u8:5 icsk_ca_state read_write - tcp_cwnd_application_limited,tcp_set_ca_state,tcp_enter_cwr,tcp_tso_should_defer,tcp_mtu_probe,tcp_schedule_loss_probe,tcp_write_xmit,__tcp_transmit_skb
|
||||
u8:1 icsk_ca_initialized read_write - tcp_init_transfer,tcp_init_congestion_control,tcp_init_transfer,tcp_finish_connect,tcp_connect
|
||||
u8:1 icsk_ca_setsockopt - -
|
||||
u8:1 icsk_ca_dst_locked write_mostly - tcp_ca_dst_init,tcp_connect_init,tcp_connect
|
||||
u8 icsk_retransmits write_mostly - tcp_connect_init,tcp_connect
|
||||
u8 icsk_pending read_write - inet_csk_reset_xmit_timer,tcp_connect,tcp_check_probe_timer,__tcp_push_pending_frames,tcp_rearm_rto,tcp_event_new_data_sent,tcp_event_new_data_sent
|
||||
u8 icsk_backoff write_mostly - tcp_write_queue_purge,tcp_connect_init
|
||||
u8 icsk_syn_retries - -
|
||||
u8 icsk_probes_out - -
|
||||
u16 icsk_ext_hdr_len read_mostly - __tcp_mtu_to_mss,tcp_mtu_to_rss,tcp_mtu_probe,tcp_write_xmit,tcp_mtu_to_mss,
|
||||
struct_icsk_ack_u8 pending read_write read_write inet_csk_ack_scheduled,__tcp_cleanup_rbuf,tcp_cleanup_rbuf,inet_csk_clear_xmit_timer,tcp_event_ack-sent,inet_csk_reset_xmit_timer
|
||||
struct_icsk_ack_u8 quick read_write write_mostly tcp_dec_quickack_mode,tcp_event_ack_sent,__tcp_transmit_skb,__tcp_select_window,__tcp_cleanup_rbuf
|
||||
struct_icsk_ack_u8 pingpong - -
|
||||
struct_icsk_ack_u8 retry write_mostly read_write inet_csk_clear_xmit_timer,tcp_rearm_rto,tcp_event_new_data_sent,tcp_write_xmit,__tcp_send_ack,tcp_send_ack,
|
||||
struct_icsk_ack_u8 ato read_mostly write_mostly tcp_dec_quickack_mode,tcp_event_ack_sent,__tcp_transmit_skb,__tcp_send_ack,tcp_send_ack
|
||||
struct_icsk_ack_unsigned_long timeout read_write read_write inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct_icsk_ack_u32 lrcvtime read_write - tcp_finish_connect,tcp_connect,tcp_event_data_sent,__tcp_transmit_skb
|
||||
struct_icsk_ack_u16 rcv_mss write_mostly read_mostly __tcp_select_window,__tcp_cleanup_rbuf,tcp_initialize_rcv_mss,tcp_connect_init
|
||||
struct_icsk_mtup_int search_high read_write - tcp_mtup_init,tcp_sync_mss,tcp_connect_init,tcp_mtu_check_reprobe,tcp_write_xmit
|
||||
struct_icsk_mtup_int search_low read_write - tcp_mtu_probe,tcp_mtu_check_reprobe,tcp_write_xmit,tcp_sync_mss,tcp_connect_init,tcp_mtup_init
|
||||
struct_icsk_mtup_u32:31 probe_size read_write - tcp_mtup_init,tcp_connect_init,__tcp_transmit_skb
|
||||
struct_icsk_mtup_u32:1 enabled read_write - tcp_mtup_init,tcp_sync_mss,tcp_connect_init,tcp_mtu_probe,tcp_write_xmit
|
||||
struct_icsk_mtup_u32 probe_timestamp read_write - tcp_mtup_init,tcp_connect_init,tcp_mtu_check_reprobe,tcp_mtu_probe
|
||||
u32 icsk_probes_tstamp - -
|
||||
u32 icsk_user_timeout - -
|
||||
u64[104/sizeof(u64)] icsk_ca_priv - -
|
||||
=================================== ====================== =================== =================== ========================================================================================================================================================
|
||||
struct inet_sock icsk_inet read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
|
||||
struct request_sock_queue icsk_accept_queue
|
||||
struct inet_bind_bucket icsk_bind_hash read_mostly tcp_set_state
|
||||
struct inet_bind2_bucket icsk_bind2_hash read_mostly tcp_set_state,inet_put_port
|
||||
unsigned_long icsk_timeout read_mostly inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct timer_list icsk_retransmit_timer read_mostly inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct timer_list icsk_delack_timer read_mostly inet_csk_reset_xmit_timer,tcp_connect
|
||||
u32 icsk_rto read_write tcp_cwnd_validate,tcp_schedule_loss_probe,tcp_connect_init,tcp_connect,tcp_write_xmit,tcp_push_one
|
||||
u32 icsk_rto_min
|
||||
u32 icsk_delack_max
|
||||
u32 icsk_pmtu_cookie read_write tcp_sync_mss,tcp_current_mss,tcp_send_syn_data,tcp_connect_init,tcp_connect
|
||||
struct tcp_congestion_ops icsk_ca_ops read_write tcp_cwnd_validate,tcp_tso_segs,tcp_ca_dst_init,tcp_connect_init,tcp_connect,tcp_write_xmit
|
||||
struct inet_connection_sock_af_ops icsk_af_ops read_mostly tcp_finish_connect,tcp_send_syn_data,tcp_mtup_init,tcp_mtu_check_reprobe,tcp_mtu_probe,tcp_connect_init,tcp_connect,__tcp_transmit_skb
|
||||
struct tcp_ulp_ops* icsk_ulp_ops
|
||||
void* icsk_ulp_data
|
||||
u8:5 icsk_ca_state read_write tcp_cwnd_application_limited,tcp_set_ca_state,tcp_enter_cwr,tcp_tso_should_defer,tcp_mtu_probe,tcp_schedule_loss_probe,tcp_write_xmit,__tcp_transmit_skb
|
||||
u8:1 icsk_ca_initialized read_write tcp_init_transfer,tcp_init_congestion_control,tcp_init_transfer,tcp_finish_connect,tcp_connect
|
||||
u8:1 icsk_ca_setsockopt
|
||||
u8:1 icsk_ca_dst_locked write_mostly tcp_ca_dst_init,tcp_connect_init,tcp_connect
|
||||
u8 icsk_retransmits write_mostly tcp_connect_init,tcp_connect
|
||||
u8 icsk_pending read_write inet_csk_reset_xmit_timer,tcp_connect,tcp_check_probe_timer,__tcp_push_pending_frames,tcp_rearm_rto,tcp_event_new_data_sent,tcp_event_new_data_sent
|
||||
u8 icsk_backoff write_mostly tcp_write_queue_purge,tcp_connect_init
|
||||
u8 icsk_syn_retries
|
||||
u8 icsk_probes_out
|
||||
u16 icsk_ext_hdr_len read_mostly __tcp_mtu_to_mss,tcp_mtu_to_rss,tcp_mtu_probe,tcp_write_xmit,tcp_mtu_to_mss,
|
||||
struct icsk_ack_u8 pending read_write read_write inet_csk_ack_scheduled,__tcp_cleanup_rbuf,tcp_cleanup_rbuf,inet_csk_clear_xmit_timer,tcp_event_ack-sent,inet_csk_reset_xmit_timer
|
||||
struct icsk_ack_u8 quick read_write write_mostly tcp_dec_quickack_mode,tcp_event_ack_sent,__tcp_transmit_skb,__tcp_select_window,__tcp_cleanup_rbuf
|
||||
struct icsk_ack_u8 pingpong
|
||||
struct icsk_ack_u8 retry write_mostly read_write inet_csk_clear_xmit_timer,tcp_rearm_rto,tcp_event_new_data_sent,tcp_write_xmit,__tcp_send_ack,tcp_send_ack,
|
||||
struct icsk_ack_u8 ato read_mostly write_mostly tcp_dec_quickack_mode,tcp_event_ack_sent,__tcp_transmit_skb,__tcp_send_ack,tcp_send_ack
|
||||
struct icsk_ack_unsigned_long timeout read_write read_write inet_csk_reset_xmit_timer,tcp_connect
|
||||
struct icsk_ack_u32 lrcvtime read_write tcp_finish_connect,tcp_connect,tcp_event_data_sent,__tcp_transmit_skb
|
||||
struct icsk_ack_u16 rcv_mss write_mostly read_mostly __tcp_select_window,__tcp_cleanup_rbuf,tcp_initialize_rcv_mss,tcp_connect_init
|
||||
struct icsk_mtup_int search_high read_write tcp_mtup_init,tcp_sync_mss,tcp_connect_init,tcp_mtu_check_reprobe,tcp_write_xmit
|
||||
struct icsk_mtup_int search_low read_write tcp_mtu_probe,tcp_mtu_check_reprobe,tcp_write_xmit,tcp_sync_mss,tcp_connect_init,tcp_mtup_init
|
||||
struct icsk_mtup_u32:31 probe_size read_write tcp_mtup_init,tcp_connect_init,__tcp_transmit_skb
|
||||
struct icsk_mtup_u32:1 enabled read_write tcp_mtup_init,tcp_sync_mss,tcp_connect_init,tcp_mtu_probe,tcp_write_xmit
|
||||
struct icsk_mtup_u32 probe_timestamp read_write tcp_mtup_init,tcp_connect_init,tcp_mtu_check_reprobe,tcp_mtu_probe
|
||||
u32 icsk_probes_tstamp
|
||||
u32 icsk_user_timeout
|
||||
u64[104/sizeof(u64)] icsk_ca_priv
|
||||
=================================== ====================== =================== =================== ========================================================================================================================================================
|
||||
|
@ -5,40 +5,42 @@
|
||||
inet_sock struct fast path usage breakdown
|
||||
==========================================
|
||||
|
||||
======================= ===================== =================== =================== ======================================================================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access comment
|
||||
..struct ..inet_sock
|
||||
struct_sock sk read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
|
||||
struct_ipv6_pinfo* pinet6 - -
|
||||
be16 inet_sport read_mostly - __tcp_transmit_skb
|
||||
be32 inet_daddr read_mostly - ip_select_ident_segs
|
||||
be32 inet_rcv_saddr - -
|
||||
be16 inet_dport read_mostly - __tcp_transmit_skb
|
||||
u16 inet_num - -
|
||||
be32 inet_saddr - -
|
||||
s16 uc_ttl read_mostly - __ip_queue_xmit/ip_select_ttl
|
||||
u16 cmsg_flags - -
|
||||
struct_ip_options_rcu* inet_opt read_mostly - __ip_queue_xmit
|
||||
u16 inet_id read_mostly - ip_select_ident_segs
|
||||
u8 tos read_mostly - ip_queue_xmit
|
||||
u8 min_ttl - -
|
||||
u8 mc_ttl - -
|
||||
u8 pmtudisc - -
|
||||
u8:1 recverr - -
|
||||
u8:1 is_icsk - -
|
||||
u8:1 freebind - -
|
||||
u8:1 hdrincl - -
|
||||
u8:1 mc_loop - -
|
||||
u8:1 transparent - -
|
||||
u8:1 mc_all - -
|
||||
u8:1 nodefrag - -
|
||||
u8:1 bind_address_no_port - -
|
||||
u8:1 recverr_rfc4884 - -
|
||||
u8:1 defer_connect read_mostly - tcp_sendmsg_fastopen
|
||||
u8 rcv_tos - -
|
||||
u8 convert_csum - -
|
||||
int uc_index - -
|
||||
int mc_index - -
|
||||
be32 mc_addr - -
|
||||
struct_ip_mc_socklist* mc_list - -
|
||||
struct_inet_cork_full cork read_mostly - __tcp_transmit_skb
|
||||
struct local_port_range - -
|
||||
======================= ===================== =================== =================== ======================================================================================================
|
||||
struct sock sk read_mostly read_mostly tcp_init_buffer_space,tcp_init_transfer,tcp_finish_connect,tcp_connect,tcp_send_rcvq,tcp_send_syn_data
|
||||
struct ipv6_pinfo* pinet6
|
||||
be16 inet_sport read_mostly __tcp_transmit_skb
|
||||
be32 inet_daddr read_mostly ip_select_ident_segs
|
||||
be32 inet_rcv_saddr
|
||||
be16 inet_dport read_mostly __tcp_transmit_skb
|
||||
u16 inet_num
|
||||
be32 inet_saddr
|
||||
s16 uc_ttl read_mostly __ip_queue_xmit/ip_select_ttl
|
||||
u16 cmsg_flags
|
||||
struct ip_options_rcu* inet_opt read_mostly __ip_queue_xmit
|
||||
u16 inet_id read_mostly ip_select_ident_segs
|
||||
u8 tos read_mostly ip_queue_xmit
|
||||
u8 min_ttl
|
||||
u8 mc_ttl
|
||||
u8 pmtudisc
|
||||
u8:1 recverr
|
||||
u8:1 is_icsk
|
||||
u8:1 freebind
|
||||
u8:1 hdrincl
|
||||
u8:1 mc_loop
|
||||
u8:1 transparent
|
||||
u8:1 mc_all
|
||||
u8:1 nodefrag
|
||||
u8:1 bind_address_no_port
|
||||
u8:1 recverr_rfc4884
|
||||
u8:1 defer_connect read_mostly tcp_sendmsg_fastopen
|
||||
u8 rcv_tos
|
||||
u8 convert_csum
|
||||
int uc_index
|
||||
int mc_index
|
||||
be32 mc_addr
|
||||
struct ip_mc_socklist* mc_list
|
||||
struct inet_cork_full cork read_mostly __tcp_transmit_skb
|
||||
struct local_port_range
|
||||
======================= ===================== =================== =================== ======================================================================================================
|
||||
|
@ -5,181 +5,188 @@
|
||||
net_device struct fast path usage breakdown
|
||||
===========================================
|
||||
|
||||
Type Name fastpath_tx_access fastpath_rx_access Comments
|
||||
..struct ..net_device
|
||||
unsigned_long:32 priv_flags read_mostly - __dev_queue_xmit(tx)
|
||||
unsigned_long:1 lltx read_mostly - HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
|
||||
char name[16] - -
|
||||
struct_netdev_name_node* name_node
|
||||
struct_dev_ifalias* ifalias
|
||||
unsigned_long mem_end
|
||||
unsigned_long mem_start
|
||||
unsigned_long base_addr
|
||||
unsigned_long state read_mostly read_mostly netif_running(dev)
|
||||
struct_list_head dev_list
|
||||
struct_list_head napi_list
|
||||
struct_list_head unreg_list
|
||||
struct_list_head close_list
|
||||
struct_list_head ptype_all read_mostly - dev_nit_active(tx)
|
||||
struct_list_head ptype_specific read_mostly deliver_ptype_list_skb/__netif_receive_skb_core(rx)
|
||||
struct adj_list
|
||||
unsigned_int flags read_mostly read_mostly __dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
|
||||
xdp_features_t xdp_features
|
||||
struct_net_device_ops* netdev_ops read_mostly - netdev_core_pick_tx,netdev_start_xmit(tx)
|
||||
struct_xdp_metadata_ops* xdp_metadata_ops
|
||||
int ifindex - read_mostly ip6_rcv_core
|
||||
unsigned_short gflags
|
||||
unsigned_short hard_header_len read_mostly read_mostly ip6_xmit(tx);gro_list_prepare(rx)
|
||||
unsigned_int mtu read_mostly - ip_finish_output2
|
||||
unsigned_short needed_headroom read_mostly - LL_RESERVED_SPACE/ip_finish_output2
|
||||
unsigned_short needed_tailroom
|
||||
netdev_features_t features read_mostly read_mostly HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
|
||||
netdev_features_t hw_features
|
||||
netdev_features_t wanted_features
|
||||
netdev_features_t vlan_features
|
||||
netdev_features_t hw_enc_features - - netif_skb_features
|
||||
netdev_features_t mpls_features
|
||||
netdev_features_t gso_partial_features read_mostly gso_features_check
|
||||
unsigned_int min_mtu
|
||||
unsigned_int max_mtu
|
||||
unsigned_short type
|
||||
unsigned_char min_header_len
|
||||
unsigned_char name_assign_type
|
||||
int group
|
||||
struct_net_device_stats stats
|
||||
struct_net_device_core_stats* core_stats
|
||||
atomic_t carrier_up_count
|
||||
atomic_t carrier_down_count
|
||||
struct_iw_handler_def* wireless_handlers
|
||||
struct_iw_public_data* wireless_data
|
||||
struct_ethtool_ops* ethtool_ops
|
||||
struct_l3mdev_ops* l3mdev_ops
|
||||
struct_ndisc_ops* ndisc_ops
|
||||
struct_xfrmdev_ops* xfrmdev_ops
|
||||
struct_tlsdev_ops* tlsdev_ops
|
||||
struct_header_ops* header_ops read_mostly - ip_finish_output2,ip6_finish_output2(tx)
|
||||
unsigned_char operstate
|
||||
unsigned_char link_mode
|
||||
unsigned_char if_port
|
||||
unsigned_char dma
|
||||
unsigned_char perm_addr[32]
|
||||
unsigned_char addr_assign_type
|
||||
unsigned_char addr_len
|
||||
unsigned_char upper_level
|
||||
unsigned_char lower_level
|
||||
unsigned_short neigh_priv_len
|
||||
unsigned_short padded
|
||||
unsigned_short dev_id
|
||||
unsigned_short dev_port
|
||||
spinlock_t addr_list_lock
|
||||
int irq
|
||||
struct_netdev_hw_addr_list uc
|
||||
struct_netdev_hw_addr_list mc
|
||||
struct_netdev_hw_addr_list dev_addrs
|
||||
struct_kset* queues_kset
|
||||
struct_list_head unlink_list
|
||||
unsigned_int promiscuity
|
||||
unsigned_int allmulti
|
||||
bool uc_promisc
|
||||
unsigned_char nested_level
|
||||
struct_in_device* ip_ptr read_mostly read_mostly __in_dev_get
|
||||
struct_inet6_dev* ip6_ptr read_mostly read_mostly __in6_dev_get
|
||||
struct_vlan_info* vlan_info
|
||||
struct_dsa_port* dsa_ptr
|
||||
struct_tipc_bearer* tipc_ptr
|
||||
void* atalk_ptr
|
||||
void* ax25_ptr
|
||||
struct_wireless_dev* ieee80211_ptr
|
||||
struct_wpan_dev* ieee802154_ptr
|
||||
struct_mpls_dev* mpls_ptr
|
||||
struct_mctp_dev* mctp_ptr
|
||||
unsigned_char* dev_addr
|
||||
struct_netdev_queue* _rx read_mostly - netdev_get_rx_queue(rx)
|
||||
unsigned_int num_rx_queues
|
||||
unsigned_int real_num_rx_queues - read_mostly get_rps_cpu
|
||||
struct_bpf_prog* xdp_prog - read_mostly netif_elide_gro()
|
||||
unsigned_long gro_flush_timeout - read_mostly napi_complete_done
|
||||
u32 napi_defer_hard_irqs - read_mostly napi_complete_done
|
||||
unsigned_int gro_max_size - read_mostly skb_gro_receive
|
||||
unsigned_int gro_ipv4_max_size - read_mostly skb_gro_receive
|
||||
rx_handler_func_t* rx_handler read_mostly - __netif_receive_skb_core
|
||||
void* rx_handler_data read_mostly -
|
||||
struct_netdev_queue* ingress_queue read_mostly -
|
||||
struct_bpf_mprog_entry tcx_ingress - read_mostly sch_handle_ingress
|
||||
struct_nf_hook_entries* nf_hooks_ingress
|
||||
unsigned_char broadcast[32]
|
||||
struct_cpu_rmap* rx_cpu_rmap
|
||||
struct_hlist_node index_hlist
|
||||
struct_netdev_queue* _tx read_mostly - netdev_get_tx_queue(tx)
|
||||
unsigned_int num_tx_queues - -
|
||||
unsigned_int real_num_tx_queues read_mostly - skb_tx_hash,netdev_core_pick_tx(tx)
|
||||
unsigned_int tx_queue_len
|
||||
spinlock_t tx_global_lock
|
||||
struct_xdp_dev_bulk_queue__percpu* xdp_bulkq
|
||||
struct_xps_dev_maps* xps_maps[2] read_mostly - __netif_set_xps_queue
|
||||
struct_bpf_mprog_entry tcx_egress read_mostly - sch_handle_egress
|
||||
struct_nf_hook_entries* nf_hooks_egress read_mostly -
|
||||
struct_hlist_head qdisc_hash[16]
|
||||
struct_timer_list watchdog_timer
|
||||
int watchdog_timeo
|
||||
u32 proto_down_reason
|
||||
struct_list_head todo_list
|
||||
int__percpu* pcpu_refcnt
|
||||
refcount_t dev_refcnt
|
||||
struct_ref_tracker_dir refcnt_tracker
|
||||
struct_list_head link_watch_list
|
||||
enum:8 reg_state
|
||||
bool dismantle
|
||||
enum:16 rtnl_link_state
|
||||
bool needs_free_netdev
|
||||
void*priv_destructor struct_net_device
|
||||
struct_netpoll_info* npinfo - read_mostly napi_poll/napi_poll_lock
|
||||
possible_net_t nd_net - read_mostly (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
|
||||
void* ml_priv
|
||||
enum_netdev_ml_priv_type ml_priv_type
|
||||
struct_pcpu_lstats__percpu* lstats read_mostly dev_lstats_add()
|
||||
struct_pcpu_sw_netstats__percpu* tstats read_mostly dev_sw_netstats_tx_add()
|
||||
struct_pcpu_dstats__percpu* dstats
|
||||
struct_garp_port* garp_port
|
||||
struct_mrp_port* mrp_port
|
||||
struct_dm_hw_stat_delta* dm_private
|
||||
struct_device dev - -
|
||||
struct_attribute_group* sysfs_groups[4]
|
||||
struct_attribute_group* sysfs_rx_queue_group
|
||||
struct_rtnl_link_ops* rtnl_link_ops
|
||||
unsigned_int gso_max_size read_mostly - sk_dst_gso_max_size
|
||||
unsigned_int tso_max_size
|
||||
u16 gso_max_segs read_mostly - gso_max_segs
|
||||
u16 tso_max_segs
|
||||
unsigned_int gso_ipv4_max_size read_mostly - sk_dst_gso_max_size
|
||||
struct_dcbnl_rtnl_ops* dcbnl_ops
|
||||
s16 num_tc read_mostly - skb_tx_hash
|
||||
struct_netdev_tc_txq tc_to_txq[16] read_mostly - skb_tx_hash
|
||||
u8 prio_tc_map[16]
|
||||
unsigned_int fcoe_ddp_xid
|
||||
struct_netprio_map* priomap
|
||||
struct_phy_device* phydev
|
||||
struct_sfp_bus* sfp_bus
|
||||
struct_lock_class_key* qdisc_tx_busylock
|
||||
bool proto_down
|
||||
unsigned:1 wol_enabled
|
||||
unsigned:1 threaded - - napi_poll(napi_enable,dev_set_threaded)
|
||||
unsigned_long:1 see_all_hwtstamp_requests
|
||||
unsigned_long:1 change_proto_down
|
||||
unsigned_long:1 netns_local
|
||||
unsigned_long:1 fcoe_mtu
|
||||
struct_list_head net_notifier_list
|
||||
struct_macsec_ops* macsec_ops
|
||||
struct_udp_tunnel_nic_info* udp_tunnel_nic_info
|
||||
struct_udp_tunnel_nic* udp_tunnel_nic
|
||||
unsigned_int xdp_zc_max_segs
|
||||
struct_bpf_xdp_entity xdp_state[3]
|
||||
u8 dev_addr_shadow[32]
|
||||
netdevice_tracker linkwatch_dev_tracker
|
||||
netdevice_tracker watchdog_dev_tracker
|
||||
netdevice_tracker dev_registered_tracker
|
||||
struct_rtnl_hw_stats64* offload_xstats_l3
|
||||
struct_devlink_port* devlink_port
|
||||
struct_dpll_pin* dpll_pin
|
||||
=================================== =========================== =================== =================== ===================================================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access Comments
|
||||
=================================== =========================== =================== =================== ===================================================================================
|
||||
unsigned_long:32 priv_flags read_mostly __dev_queue_xmit(tx)
|
||||
unsigned_long:1 lltx read_mostly HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
|
||||
char name[16]
|
||||
struct netdev_name_node* name_node
|
||||
struct dev_ifalias* ifalias
|
||||
unsigned_long mem_end
|
||||
unsigned_long mem_start
|
||||
unsigned_long base_addr
|
||||
unsigned_long state read_mostly read_mostly netif_running(dev)
|
||||
struct list_head dev_list
|
||||
struct list_head napi_list
|
||||
struct list_head unreg_list
|
||||
struct list_head close_list
|
||||
struct list_head ptype_all read_mostly dev_nit_active(tx)
|
||||
struct list_head ptype_specific read_mostly deliver_ptype_list_skb/__netif_receive_skb_core(rx)
|
||||
struct adj_list
|
||||
unsigned_int flags read_mostly read_mostly __dev_queue_xmit,__dev_xmit_skb,ip6_output,__ip6_finish_output(tx);ip6_rcv_core(rx)
|
||||
xdp_features_t xdp_features
|
||||
struct net_device_ops* netdev_ops read_mostly netdev_core_pick_tx,netdev_start_xmit(tx)
|
||||
struct xdp_metadata_ops* xdp_metadata_ops
|
||||
int ifindex read_mostly ip6_rcv_core
|
||||
unsigned_short gflags
|
||||
unsigned_short hard_header_len read_mostly read_mostly ip6_xmit(tx);gro_list_prepare(rx)
|
||||
unsigned_int mtu read_mostly ip_finish_output2
|
||||
unsigned_short needed_headroom read_mostly LL_RESERVED_SPACE/ip_finish_output2
|
||||
unsigned_short needed_tailroom
|
||||
netdev_features_t features read_mostly read_mostly HARD_TX_LOCK,netif_skb_features,sk_setup_caps(tx);netif_elide_gro(rx)
|
||||
netdev_features_t hw_features
|
||||
netdev_features_t wanted_features
|
||||
netdev_features_t vlan_features
|
||||
netdev_features_t hw_enc_features netif_skb_features
|
||||
netdev_features_t mpls_features
|
||||
netdev_features_t gso_partial_features read_mostly gso_features_check
|
||||
unsigned_int min_mtu
|
||||
unsigned_int max_mtu
|
||||
unsigned_short type
|
||||
unsigned_char min_header_len
|
||||
unsigned_char name_assign_type
|
||||
int group
|
||||
struct net_device_stats stats
|
||||
struct net_device_core_stats* core_stats
|
||||
atomic_t carrier_up_count
|
||||
atomic_t carrier_down_count
|
||||
struct iw_handler_def* wireless_handlers
|
||||
struct ethtool_ops* ethtool_ops
|
||||
struct l3mdev_ops* l3mdev_ops
|
||||
struct ndisc_ops* ndisc_ops
|
||||
struct xfrmdev_ops* xfrmdev_ops
|
||||
struct tlsdev_ops* tlsdev_ops
|
||||
struct header_ops* header_ops read_mostly ip_finish_output2,ip6_finish_output2(tx)
|
||||
unsigned_char operstate
|
||||
unsigned_char link_mode
|
||||
unsigned_char if_port
|
||||
unsigned_char dma
|
||||
unsigned_char perm_addr[32]
|
||||
unsigned_char addr_assign_type
|
||||
unsigned_char addr_len
|
||||
unsigned_char upper_level
|
||||
unsigned_char lower_level
|
||||
unsigned_short neigh_priv_len
|
||||
unsigned_short padded
|
||||
unsigned_short dev_id
|
||||
unsigned_short dev_port
|
||||
spinlock_t addr_list_lock
|
||||
int irq
|
||||
struct netdev_hw_addr_list uc
|
||||
struct netdev_hw_addr_list mc
|
||||
struct netdev_hw_addr_list dev_addrs
|
||||
struct kset* queues_kset
|
||||
struct list_head unlink_list
|
||||
unsigned_int promiscuity
|
||||
unsigned_int allmulti
|
||||
bool uc_promisc
|
||||
unsigned_char nested_level
|
||||
struct in_device* ip_ptr read_mostly read_mostly __in_dev_get
|
||||
struct hlist_head fib_nh_head
|
||||
struct inet6_dev* ip6_ptr read_mostly read_mostly __in6_dev_get
|
||||
struct vlan_info* vlan_info
|
||||
struct dsa_port* dsa_ptr
|
||||
struct tipc_bearer* tipc_ptr
|
||||
void* atalk_ptr
|
||||
void* ax25_ptr
|
||||
struct wireless_dev* ieee80211_ptr
|
||||
struct wpan_dev* ieee802154_ptr
|
||||
struct mpls_dev* mpls_ptr
|
||||
struct mctp_dev* mctp_ptr
|
||||
unsigned_char* dev_addr
|
||||
struct netdev_queue* _rx read_mostly netdev_get_rx_queue(rx)
|
||||
unsigned_int num_rx_queues
|
||||
unsigned_int real_num_rx_queues read_mostly get_rps_cpu
|
||||
struct bpf_prog* xdp_prog read_mostly netif_elide_gro()
|
||||
unsigned_long gro_flush_timeout read_mostly napi_complete_done
|
||||
u32 napi_defer_hard_irqs read_mostly napi_complete_done
|
||||
unsigned_int gro_max_size read_mostly skb_gro_receive
|
||||
unsigned_int gro_ipv4_max_size read_mostly skb_gro_receive
|
||||
rx_handler_func_t* rx_handler read_mostly __netif_receive_skb_core
|
||||
void* rx_handler_data read_mostly
|
||||
struct netdev_queue* ingress_queue read_mostly
|
||||
struct bpf_mprog_entry tcx_ingress read_mostly sch_handle_ingress
|
||||
struct nf_hook_entries* nf_hooks_ingress
|
||||
unsigned_char broadcast[32]
|
||||
struct cpu_rmap* rx_cpu_rmap
|
||||
struct hlist_node index_hlist
|
||||
struct netdev_queue* _tx read_mostly netdev_get_tx_queue(tx)
|
||||
unsigned_int num_tx_queues
|
||||
unsigned_int real_num_tx_queues read_mostly skb_tx_hash,netdev_core_pick_tx(tx)
|
||||
unsigned_int tx_queue_len
|
||||
spinlock_t tx_global_lock
|
||||
struct xdp_dev_bulk_queue__percpu* xdp_bulkq
|
||||
struct xps_dev_maps* xps_maps[2] read_mostly __netif_set_xps_queue
|
||||
struct bpf_mprog_entry tcx_egress read_mostly sch_handle_egress
|
||||
struct nf_hook_entries* nf_hooks_egress read_mostly
|
||||
struct hlist_head qdisc_hash[16]
|
||||
struct timer_list watchdog_timer
|
||||
int watchdog_timeo
|
||||
u32 proto_down_reason
|
||||
struct list_head todo_list
|
||||
int__percpu* pcpu_refcnt
|
||||
refcount_t dev_refcnt
|
||||
struct ref_tracker_dir refcnt_tracker
|
||||
struct list_head link_watch_list
|
||||
enum:8 reg_state
|
||||
bool dismantle
|
||||
enum:16 rtnl_link_state
|
||||
bool needs_free_netdev
|
||||
void*priv_destructor struct net_device
|
||||
struct netpoll_info* npinfo read_mostly napi_poll/napi_poll_lock
|
||||
possible_net_t nd_net read_mostly (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
|
||||
void* ml_priv
|
||||
enum_netdev_ml_priv_type ml_priv_type
|
||||
struct pcpu_lstats__percpu* lstats read_mostly dev_lstats_add()
|
||||
struct pcpu_sw_netstats__percpu* tstats read_mostly dev_sw_netstats_tx_add()
|
||||
struct pcpu_dstats__percpu* dstats
|
||||
struct garp_port* garp_port
|
||||
struct mrp_port* mrp_port
|
||||
struct dm_hw_stat_delta* dm_private
|
||||
struct device dev
|
||||
struct attribute_group* sysfs_groups[4]
|
||||
struct attribute_group* sysfs_rx_queue_group
|
||||
struct rtnl_link_ops* rtnl_link_ops
|
||||
unsigned_int gso_max_size read_mostly sk_dst_gso_max_size
|
||||
unsigned_int tso_max_size
|
||||
u16 gso_max_segs read_mostly gso_max_segs
|
||||
u16 tso_max_segs
|
||||
unsigned_int gso_ipv4_max_size read_mostly sk_dst_gso_max_size
|
||||
struct dcbnl_rtnl_ops* dcbnl_ops
|
||||
s16 num_tc read_mostly skb_tx_hash
|
||||
struct netdev_tc_txq tc_to_txq[16] read_mostly skb_tx_hash
|
||||
u8 prio_tc_map[16]
|
||||
unsigned_int fcoe_ddp_xid
|
||||
struct netprio_map* priomap
|
||||
struct phy_device* phydev
|
||||
struct sfp_bus* sfp_bus
|
||||
struct lock_class_key* qdisc_tx_busylock
|
||||
bool proto_down
|
||||
unsigned:1 wol_enabled
|
||||
unsigned:1 threaded napi_poll(napi_enable,dev_set_threaded)
|
||||
unsigned_long:1 see_all_hwtstamp_requests
|
||||
unsigned_long:1 change_proto_down
|
||||
unsigned_long:1 netns_local
|
||||
unsigned_long:1 fcoe_mtu
|
||||
struct list_head net_notifier_list
|
||||
struct macsec_ops* macsec_ops
|
||||
struct udp_tunnel_nic_info* udp_tunnel_nic_info
|
||||
struct udp_tunnel_nic* udp_tunnel_nic
|
||||
unsigned_int xdp_zc_max_segs
|
||||
struct bpf_xdp_entity xdp_state[3]
|
||||
u8 dev_addr_shadow[32]
|
||||
netdevice_tracker linkwatch_dev_tracker
|
||||
netdevice_tracker watchdog_dev_tracker
|
||||
netdevice_tracker dev_registered_tracker
|
||||
struct rtnl_hw_stats64* offload_xstats_l3
|
||||
struct devlink_port* devlink_port
|
||||
struct dpll_pin* dpll_pin
|
||||
struct hlist_head page_pools
|
||||
struct dim_irq_moder* irq_moder
|
||||
u64 max_pacing_offload_horizon
|
||||
struct_napi_config* napi_config
|
||||
unsigned_long gro_flush_timeout
|
||||
u32 napi_defer_hard_irqs
|
||||
struct hlist_head neighbours[2]
|
||||
=================================== =========================== =================== =================== ===================================================================================
|
||||
|
@ -5,154 +5,156 @@
|
||||
netns_ipv4 struct fast path usage breakdown
|
||||
===========================================
|
||||
|
||||
=============================== ============================================ =================== =================== =================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access comment
|
||||
..struct ..netns_ipv4
|
||||
struct_inet_timewait_death_row tcp_death_row
|
||||
struct_udp_table* udp_table
|
||||
struct_ctl_table_header* forw_hdr
|
||||
struct_ctl_table_header* frags_hdr
|
||||
struct_ctl_table_header* ipv4_hdr
|
||||
struct_ctl_table_header* route_hdr
|
||||
struct_ctl_table_header* xfrm4_hdr
|
||||
struct_ipv4_devconf* devconf_all
|
||||
struct_ipv4_devconf* devconf_dflt
|
||||
struct_ip_ra_chain ra_chain
|
||||
struct_mutex ra_mutex
|
||||
struct_fib_rules_ops* rules_ops
|
||||
struct_fib_table fib_main
|
||||
struct_fib_table fib_default
|
||||
unsigned_int fib_rules_require_fldissect
|
||||
bool fib_has_custom_rules
|
||||
bool fib_has_custom_local_routes
|
||||
bool fib_offload_disabled
|
||||
atomic_t fib_num_tclassid_users
|
||||
struct_hlist_head* fib_table_hash
|
||||
struct_sock* fibnl
|
||||
struct_sock* mc_autojoin_sk
|
||||
struct_inet_peer_base* peers
|
||||
struct_fqdir* fqdir
|
||||
u8 sysctl_icmp_echo_ignore_all
|
||||
u8 sysctl_icmp_echo_enable_probe
|
||||
u8 sysctl_icmp_echo_ignore_broadcasts
|
||||
u8 sysctl_icmp_ignore_bogus_error_responses
|
||||
u8 sysctl_icmp_errors_use_inbound_ifaddr
|
||||
int sysctl_icmp_ratelimit
|
||||
int sysctl_icmp_ratemask
|
||||
u32 ip_rt_min_pmtu - -
|
||||
int ip_rt_mtu_expires - -
|
||||
int ip_rt_min_advmss - -
|
||||
struct_local_ports ip_local_ports - -
|
||||
u8 sysctl_tcp_ecn - -
|
||||
u8 sysctl_tcp_ecn_fallback - -
|
||||
u8 sysctl_ip_default_ttl - - ip4_dst_hoplimit/ip_select_ttl
|
||||
u8 sysctl_ip_no_pmtu_disc - -
|
||||
u8 sysctl_ip_fwd_use_pmtu read_mostly - ip_dst_mtu_maybe_forward/ip_skb_dst_mtu
|
||||
u8 sysctl_ip_fwd_update_priority - - ip_forward
|
||||
u8 sysctl_ip_nonlocal_bind - -
|
||||
u8 sysctl_ip_autobind_reuse - -
|
||||
u8 sysctl_ip_dynaddr - -
|
||||
u8 sysctl_ip_early_demux - read_mostly ip(6)_rcv_finish_core
|
||||
u8 sysctl_raw_l3mdev_accept - -
|
||||
u8 sysctl_tcp_early_demux - read_mostly ip(6)_rcv_finish_core
|
||||
u8 sysctl_udp_early_demux
|
||||
u8 sysctl_nexthop_compat_mode - -
|
||||
u8 sysctl_fwmark_reflect - -
|
||||
u8 sysctl_tcp_fwmark_accept - -
|
||||
u8 sysctl_tcp_l3mdev_accept - -
|
||||
u8 sysctl_tcp_mtu_probing - -
|
||||
int sysctl_tcp_mtu_probe_floor - -
|
||||
int sysctl_tcp_base_mss - -
|
||||
int sysctl_tcp_min_snd_mss read_mostly - __tcp_mtu_to_mss(tcp_write_xmit)
|
||||
int sysctl_tcp_probe_threshold - - tcp_mtu_probe(tcp_write_xmit)
|
||||
u32 sysctl_tcp_probe_interval - - tcp_mtu_check_reprobe(tcp_write_xmit)
|
||||
int sysctl_tcp_keepalive_time - -
|
||||
int sysctl_tcp_keepalive_intvl - -
|
||||
u8 sysctl_tcp_keepalive_probes - -
|
||||
u8 sysctl_tcp_syn_retries - -
|
||||
u8 sysctl_tcp_synack_retries - -
|
||||
u8 sysctl_tcp_syncookies - - generated_on_syn
|
||||
u8 sysctl_tcp_migrate_req - - reuseport
|
||||
u8 sysctl_tcp_comp_sack_nr - - __tcp_ack_snd_check
|
||||
int sysctl_tcp_reordering - read_mostly tcp_may_raise_cwnd/tcp_cong_control
|
||||
u8 sysctl_tcp_retries1 - -
|
||||
u8 sysctl_tcp_retries2 - -
|
||||
u8 sysctl_tcp_orphan_retries - -
|
||||
u8 sysctl_tcp_tw_reuse - - timewait_sock_ops
|
||||
int sysctl_tcp_fin_timeout - - TCP_LAST_ACK/tcp_rcv_state_process
|
||||
unsigned_int sysctl_tcp_notsent_lowat read_mostly - tcp_notsent_lowat/tcp_stream_memory_free
|
||||
u8 sysctl_tcp_sack - - tcp_syn_options
|
||||
u8 sysctl_tcp_window_scaling - - tcp_syn_options,tcp_parse_options
|
||||
u8 sysctl_tcp_timestamps
|
||||
u8 sysctl_tcp_early_retrans read_mostly - tcp_schedule_loss_probe(tcp_write_xmit)
|
||||
u8 sysctl_tcp_recovery - - tcp_fastretrans_alert
|
||||
u8 sysctl_tcp_thin_linear_timeouts - - tcp_retrans_timer(on_thin_streams)
|
||||
u8 sysctl_tcp_slow_start_after_idle - - unlikely(tcp_cwnd_validate-network-not-starved)
|
||||
u8 sysctl_tcp_retrans_collapse - -
|
||||
u8 sysctl_tcp_stdurg - - unlikely(tcp_check_urg)
|
||||
u8 sysctl_tcp_rfc1337 - -
|
||||
u8 sysctl_tcp_abort_on_overflow - -
|
||||
u8 sysctl_tcp_fack - -
|
||||
int sysctl_tcp_max_reordering - - tcp_check_sack_reordering
|
||||
int sysctl_tcp_adv_win_scale - - tcp_init_buffer_space
|
||||
u8 sysctl_tcp_dsack - - partial_packet_or_retrans_in_tcp_data_queue
|
||||
u8 sysctl_tcp_app_win - - tcp_win_from_space
|
||||
u8 sysctl_tcp_frto - - tcp_enter_loss
|
||||
u8 sysctl_tcp_nometrics_save - - TCP_LAST_ACK/tcp_update_metrics
|
||||
u8 sysctl_tcp_no_ssthresh_metrics_save - - TCP_LAST_ACK/tcp_(update/init)_metrics
|
||||
=============================== ============================================ =================== =================== =================================================
|
||||
struct_inet_timewait_death_row tcp_death_row
|
||||
struct_udp_table* udp_table
|
||||
struct_ctl_table_header* forw_hdr
|
||||
struct_ctl_table_header* frags_hdr
|
||||
struct_ctl_table_header* ipv4_hdr
|
||||
struct_ctl_table_header* route_hdr
|
||||
struct_ctl_table_header* xfrm4_hdr
|
||||
struct_ipv4_devconf* devconf_all
|
||||
struct_ipv4_devconf* devconf_dflt
|
||||
struct_ip_ra_chain ra_chain
|
||||
struct_mutex ra_mutex
|
||||
struct_fib_rules_ops* rules_ops
|
||||
struct_fib_table fib_main
|
||||
struct_fib_table fib_default
|
||||
unsigned_int fib_rules_require_fldissect
|
||||
bool fib_has_custom_rules
|
||||
bool fib_has_custom_local_routes
|
||||
bool fib_offload_disabled
|
||||
atomic_t fib_num_tclassid_users
|
||||
struct_hlist_head* fib_table_hash
|
||||
struct_sock* fibnl
|
||||
struct_sock* mc_autojoin_sk
|
||||
struct_inet_peer_base* peers
|
||||
struct_fqdir* fqdir
|
||||
u8 sysctl_icmp_echo_ignore_all
|
||||
u8 sysctl_icmp_echo_enable_probe
|
||||
u8 sysctl_icmp_echo_ignore_broadcasts
|
||||
u8 sysctl_icmp_ignore_bogus_error_responses
|
||||
u8 sysctl_icmp_errors_use_inbound_ifaddr
|
||||
int sysctl_icmp_ratelimit
|
||||
int sysctl_icmp_ratemask
|
||||
u32 ip_rt_min_pmtu
|
||||
int ip_rt_mtu_expires
|
||||
int ip_rt_min_advmss
|
||||
struct_local_ports ip_local_ports
|
||||
u8 sysctl_tcp_ecn
|
||||
u8 sysctl_tcp_ecn_fallback
|
||||
u8 sysctl_ip_default_ttl ip4_dst_hoplimit/ip_select_ttl
|
||||
u8 sysctl_ip_no_pmtu_disc
|
||||
u8 sysctl_ip_fwd_use_pmtu read_mostly ip_dst_mtu_maybe_forward/ip_skb_dst_mtu
|
||||
u8 sysctl_ip_fwd_update_priority ip_forward
|
||||
u8 sysctl_ip_nonlocal_bind
|
||||
u8 sysctl_ip_autobind_reuse
|
||||
u8 sysctl_ip_dynaddr
|
||||
u8 sysctl_ip_early_demux read_mostly ip(6)_rcv_finish_core
|
||||
u8 sysctl_raw_l3mdev_accept
|
||||
u8 sysctl_tcp_early_demux read_mostly ip(6)_rcv_finish_core
|
||||
u8 sysctl_udp_early_demux
|
||||
u8 sysctl_nexthop_compat_mode
|
||||
u8 sysctl_fwmark_reflect
|
||||
u8 sysctl_tcp_fwmark_accept
|
||||
u8 sysctl_tcp_l3mdev_accept read_mostly __inet6_lookup_established/inet_request_bound_dev_if
|
||||
u8 sysctl_tcp_mtu_probing
|
||||
int sysctl_tcp_mtu_probe_floor
|
||||
int sysctl_tcp_base_mss
|
||||
int sysctl_tcp_min_snd_mss read_mostly __tcp_mtu_to_mss(tcp_write_xmit)
|
||||
int sysctl_tcp_probe_threshold tcp_mtu_probe(tcp_write_xmit)
|
||||
u32 sysctl_tcp_probe_interval tcp_mtu_check_reprobe(tcp_write_xmit)
|
||||
int sysctl_tcp_keepalive_time
|
||||
int sysctl_tcp_keepalive_intvl
|
||||
u8 sysctl_tcp_keepalive_probes
|
||||
u8 sysctl_tcp_syn_retries
|
||||
u8 sysctl_tcp_synack_retries
|
||||
u8 sysctl_tcp_syncookies generated_on_syn
|
||||
u8 sysctl_tcp_migrate_req reuseport
|
||||
u8 sysctl_tcp_comp_sack_nr __tcp_ack_snd_check
|
||||
int sysctl_tcp_reordering read_mostly tcp_may_raise_cwnd/tcp_cong_control
|
||||
u8 sysctl_tcp_retries1
|
||||
u8 sysctl_tcp_retries2
|
||||
u8 sysctl_tcp_orphan_retries
|
||||
u8 sysctl_tcp_tw_reuse timewait_sock_ops
|
||||
int sysctl_tcp_fin_timeout TCP_LAST_ACK/tcp_rcv_state_process
|
||||
unsigned_int sysctl_tcp_notsent_lowat read_mostly tcp_notsent_lowat/tcp_stream_memory_free
|
||||
u8 sysctl_tcp_sack tcp_syn_options
|
||||
u8 sysctl_tcp_window_scaling tcp_syn_options,tcp_parse_options
|
||||
u8 sysctl_tcp_timestamps
|
||||
u8 sysctl_tcp_early_retrans read_mostly tcp_schedule_loss_probe(tcp_write_xmit)
|
||||
u8 sysctl_tcp_recovery tcp_fastretrans_alert
|
||||
u8 sysctl_tcp_thin_linear_timeouts tcp_retrans_timer(on_thin_streams)
|
||||
u8 sysctl_tcp_slow_start_after_idle unlikely(tcp_cwnd_validate-network-not-starved)
|
||||
u8 sysctl_tcp_retrans_collapse
|
||||
u8 sysctl_tcp_stdurg unlikely(tcp_check_urg)
|
||||
u8 sysctl_tcp_rfc1337
|
||||
u8 sysctl_tcp_abort_on_overflow
|
||||
u8 sysctl_tcp_fack
|
||||
int sysctl_tcp_max_reordering tcp_check_sack_reordering
|
||||
int sysctl_tcp_adv_win_scale tcp_init_buffer_space
|
||||
u8 sysctl_tcp_dsack partial_packet_or_retrans_in_tcp_data_queue
|
||||
u8 sysctl_tcp_app_win tcp_win_from_space
|
||||
u8 sysctl_tcp_frto tcp_enter_loss
|
||||
u8 sysctl_tcp_nometrics_save TCP_LAST_ACK/tcp_update_metrics
|
||||
u8 sysctl_tcp_no_ssthresh_metrics_save TCP_LAST_ACK/tcp_(update/init)_metrics
|
||||
u8 sysctl_tcp_moderate_rcvbuf read_mostly read_mostly tcp_tso_should_defer(tx);tcp_rcv_space_adjust(rx)
|
||||
u8 sysctl_tcp_tso_win_divisor read_mostly - tcp_tso_should_defer(tcp_write_xmit)
|
||||
u8 sysctl_tcp_workaround_signed_windows - - tcp_select_window
|
||||
int sysctl_tcp_limit_output_bytes read_mostly - tcp_small_queue_check(tcp_write_xmit)
|
||||
int sysctl_tcp_challenge_ack_limit - -
|
||||
int sysctl_tcp_min_rtt_wlen read_mostly - tcp_ack_update_rtt
|
||||
u8 sysctl_tcp_min_tso_segs - - unlikely(icsk_ca_ops-written)
|
||||
u8 sysctl_tcp_tso_rtt_log read_mostly - tcp_tso_autosize
|
||||
u8 sysctl_tcp_autocorking read_mostly - tcp_push/tcp_should_autocork
|
||||
u8 sysctl_tcp_reflect_tos - - tcp_v(4/6)_send_synack
|
||||
int sysctl_tcp_invalid_ratelimit - -
|
||||
int sysctl_tcp_pacing_ss_ratio - - default_cong_cont(tcp_update_pacing_rate)
|
||||
int sysctl_tcp_pacing_ca_ratio - - default_cong_cont(tcp_update_pacing_rate)
|
||||
int sysctl_tcp_wmem[3] read_mostly - tcp_wmem_schedule(sendmsg/sendpage)
|
||||
int sysctl_tcp_rmem[3] - read_mostly __tcp_grow_window(tx),tcp_rcv_space_adjust(rx)
|
||||
unsigned_int sysctl_tcp_child_ehash_entries
|
||||
unsigned_long sysctl_tcp_comp_sack_delay_ns - - __tcp_ack_snd_check
|
||||
unsigned_long sysctl_tcp_comp_sack_slack_ns - - __tcp_ack_snd_check
|
||||
int sysctl_max_syn_backlog - -
|
||||
int sysctl_tcp_fastopen - -
|
||||
struct_tcp_congestion_ops tcp_congestion_control - - init_cc
|
||||
struct_tcp_fastopen_context tcp_fastopen_ctx - -
|
||||
unsigned_int sysctl_tcp_fastopen_blackhole_timeout - -
|
||||
atomic_t tfo_active_disable_times - -
|
||||
unsigned_long tfo_active_disable_stamp - -
|
||||
u32 tcp_challenge_timestamp - -
|
||||
u32 tcp_challenge_count - -
|
||||
u8 sysctl_tcp_plb_enabled - -
|
||||
u8 sysctl_tcp_plb_idle_rehash_rounds - -
|
||||
u8 sysctl_tcp_plb_rehash_rounds - -
|
||||
u8 sysctl_tcp_plb_suspend_rto_sec - -
|
||||
int sysctl_tcp_plb_cong_thresh - -
|
||||
int sysctl_udp_wmem_min
|
||||
int sysctl_udp_rmem_min
|
||||
u8 sysctl_fib_notify_on_flag_change
|
||||
u8 sysctl_udp_l3mdev_accept
|
||||
u8 sysctl_igmp_llm_reports
|
||||
int sysctl_igmp_max_memberships
|
||||
int sysctl_igmp_max_msf
|
||||
int sysctl_igmp_qrv
|
||||
struct_ping_group_range ping_group_range
|
||||
atomic_t dev_addr_genid
|
||||
unsigned_int sysctl_udp_child_hash_entries
|
||||
unsigned_long* sysctl_local_reserved_ports
|
||||
int sysctl_ip_prot_sock
|
||||
struct_mr_table* mrt
|
||||
struct_list_head mr_tables
|
||||
struct_fib_rules_ops* mr_rules_ops
|
||||
u32 sysctl_fib_multipath_hash_fields
|
||||
u8 sysctl_fib_multipath_use_neigh
|
||||
u8 sysctl_fib_multipath_hash_policy
|
||||
struct_fib_notifier_ops* notifier_ops
|
||||
unsigned_int fib_seq
|
||||
struct_fib_notifier_ops* ipmr_notifier_ops
|
||||
unsigned_int ipmr_seq
|
||||
atomic_t rt_genid
|
||||
siphash_key_t ip_id_key
|
||||
u8 sysctl_tcp_tso_win_divisor read_mostly tcp_tso_should_defer(tcp_write_xmit)
|
||||
u8 sysctl_tcp_workaround_signed_windows tcp_select_window
|
||||
int sysctl_tcp_limit_output_bytes read_mostly tcp_small_queue_check(tcp_write_xmit)
|
||||
int sysctl_tcp_challenge_ack_limit
|
||||
int sysctl_tcp_min_rtt_wlen read_mostly tcp_ack_update_rtt
|
||||
u8 sysctl_tcp_min_tso_segs unlikely(icsk_ca_ops-written)
|
||||
u8 sysctl_tcp_tso_rtt_log read_mostly tcp_tso_autosize
|
||||
u8 sysctl_tcp_autocorking read_mostly tcp_push/tcp_should_autocork
|
||||
u8 sysctl_tcp_reflect_tos tcp_v(4/6)_send_synack
|
||||
int sysctl_tcp_invalid_ratelimit
|
||||
int sysctl_tcp_pacing_ss_ratio default_cong_cont(tcp_update_pacing_rate)
|
||||
int sysctl_tcp_pacing_ca_ratio default_cong_cont(tcp_update_pacing_rate)
|
||||
int sysctl_tcp_wmem[3] read_mostly tcp_wmem_schedule(sendmsg/sendpage)
|
||||
int sysctl_tcp_rmem[3] read_mostly __tcp_grow_window(tx),tcp_rcv_space_adjust(rx)
|
||||
unsigned_int sysctl_tcp_child_ehash_entries
|
||||
unsigned_long sysctl_tcp_comp_sack_delay_ns __tcp_ack_snd_check
|
||||
unsigned_long sysctl_tcp_comp_sack_slack_ns __tcp_ack_snd_check
|
||||
int sysctl_max_syn_backlog
|
||||
int sysctl_tcp_fastopen
|
||||
struct_tcp_congestion_ops tcp_congestion_control init_cc
|
||||
struct_tcp_fastopen_context tcp_fastopen_ctx
|
||||
unsigned_int sysctl_tcp_fastopen_blackhole_timeout
|
||||
atomic_t tfo_active_disable_times
|
||||
unsigned_long tfo_active_disable_stamp
|
||||
u32 tcp_challenge_timestamp
|
||||
u32 tcp_challenge_count
|
||||
u8 sysctl_tcp_plb_enabled
|
||||
u8 sysctl_tcp_plb_idle_rehash_rounds
|
||||
u8 sysctl_tcp_plb_rehash_rounds
|
||||
u8 sysctl_tcp_plb_suspend_rto_sec
|
||||
int sysctl_tcp_plb_cong_thresh
|
||||
int sysctl_udp_wmem_min
|
||||
int sysctl_udp_rmem_min
|
||||
u8 sysctl_fib_notify_on_flag_change
|
||||
u8 sysctl_udp_l3mdev_accept
|
||||
u8 sysctl_igmp_llm_reports
|
||||
int sysctl_igmp_max_memberships
|
||||
int sysctl_igmp_max_msf
|
||||
int sysctl_igmp_qrv
|
||||
struct_ping_group_range ping_group_range
|
||||
atomic_t dev_addr_genid
|
||||
unsigned_int sysctl_udp_child_hash_entries
|
||||
unsigned_long* sysctl_local_reserved_ports
|
||||
int sysctl_ip_prot_sock
|
||||
struct_mr_table* mrt
|
||||
struct_list_head mr_tables
|
||||
struct_fib_rules_ops* mr_rules_ops
|
||||
u32 sysctl_fib_multipath_hash_fields
|
||||
u8 sysctl_fib_multipath_use_neigh
|
||||
u8 sysctl_fib_multipath_hash_policy
|
||||
struct_fib_notifier_ops* notifier_ops
|
||||
unsigned_int fib_seq
|
||||
struct_fib_notifier_ops* ipmr_notifier_ops
|
||||
unsigned_int ipmr_seq
|
||||
atomic_t rt_genid
|
||||
siphash_key_t ip_id_key
|
||||
=============================== ============================================ =================== =================== =================================================
|
||||
|
@ -5,131 +5,133 @@
|
||||
netns_ipv4 enum fast path usage breakdown
|
||||
===========================================
|
||||
|
||||
============== ===================================== =================== =================== ==================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access comment
|
||||
..enum
|
||||
unsigned_long LINUX_MIB_TCPKEEPALIVE write_mostly - tcp_keepalive_timer
|
||||
unsigned_long LINUX_MIB_DELAYEDACKS write_mostly - tcp_delack_timer_handler,tcp_delack_timer
|
||||
unsigned_long LINUX_MIB_DELAYEDACKLOCKED write_mostly - tcp_delack_timer_handler,tcp_delack_timer
|
||||
unsigned_long LINUX_MIB_TCPAUTOCORKING write_mostly - tcp_push,tcp_sendmsg_locked
|
||||
unsigned_long LINUX_MIB_TCPFROMZEROWINDOWADV write_mostly - tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPTOZEROWINDOWADV write_mostly - tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPWANTZEROWINDOWADV write_mostly - tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPORIGDATASENT write_mostly - tcp_write_xmit
|
||||
unsigned_long LINUX_MIB_TCPHPHITS - write_mostly tcp_rcv_established,tcp_v4_do_rcv,tcp_v6_do_rcv
|
||||
unsigned_long LINUX_MIB_TCPRCVCOALESCE - write_mostly tcp_try_coalesce,tcp_queue_rcv,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPPUREACKS - write_mostly tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPHPACKS - write_mostly tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPDELIVERED - write_mostly tcp_newly_delivered,tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESSENT
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESRECV
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESFAILED
|
||||
unsigned_long LINUX_MIB_EMBRYONICRSTS
|
||||
unsigned_long LINUX_MIB_PRUNECALLED
|
||||
unsigned_long LINUX_MIB_RCVPRUNED
|
||||
unsigned_long LINUX_MIB_OFOPRUNED
|
||||
unsigned_long LINUX_MIB_OUTOFWINDOWICMPS
|
||||
unsigned_long LINUX_MIB_LOCKDROPPEDICMPS
|
||||
unsigned_long LINUX_MIB_ARPFILTER
|
||||
unsigned_long LINUX_MIB_TIMEWAITED
|
||||
unsigned_long LINUX_MIB_TIMEWAITRECYCLED
|
||||
unsigned_long LINUX_MIB_TIMEWAITKILLED
|
||||
unsigned_long LINUX_MIB_PAWSACTIVEREJECTED
|
||||
unsigned_long LINUX_MIB_PAWSESTABREJECTED
|
||||
unsigned_long LINUX_MIB_DELAYEDACKLOST
|
||||
unsigned_long LINUX_MIB_LISTENOVERFLOWS
|
||||
unsigned_long LINUX_MIB_LISTENDROPS
|
||||
unsigned_long LINUX_MIB_TCPRENORECOVERY
|
||||
unsigned_long LINUX_MIB_TCPSACKRECOVERY
|
||||
unsigned_long LINUX_MIB_TCPSACKRENEGING
|
||||
unsigned_long LINUX_MIB_TCPSACKREORDER
|
||||
unsigned_long LINUX_MIB_TCPRENOREORDER
|
||||
unsigned_long LINUX_MIB_TCPTSREORDER
|
||||
unsigned_long LINUX_MIB_TCPFULLUNDO
|
||||
unsigned_long LINUX_MIB_TCPPARTIALUNDO
|
||||
unsigned_long LINUX_MIB_TCPDSACKUNDO
|
||||
unsigned_long LINUX_MIB_TCPLOSSUNDO
|
||||
unsigned_long LINUX_MIB_TCPLOSTRETRANSMIT
|
||||
unsigned_long LINUX_MIB_TCPRENOFAILURES
|
||||
unsigned_long LINUX_MIB_TCPSACKFAILURES
|
||||
unsigned_long LINUX_MIB_TCPLOSSFAILURES
|
||||
unsigned_long LINUX_MIB_TCPFASTRETRANS
|
||||
unsigned_long LINUX_MIB_TCPSLOWSTARTRETRANS
|
||||
unsigned_long LINUX_MIB_TCPTIMEOUTS
|
||||
unsigned_long LINUX_MIB_TCPLOSSPROBES
|
||||
unsigned_long LINUX_MIB_TCPLOSSPROBERECOVERY
|
||||
unsigned_long LINUX_MIB_TCPRENORECOVERYFAIL
|
||||
unsigned_long LINUX_MIB_TCPSACKRECOVERYFAIL
|
||||
unsigned_long LINUX_MIB_TCPRCVCOLLAPSED
|
||||
unsigned_long LINUX_MIB_TCPDSACKOLDSENT
|
||||
unsigned_long LINUX_MIB_TCPDSACKOFOSENT
|
||||
unsigned_long LINUX_MIB_TCPDSACKRECV
|
||||
unsigned_long LINUX_MIB_TCPDSACKOFORECV
|
||||
unsigned_long LINUX_MIB_TCPABORTONDATA
|
||||
unsigned_long LINUX_MIB_TCPABORTONCLOSE
|
||||
unsigned_long LINUX_MIB_TCPABORTONMEMORY
|
||||
unsigned_long LINUX_MIB_TCPABORTONTIMEOUT
|
||||
unsigned_long LINUX_MIB_TCPABORTONLINGER
|
||||
unsigned_long LINUX_MIB_TCPABORTFAILED
|
||||
unsigned_long LINUX_MIB_TCPMEMORYPRESSURES
|
||||
unsigned_long LINUX_MIB_TCPMEMORYPRESSURESCHRONO
|
||||
unsigned_long LINUX_MIB_TCPSACKDISCARD
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDOLD
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDNOUNDO
|
||||
unsigned_long LINUX_MIB_TCPSPURIOUSRTOS
|
||||
unsigned_long LINUX_MIB_TCPMD5NOTFOUND
|
||||
unsigned_long LINUX_MIB_TCPMD5UNEXPECTED
|
||||
unsigned_long LINUX_MIB_TCPMD5FAILURE
|
||||
unsigned_long LINUX_MIB_SACKSHIFTED
|
||||
unsigned_long LINUX_MIB_SACKMERGED
|
||||
unsigned_long LINUX_MIB_SACKSHIFTFALLBACK
|
||||
unsigned_long LINUX_MIB_TCPBACKLOGDROP
|
||||
unsigned_long LINUX_MIB_PFMEMALLOCDROP
|
||||
unsigned_long LINUX_MIB_TCPMINTTLDROP
|
||||
unsigned_long LINUX_MIB_TCPDEFERACCEPTDROP
|
||||
unsigned_long LINUX_MIB_IPRPFILTER
|
||||
unsigned_long LINUX_MIB_TCPTIMEWAITOVERFLOW
|
||||
unsigned_long LINUX_MIB_TCPREQQFULLDOCOOKIES
|
||||
unsigned_long LINUX_MIB_TCPREQQFULLDROP
|
||||
unsigned_long LINUX_MIB_TCPRETRANSFAIL
|
||||
unsigned_long LINUX_MIB_TCPBACKLOGCOALESCE
|
||||
unsigned_long LINUX_MIB_TCPOFOQUEUE
|
||||
unsigned_long LINUX_MIB_TCPOFODROP
|
||||
unsigned_long LINUX_MIB_TCPOFOMERGE
|
||||
unsigned_long LINUX_MIB_TCPCHALLENGEACK
|
||||
unsigned_long LINUX_MIB_TCPSYNCHALLENGE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENACTIVE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENACTIVEFAIL
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVEFAIL
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENLISTENOVERFLOW
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENCOOKIEREQD
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENBLACKHOLE
|
||||
unsigned_long LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES
|
||||
unsigned_long LINUX_MIB_BUSYPOLLRXPACKETS
|
||||
unsigned_long LINUX_MIB_TCPSYNRETRANS
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTTRAINDETECT
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTTRAINCWND
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTDELAYDETECT
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTDELAYCWND
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDSYNRECV
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDPAWS
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDSEQ
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDFINWAIT2
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDTIMEWAIT
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDCHALLENGE
|
||||
unsigned_long LINUX_MIB_TCPWINPROBE
|
||||
unsigned_long LINUX_MIB_TCPMTUPFAIL
|
||||
unsigned_long LINUX_MIB_TCPMTUPSUCCESS
|
||||
unsigned_long LINUX_MIB_TCPDELIVEREDCE
|
||||
unsigned_long LINUX_MIB_TCPACKCOMPRESSED
|
||||
unsigned_long LINUX_MIB_TCPZEROWINDOWDROP
|
||||
unsigned_long LINUX_MIB_TCPRCVQDROP
|
||||
unsigned_long LINUX_MIB_TCPWQUEUETOOBIG
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVEALTKEY
|
||||
unsigned_long LINUX_MIB_TCPTIMEOUTREHASH
|
||||
unsigned_long LINUX_MIB_TCPDUPLICATEDATAREHASH
|
||||
unsigned_long LINUX_MIB_TCPDSACKRECVSEGS
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDDUBIOUS
|
||||
unsigned_long LINUX_MIB_TCPMIGRATEREQSUCCESS
|
||||
unsigned_long LINUX_MIB_TCPMIGRATEREQFAILURE
|
||||
unsigned_long __LINUX_MIB_MAX
|
||||
============== ===================================== =================== =================== ==================================================
|
||||
unsigned_long LINUX_MIB_TCPKEEPALIVE write_mostly tcp_keepalive_timer
|
||||
unsigned_long LINUX_MIB_DELAYEDACKS write_mostly tcp_delack_timer_handler,tcp_delack_timer
|
||||
unsigned_long LINUX_MIB_DELAYEDACKLOCKED write_mostly tcp_delack_timer_handler,tcp_delack_timer
|
||||
unsigned_long LINUX_MIB_TCPAUTOCORKING write_mostly tcp_push,tcp_sendmsg_locked
|
||||
unsigned_long LINUX_MIB_TCPFROMZEROWINDOWADV write_mostly tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPTOZEROWINDOWADV write_mostly tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPWANTZEROWINDOWADV write_mostly tcp_select_window,tcp_transmit-skb
|
||||
unsigned_long LINUX_MIB_TCPORIGDATASENT write_mostly tcp_write_xmit
|
||||
unsigned_long LINUX_MIB_TCPHPHITS write_mostly tcp_rcv_established,tcp_v4_do_rcv,tcp_v6_do_rcv
|
||||
unsigned_long LINUX_MIB_TCPRCVCOALESCE write_mostly tcp_try_coalesce,tcp_queue_rcv,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPPUREACKS write_mostly tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPHPACKS write_mostly tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_TCPDELIVERED write_mostly tcp_newly_delivered,tcp_ack,tcp_rcv_established
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESSENT
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESRECV
|
||||
unsigned_long LINUX_MIB_SYNCOOKIESFAILED
|
||||
unsigned_long LINUX_MIB_EMBRYONICRSTS
|
||||
unsigned_long LINUX_MIB_PRUNECALLED
|
||||
unsigned_long LINUX_MIB_RCVPRUNED
|
||||
unsigned_long LINUX_MIB_OFOPRUNED
|
||||
unsigned_long LINUX_MIB_OUTOFWINDOWICMPS
|
||||
unsigned_long LINUX_MIB_LOCKDROPPEDICMPS
|
||||
unsigned_long LINUX_MIB_ARPFILTER
|
||||
unsigned_long LINUX_MIB_TIMEWAITED
|
||||
unsigned_long LINUX_MIB_TIMEWAITRECYCLED
|
||||
unsigned_long LINUX_MIB_TIMEWAITKILLED
|
||||
unsigned_long LINUX_MIB_PAWSACTIVEREJECTED
|
||||
unsigned_long LINUX_MIB_PAWSESTABREJECTED
|
||||
unsigned_long LINUX_MIB_DELAYEDACKLOST
|
||||
unsigned_long LINUX_MIB_LISTENOVERFLOWS
|
||||
unsigned_long LINUX_MIB_LISTENDROPS
|
||||
unsigned_long LINUX_MIB_TCPRENORECOVERY
|
||||
unsigned_long LINUX_MIB_TCPSACKRECOVERY
|
||||
unsigned_long LINUX_MIB_TCPSACKRENEGING
|
||||
unsigned_long LINUX_MIB_TCPSACKREORDER
|
||||
unsigned_long LINUX_MIB_TCPRENOREORDER
|
||||
unsigned_long LINUX_MIB_TCPTSREORDER
|
||||
unsigned_long LINUX_MIB_TCPFULLUNDO
|
||||
unsigned_long LINUX_MIB_TCPPARTIALUNDO
|
||||
unsigned_long LINUX_MIB_TCPDSACKUNDO
|
||||
unsigned_long LINUX_MIB_TCPLOSSUNDO
|
||||
unsigned_long LINUX_MIB_TCPLOSTRETRANSMIT
|
||||
unsigned_long LINUX_MIB_TCPRENOFAILURES
|
||||
unsigned_long LINUX_MIB_TCPSACKFAILURES
|
||||
unsigned_long LINUX_MIB_TCPLOSSFAILURES
|
||||
unsigned_long LINUX_MIB_TCPFASTRETRANS
|
||||
unsigned_long LINUX_MIB_TCPSLOWSTARTRETRANS
|
||||
unsigned_long LINUX_MIB_TCPTIMEOUTS
|
||||
unsigned_long LINUX_MIB_TCPLOSSPROBES
|
||||
unsigned_long LINUX_MIB_TCPLOSSPROBERECOVERY
|
||||
unsigned_long LINUX_MIB_TCPRENORECOVERYFAIL
|
||||
unsigned_long LINUX_MIB_TCPSACKRECOVERYFAIL
|
||||
unsigned_long LINUX_MIB_TCPRCVCOLLAPSED
|
||||
unsigned_long LINUX_MIB_TCPDSACKOLDSENT
|
||||
unsigned_long LINUX_MIB_TCPDSACKOFOSENT
|
||||
unsigned_long LINUX_MIB_TCPDSACKRECV
|
||||
unsigned_long LINUX_MIB_TCPDSACKOFORECV
|
||||
unsigned_long LINUX_MIB_TCPABORTONDATA
|
||||
unsigned_long LINUX_MIB_TCPABORTONCLOSE
|
||||
unsigned_long LINUX_MIB_TCPABORTONMEMORY
|
||||
unsigned_long LINUX_MIB_TCPABORTONTIMEOUT
|
||||
unsigned_long LINUX_MIB_TCPABORTONLINGER
|
||||
unsigned_long LINUX_MIB_TCPABORTFAILED
|
||||
unsigned_long LINUX_MIB_TCPMEMORYPRESSURES
|
||||
unsigned_long LINUX_MIB_TCPMEMORYPRESSURESCHRONO
|
||||
unsigned_long LINUX_MIB_TCPSACKDISCARD
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDOLD
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDNOUNDO
|
||||
unsigned_long LINUX_MIB_TCPSPURIOUSRTOS
|
||||
unsigned_long LINUX_MIB_TCPMD5NOTFOUND
|
||||
unsigned_long LINUX_MIB_TCPMD5UNEXPECTED
|
||||
unsigned_long LINUX_MIB_TCPMD5FAILURE
|
||||
unsigned_long LINUX_MIB_SACKSHIFTED
|
||||
unsigned_long LINUX_MIB_SACKMERGED
|
||||
unsigned_long LINUX_MIB_SACKSHIFTFALLBACK
|
||||
unsigned_long LINUX_MIB_TCPBACKLOGDROP
|
||||
unsigned_long LINUX_MIB_PFMEMALLOCDROP
|
||||
unsigned_long LINUX_MIB_TCPMINTTLDROP
|
||||
unsigned_long LINUX_MIB_TCPDEFERACCEPTDROP
|
||||
unsigned_long LINUX_MIB_IPRPFILTER
|
||||
unsigned_long LINUX_MIB_TCPTIMEWAITOVERFLOW
|
||||
unsigned_long LINUX_MIB_TCPREQQFULLDOCOOKIES
|
||||
unsigned_long LINUX_MIB_TCPREQQFULLDROP
|
||||
unsigned_long LINUX_MIB_TCPRETRANSFAIL
|
||||
unsigned_long LINUX_MIB_TCPBACKLOGCOALESCE
|
||||
unsigned_long LINUX_MIB_TCPOFOQUEUE
|
||||
unsigned_long LINUX_MIB_TCPOFODROP
|
||||
unsigned_long LINUX_MIB_TCPOFOMERGE
|
||||
unsigned_long LINUX_MIB_TCPCHALLENGEACK
|
||||
unsigned_long LINUX_MIB_TCPSYNCHALLENGE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENACTIVE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENACTIVEFAIL
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVE
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVEFAIL
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENLISTENOVERFLOW
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENCOOKIEREQD
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENBLACKHOLE
|
||||
unsigned_long LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES
|
||||
unsigned_long LINUX_MIB_BUSYPOLLRXPACKETS
|
||||
unsigned_long LINUX_MIB_TCPSYNRETRANS
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTTRAINDETECT
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTTRAINCWND
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTDELAYDETECT
|
||||
unsigned_long LINUX_MIB_TCPHYSTARTDELAYCWND
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDSYNRECV
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDPAWS
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDSEQ
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDFINWAIT2
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDTIMEWAIT
|
||||
unsigned_long LINUX_MIB_TCPACKSKIPPEDCHALLENGE
|
||||
unsigned_long LINUX_MIB_TCPWINPROBE
|
||||
unsigned_long LINUX_MIB_TCPMTUPFAIL
|
||||
unsigned_long LINUX_MIB_TCPMTUPSUCCESS
|
||||
unsigned_long LINUX_MIB_TCPDELIVEREDCE
|
||||
unsigned_long LINUX_MIB_TCPACKCOMPRESSED
|
||||
unsigned_long LINUX_MIB_TCPZEROWINDOWDROP
|
||||
unsigned_long LINUX_MIB_TCPRCVQDROP
|
||||
unsigned_long LINUX_MIB_TCPWQUEUETOOBIG
|
||||
unsigned_long LINUX_MIB_TCPFASTOPENPASSIVEALTKEY
|
||||
unsigned_long LINUX_MIB_TCPTIMEOUTREHASH
|
||||
unsigned_long LINUX_MIB_TCPDUPLICATEDATAREHASH
|
||||
unsigned_long LINUX_MIB_TCPDSACKRECVSEGS
|
||||
unsigned_long LINUX_MIB_TCPDSACKIGNOREDDUBIOUS
|
||||
unsigned_long LINUX_MIB_TCPMIGRATEREQSUCCESS
|
||||
unsigned_long LINUX_MIB_TCPMIGRATEREQFAILURE
|
||||
unsigned_long __LINUX_MIB_MAX
|
||||
============== ===================================== =================== =================== ==================================================
|
||||
|
@ -5,153 +5,155 @@
|
||||
tcp_sock struct fast path usage breakdown
|
||||
=========================================
|
||||
|
||||
============================= ======================= =================== =================== ==================================================================================================================================================================================================================
|
||||
Type Name fastpath_tx_access fastpath_rx_access Comments
|
||||
..struct ..tcp_sock
|
||||
struct_inet_connection_sock inet_conn
|
||||
============================= ======================= =================== =================== ==================================================================================================================================================================================================================
|
||||
struct inet_connection_sock inet_conn
|
||||
u16 tcp_header_len read_mostly read_mostly tcp_bound_to_half_wnd,tcp_current_mss(tx);tcp_rcv_established(rx)
|
||||
u16 gso_segs read_mostly - tcp_xmit_size_goal
|
||||
u16 gso_segs read_mostly tcp_xmit_size_goal
|
||||
__be32 pred_flags read_write read_mostly tcp_select_window(tx);tcp_rcv_established(rx)
|
||||
u64 bytes_received - read_write tcp_rcv_nxt_update(rx)
|
||||
u32 segs_in - read_write tcp_v6_rcv(rx)
|
||||
u32 data_segs_in - read_write tcp_v6_rcv(rx)
|
||||
u64 bytes_received read_write tcp_rcv_nxt_update(rx)
|
||||
u32 segs_in read_write tcp_v6_rcv(rx)
|
||||
u32 data_segs_in read_write tcp_v6_rcv(rx)
|
||||
u32 rcv_nxt read_mostly read_write tcp_cleanup_rbuf,tcp_send_ack,tcp_inq_hint,tcp_transmit_skb,tcp_receive_window(tx);tcp_v6_do_rcv,tcp_rcv_established,tcp_data_queue,tcp_receive_window,tcp_rcv_nxt_update(write)(rx)
|
||||
u32 copied_seq - read_mostly tcp_cleanup_rbuf,tcp_rcv_space_adjust,tcp_inq_hint
|
||||
u32 rcv_wup - read_write __tcp_cleanup_rbuf,tcp_receive_window,tcp_receive_established
|
||||
u32 copied_seq read_mostly tcp_cleanup_rbuf,tcp_rcv_space_adjust,tcp_inq_hint
|
||||
u32 rcv_wup read_write __tcp_cleanup_rbuf,tcp_receive_window,tcp_receive_established
|
||||
u32 snd_nxt read_write read_mostly tcp_rate_check_app_limited,__tcp_transmit_skb,tcp_event_new_data_sent(write)(tx);tcp_rcv_established,tcp_ack,tcp_clean_rtx_queue(rx)
|
||||
u32 segs_out read_write - __tcp_transmit_skb
|
||||
u32 data_segs_out read_write - __tcp_transmit_skb,tcp_update_skb_after_send
|
||||
u64 bytes_sent read_write - __tcp_transmit_skb
|
||||
u64 bytes_acked - read_write tcp_snd_una_update/tcp_ack
|
||||
u32 dsack_dups
|
||||
u32 segs_out read_write __tcp_transmit_skb
|
||||
u32 data_segs_out read_write __tcp_transmit_skb,tcp_update_skb_after_send
|
||||
u64 bytes_sent read_write __tcp_transmit_skb
|
||||
u64 bytes_acked read_write tcp_snd_una_update/tcp_ack
|
||||
u32 dsack_dups
|
||||
u32 snd_una read_mostly read_write tcp_wnd_end,tcp_urg_mode,tcp_minshall_check,tcp_cwnd_validate(tx);tcp_ack,tcp_may_update_window,tcp_clean_rtx_queue(write),tcp_ack_tstamp(rx)
|
||||
u32 snd_sml read_write - tcp_minshall_check,tcp_minshall_update
|
||||
u32 rcv_tstamp - read_mostly tcp_ack
|
||||
u32 lsndtime read_write - tcp_slow_start_after_idle_check,tcp_event_data_sent
|
||||
u32 last_oow_ack_time
|
||||
u32 compressed_ack_rcv_nxt
|
||||
u32 snd_sml read_write tcp_minshall_check,tcp_minshall_update
|
||||
u32 rcv_tstamp read_mostly tcp_ack
|
||||
u32 lsndtime read_write tcp_slow_start_after_idle_check,tcp_event_data_sent
|
||||
u32 last_oow_ack_time
|
||||
u32 compressed_ack_rcv_nxt
|
||||
u32 tsoffset read_mostly read_mostly tcp_established_options(tx);tcp_fast_parse_options(rx)
|
||||
struct_list_head tsq_node - -
|
||||
struct_list_head tsorted_sent_queue read_write - tcp_update_skb_after_send
|
||||
u32 snd_wl1 - read_mostly tcp_may_update_window
|
||||
struct list_head tsq_node
|
||||
struct list_head tsorted_sent_queue read_write tcp_update_skb_after_send
|
||||
u32 snd_wl1 read_mostly tcp_may_update_window
|
||||
u32 snd_wnd read_mostly read_mostly tcp_wnd_end,tcp_tso_should_defer(tx);tcp_fast_path_on(rx)
|
||||
u32 max_window read_mostly - tcp_bound_to_half_wnd,forced_push
|
||||
u32 max_window read_mostly tcp_bound_to_half_wnd,forced_push
|
||||
u32 mss_cache read_mostly read_mostly tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)
|
||||
u32 window_clamp read_mostly read_write tcp_rcv_space_adjust,__tcp_select_window
|
||||
u32 rcv_ssthresh read_mostly - __tcp_select_window
|
||||
u32 rcv_ssthresh read_mostly __tcp_select_window
|
||||
u8 scaling_ratio read_mostly read_mostly tcp_win_from_space
|
||||
struct tcp_rack
|
||||
u16 advmss - read_mostly tcp_rcv_space_adjust
|
||||
u8 compressed_ack
|
||||
u8:2 dup_ack_counter
|
||||
u8:1 tlp_retrans
|
||||
struct tcp_rack
|
||||
u16 advmss read_mostly tcp_rcv_space_adjust
|
||||
u8 compressed_ack
|
||||
u8:2 dup_ack_counter
|
||||
u8:1 tlp_retrans
|
||||
u8:1 tcp_usec_ts read_mostly read_mostly
|
||||
u32 chrono_start read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u32[3] chrono_stat read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u8:2 chrono_type read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u8:1 rate_app_limited - read_write tcp_rate_gen
|
||||
u8:1 fastopen_connect
|
||||
u8:1 fastopen_no_cookie
|
||||
u8:1 is_sack_reneg - read_mostly tcp_skb_entail,tcp_ack
|
||||
u8:2 fastopen_client_fail
|
||||
u8:4 nonagle read_write - tcp_skb_entail,tcp_push_pending_frames
|
||||
u8:1 thin_lto
|
||||
u8:1 recvmsg_inq
|
||||
u8:1 repair read_mostly - tcp_write_xmit
|
||||
u8:1 frto
|
||||
u8 repair_queue - -
|
||||
u8:2 save_syn
|
||||
u8:1 syn_data
|
||||
u8:1 syn_fastopen
|
||||
u8:1 syn_fastopen_exp
|
||||
u8:1 syn_fastopen_ch
|
||||
u8:1 syn_data_acked
|
||||
u8:1 is_cwnd_limited read_mostly - tcp_cwnd_validate,tcp_is_cwnd_limited
|
||||
u32 tlp_high_seq - read_mostly tcp_ack
|
||||
u32 tcp_tx_delay
|
||||
u64 tcp_wstamp_ns read_write - tcp_pacing_check,tcp_tso_should_defer,tcp_update_skb_after_send
|
||||
u32 chrono_start read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u32[3] chrono_stat read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u8:2 chrono_type read_write tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
|
||||
u8:1 rate_app_limited read_write tcp_rate_gen
|
||||
u8:1 fastopen_connect
|
||||
u8:1 fastopen_no_cookie
|
||||
u8:1 is_sack_reneg read_mostly tcp_skb_entail,tcp_ack
|
||||
u8:2 fastopen_client_fail
|
||||
u8:4 nonagle read_write tcp_skb_entail,tcp_push_pending_frames
|
||||
u8:1 thin_lto
|
||||
u8:1 recvmsg_inq
|
||||
u8:1 repair read_mostly tcp_write_xmit
|
||||
u8:1 frto
|
||||
u8 repair_queue
|
||||
u8:2 save_syn
|
||||
u8:1 syn_data
|
||||
u8:1 syn_fastopen
|
||||
u8:1 syn_fastopen_exp
|
||||
u8:1 syn_fastopen_ch
|
||||
u8:1 syn_data_acked
|
||||
u8:1 is_cwnd_limited read_mostly tcp_cwnd_validate,tcp_is_cwnd_limited
|
||||
u32 tlp_high_seq read_mostly tcp_ack
|
||||
u32 tcp_tx_delay
|
||||
u64 tcp_wstamp_ns read_write tcp_pacing_check,tcp_tso_should_defer,tcp_update_skb_after_send
|
||||
u64 tcp_clock_cache read_write read_write tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust),__tcp_transmit_skb,tcp_tso_should_defer;timer
|
||||
u64 tcp_mstamp read_write read_write tcp_mstamp_refresh(tcp_write_xmit/tcp_rcv_space_adjust)(tx);tcp_rcv_space_adjust,tcp_rate_gen,tcp_clean_rtx_queue,tcp_ack_update_rtt/tcp_time_stamp(rx);timer
|
||||
u32 srtt_us read_mostly read_write tcp_tso_should_defer(tx);tcp_update_pacing_rate,__tcp_set_rto,tcp_rtt_estimator(rx)
|
||||
u32 mdev_us read_write - tcp_rtt_estimator
|
||||
u32 mdev_max_us
|
||||
u32 rttvar_us - read_mostly __tcp_set_rto
|
||||
u32 mdev_us read_write tcp_rtt_estimator
|
||||
u32 mdev_max_us
|
||||
u32 rttvar_us read_mostly __tcp_set_rto
|
||||
u32 rtt_seq read_write tcp_rtt_estimator
|
||||
struct_minmax rtt_min - read_mostly tcp_min_rtt/tcp_rate_gen,tcp_min_rtttcp_update_rtt_min
|
||||
struct minmax rtt_min read_mostly tcp_min_rtt/tcp_rate_gen,tcp_min_rtttcp_update_rtt_min
|
||||
u32 packets_out read_write read_write tcp_packets_in_flight(tx/rx);tcp_slow_start_after_idle_check,tcp_nagle_check,tcp_rate_skb_sent,tcp_event_new_data_sent,tcp_cwnd_validate,tcp_write_xmit(tx);tcp_ack,tcp_clean_rtx_queue,tcp_update_pacing_rate(rx)
|
||||
u32 retrans_out - read_mostly tcp_packets_in_flight,tcp_rate_check_app_limited
|
||||
u32 max_packets_out - read_write tcp_cwnd_validate
|
||||
u32 cwnd_usage_seq - read_write tcp_cwnd_validate
|
||||
u16 urg_data - read_mostly tcp_fast_path_check
|
||||
u8 ecn_flags read_write - tcp_ecn_send
|
||||
u8 keepalive_probes
|
||||
u32 reordering read_mostly - tcp_sndbuf_expand
|
||||
u32 reord_seen
|
||||
u32 retrans_out read_mostly tcp_packets_in_flight,tcp_rate_check_app_limited
|
||||
u32 max_packets_out read_write tcp_cwnd_validate
|
||||
u32 cwnd_usage_seq read_write tcp_cwnd_validate
|
||||
u16 urg_data read_mostly tcp_fast_path_check
|
||||
u8 ecn_flags read_write tcp_ecn_send
|
||||
u8 keepalive_probes
|
||||
u32 reordering read_mostly tcp_sndbuf_expand
|
||||
u32 reord_seen
|
||||
u32 snd_up read_write read_mostly tcp_mark_urg,tcp_urg_mode,__tcp_transmit_skb(tx);tcp_clean_rtx_queue(rx)
|
||||
struct_tcp_options_received rx_opt read_mostly read_write tcp_established_options(tx);tcp_fast_path_on,tcp_ack_update_window,tcp_is_sack,tcp_data_queue,tcp_rcv_established,tcp_ack_update_rtt(rx)
|
||||
u32 snd_ssthresh - read_mostly tcp_update_pacing_rate
|
||||
struct tcp_options_received rx_opt read_mostly read_write tcp_established_options(tx);tcp_fast_path_on,tcp_ack_update_window,tcp_is_sack,tcp_data_queue,tcp_rcv_established,tcp_ack_update_rtt(rx)
|
||||
u32 snd_ssthresh read_mostly tcp_update_pacing_rate
|
||||
u32 snd_cwnd read_mostly read_mostly tcp_snd_cwnd,tcp_rate_check_app_limited,tcp_tso_should_defer(tx);tcp_update_pacing_rate
|
||||
u32 snd_cwnd_cnt
|
||||
u32 snd_cwnd_clamp
|
||||
u32 snd_cwnd_used
|
||||
u32 snd_cwnd_stamp
|
||||
u32 prior_cwnd
|
||||
u32 prr_delivered
|
||||
u32 snd_cwnd_cnt
|
||||
u32 snd_cwnd_clamp
|
||||
u32 snd_cwnd_used
|
||||
u32 snd_cwnd_stamp
|
||||
u32 prior_cwnd
|
||||
u32 prr_delivered
|
||||
u32 prr_out read_mostly read_mostly tcp_rate_skb_sent,tcp_newly_delivered(tx);tcp_ack,tcp_rate_gen,tcp_clean_rtx_queue(rx)
|
||||
u32 delivered read_mostly read_write tcp_rate_skb_sent, tcp_newly_delivered(tx);tcp_ack, tcp_rate_gen, tcp_clean_rtx_queue (rx)
|
||||
u32 delivered_ce read_mostly read_write tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
|
||||
u32 lost - read_mostly tcp_ack
|
||||
u32 lost read_mostly tcp_ack
|
||||
u32 app_limited read_write read_mostly tcp_rate_check_app_limited,tcp_rate_skb_sent(tx);tcp_rate_gen(rx)
|
||||
u64 first_tx_mstamp read_write - tcp_rate_skb_sent
|
||||
u64 delivered_mstamp read_write - tcp_rate_skb_sent
|
||||
u32 rate_delivered - read_mostly tcp_rate_gen
|
||||
u32 rate_interval_us - read_mostly rate_delivered,rate_app_limited
|
||||
u64 first_tx_mstamp read_write tcp_rate_skb_sent
|
||||
u64 delivered_mstamp read_write tcp_rate_skb_sent
|
||||
u32 rate_delivered read_mostly tcp_rate_gen
|
||||
u32 rate_interval_us read_mostly rate_delivered,rate_app_limited
|
||||
u32 rcv_wnd read_write read_mostly tcp_select_window,tcp_receive_window,tcp_fast_path_check
|
||||
u32 write_seq read_write - tcp_rate_check_app_limited,tcp_write_queue_empty,tcp_skb_entail,forced_push,tcp_mark_push
|
||||
u32 notsent_lowat read_mostly - tcp_stream_memory_free
|
||||
u32 pushed_seq read_write - tcp_mark_push,forced_push
|
||||
u32 write_seq read_write tcp_rate_check_app_limited,tcp_write_queue_empty,tcp_skb_entail,forced_push,tcp_mark_push
|
||||
u32 notsent_lowat read_mostly tcp_stream_memory_free
|
||||
u32 pushed_seq read_write tcp_mark_push,forced_push
|
||||
u32 lost_out read_mostly read_mostly tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_rate_check_app_limited(rx)
|
||||
u32 sacked_out read_mostly read_mostly tcp_left_out(tx);tcp_packets_in_flight(tx/rx);tcp_clean_rtx_queue(rx)
|
||||
struct_hrtimer pacing_timer
|
||||
struct_hrtimer compressed_ack_timer
|
||||
struct_sk_buff* lost_skb_hint read_mostly tcp_clean_rtx_queue
|
||||
struct_sk_buff* retransmit_skb_hint read_mostly - tcp_clean_rtx_queue
|
||||
struct_rb_root out_of_order_queue - read_mostly tcp_data_queue,tcp_fast_path_check
|
||||
struct_sk_buff* ooo_last_skb
|
||||
struct_tcp_sack_block[1] duplicate_sack
|
||||
struct_tcp_sack_block[4] selective_acks
|
||||
struct_tcp_sack_block[4] recv_sack_cache
|
||||
struct_sk_buff* highest_sack read_write - tcp_event_new_data_sent
|
||||
int lost_cnt_hint
|
||||
u32 prior_ssthresh
|
||||
u32 high_seq
|
||||
u32 retrans_stamp
|
||||
u32 undo_marker
|
||||
int undo_retrans
|
||||
u64 bytes_retrans
|
||||
u32 total_retrans
|
||||
u32 rto_stamp
|
||||
u16 total_rto
|
||||
u16 total_rto_recoveries
|
||||
u32 total_rto_time
|
||||
u32 urg_seq - -
|
||||
unsigned_int keepalive_time
|
||||
unsigned_int keepalive_intvl
|
||||
int linger2
|
||||
u8 bpf_sock_ops_cb_flags
|
||||
u8:1 bpf_chg_cc_inprogress
|
||||
u16 timeout_rehash
|
||||
u32 rcv_ooopack
|
||||
u32 rcv_rtt_last_tsecr
|
||||
struct rcv_rtt_est - read_write tcp_rcv_space_adjust,tcp_rcv_established
|
||||
struct rcvq_space - read_write tcp_rcv_space_adjust
|
||||
struct mtu_probe
|
||||
u32 plb_rehash
|
||||
u32 mtu_info
|
||||
bool is_mptcp
|
||||
bool smc_hs_congested
|
||||
bool syn_smc
|
||||
struct_tcp_sock_af_ops* af_specific
|
||||
struct_tcp_md5sig_info* md5sig_info
|
||||
struct_tcp_fastopen_request* fastopen_req
|
||||
struct_request_sock* fastopen_rsk
|
||||
struct_saved_syn* saved_syn
|
||||
struct hrtimer pacing_timer
|
||||
struct hrtimer compressed_ack_timer
|
||||
struct sk_buff* lost_skb_hint read_mostly tcp_clean_rtx_queue
|
||||
struct sk_buff* retransmit_skb_hint read_mostly tcp_clean_rtx_queue
|
||||
struct rb_root out_of_order_queue read_mostly tcp_data_queue,tcp_fast_path_check
|
||||
struct sk_buff* ooo_last_skb
|
||||
struct tcp_sack_block[1] duplicate_sack
|
||||
struct tcp_sack_block[4] selective_acks
|
||||
struct tcp_sack_block[4] recv_sack_cache
|
||||
struct sk_buff* highest_sack read_write tcp_event_new_data_sent
|
||||
int lost_cnt_hint
|
||||
u32 prior_ssthresh
|
||||
u32 high_seq
|
||||
u32 retrans_stamp
|
||||
u32 undo_marker
|
||||
int undo_retrans
|
||||
u64 bytes_retrans
|
||||
u32 total_retrans
|
||||
u32 rto_stamp
|
||||
u16 total_rto
|
||||
u16 total_rto_recoveries
|
||||
u32 total_rto_time
|
||||
u32 urg_seq
|
||||
unsigned_int keepalive_time
|
||||
unsigned_int keepalive_intvl
|
||||
int linger2
|
||||
u8 bpf_sock_ops_cb_flags
|
||||
u8:1 bpf_chg_cc_inprogress
|
||||
u16 timeout_rehash
|
||||
u32 rcv_ooopack
|
||||
u32 rcv_rtt_last_tsecr
|
||||
struct rcv_rtt_est read_write tcp_rcv_space_adjust,tcp_rcv_established
|
||||
struct rcvq_space read_write tcp_rcv_space_adjust
|
||||
struct mtu_probe
|
||||
u32 plb_rehash
|
||||
u32 mtu_info
|
||||
bool is_mptcp
|
||||
bool smc_hs_congested
|
||||
bool syn_smc
|
||||
struct tcp_sock_af_ops* af_specific
|
||||
struct tcp_md5sig_info* md5sig_info
|
||||
struct tcp_fastopen_request* fastopen_req
|
||||
struct request_sock* fastopen_rsk
|
||||
struct saved_syn* saved_syn
|
||||
============================= ======================= =================== =================== ==================================================================================================================================================================================================================
|
||||
|
@ -156,7 +156,7 @@ usage is not complete but it should make the outline of the usage clear.
|
||||
my_entity->bytes,
|
||||
&dim_sample);
|
||||
/* Call net DIM */
|
||||
net_dim(&my_entity->dim, dim_sample);
|
||||
net_dim(&my_entity->dim, &dim_sample);
|
||||
...
|
||||
}
|
||||
|
||||
|
@ -194,6 +194,20 @@ SOF_TIMESTAMPING_OPT_ID:
|
||||
among all possibly concurrently outstanding timestamp requests for
|
||||
that socket.
|
||||
|
||||
The process can optionally override the default generated ID, by
|
||||
passing a specific ID with control message SCM_TS_OPT_ID (not
|
||||
supported for TCP sockets)::
|
||||
|
||||
struct msghdr *msg;
|
||||
...
|
||||
cmsg = CMSG_FIRSTHDR(msg);
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
cmsg->cmsg_type = SCM_TS_OPT_ID;
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(__u32));
|
||||
*((__u32 *) CMSG_DATA(cmsg)) = opt_id;
|
||||
err = sendmsg(fd, msg, 0);
|
||||
|
||||
|
||||
SOF_TIMESTAMPING_OPT_ID_TCP:
|
||||
Pass this modifier along with SOF_TIMESTAMPING_OPT_ID for new TCP
|
||||
timestamping applications. SOF_TIMESTAMPING_OPT_ID defines how the
|
||||
|
@ -112,7 +112,7 @@ More Information
|
||||
|
||||
- How to contribute to TIPC:
|
||||
|
||||
- http://tipc.io/contacts.html
|
||||
http://tipc.io/contacts.html
|
||||
|
||||
- More details about TIPC specification:
|
||||
|
||||
|
55
MAINTAINERS
55
MAINTAINERS
@ -9016,9 +9016,16 @@ F: drivers/dma/fsl-edma*.*
|
||||
FREESCALE ENETC ETHERNET DRIVERS
|
||||
M: Claudiu Manoil <claudiu.manoil@nxp.com>
|
||||
M: Vladimir Oltean <vladimir.oltean@nxp.com>
|
||||
M: Wei Fang <wei.fang@nxp.com>
|
||||
M: Clark Wang <xiaoning.wang@nxp.com>
|
||||
L: imx@lists.linux.dev
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/fsl,enetc*.yaml
|
||||
F: Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
|
||||
F: drivers/net/ethernet/freescale/enetc/
|
||||
F: include/linux/fsl/enetc_mdio.h
|
||||
F: include/linux/fsl/netc_global.h
|
||||
|
||||
FREESCALE eTSEC ETHERNET DRIVER (GIANFAR)
|
||||
M: Claudiu Manoil <claudiu.manoil@nxp.com>
|
||||
@ -10271,6 +10278,12 @@ S: Maintained
|
||||
W: http://www.hisilicon.com
|
||||
F: drivers/net/ethernet/hisilicon/hns3/
|
||||
|
||||
HISILICON NETWORK HIBMCGE DRIVER
|
||||
M: Jijie Shao <shaojijie@huawei.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/hisilicon/hibmcge/
|
||||
|
||||
HISILICON NETWORK SUBSYSTEM DRIVER
|
||||
M: Jian Shen <shenjian15@huawei.com>
|
||||
M: Salil Mehta <salil.mehta@huawei.com>
|
||||
@ -14462,8 +14475,10 @@ M: Qingfang Deng <dqfext@gmail.com>
|
||||
M: SkyLake Huang <SkyLake.Huang@mediatek.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/phy/mediatek-ge-soc.c
|
||||
F: drivers/net/phy/mediatek-ge.c
|
||||
F: drivers/net/phy/mediatek/mtk-ge-soc.c
|
||||
F: drivers/net/phy/mediatek/mtk-phy-lib.c
|
||||
F: drivers/net/phy/mediatek/mtk-ge.c
|
||||
F: drivers/net/phy/mediatek/mtk.h
|
||||
F: drivers/phy/mediatek/phy-mtk-xfi-tphy.c
|
||||
|
||||
MEDIATEK I2C CONTROLLER DRIVER
|
||||
@ -15184,6 +15199,13 @@ S: Maintained
|
||||
F: drivers/misc/lan966x_pci.c
|
||||
F: drivers/misc/lan966x_pci.dtso
|
||||
|
||||
MICROCHIP LAN969X ETHERNET DRIVER
|
||||
M: Daniel Machon <daniel.machon@microchip.com>
|
||||
M: UNGLinuxDriver@microchip.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/microchip/lan969x/*
|
||||
|
||||
MICROCHIP LCDFB DRIVER
|
||||
M: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
@ -16111,10 +16133,13 @@ F: include/linux/platform_data/wiznet.h
|
||||
F: include/uapi/linux/cn_proc.h
|
||||
F: include/uapi/linux/ethtool_netlink.h
|
||||
F: include/uapi/linux/if_*
|
||||
F: include/uapi/linux/net_shaper.h
|
||||
F: include/uapi/linux/netdev*
|
||||
F: tools/testing/selftests/drivers/net/
|
||||
X: Documentation/devicetree/bindings/net/bluetooth/
|
||||
X: Documentation/devicetree/bindings/net/can/
|
||||
X: Documentation/devicetree/bindings/net/wireless/
|
||||
X: drivers/net/can/
|
||||
X: drivers/net/wireless/
|
||||
|
||||
NETWORKING DRIVERS (WIRELESS)
|
||||
@ -16203,6 +16228,7 @@ X: include/net/mac80211.h
|
||||
X: include/net/wext.h
|
||||
X: net/9p/
|
||||
X: net/bluetooth/
|
||||
X: net/can/
|
||||
X: net/mac80211/
|
||||
X: net/rfkill/
|
||||
X: net/wireless/
|
||||
@ -16291,7 +16317,7 @@ F: include/net/mptcp.h
|
||||
F: include/trace/events/mptcp.h
|
||||
F: include/uapi/linux/mptcp*.h
|
||||
F: net/mptcp/
|
||||
F: tools/testing/selftests/bpf/*/*mptcp*.c
|
||||
F: tools/testing/selftests/bpf/*/*mptcp*.[ch]
|
||||
F: tools/testing/selftests/net/mptcp/
|
||||
|
||||
NETWORKING [TCP]
|
||||
@ -17458,6 +17484,7 @@ S: Supported
|
||||
F: Documentation/core-api/packing.rst
|
||||
F: include/linux/packing.h
|
||||
F: lib/packing.c
|
||||
F: lib/packing_test.c
|
||||
|
||||
PADATA PARALLEL EXECUTION MECHANISM
|
||||
M: Steffen Klassert <steffen.klassert@secunet.com>
|
||||
@ -18663,6 +18690,13 @@ S: Maintained
|
||||
F: drivers/ptp/ptp_vclock.c
|
||||
F: net/ethtool/phc_vclocks.c
|
||||
|
||||
PTP VMCLOCK SUPPORT
|
||||
M: David Woodhouse <dwmw2@infradead.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/ptp/ptp_vmclock.c
|
||||
F: include/uapi/linux/vmclock-abi.h
|
||||
|
||||
PTRACE SUPPORT
|
||||
M: Oleg Nesterov <oleg@redhat.com>
|
||||
S: Maintained
|
||||
@ -19946,8 +19980,10 @@ L: linux-riscv@lists.infradead.org
|
||||
S: Maintained
|
||||
T: git https://github.com/pdp7/linux.git
|
||||
F: Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml
|
||||
F: Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml
|
||||
F: arch/riscv/boot/dts/thead/
|
||||
F: drivers/clk/thead/clk-th1520-ap.c
|
||||
F: drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
|
||||
F: include/dt-bindings/clock/thead,th1520-clk-ap.h
|
||||
|
||||
RNBD BLOCK DRIVERS
|
||||
@ -20340,6 +20376,12 @@ F: Documentation/arch/s390/pci.rst
|
||||
F: arch/s390/pci/
|
||||
F: drivers/pci/hotplug/s390_pci_hpc.c
|
||||
|
||||
S390 PTP DRIVER
|
||||
M: Sven Schnelle <svens@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/ptp/ptp_s390.c
|
||||
|
||||
S390 SCM DRIVER
|
||||
M: Vineeth Vijayan <vneethv@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
@ -21020,6 +21062,7 @@ M: Jan Karcher <jaka@linux.ibm.com>
|
||||
R: D. Wythe <alibuda@linux.alibaba.com>
|
||||
R: Tony Lu <tonylu@linux.alibaba.com>
|
||||
R: Wen Gu <guwen@linux.alibaba.com>
|
||||
L: linux-rdma@vger.kernel.org
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
F: net/smc/
|
||||
@ -22280,12 +22323,6 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
|
||||
F: drivers/input/keyboard/sun4i-lradc-keys.c
|
||||
|
||||
SUNDANCE NETWORK DRIVER
|
||||
M: Denis Kirjanov <kda@linux-powerpc.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/dlink/sundance.c
|
||||
|
||||
SUNPLUS ETHERNET DRIVER
|
||||
M: Wells Lu <wellslutw@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -146,6 +146,8 @@
|
||||
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
|
||||
#define SO_DEVMEM_DONTNEED 80
|
||||
|
||||
#define SCM_TS_OPT_ID 81
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -275,7 +275,6 @@ CONFIG_DM9102=m
|
||||
CONFIG_ULI526X=m
|
||||
CONFIG_PCMCIA_XIRCOM=m
|
||||
CONFIG_DL2K=m
|
||||
CONFIG_SUNDANCE=m
|
||||
CONFIG_PCMCIA_FMVJ18X=m
|
||||
CONFIG_E100=m
|
||||
CONFIG_E1000=m
|
||||
|
@ -157,6 +157,8 @@
|
||||
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
|
||||
#define SO_DEVMEM_DONTNEED 80
|
||||
|
||||
#define SCM_TS_OPT_ID 81
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -138,6 +138,8 @@
|
||||
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
|
||||
#define SO_DEVMEM_DONTNEED 80
|
||||
|
||||
#define SCM_TS_OPT_ID 0x404C
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -25,15 +25,6 @@
|
||||
: "=r"(_t) \
|
||||
: "r"(_r), "0"(_t));
|
||||
|
||||
static inline unsigned short from32to16(unsigned int x)
|
||||
{
|
||||
/* 32 bits --> 16 bits + carry */
|
||||
x = (x & 0xffff) + (x >> 16);
|
||||
/* 16 bits + carry --> 16 bits including carry */
|
||||
x = (x & 0xffff) + (x >> 16);
|
||||
return (unsigned short)x;
|
||||
}
|
||||
|
||||
static inline unsigned int do_csum(const unsigned char * buff, int len)
|
||||
{
|
||||
int odd, count;
|
||||
@ -85,7 +76,7 @@ static inline unsigned int do_csum(const unsigned char * buff, int len)
|
||||
}
|
||||
if (len & 1)
|
||||
result += le16_to_cpu(*buff);
|
||||
result = from32to16(result);
|
||||
result = csum_from32to16(result);
|
||||
if (odd)
|
||||
result = swab16(result);
|
||||
out:
|
||||
@ -102,7 +93,7 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)
|
||||
{
|
||||
unsigned int result = do_csum(buff, len);
|
||||
addc(result, sum);
|
||||
return (__force __wsum)from32to16(result);
|
||||
return (__force __wsum)csum_from32to16(result);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(csum_partial);
|
||||
|
@ -435,7 +435,6 @@ CONFIG_DM9102=m
|
||||
CONFIG_ULI526X=m
|
||||
CONFIG_PCMCIA_XIRCOM=m
|
||||
CONFIG_DL2K=m
|
||||
CONFIG_SUNDANCE=m
|
||||
CONFIG_S2IO=m
|
||||
CONFIG_FEC_MPC52xx=m
|
||||
CONFIG_GIANFAR=m
|
||||
|
@ -94,5 +94,6 @@ struct stp_stzi {
|
||||
int stp_sync_check(void);
|
||||
int stp_island_check(void);
|
||||
void stp_queue_work(void);
|
||||
bool stp_enabled(void);
|
||||
|
||||
#endif /* __S390_STP_H */
|
||||
|
@ -96,6 +96,7 @@ extern unsigned char ptff_function_mask[16];
|
||||
#define PTFF_QAF 0x00 /* query available functions */
|
||||
#define PTFF_QTO 0x01 /* query tod offset */
|
||||
#define PTFF_QSI 0x02 /* query steering information */
|
||||
#define PTFF_QPT 0x03 /* query physical clock */
|
||||
#define PTFF_QUI 0x04 /* query UTC information */
|
||||
#define PTFF_ATO 0x40 /* adjust tod offset */
|
||||
#define PTFF_STO 0x41 /* set tod offset */
|
||||
@ -252,6 +253,11 @@ static __always_inline unsigned long tod_to_ns(unsigned long todval)
|
||||
return ((todval >> 9) * 125) + (((todval & 0x1ff) * 125) >> 9);
|
||||
}
|
||||
|
||||
static __always_inline u128 eitod_to_ns(u128 todval)
|
||||
{
|
||||
return (todval * 125) >> 9;
|
||||
}
|
||||
|
||||
/**
|
||||
* tod_after - compare two 64 bit TOD values
|
||||
* @a: first 64 bit TOD timestamp
|
||||
|
@ -254,6 +254,7 @@ static struct clocksource clocksource_tod = {
|
||||
.shift = 24,
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
.vdso_clock_mode = VDSO_CLOCKMODE_TOD,
|
||||
.id = CSID_S390_TOD,
|
||||
};
|
||||
|
||||
struct clocksource * __init clocksource_default_clock(void)
|
||||
@ -467,6 +468,12 @@ static void __init stp_reset(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool stp_enabled(void)
|
||||
{
|
||||
return test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags) && stp_online;
|
||||
}
|
||||
EXPORT_SYMBOL(stp_enabled);
|
||||
|
||||
static void stp_timeout(struct timer_list *unused)
|
||||
{
|
||||
queue_work(time_sync_wq, &stp_work);
|
||||
|
@ -139,6 +139,8 @@
|
||||
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
|
||||
#define SO_DEVMEM_DONTNEED 0x0059
|
||||
|
||||
#define SCM_TS_OPT_ID 0x005a
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
|
||||
|
@ -103,26 +103,8 @@ typedef struct page *pgtable_t;
|
||||
#define __pgd(x) ((pgd_t) { (x) } )
|
||||
#define __pgprot(x) ((pgprot_t) { (x) } )
|
||||
|
||||
/*
|
||||
* Pure 2^n version of get_order
|
||||
* Use 'nsau' instructions if supported by the processor or the generic version.
|
||||
*/
|
||||
|
||||
#if XCHAL_HAVE_NSA
|
||||
|
||||
static inline __attribute_const__ int get_order(unsigned long size)
|
||||
{
|
||||
int lz;
|
||||
asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT));
|
||||
return 32 - lz;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
# include <asm-generic/getorder.h>
|
||||
|
||||
#endif
|
||||
|
||||
struct page;
|
||||
struct vm_area_struct;
|
||||
extern void clear_page(void *page);
|
||||
|
@ -541,11 +541,10 @@ static const struct bcm_subver_table bcm_usb_subver_table[] = {
|
||||
static const char *btbcm_get_board_name(struct device *dev)
|
||||
{
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *root;
|
||||
struct device_node *root __free(device_node) = of_find_node_by_path("/");
|
||||
char *board_type;
|
||||
const char *tmp;
|
||||
|
||||
root = of_find_node_by_path("/");
|
||||
if (!root)
|
||||
return NULL;
|
||||
|
||||
@ -555,7 +554,6 @@ static const char *btbcm_get_board_name(struct device *dev)
|
||||
/* get rid of any '/' in the compatible string */
|
||||
board_type = devm_kstrdup(dev, tmp, GFP_KERNEL);
|
||||
strreplace(board_type, '/', '-');
|
||||
of_node_put(root);
|
||||
|
||||
return board_type;
|
||||
#else
|
||||
|
@ -1040,7 +1040,7 @@ static int btintel_download_firmware_payload(struct hci_dev *hdev,
|
||||
* as needed.
|
||||
*
|
||||
* Send set of commands with 4 byte alignment from the
|
||||
* firmware data buffer as a single Data fragement.
|
||||
* firmware data buffer as a single Data fragment.
|
||||
*/
|
||||
if (!(frag_len % 4)) {
|
||||
err = btintel_secure_send(hdev, 0x01, frag_len, fw_ptr);
|
||||
@ -1252,6 +1252,12 @@ static void btintel_reset_to_bootloader(struct hci_dev *hdev)
|
||||
struct intel_reset params;
|
||||
struct sk_buff *skb;
|
||||
|
||||
/* PCIe transport uses shared hardware reset mechanism for recovery
|
||||
* which gets triggered in pcie *setup* function on error.
|
||||
*/
|
||||
if (hdev->bus == HCI_PCI)
|
||||
return;
|
||||
|
||||
/* Send Intel Reset command. This will result in
|
||||
* re-enumeration of BT controller.
|
||||
*
|
||||
@ -1267,6 +1273,7 @@ static void btintel_reset_to_bootloader(struct hci_dev *hdev)
|
||||
* boot_param: Boot address
|
||||
*
|
||||
*/
|
||||
|
||||
params.reset_type = 0x01;
|
||||
params.patch_enable = 0x01;
|
||||
params.ddc_reload = 0x01;
|
||||
@ -1841,6 +1848,37 @@ static int btintel_boot_wait(struct hci_dev *hdev, ktime_t calltime, int msec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btintel_boot_wait_d0(struct hci_dev *hdev, ktime_t calltime,
|
||||
int msec)
|
||||
{
|
||||
ktime_t delta, rettime;
|
||||
unsigned long long duration;
|
||||
int err;
|
||||
|
||||
bt_dev_info(hdev, "Waiting for device transition to d0");
|
||||
|
||||
err = btintel_wait_on_flag_timeout(hdev, INTEL_WAIT_FOR_D0,
|
||||
TASK_INTERRUPTIBLE,
|
||||
msecs_to_jiffies(msec));
|
||||
if (err == -EINTR) {
|
||||
bt_dev_err(hdev, "Device d0 move interrupted");
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Device d0 move timeout");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
rettime = ktime_get();
|
||||
delta = ktime_sub(rettime, calltime);
|
||||
duration = (unsigned long long)ktime_to_ns(delta) >> 10;
|
||||
|
||||
bt_dev_info(hdev, "Device moved to D0 in %llu usecs", duration);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btintel_boot(struct hci_dev *hdev, u32 boot_addr)
|
||||
{
|
||||
ktime_t calltime;
|
||||
@ -1849,6 +1887,7 @@ static int btintel_boot(struct hci_dev *hdev, u32 boot_addr)
|
||||
calltime = ktime_get();
|
||||
|
||||
btintel_set_flag(hdev, INTEL_BOOTING);
|
||||
btintel_set_flag(hdev, INTEL_WAIT_FOR_D0);
|
||||
|
||||
err = btintel_send_intel_reset(hdev, boot_addr);
|
||||
if (err) {
|
||||
@ -1861,13 +1900,28 @@ static int btintel_boot(struct hci_dev *hdev, u32 boot_addr)
|
||||
* is done by the operational firmware sending bootup notification.
|
||||
*
|
||||
* Booting into operational firmware should not take longer than
|
||||
* 1 second. However if that happens, then just fail the setup
|
||||
* 5 second. However if that happens, then just fail the setup
|
||||
* since something went wrong.
|
||||
*/
|
||||
err = btintel_boot_wait(hdev, calltime, 1000);
|
||||
if (err == -ETIMEDOUT)
|
||||
err = btintel_boot_wait(hdev, calltime, 5000);
|
||||
if (err == -ETIMEDOUT) {
|
||||
btintel_reset_to_bootloader(hdev);
|
||||
goto exit_error;
|
||||
}
|
||||
|
||||
if (hdev->bus == HCI_PCI) {
|
||||
/* In case of PCIe, after receiving bootup event, driver performs
|
||||
* D0 entry by writing 0 to sleep control register (check
|
||||
* btintel_pcie_recv_event())
|
||||
* Firmware acks with alive interrupt indicating host is full ready to
|
||||
* perform BT operation. Lets wait here till INTEL_WAIT_FOR_D0
|
||||
* bit is cleared.
|
||||
*/
|
||||
calltime = ktime_get();
|
||||
err = btintel_boot_wait_d0(hdev, calltime, 2000);
|
||||
}
|
||||
|
||||
exit_error:
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -2693,20 +2747,32 @@ static int btintel_set_dsbr(struct hci_dev *hdev, struct intel_version_tlv *ver)
|
||||
|
||||
struct btintel_dsbr_cmd cmd;
|
||||
struct sk_buff *skb;
|
||||
u32 dsbr, cnvi;
|
||||
u8 status;
|
||||
u32 dsbr;
|
||||
bool apply_dsbr;
|
||||
int err;
|
||||
|
||||
/* DSBR command needs to be sent for BlazarI + B0 step product after
|
||||
* downloading IML image.
|
||||
cnvi = ver->cnvi_top & 0xfff;
|
||||
/* DSBR command needs to be sent for,
|
||||
* 1. BlazarI or BlazarIW + B0 step product in IML image.
|
||||
* 2. Gale Peak2 or BlazarU in OP image.
|
||||
*/
|
||||
apply_dsbr = (ver->img_type == BTINTEL_IMG_IML &&
|
||||
((ver->cnvi_top & 0xfff) == BTINTEL_CNVI_BLAZARI) &&
|
||||
INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01);
|
||||
|
||||
if (!apply_dsbr)
|
||||
switch (cnvi) {
|
||||
case BTINTEL_CNVI_BLAZARI:
|
||||
case BTINTEL_CNVI_BLAZARIW:
|
||||
if (ver->img_type == BTINTEL_IMG_IML &&
|
||||
INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01)
|
||||
break;
|
||||
return 0;
|
||||
case BTINTEL_CNVI_GAP:
|
||||
case BTINTEL_CNVI_BLAZARU:
|
||||
if (ver->img_type == BTINTEL_IMG_OP &&
|
||||
hdev->bus == HCI_USB)
|
||||
break;
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
dsbr = 0;
|
||||
err = btintel_uefi_get_dsbr(&dsbr);
|
||||
@ -2749,6 +2815,13 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
|
||||
*/
|
||||
boot_param = 0x00000000;
|
||||
|
||||
/* In case of PCIe, this function might get called multiple times with
|
||||
* same hdev instance if there is any error on firmware download.
|
||||
* Need to clear stale bits of previous firmware download attempt.
|
||||
*/
|
||||
for (int i = 0; i < __INTEL_NUM_FLAGS; i++)
|
||||
btintel_clear_flag(hdev, i);
|
||||
|
||||
btintel_set_flag(hdev, INTEL_BOOTLOADER);
|
||||
|
||||
err = btintel_prepare_fw_download_tlv(hdev, ver, &boot_param);
|
||||
@ -2835,7 +2908,7 @@ void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
|
||||
case 0x12: /* ThP */
|
||||
case 0x13: /* HrP */
|
||||
case 0x14: /* CcP */
|
||||
/* All Intel new genration controllers support the Microsoft vendor
|
||||
/* All Intel new generation controllers support the Microsoft vendor
|
||||
* extension are using 0xFC1E for VsMsftOpCode.
|
||||
*/
|
||||
case 0x17:
|
||||
@ -3273,7 +3346,7 @@ int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btintel_configure_setup);
|
||||
|
||||
static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
struct intel_tlv *tlv = (void *)&skb->data[5];
|
||||
|
||||
@ -3301,6 +3374,7 @@ static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
recv_frame:
|
||||
return hci_recv_frame(hdev, skb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btintel_diagnostics);
|
||||
|
||||
int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
@ -3320,7 +3394,8 @@ int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
* indicating that the bootup completed.
|
||||
*/
|
||||
btintel_bootup(hdev, ptr, len);
|
||||
break;
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
case 0x06:
|
||||
/* When the firmware loading completes the
|
||||
* device sends out a vendor specific event
|
||||
@ -3328,7 +3403,8 @@ int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
* loading.
|
||||
*/
|
||||
btintel_secure_send_result(hdev, ptr, len);
|
||||
break;
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,9 @@ struct intel_tlv {
|
||||
} __packed;
|
||||
|
||||
#define BTINTEL_CNVI_BLAZARI 0x900
|
||||
#define BTINTEL_CNVI_BLAZARIW 0x901
|
||||
#define BTINTEL_CNVI_GAP 0x910
|
||||
#define BTINTEL_CNVI_BLAZARU 0x930
|
||||
|
||||
#define BTINTEL_IMG_BOOTLOADER 0x01 /* Bootloader image */
|
||||
#define BTINTEL_IMG_IML 0x02 /* Intermediate image */
|
||||
@ -178,6 +181,7 @@ enum {
|
||||
INTEL_ROM_LEGACY,
|
||||
INTEL_ROM_LEGACY_NO_WBS_SUPPORT,
|
||||
INTEL_ACPI_RESET_ACTIVE,
|
||||
INTEL_WAIT_FOR_D0,
|
||||
|
||||
__INTEL_NUM_FLAGS,
|
||||
};
|
||||
@ -249,6 +253,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
|
||||
int btintel_shutdown_combined(struct hci_dev *hdev);
|
||||
void btintel_hw_error(struct hci_dev *hdev, u8 code);
|
||||
void btintel_print_fseq_info(struct hci_dev *hdev);
|
||||
int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb);
|
||||
#else
|
||||
|
||||
static inline int btintel_check_bdaddr(struct hci_dev *hdev)
|
||||
@ -382,4 +387,9 @@ static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
|
||||
static inline void btintel_print_fseq_info(struct hci_dev *hdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
@ -48,6 +48,17 @@ MODULE_DEVICE_TABLE(pci, btintel_pcie_table);
|
||||
#define BTINTEL_PCIE_HCI_EVT_PKT 0x00000004
|
||||
#define BTINTEL_PCIE_HCI_ISO_PKT 0x00000005
|
||||
|
||||
/* Alive interrupt context */
|
||||
enum {
|
||||
BTINTEL_PCIE_ROM,
|
||||
BTINTEL_PCIE_FW_DL,
|
||||
BTINTEL_PCIE_HCI_RESET,
|
||||
BTINTEL_PCIE_INTEL_HCI_RESET1,
|
||||
BTINTEL_PCIE_INTEL_HCI_RESET2,
|
||||
BTINTEL_PCIE_D0,
|
||||
BTINTEL_PCIE_D3
|
||||
};
|
||||
|
||||
static inline void ipc_print_ia_ring(struct hci_dev *hdev, struct ia *ia,
|
||||
u16 queue_num)
|
||||
{
|
||||
@ -64,24 +75,6 @@ static inline void ipc_print_urbd1(struct hci_dev *hdev, struct urbd1 *urbd1,
|
||||
index, urbd1->frbd_tag, urbd1->status, urbd1->fixed);
|
||||
}
|
||||
|
||||
static int btintel_pcie_poll_bit(struct btintel_pcie_data *data, u32 offset,
|
||||
u32 bits, u32 mask, int timeout_us)
|
||||
{
|
||||
int t = 0;
|
||||
u32 reg;
|
||||
|
||||
do {
|
||||
reg = btintel_pcie_rd_reg32(data, offset);
|
||||
|
||||
if ((reg & mask) == (bits & mask))
|
||||
return t;
|
||||
udelay(POLL_INTERVAL_US);
|
||||
t += POLL_INTERVAL_US;
|
||||
} while (t < timeout_us);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static struct btintel_pcie_data *btintel_pcie_get_data(struct msix_entry *entry)
|
||||
{
|
||||
u8 queue = entry->entry;
|
||||
@ -237,10 +230,47 @@ static void btintel_pcie_reset_ia(struct btintel_pcie_data *data)
|
||||
memset(data->ia.cr_tia, 0, sizeof(u16) * BTINTEL_PCIE_NUM_QUEUES);
|
||||
}
|
||||
|
||||
static void btintel_pcie_reset_bt(struct btintel_pcie_data *data)
|
||||
static int btintel_pcie_reset_bt(struct btintel_pcie_data *data)
|
||||
{
|
||||
btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_SW_RESET);
|
||||
u32 reg;
|
||||
int retry = 3;
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
|
||||
reg &= ~(BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT);
|
||||
reg |= BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_DISCON;
|
||||
|
||||
btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG, reg);
|
||||
|
||||
do {
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
if (reg & BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_STS)
|
||||
break;
|
||||
usleep_range(10000, 12000);
|
||||
|
||||
} while (--retry > 0);
|
||||
usleep_range(10000, 12000);
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
|
||||
reg &= ~(BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT);
|
||||
reg |= BTINTEL_PCIE_CSR_FUNC_CTRL_SW_RESET;
|
||||
btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG, reg);
|
||||
usleep_range(10000, 12000);
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
bt_dev_dbg(data->hdev, "csr register after reset: 0x%8.8x", reg);
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_BOOT_STAGE_REG);
|
||||
|
||||
/* If shared hardware reset is success then boot stage register shall be
|
||||
* set to 0
|
||||
*/
|
||||
return reg == 0 ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
/* This function enables BT function by setting BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT bit in
|
||||
@ -252,6 +282,7 @@ static void btintel_pcie_reset_bt(struct btintel_pcie_data *data)
|
||||
static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
|
||||
{
|
||||
int err;
|
||||
u32 reg;
|
||||
|
||||
data->gp0_received = false;
|
||||
|
||||
@ -267,22 +298,17 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
|
||||
data->boot_stage_cache = 0x0;
|
||||
|
||||
/* Set MAC_INIT bit to start primary bootloader */
|
||||
btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
reg &= ~(BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_DISCON |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_SW_RESET);
|
||||
reg |= (BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT);
|
||||
|
||||
btintel_pcie_set_reg_bits(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT);
|
||||
|
||||
/* Wait until MAC_ACCESS is granted */
|
||||
err = btintel_pcie_poll_bit(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_ACCESS_STS,
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_ACCESS_STS,
|
||||
BTINTEL_DEFAULT_MAC_ACCESS_TIMEOUT_US);
|
||||
if (err < 0)
|
||||
return -ENODEV;
|
||||
btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG, reg);
|
||||
|
||||
/* MAC is ready. Enable BT FUNC */
|
||||
btintel_pcie_set_reg_bits(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA |
|
||||
BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT);
|
||||
|
||||
btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
|
||||
@ -290,8 +316,9 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
|
||||
/* wait for interrupt from the device after booting up to primary
|
||||
* bootloader.
|
||||
*/
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_ROM;
|
||||
err = wait_event_timeout(data->gp0_wait_q, data->gp0_received,
|
||||
msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT));
|
||||
msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT_MS));
|
||||
if (!err)
|
||||
return -ETIME;
|
||||
|
||||
@ -302,12 +329,77 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* BIT(0) - ROM, BIT(1) - IML and BIT(3) - OP
|
||||
* Sometimes during firmware image switching from ROM to IML or IML to OP image,
|
||||
* the previous image bit is not cleared by firmware when alive interrupt is
|
||||
* received. Driver needs to take care of these sticky bits when deciding the
|
||||
* current image running on controller.
|
||||
* Ex: 0x10 and 0x11 - both represents that controller is running IML
|
||||
*/
|
||||
static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)
|
||||
{
|
||||
return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ROM &&
|
||||
!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_IML) &&
|
||||
!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW);
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_op(struct btintel_pcie_data *data)
|
||||
{
|
||||
return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW;
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_iml(struct btintel_pcie_data *data)
|
||||
{
|
||||
return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_IML &&
|
||||
!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW);
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_d3(struct btintel_pcie_data *data)
|
||||
{
|
||||
return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_D3_STATE_READY;
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_d0(struct btintel_pcie_data *data)
|
||||
{
|
||||
return !(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_D3_STATE_READY);
|
||||
}
|
||||
|
||||
static void btintel_pcie_wr_sleep_cntrl(struct btintel_pcie_data *data,
|
||||
u32 dxstate)
|
||||
{
|
||||
bt_dev_dbg(data->hdev, "writing sleep_ctl_reg: 0x%8.8x", dxstate);
|
||||
btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_IPC_SLEEP_CTL_REG, dxstate);
|
||||
}
|
||||
|
||||
static inline char *btintel_pcie_alivectxt_state2str(u32 alive_intr_ctxt)
|
||||
{
|
||||
switch (alive_intr_ctxt) {
|
||||
case BTINTEL_PCIE_ROM:
|
||||
return "rom";
|
||||
case BTINTEL_PCIE_FW_DL:
|
||||
return "fw_dl";
|
||||
case BTINTEL_PCIE_D0:
|
||||
return "d0";
|
||||
case BTINTEL_PCIE_D3:
|
||||
return "d3";
|
||||
case BTINTEL_PCIE_HCI_RESET:
|
||||
return "hci_reset";
|
||||
case BTINTEL_PCIE_INTEL_HCI_RESET1:
|
||||
return "intel_reset1";
|
||||
case BTINTEL_PCIE_INTEL_HCI_RESET2:
|
||||
return "intel_reset2";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
/* This function handles the MSI-X interrupt for gp0 cause (bit 0 in
|
||||
* BTINTEL_PCIE_CSR_MSIX_HW_INT_CAUSES) which is sent for boot stage and image response.
|
||||
*/
|
||||
static void btintel_pcie_msix_gp0_handler(struct btintel_pcie_data *data)
|
||||
{
|
||||
u32 reg;
|
||||
bool submit_rx, signal_waitq;
|
||||
u32 reg, old_ctxt;
|
||||
|
||||
/* This interrupt is for three different causes and it is not easy to
|
||||
* know what causes the interrupt. So, it compares each register value
|
||||
@ -317,20 +409,87 @@ static void btintel_pcie_msix_gp0_handler(struct btintel_pcie_data *data)
|
||||
if (reg != data->boot_stage_cache)
|
||||
data->boot_stage_cache = reg;
|
||||
|
||||
bt_dev_dbg(data->hdev, "Alive context: %s old_boot_stage: 0x%8.8x new_boot_stage: 0x%8.8x",
|
||||
btintel_pcie_alivectxt_state2str(data->alive_intr_ctxt),
|
||||
data->boot_stage_cache, reg);
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IMG_RESPONSE_REG);
|
||||
if (reg != data->img_resp_cache)
|
||||
data->img_resp_cache = reg;
|
||||
|
||||
data->gp0_received = true;
|
||||
|
||||
/* If the boot stage is OP or IML, reset IA and start RX again */
|
||||
if (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW ||
|
||||
data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_IML) {
|
||||
old_ctxt = data->alive_intr_ctxt;
|
||||
submit_rx = false;
|
||||
signal_waitq = false;
|
||||
|
||||
switch (data->alive_intr_ctxt) {
|
||||
case BTINTEL_PCIE_ROM:
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_FW_DL;
|
||||
signal_waitq = true;
|
||||
break;
|
||||
case BTINTEL_PCIE_FW_DL:
|
||||
/* Error case is already handled. Ideally control shall not
|
||||
* reach here
|
||||
*/
|
||||
break;
|
||||
case BTINTEL_PCIE_INTEL_HCI_RESET1:
|
||||
if (btintel_pcie_in_op(data)) {
|
||||
submit_rx = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (btintel_pcie_in_iml(data)) {
|
||||
submit_rx = true;
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_FW_DL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BTINTEL_PCIE_INTEL_HCI_RESET2:
|
||||
if (btintel_test_and_clear_flag(data->hdev, INTEL_WAIT_FOR_D0)) {
|
||||
btintel_wake_up_flag(data->hdev, INTEL_WAIT_FOR_D0);
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_D0;
|
||||
}
|
||||
break;
|
||||
case BTINTEL_PCIE_D0:
|
||||
if (btintel_pcie_in_d3(data)) {
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_D3;
|
||||
signal_waitq = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BTINTEL_PCIE_D3:
|
||||
if (btintel_pcie_in_d0(data)) {
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_D0;
|
||||
submit_rx = true;
|
||||
signal_waitq = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BTINTEL_PCIE_HCI_RESET:
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_D0;
|
||||
submit_rx = true;
|
||||
signal_waitq = true;
|
||||
break;
|
||||
default:
|
||||
bt_dev_err(data->hdev, "Unknown state: 0x%2.2x",
|
||||
data->alive_intr_ctxt);
|
||||
break;
|
||||
}
|
||||
|
||||
if (submit_rx) {
|
||||
btintel_pcie_reset_ia(data);
|
||||
btintel_pcie_start_rx(data);
|
||||
}
|
||||
|
||||
wake_up(&data->gp0_wait_q);
|
||||
if (signal_waitq) {
|
||||
bt_dev_dbg(data->hdev, "wake up gp0 wait_q");
|
||||
wake_up(&data->gp0_wait_q);
|
||||
}
|
||||
|
||||
if (old_ctxt != data->alive_intr_ctxt)
|
||||
bt_dev_dbg(data->hdev, "alive context changed: %s -> %s",
|
||||
btintel_pcie_alivectxt_state2str(old_ctxt),
|
||||
btintel_pcie_alivectxt_state2str(data->alive_intr_ctxt));
|
||||
}
|
||||
|
||||
/* This function handles the MSX-X interrupt for rx queue 0 which is for TX
|
||||
@ -364,6 +523,83 @@ static void btintel_pcie_msix_tx_handle(struct btintel_pcie_data *data)
|
||||
}
|
||||
}
|
||||
|
||||
static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
struct hci_event_hdr *hdr = (void *)skb->data;
|
||||
const char diagnostics_hdr[] = { 0x87, 0x80, 0x03 };
|
||||
struct btintel_pcie_data *data = hci_get_drvdata(hdev);
|
||||
|
||||
if (skb->len > HCI_EVENT_HDR_SIZE && hdr->evt == 0xff &&
|
||||
hdr->plen > 0) {
|
||||
const void *ptr = skb->data + HCI_EVENT_HDR_SIZE + 1;
|
||||
unsigned int len = skb->len - HCI_EVENT_HDR_SIZE - 1;
|
||||
|
||||
if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
|
||||
switch (skb->data[2]) {
|
||||
case 0x02:
|
||||
/* When switching to the operational firmware
|
||||
* the device sends a vendor specific event
|
||||
* indicating that the bootup completed.
|
||||
*/
|
||||
btintel_bootup(hdev, ptr, len);
|
||||
|
||||
/* If bootup event is from operational image,
|
||||
* driver needs to write sleep control register to
|
||||
* move into D0 state
|
||||
*/
|
||||
if (btintel_pcie_in_op(data)) {
|
||||
btintel_pcie_wr_sleep_cntrl(data, BTINTEL_PCIE_STATE_D0);
|
||||
data->alive_intr_ctxt = BTINTEL_PCIE_INTEL_HCI_RESET2;
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (btintel_pcie_in_iml(data)) {
|
||||
/* In case of IML, there is no concept
|
||||
* of D0 transition. Just mimic as if
|
||||
* IML moved to D0 by clearing INTEL_WAIT_FOR_D0
|
||||
* bit and waking up the task waiting on
|
||||
* INTEL_WAIT_FOR_D0. This is required
|
||||
* as intel_boot() is common function for
|
||||
* both IML and OP image loading.
|
||||
*/
|
||||
if (btintel_test_and_clear_flag(data->hdev,
|
||||
INTEL_WAIT_FOR_D0))
|
||||
btintel_wake_up_flag(data->hdev,
|
||||
INTEL_WAIT_FOR_D0);
|
||||
}
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
case 0x06:
|
||||
/* When the firmware loading completes the
|
||||
* device sends out a vendor specific event
|
||||
* indicating the result of the firmware
|
||||
* loading.
|
||||
*/
|
||||
btintel_secure_send_result(hdev, ptr, len);
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle all diagnostics events separately. May still call
|
||||
* hci_recv_frame.
|
||||
*/
|
||||
if (len >= sizeof(diagnostics_hdr) &&
|
||||
memcmp(&skb->data[2], diagnostics_hdr,
|
||||
sizeof(diagnostics_hdr)) == 0) {
|
||||
return btintel_diagnostics(hdev, skb);
|
||||
}
|
||||
|
||||
/* This is a debug event that comes from IML and OP image when it
|
||||
* starts execution. There is no need pass this event to stack.
|
||||
*/
|
||||
if (skb->data[2] == 0x97)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return hci_recv_frame(hdev, skb);
|
||||
}
|
||||
/* Process the received rx data
|
||||
* It check the frame header to identify the data type and create skb
|
||||
* and calling HCI API
|
||||
@ -465,7 +701,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
|
||||
hdev->stat.byte_rx += plen;
|
||||
|
||||
if (pcie_pkt_type == BTINTEL_PCIE_HCI_EVT_PKT)
|
||||
ret = btintel_recv_event(hdev, new_skb);
|
||||
ret = btintel_pcie_recv_event(hdev, new_skb);
|
||||
else
|
||||
ret = hci_recv_frame(hdev, new_skb);
|
||||
|
||||
@ -516,10 +752,8 @@ static int btintel_pcie_submit_rx_work(struct btintel_pcie_data *data, u8 status
|
||||
buf += sizeof(*rfh_hdr);
|
||||
|
||||
skb = alloc_skb(len, GFP_ATOMIC);
|
||||
if (!skb) {
|
||||
ret = -ENOMEM;
|
||||
if (!skb)
|
||||
goto resubmit;
|
||||
}
|
||||
|
||||
skb_put_data(skb, buf, len);
|
||||
skb_queue_tail(&data->rx_skb_q, skb);
|
||||
@ -734,13 +968,9 @@ static int btintel_pcie_config_pcie(struct pci_dev *pdev,
|
||||
return err;
|
||||
}
|
||||
|
||||
err = pcim_iomap_regions(pdev, BIT(0), KBUILD_MODNAME);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
data->base_addr = pcim_iomap_table(pdev)[0];
|
||||
if (!data->base_addr)
|
||||
return -ENODEV;
|
||||
data->base_addr = pcim_iomap_region(pdev, 0, KBUILD_MODNAME);
|
||||
if (IS_ERR(data->base_addr))
|
||||
return PTR_ERR(data->base_addr);
|
||||
|
||||
err = btintel_pcie_setup_irq(data);
|
||||
if (err)
|
||||
@ -1053,8 +1283,11 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct btintel_pcie_data *data = hci_get_drvdata(hdev);
|
||||
struct hci_command_hdr *cmd;
|
||||
__u16 opcode = ~0;
|
||||
int ret;
|
||||
u32 type;
|
||||
u32 old_ctxt;
|
||||
|
||||
/* Due to the fw limitation, the type header of the packet should be
|
||||
* 4 bytes unlike 1 byte for UART. In UART, the firmware can read
|
||||
@ -1073,6 +1306,8 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
|
||||
switch (hci_skb_pkt_type(skb)) {
|
||||
case HCI_COMMAND_PKT:
|
||||
type = BTINTEL_PCIE_HCI_CMD_PKT;
|
||||
cmd = (void *)skb->data;
|
||||
opcode = le16_to_cpu(cmd->opcode);
|
||||
if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
|
||||
struct hci_command_hdr *cmd = (void *)skb->data;
|
||||
__u16 opcode = le16_to_cpu(cmd->opcode);
|
||||
@ -1111,6 +1346,30 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
|
||||
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
|
||||
goto exit_error;
|
||||
}
|
||||
|
||||
if (type == BTINTEL_PCIE_HCI_CMD_PKT &&
|
||||
(opcode == HCI_OP_RESET || opcode == 0xfc01)) {
|
||||
old_ctxt = data->alive_intr_ctxt;
|
||||
data->alive_intr_ctxt =
|
||||
(opcode == 0xfc01 ? BTINTEL_PCIE_INTEL_HCI_RESET1 :
|
||||
BTINTEL_PCIE_HCI_RESET);
|
||||
bt_dev_dbg(data->hdev, "sent cmd: 0x%4.4x alive context changed: %s -> %s",
|
||||
opcode, btintel_pcie_alivectxt_state2str(old_ctxt),
|
||||
btintel_pcie_alivectxt_state2str(data->alive_intr_ctxt));
|
||||
if (opcode == HCI_OP_RESET) {
|
||||
data->gp0_received = false;
|
||||
ret = wait_event_timeout(data->gp0_wait_q,
|
||||
data->gp0_received,
|
||||
msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT_MS));
|
||||
if (!ret) {
|
||||
hdev->stat.err_tx++;
|
||||
bt_dev_err(hdev, "No alive interrupt received for %s",
|
||||
btintel_pcie_alivectxt_state2str(data->alive_intr_ctxt));
|
||||
ret = -ETIME;
|
||||
goto exit_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
hdev->stat.byte_tx += skb->len;
|
||||
kfree_skb(skb);
|
||||
|
||||
@ -1128,7 +1387,7 @@ static void btintel_pcie_release_hdev(struct btintel_pcie_data *data)
|
||||
data->hdev = NULL;
|
||||
}
|
||||
|
||||
static int btintel_pcie_setup(struct hci_dev *hdev)
|
||||
static int btintel_pcie_setup_internal(struct hci_dev *hdev)
|
||||
{
|
||||
const u8 param[1] = { 0xFF };
|
||||
struct intel_version_tlv ver_tlv;
|
||||
@ -1219,6 +1478,32 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int btintel_pcie_setup(struct hci_dev *hdev)
|
||||
{
|
||||
int err, fw_dl_retry = 0;
|
||||
struct btintel_pcie_data *data = hci_get_drvdata(hdev);
|
||||
|
||||
while ((err = btintel_pcie_setup_internal(hdev)) && fw_dl_retry++ < 1) {
|
||||
bt_dev_err(hdev, "Firmware download retry count: %d",
|
||||
fw_dl_retry);
|
||||
err = btintel_pcie_reset_bt(data);
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Failed to do shr reset: %d", err);
|
||||
break;
|
||||
}
|
||||
usleep_range(10000, 12000);
|
||||
btintel_pcie_reset_ia(data);
|
||||
btintel_pcie_config_msix(data);
|
||||
err = btintel_pcie_enable_bt(data);
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Failed to enable hardware: %d", err);
|
||||
break;
|
||||
}
|
||||
btintel_pcie_start_rx(data);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static int btintel_pcie_setup_hdev(struct btintel_pcie_data *data)
|
||||
{
|
||||
int err;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#define BTINTEL_PCIE_CSR_HW_REV_REG (BTINTEL_PCIE_CSR_BASE + 0x028)
|
||||
#define BTINTEL_PCIE_CSR_RF_ID_REG (BTINTEL_PCIE_CSR_BASE + 0x09C)
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_REG (BTINTEL_PCIE_CSR_BASE + 0x108)
|
||||
#define BTINTEL_PCIE_CSR_IPC_SLEEP_CTL_REG (BTINTEL_PCIE_CSR_BASE + 0x114)
|
||||
#define BTINTEL_PCIE_CSR_CI_ADDR_LSB_REG (BTINTEL_PCIE_CSR_BASE + 0x118)
|
||||
#define BTINTEL_PCIE_CSR_CI_ADDR_MSB_REG (BTINTEL_PCIE_CSR_BASE + 0x11C)
|
||||
#define BTINTEL_PCIE_CSR_IMG_RESPONSE_REG (BTINTEL_PCIE_CSR_BASE + 0x12C)
|
||||
@ -22,6 +23,8 @@
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT (BIT(6))
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT (BIT(7))
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_ACCESS_STS (BIT(20))
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_STS (BIT(28))
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_DISCON (BIT(29))
|
||||
#define BTINTEL_PCIE_CSR_FUNC_CTRL_SW_RESET (BIT(31))
|
||||
|
||||
/* Value for BTINTEL_PCIE_CSR_BOOT_STAGE register */
|
||||
@ -32,6 +35,7 @@
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_IML_LOCKDOWN (BIT(11))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_MAC_ACCESS_ON (BIT(16))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_ALIVE (BIT(23))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_D3_STATE_READY (BIT(24))
|
||||
|
||||
/* Registers for MSI-X */
|
||||
#define BTINTEL_PCIE_CSR_MSIX_BASE (0x2000)
|
||||
@ -55,6 +59,16 @@ enum msix_hw_int_causes {
|
||||
BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0 = BIT(0), /* cause 32 */
|
||||
};
|
||||
|
||||
/* PCIe device states
|
||||
* Host-Device interface is active
|
||||
* Host-Device interface is inactive(as reflected by IPC_SLEEP_CONTROL_CSR_AD)
|
||||
* Host-Device interface is inactive(as reflected by IPC_SLEEP_CONTROL_CSR_AD)
|
||||
*/
|
||||
enum {
|
||||
BTINTEL_PCIE_STATE_D0 = 0,
|
||||
BTINTEL_PCIE_STATE_D3_HOT = 2,
|
||||
BTINTEL_PCIE_STATE_D3_COLD = 3,
|
||||
};
|
||||
#define BTINTEL_PCIE_MSIX_NON_AUTO_CLEAR_CAUSE BIT(7)
|
||||
|
||||
/* Minimum and Maximum number of MSI-X Vector
|
||||
@ -67,7 +81,7 @@ enum msix_hw_int_causes {
|
||||
#define BTINTEL_DEFAULT_MAC_ACCESS_TIMEOUT_US 200000
|
||||
|
||||
/* Default interrupt timeout in msec */
|
||||
#define BTINTEL_DEFAULT_INTR_TIMEOUT 3000
|
||||
#define BTINTEL_DEFAULT_INTR_TIMEOUT_MS 3000
|
||||
|
||||
/* The number of descriptors in TX/RX queues */
|
||||
#define BTINTEL_DESCS_COUNT 16
|
||||
@ -343,6 +357,7 @@ struct rxq {
|
||||
* @ia: Index Array struct
|
||||
* @txq: TX Queue struct
|
||||
* @rxq: RX Queue struct
|
||||
* @alive_intr_ctxt: Alive interrupt context
|
||||
*/
|
||||
struct btintel_pcie_data {
|
||||
struct pci_dev *pdev;
|
||||
@ -389,6 +404,7 @@ struct btintel_pcie_data {
|
||||
struct ia ia;
|
||||
struct txq txq;
|
||||
struct rxq rxq;
|
||||
u32 alive_intr_ctxt;
|
||||
};
|
||||
|
||||
static inline u32 btintel_pcie_rd_reg32(struct btintel_pcie_data *data,
|
||||
|
@ -324,7 +324,7 @@ int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
|
||||
wmt_params.data = NULL;
|
||||
wmt_params.status = NULL;
|
||||
|
||||
/* Activate funciton the firmware providing to */
|
||||
/* Activate function the firmware providing to */
|
||||
err = wmt_cmd_sync(hdev, &wmt_params);
|
||||
if (err < 0) {
|
||||
bt_dev_err(hdev, "Failed to send wmt rst (%d)", err);
|
||||
@ -1215,7 +1215,6 @@ static int btmtk_usb_isointf_init(struct hci_dev *hdev)
|
||||
struct sk_buff *skb;
|
||||
int err;
|
||||
|
||||
init_usb_anchor(&btmtk_data->isopkt_anchor);
|
||||
spin_lock_init(&btmtk_data->isorxlock);
|
||||
|
||||
__set_mtk_intr_interface(hdev);
|
||||
|
@ -681,7 +681,7 @@ static int btmtksdio_open(struct hci_dev *hdev)
|
||||
if (err < 0)
|
||||
goto err_release_irq;
|
||||
|
||||
/* Explitly set write-1-clear method */
|
||||
/* Explicitly set write-1-clear method */
|
||||
val = sdio_readl(bdev->func, MTK_REG_CHCR, &err);
|
||||
if (err < 0)
|
||||
goto err_release_irq;
|
||||
@ -1328,6 +1328,8 @@ static int btmtksdio_probe(struct sdio_func *func,
|
||||
{
|
||||
struct btmtksdio_dev *bdev;
|
||||
struct hci_dev *hdev;
|
||||
struct device_node *old_node;
|
||||
bool restore_node;
|
||||
int err;
|
||||
|
||||
bdev = devm_kzalloc(&func->dev, sizeof(*bdev), GFP_KERNEL);
|
||||
@ -1396,7 +1398,7 @@ static int btmtksdio_probe(struct sdio_func *func,
|
||||
if (pm_runtime_enabled(bdev->dev))
|
||||
pm_runtime_disable(bdev->dev);
|
||||
|
||||
/* As explaination in drivers/mmc/core/sdio_bus.c tells us:
|
||||
/* As explanation in drivers/mmc/core/sdio_bus.c tells us:
|
||||
* Unbound SDIO functions are always suspended.
|
||||
* During probe, the function is set active and the usage count
|
||||
* is incremented. If the driver supports runtime PM,
|
||||
@ -1411,13 +1413,24 @@ static int btmtksdio_probe(struct sdio_func *func,
|
||||
if (err)
|
||||
bt_dev_err(hdev, "failed to initialize device wakeup");
|
||||
|
||||
bdev->dev->of_node = of_find_compatible_node(NULL, NULL,
|
||||
"mediatek,mt7921s-bluetooth");
|
||||
restore_node = false;
|
||||
if (!of_device_is_compatible(bdev->dev->of_node, "mediatek,mt7921s-bluetooth")) {
|
||||
restore_node = true;
|
||||
old_node = bdev->dev->of_node;
|
||||
bdev->dev->of_node = of_find_compatible_node(NULL, NULL,
|
||||
"mediatek,mt7921s-bluetooth");
|
||||
}
|
||||
|
||||
bdev->reset = devm_gpiod_get_optional(bdev->dev, "reset",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(bdev->reset))
|
||||
err = PTR_ERR(bdev->reset);
|
||||
|
||||
if (restore_node) {
|
||||
of_node_put(bdev->dev->of_node);
|
||||
bdev->dev->of_node = old_node;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ mtk_stp_split(struct btmtkuart_dev *bdev, const unsigned char *data, int count,
|
||||
if (count <= 0)
|
||||
return NULL;
|
||||
|
||||
/* Tranlate to how much the size of data H4 can handle so far */
|
||||
/* Translate to how much the size of data H4 can handle so far */
|
||||
*sz_h4 = min_t(int, count, bdev->stp_dlen);
|
||||
|
||||
/* Update the remaining size of STP packet */
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <linux/crc8.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/string_helpers.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
@ -34,16 +35,17 @@
|
||||
/* NXP HW err codes */
|
||||
#define BTNXPUART_IR_HW_ERR 0xb0
|
||||
|
||||
#define FIRMWARE_W8987 "uart8987_bt_v0.bin"
|
||||
#define FIRMWARE_W8987 "uart8987_bt.bin"
|
||||
#define FIRMWARE_W8987_OLD "uartuart8987_bt.bin"
|
||||
#define FIRMWARE_W8997 "uart8997_bt_v4.bin"
|
||||
#define FIRMWARE_W8997_OLD "uartuart8997_bt_v4.bin"
|
||||
#define FIRMWARE_W9098 "uart9098_bt_v1.bin"
|
||||
#define FIRMWARE_W9098_OLD "uartuart9098_bt_v1.bin"
|
||||
#define FIRMWARE_IW416 "uartiw416_bt_v0.bin"
|
||||
#define FIRMWARE_IW416 "uartiw416_bt.bin"
|
||||
#define FIRMWARE_IW416_OLD "uartiw416_bt_v0.bin"
|
||||
#define FIRMWARE_IW612 "uartspi_n61x_v1.bin.se"
|
||||
#define FIRMWARE_IW615 "uartspi_iw610_v0.bin"
|
||||
#define FIRMWARE_SECURE_IW615 "uartspi_iw610_v0.bin.se"
|
||||
#define FIRMWARE_IW610 "uartspi_iw610.bin"
|
||||
#define FIRMWARE_SECURE_IW610 "uartspi_iw610.bin.se"
|
||||
#define FIRMWARE_IW624 "uartiw624_bt.bin"
|
||||
#define FIRMWARE_SECURE_IW624 "uartiw624_bt.bin.se"
|
||||
#define FIRMWARE_AW693 "uartaw693_bt.bin"
|
||||
@ -59,8 +61,8 @@
|
||||
#define CHIP_ID_IW624c 0x8001
|
||||
#define CHIP_ID_AW693a0 0x8200
|
||||
#define CHIP_ID_AW693a1 0x8201
|
||||
#define CHIP_ID_IW615a0 0x8800
|
||||
#define CHIP_ID_IW615a1 0x8801
|
||||
#define CHIP_ID_IW610a0 0x8800
|
||||
#define CHIP_ID_IW610a1 0x8801
|
||||
|
||||
#define FW_SECURE_MASK 0xc0
|
||||
#define FW_OPEN 0x00
|
||||
@ -81,6 +83,7 @@
|
||||
#define WAKEUP_METHOD_BREAK 1
|
||||
#define WAKEUP_METHOD_EXT_BREAK 2
|
||||
#define WAKEUP_METHOD_RTS 3
|
||||
#define WAKEUP_METHOD_GPIO 4
|
||||
#define WAKEUP_METHOD_INVALID 0xff
|
||||
|
||||
/* power save mode status */
|
||||
@ -134,6 +137,7 @@ struct ps_data {
|
||||
bool driver_sent_cmd;
|
||||
u16 h2c_ps_interval;
|
||||
u16 c2h_ps_interval;
|
||||
struct gpio_desc *h2c_ps_gpio;
|
||||
struct hci_dev *hdev;
|
||||
struct work_struct work;
|
||||
struct timer_list ps_timer;
|
||||
@ -364,7 +368,7 @@ static void ps_control(struct hci_dev *hdev, u8 ps_state)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
if (psdata->ps_state == ps_state ||
|
||||
!test_bit(BTNXPUART_SERDEV_OPEN, &nxpdev->tx_state))
|
||||
@ -372,6 +376,14 @@ static void ps_control(struct hci_dev *hdev, u8 ps_state)
|
||||
|
||||
mutex_lock(&psdata->ps_lock);
|
||||
switch (psdata->cur_h2c_wakeupmode) {
|
||||
case WAKEUP_METHOD_GPIO:
|
||||
if (ps_state == PS_STATE_AWAKE)
|
||||
gpiod_set_value_cansleep(psdata->h2c_ps_gpio, 0);
|
||||
else
|
||||
gpiod_set_value_cansleep(psdata->h2c_ps_gpio, 1);
|
||||
bt_dev_dbg(hdev, "Set h2c_ps_gpio: %s",
|
||||
str_high_low(ps_state == PS_STATE_SLEEP));
|
||||
break;
|
||||
case WAKEUP_METHOD_DTR:
|
||||
if (ps_state == PS_STATE_AWAKE)
|
||||
status = serdev_device_set_tiocm(nxpdev->serdev, TIOCM_DTR, 0);
|
||||
@ -421,15 +433,29 @@ static void ps_timeout_func(struct timer_list *t)
|
||||
}
|
||||
}
|
||||
|
||||
static void ps_setup(struct hci_dev *hdev)
|
||||
static int ps_setup(struct hci_dev *hdev)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
struct serdev_device *serdev = nxpdev->serdev;
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
|
||||
psdata->h2c_ps_gpio = devm_gpiod_get_optional(&serdev->dev, "device-wakeup",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(psdata->h2c_ps_gpio)) {
|
||||
bt_dev_err(hdev, "Error fetching device-wakeup-gpios: %ld",
|
||||
PTR_ERR(psdata->h2c_ps_gpio));
|
||||
return PTR_ERR(psdata->h2c_ps_gpio);
|
||||
}
|
||||
|
||||
if (!psdata->h2c_ps_gpio)
|
||||
psdata->h2c_wakeup_gpio = 0xff;
|
||||
|
||||
psdata->hdev = hdev;
|
||||
INIT_WORK(&psdata->work, ps_work_func);
|
||||
mutex_init(&psdata->ps_lock);
|
||||
timer_setup(&psdata->ps_timer, ps_timeout_func, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool ps_wakeup(struct btnxpuart_dev *nxpdev)
|
||||
@ -515,6 +541,9 @@ static int send_wakeup_method_cmd(struct hci_dev *hdev, void *data)
|
||||
pcmd.c2h_wakeupmode = psdata->c2h_wakeupmode;
|
||||
pcmd.c2h_wakeup_gpio = psdata->c2h_wakeup_gpio;
|
||||
switch (psdata->h2c_wakeupmode) {
|
||||
case WAKEUP_METHOD_GPIO:
|
||||
pcmd.h2c_wakeupmode = BT_CTRL_WAKEUP_METHOD_GPIO;
|
||||
break;
|
||||
case WAKEUP_METHOD_DTR:
|
||||
pcmd.h2c_wakeupmode = BT_CTRL_WAKEUP_METHOD_DSR;
|
||||
break;
|
||||
@ -549,6 +578,7 @@ static void ps_init(struct hci_dev *hdev)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
u8 default_h2c_wakeup_mode = DEFAULT_H2C_WAKEUP_MODE;
|
||||
|
||||
serdev_device_set_tiocm(nxpdev->serdev, 0, TIOCM_RTS);
|
||||
usleep_range(5000, 10000);
|
||||
@ -560,8 +590,17 @@ static void ps_init(struct hci_dev *hdev)
|
||||
psdata->c2h_wakeup_gpio = 0xff;
|
||||
|
||||
psdata->cur_h2c_wakeupmode = WAKEUP_METHOD_INVALID;
|
||||
if (psdata->h2c_ps_gpio)
|
||||
default_h2c_wakeup_mode = WAKEUP_METHOD_GPIO;
|
||||
|
||||
psdata->h2c_ps_interval = PS_DEFAULT_TIMEOUT_PERIOD_MS;
|
||||
switch (DEFAULT_H2C_WAKEUP_MODE) {
|
||||
|
||||
switch (default_h2c_wakeup_mode) {
|
||||
case WAKEUP_METHOD_GPIO:
|
||||
psdata->h2c_wakeupmode = WAKEUP_METHOD_GPIO;
|
||||
gpiod_set_value_cansleep(psdata->h2c_ps_gpio, 0);
|
||||
usleep_range(5000, 10000);
|
||||
break;
|
||||
case WAKEUP_METHOD_DTR:
|
||||
psdata->h2c_wakeupmode = WAKEUP_METHOD_DTR;
|
||||
serdev_device_set_tiocm(nxpdev->serdev, 0, TIOCM_DTR);
|
||||
@ -946,12 +985,12 @@ static char *nxp_get_fw_name_from_chipid(struct hci_dev *hdev, u16 chipid,
|
||||
else
|
||||
bt_dev_err(hdev, "Illegal loader version %02x", loader_ver);
|
||||
break;
|
||||
case CHIP_ID_IW615a0:
|
||||
case CHIP_ID_IW615a1:
|
||||
case CHIP_ID_IW610a0:
|
||||
case CHIP_ID_IW610a1:
|
||||
if ((loader_ver & FW_SECURE_MASK) == FW_OPEN)
|
||||
fw_name = FIRMWARE_IW615;
|
||||
fw_name = FIRMWARE_IW610;
|
||||
else if ((loader_ver & FW_SECURE_MASK) != FW_AUTH_ILLEGAL)
|
||||
fw_name = FIRMWARE_SECURE_IW615;
|
||||
fw_name = FIRMWARE_SECURE_IW610;
|
||||
else
|
||||
bt_dev_err(hdev, "Illegal loader version %02x", loader_ver);
|
||||
break;
|
||||
@ -971,6 +1010,9 @@ static char *nxp_get_old_fw_name_from_chipid(struct hci_dev *hdev, u16 chipid,
|
||||
case CHIP_ID_W9098:
|
||||
fw_name_old = FIRMWARE_W9098_OLD;
|
||||
break;
|
||||
case CHIP_ID_IW416:
|
||||
fw_name_old = FIRMWARE_IW416_OLD;
|
||||
break;
|
||||
}
|
||||
return fw_name_old;
|
||||
}
|
||||
@ -1275,6 +1317,9 @@ static int nxp_enqueue(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
psdata->c2h_wakeup_gpio = wakeup_parm.c2h_wakeup_gpio;
|
||||
psdata->h2c_wakeup_gpio = wakeup_parm.h2c_wakeup_gpio;
|
||||
switch (wakeup_parm.h2c_wakeupmode) {
|
||||
case BT_CTRL_WAKEUP_METHOD_GPIO:
|
||||
psdata->h2c_wakeupmode = WAKEUP_METHOD_GPIO;
|
||||
break;
|
||||
case BT_CTRL_WAKEUP_METHOD_DSR:
|
||||
psdata->h2c_wakeupmode = WAKEUP_METHOD_DTR;
|
||||
break;
|
||||
@ -1505,13 +1550,17 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
|
||||
|
||||
if (hci_register_dev(hdev) < 0) {
|
||||
dev_err(&serdev->dev, "Can't register HCI device\n");
|
||||
hci_free_dev(hdev);
|
||||
return -ENODEV;
|
||||
goto probe_fail;
|
||||
}
|
||||
|
||||
ps_setup(hdev);
|
||||
if (ps_setup(hdev))
|
||||
goto probe_fail;
|
||||
|
||||
return 0;
|
||||
|
||||
probe_fail:
|
||||
hci_free_dev(hdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static void nxp_serdev_remove(struct serdev_device *serdev)
|
||||
|
@ -1371,7 +1371,7 @@ int btrtl_shutdown_realtek(struct hci_dev *hdev)
|
||||
/* According to the vendor driver, BT must be reset on close to avoid
|
||||
* firmware crash.
|
||||
*/
|
||||
skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
|
||||
skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_CMD_TIMEOUT);
|
||||
if (IS_ERR(skb)) {
|
||||
ret = PTR_ERR(skb);
|
||||
bt_dev_err(hdev, "HCI reset during shutdown failed");
|
||||
|
@ -371,6 +371,12 @@ static const struct usb_device_id quirks_table[] = {
|
||||
/* QCA WCN785x chipset */
|
||||
{ USB_DEVICE(0x0cf3, 0xe700), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe0fc), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe0f3), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3623), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Broadcom BCM2035 */
|
||||
{ USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
|
||||
@ -524,6 +530,8 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe123), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
@ -563,6 +571,16 @@ static const struct usb_device_id quirks_table[] = {
|
||||
{ USB_DEVICE(0x043e, 0x3109), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional MediaTek MT7920 Bluetooth devices */
|
||||
{ USB_DEVICE(0x0489, 0xe134), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3620), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3621), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3622), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional MediaTek MT7921 Bluetooth devices */
|
||||
{ USB_DEVICE(0x0489, 0xe0c8), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
@ -630,12 +648,24 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional MediaTek MT7925 Bluetooth devices */
|
||||
{ USB_DEVICE(0x0489, 0xe111), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe113), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe118), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe11e), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe124), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe139), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe14f), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe150), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x0489, 0xe151), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3602), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3603), .driver_info = BTUSB_MEDIATEK |
|
||||
@ -846,6 +876,7 @@ struct btusb_data {
|
||||
|
||||
int (*suspend)(struct hci_dev *hdev);
|
||||
int (*resume)(struct hci_dev *hdev);
|
||||
int (*disconnect)(struct hci_dev *hdev);
|
||||
|
||||
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
|
||||
unsigned cmd_timeout_cnt;
|
||||
@ -1061,7 +1092,7 @@ static inline void btusb_free_frags(struct btusb_data *data)
|
||||
static int btusb_recv_event(struct btusb_data *data, struct sk_buff *skb)
|
||||
{
|
||||
if (data->intr_interval) {
|
||||
/* Trigger dequeue immediatelly if an event is received */
|
||||
/* Trigger dequeue immediately if an event is received */
|
||||
schedule_delayed_work(&data->rx_work, 0);
|
||||
}
|
||||
|
||||
@ -2616,13 +2647,14 @@ static void btusb_mtk_claim_iso_intf(struct btusb_data *data)
|
||||
}
|
||||
|
||||
set_bit(BTMTK_ISOPKT_OVER_INTR, &btmtk_data->flags);
|
||||
init_usb_anchor(&btmtk_data->isopkt_anchor);
|
||||
}
|
||||
|
||||
static void btusb_mtk_release_iso_intf(struct btusb_data *data)
|
||||
static void btusb_mtk_release_iso_intf(struct hci_dev *hdev)
|
||||
{
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(data->hdev);
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(hdev);
|
||||
|
||||
if (btmtk_data->isopkt_intf) {
|
||||
if (test_bit(BTMTK_ISOPKT_OVER_INTR, &btmtk_data->flags)) {
|
||||
usb_kill_anchored_urbs(&btmtk_data->isopkt_anchor);
|
||||
clear_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags);
|
||||
|
||||
@ -2636,6 +2668,16 @@ static void btusb_mtk_release_iso_intf(struct btusb_data *data)
|
||||
clear_bit(BTMTK_ISOPKT_OVER_INTR, &btmtk_data->flags);
|
||||
}
|
||||
|
||||
static int btusb_mtk_disconnect(struct hci_dev *hdev)
|
||||
{
|
||||
/* This function describes the specific additional steps taken by MediaTek
|
||||
* when Bluetooth usb driver's resume function is called.
|
||||
*/
|
||||
btusb_mtk_release_iso_intf(hdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btusb_mtk_reset(struct hci_dev *hdev, void *rst_data)
|
||||
{
|
||||
struct btusb_data *data = hci_get_drvdata(hdev);
|
||||
@ -2652,8 +2694,8 @@ static int btusb_mtk_reset(struct hci_dev *hdev, void *rst_data)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (test_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags))
|
||||
btusb_mtk_release_iso_intf(data);
|
||||
/* Release MediaTek ISO data interface */
|
||||
btusb_mtk_release_iso_intf(hdev);
|
||||
|
||||
btusb_stop_traffic(data);
|
||||
usb_kill_anchored_urbs(&data->tx_anchor);
|
||||
@ -2698,22 +2740,24 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
|
||||
btmtk_data->reset_sync = btusb_mtk_reset;
|
||||
|
||||
/* Claim ISO data interface and endpoint */
|
||||
btmtk_data->isopkt_intf = usb_ifnum_to_if(data->udev, MTK_ISO_IFNUM);
|
||||
if (btmtk_data->isopkt_intf)
|
||||
if (!test_bit(BTMTK_ISOPKT_OVER_INTR, &btmtk_data->flags)) {
|
||||
btmtk_data->isopkt_intf = usb_ifnum_to_if(data->udev, MTK_ISO_IFNUM);
|
||||
btusb_mtk_claim_iso_intf(data);
|
||||
}
|
||||
|
||||
return btmtk_usb_setup(hdev);
|
||||
}
|
||||
|
||||
static int btusb_mtk_shutdown(struct hci_dev *hdev)
|
||||
{
|
||||
struct btusb_data *data = hci_get_drvdata(hdev);
|
||||
struct btmtk_data *btmtk_data = hci_get_priv(hdev);
|
||||
int ret;
|
||||
|
||||
if (test_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags))
|
||||
btusb_mtk_release_iso_intf(data);
|
||||
ret = btmtk_usb_shutdown(hdev);
|
||||
|
||||
return btmtk_usb_shutdown(hdev);
|
||||
/* Release MediaTek iso interface after shutdown */
|
||||
btusb_mtk_release_iso_intf(hdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@ -3825,6 +3869,7 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
data->recv_acl = btmtk_usb_recv_acl;
|
||||
data->suspend = btmtk_usb_suspend;
|
||||
data->resume = btmtk_usb_resume;
|
||||
data->disconnect = btusb_mtk_disconnect;
|
||||
}
|
||||
|
||||
if (id->driver_info & BTUSB_SWAVE) {
|
||||
@ -3896,6 +3941,8 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
set_bit(HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_EXT_CREATE_CONN, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_WRITE_AUTH_PAYLOAD_TIMEOUT, &hdev->quirks);
|
||||
}
|
||||
|
||||
if (!reset)
|
||||
@ -4013,6 +4060,9 @@ static void btusb_disconnect(struct usb_interface *intf)
|
||||
if (data->diag)
|
||||
usb_set_intfdata(data->diag, NULL);
|
||||
|
||||
if (data->disconnect)
|
||||
data->disconnect(hdev);
|
||||
|
||||
hci_unregister_dev(hdev);
|
||||
|
||||
if (intf == data->intf) {
|
||||
|
@ -1068,17 +1068,17 @@ static struct clk *bcm_get_txco(struct device *dev)
|
||||
struct clk *clk;
|
||||
|
||||
/* New explicit name */
|
||||
clk = devm_clk_get(dev, "txco");
|
||||
if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
|
||||
clk = devm_clk_get_optional(dev, "txco");
|
||||
if (clk)
|
||||
return clk;
|
||||
|
||||
/* Deprecated name */
|
||||
clk = devm_clk_get(dev, "extclk");
|
||||
if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
|
||||
clk = devm_clk_get_optional(dev, "extclk");
|
||||
if (clk)
|
||||
return clk;
|
||||
|
||||
/* Original code used no name at all */
|
||||
return devm_clk_get(dev, NULL);
|
||||
return devm_clk_get_optional(dev, NULL);
|
||||
}
|
||||
|
||||
static int bcm_get_resources(struct bcm_device *dev)
|
||||
@ -1093,21 +1093,12 @@ static int bcm_get_resources(struct bcm_device *dev)
|
||||
return 0;
|
||||
|
||||
dev->txco_clk = bcm_get_txco(dev->dev);
|
||||
|
||||
/* Handle deferred probing */
|
||||
if (dev->txco_clk == ERR_PTR(-EPROBE_DEFER))
|
||||
if (IS_ERR(dev->txco_clk))
|
||||
return PTR_ERR(dev->txco_clk);
|
||||
|
||||
/* Ignore all other errors as before */
|
||||
if (IS_ERR(dev->txco_clk))
|
||||
dev->txco_clk = NULL;
|
||||
|
||||
dev->lpo_clk = devm_clk_get(dev->dev, "lpo");
|
||||
if (dev->lpo_clk == ERR_PTR(-EPROBE_DEFER))
|
||||
return PTR_ERR(dev->lpo_clk);
|
||||
|
||||
dev->lpo_clk = devm_clk_get_optional(dev->dev, "lpo");
|
||||
if (IS_ERR(dev->lpo_clk))
|
||||
dev->lpo_clk = NULL;
|
||||
return PTR_ERR(dev->lpo_clk);
|
||||
|
||||
/* Check if we accidentally fetched the lpo clock twice */
|
||||
if (dev->lpo_clk && clk_is_match(dev->lpo_clk, dev->txco_clk)) {
|
||||
|
@ -594,7 +594,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
|
||||
* Called by tty low level driver when receive data is
|
||||
* available.
|
||||
*
|
||||
* Arguments: tty pointer to tty isntance data
|
||||
* Arguments: tty pointer to tty instance data
|
||||
* data pointer to received data
|
||||
* flags pointer to flags for data
|
||||
* count count of received data in bytes
|
||||
|
@ -305,7 +305,7 @@ static void ll_device_woke_up(struct hci_uart *hu)
|
||||
hci_uart_tx_wakeup(hu);
|
||||
}
|
||||
|
||||
/* Enqueue frame for transmittion (padding, crc, etc) */
|
||||
/* Enqueue frame for transmission (padding, crc, etc) */
|
||||
/* may be called from two simultaneous tasklets */
|
||||
static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
||||
{
|
||||
|
@ -501,7 +501,7 @@ static int nokia_close(struct hci_uart *hu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Enqueue frame for transmittion (padding, crc, etc) */
|
||||
/* Enqueue frame for transmission (padding, crc, etc) */
|
||||
static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
||||
{
|
||||
struct nokia_bt_dev *btdev = hu->priv;
|
||||
|
@ -873,7 +873,7 @@ static void device_woke_up(struct hci_uart *hu)
|
||||
hci_uart_tx_wakeup(hu);
|
||||
}
|
||||
|
||||
/* Enqueue frame for transmittion (padding, crc, etc) may be called from
|
||||
/* Enqueue frame for transmission (padding, crc, etc) may be called from
|
||||
* two simultaneous tasklets.
|
||||
*/
|
||||
static int qca_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
||||
@ -1059,7 +1059,7 @@ static void qca_controller_memdump(struct work_struct *work)
|
||||
if (!seq_no) {
|
||||
|
||||
/* This is the first frame of memdump packet from
|
||||
* the controller, Disable IBS to recevie dump
|
||||
* the controller, Disable IBS to receive dump
|
||||
* with out any interruption, ideally time required for
|
||||
* the controller to send the dump is 8 seconds. let us
|
||||
* start timer to handle this asynchronous activity.
|
||||
@ -2294,13 +2294,6 @@ static int qca_init_regulators(struct qca_power *qca,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void qca_clk_disable_unprepare(void *data)
|
||||
{
|
||||
struct clk *clk = data;
|
||||
|
||||
clk_disable_unprepare(clk);
|
||||
}
|
||||
|
||||
static int qca_serdev_probe(struct serdev_device *serdev)
|
||||
{
|
||||
struct qca_serdev *qcadev;
|
||||
@ -2358,7 +2351,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
|
||||
* Backward compatibility with old DT sources. If the
|
||||
* node doesn't have the 'enable-gpios' property then
|
||||
* let's use the power sequencer. Otherwise, let's
|
||||
* drive everything outselves.
|
||||
* drive everything ourselves.
|
||||
*/
|
||||
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
|
||||
"bluetooth");
|
||||
@ -2433,25 +2426,12 @@ static int qca_serdev_probe(struct serdev_device *serdev)
|
||||
if (!qcadev->bt_en)
|
||||
power_ctrl_enabled = false;
|
||||
|
||||
qcadev->susclk = devm_clk_get_optional(&serdev->dev, NULL);
|
||||
qcadev->susclk = devm_clk_get_optional_enabled_with_rate(
|
||||
&serdev->dev, NULL, SUSCLK_RATE_32KHZ);
|
||||
if (IS_ERR(qcadev->susclk)) {
|
||||
dev_warn(&serdev->dev, "failed to acquire clk\n");
|
||||
return PTR_ERR(qcadev->susclk);
|
||||
}
|
||||
err = clk_set_rate(qcadev->susclk, SUSCLK_RATE_32KHZ);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = clk_prepare_enable(qcadev->susclk);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = devm_add_action_or_reset(&serdev->dev,
|
||||
qca_clk_disable_unprepare,
|
||||
qcadev->susclk);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
}
|
||||
|
||||
err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
|
||||
@ -2530,7 +2510,7 @@ static void qca_serdev_shutdown(struct device *dev)
|
||||
hci_dev_test_flag(hdev, HCI_SETUP))
|
||||
return;
|
||||
|
||||
/* The serdev must be in open state when conrol logic arrives
|
||||
/* The serdev must be in open state when control logic arrives
|
||||
* here, so also fix the use-after-free issue caused by that
|
||||
* the serdev is flushed or wrote after it is closed.
|
||||
*/
|
||||
|
@ -169,6 +169,27 @@ dpll_msg_add_temp(struct sk_buff *msg, struct dpll_device *dpll,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
dpll_msg_add_clock_quality_level(struct sk_buff *msg, struct dpll_device *dpll,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct dpll_device_ops *ops = dpll_device_ops(dpll);
|
||||
DECLARE_BITMAP(qls, DPLL_CLOCK_QUALITY_LEVEL_MAX) = { 0 };
|
||||
enum dpll_clock_quality_level ql;
|
||||
int ret;
|
||||
|
||||
if (!ops->clock_quality_level_get)
|
||||
return 0;
|
||||
ret = ops->clock_quality_level_get(dpll, dpll_priv(dpll), qls, extack);
|
||||
if (ret)
|
||||
return ret;
|
||||
for_each_set_bit(ql, qls, DPLL_CLOCK_QUALITY_LEVEL_MAX)
|
||||
if (nla_put_u32(msg, DPLL_A_CLOCK_QUALITY_LEVEL, ql))
|
||||
return -EMSGSIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
dpll_msg_add_pin_prio(struct sk_buff *msg, struct dpll_pin *pin,
|
||||
struct dpll_pin_ref *ref,
|
||||
@ -557,6 +578,9 @@ dpll_device_get_one(struct dpll_device *dpll, struct sk_buff *msg,
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = dpll_msg_add_lock_status(msg, dpll, extack);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = dpll_msg_add_clock_quality_level(msg, dpll, extack);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = dpll_msg_add_mode(msg, dpll, extack);
|
||||
|
@ -25,8 +25,8 @@
|
||||
* Bit 8 = 0x00100 = uLaw (instead of aLaw)
|
||||
* Bit 9 = 0x00200 = Disable DTMF detect on all B-channels via hardware
|
||||
* Bit 10 = spare
|
||||
* Bit 11 = 0x00800 = Force PCM bus into slave mode. (otherwhise auto)
|
||||
* or Bit 12 = 0x01000 = Force PCM bus into master mode. (otherwhise auto)
|
||||
* Bit 11 = 0x00800 = Force PCM bus into slave mode. (otherwise auto)
|
||||
* or Bit 12 = 0x01000 = Force PCM bus into master mode. (otherwise auto)
|
||||
* Bit 13 = spare
|
||||
* Bit 14 = 0x04000 = Use external ram (128K)
|
||||
* Bit 15 = 0x08000 = Use external ram (512K)
|
||||
@ -41,7 +41,7 @@
|
||||
* port: (optional or required for all ports on all installed cards)
|
||||
* HFC-4S/HFC-8S only bits:
|
||||
* Bit 0 = 0x001 = Use master clock for this S/T interface
|
||||
* (ony once per chip).
|
||||
* (only once per chip).
|
||||
* Bit 1 = 0x002 = transmitter line setup (non capacitive mode)
|
||||
* Don't use this unless you know what you are doing!
|
||||
* Bit 2 = 0x004 = Disable E-channel. (No E-channel processing)
|
||||
@ -82,7 +82,7 @@
|
||||
* By default (0), the PCM bus id is 100 for the card that is PCM master.
|
||||
* If multiple cards are PCM master (because they are not interconnected),
|
||||
* each card with PCM master will have increasing PCM id.
|
||||
* All PCM busses with the same ID are expected to be connected and have
|
||||
* All PCM buses with the same ID are expected to be connected and have
|
||||
* common time slots slots.
|
||||
* Only one chip of the PCM bus must be master, the others slave.
|
||||
* -1 means no support of PCM bus not even.
|
||||
@ -930,7 +930,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
|
||||
if (newmaster) {
|
||||
hc = newmaster;
|
||||
if (debug & DEBUG_HFCMULTI_PLXSD)
|
||||
printk(KERN_DEBUG "id=%d (0x%p) = syncronized with "
|
||||
printk(KERN_DEBUG "id=%d (0x%p) = synchronized with "
|
||||
"interface.\n", hc->id, hc);
|
||||
/* Enable new sync master */
|
||||
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
|
||||
@ -949,7 +949,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
|
||||
hc = pcmmaster;
|
||||
if (debug & DEBUG_HFCMULTI_PLXSD)
|
||||
printk(KERN_DEBUG
|
||||
"id=%d (0x%p) = PCM master syncronized "
|
||||
"id=%d (0x%p) = PCM master synchronized "
|
||||
"with QUARTZ\n", hc->id, hc);
|
||||
if (hc->ctype == HFC_TYPE_E1) {
|
||||
/* Use the crystal clock for the PCM
|
||||
@ -2001,7 +2001,7 @@ hfcmulti_tx(struct hfc_multi *hc, int ch)
|
||||
if (Zspace <= 0)
|
||||
Zspace += hc->Zlen;
|
||||
Zspace -= 4; /* keep not too full, so pointers will not overrun */
|
||||
/* fill transparent data only to maxinum transparent load (minus 4) */
|
||||
/* fill transparent data only to maximum transparent load (minus 4) */
|
||||
if (bch && test_bit(FLG_TRANSPARENT, &bch->Flags))
|
||||
Zspace = Zspace - hc->Zlen + hc->max_trans;
|
||||
if (Zspace <= 0) /* no space of 4 bytes */
|
||||
@ -4672,7 +4672,7 @@ init_e1_port_hw(struct hfc_multi *hc, struct hm_map *m)
|
||||
if (debug & DEBUG_HFCMULTI_INIT)
|
||||
printk(KERN_DEBUG
|
||||
"%s: PORT set optical "
|
||||
"interfacs: card(%d) "
|
||||
"interface: card(%d) "
|
||||
"port(%d)\n",
|
||||
__func__,
|
||||
HFC_cnt + 1, 1);
|
||||
|
@ -641,6 +641,7 @@ config NETDEVSIM
|
||||
depends on PTP_1588_CLOCK_MOCK || PTP_1588_CLOCK_MOCK=n
|
||||
select NET_DEVLINK
|
||||
select PAGE_POOL
|
||||
select NET_SHAPER
|
||||
help
|
||||
This driver is a developer testing tool and software model that can
|
||||
be used to test various control path networking APIs, especially
|
||||
|
@ -3206,15 +3206,11 @@ static int amt_newlink(struct net *net, struct net_device *dev,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (data[IFLA_AMT_RELAY_PORT])
|
||||
amt->relay_port = nla_get_be16(data[IFLA_AMT_RELAY_PORT]);
|
||||
else
|
||||
amt->relay_port = htons(IANA_AMT_UDP_PORT);
|
||||
amt->relay_port = nla_get_be16_default(data[IFLA_AMT_RELAY_PORT],
|
||||
htons(IANA_AMT_UDP_PORT));
|
||||
|
||||
if (data[IFLA_AMT_GATEWAY_PORT])
|
||||
amt->gw_port = nla_get_be16(data[IFLA_AMT_GATEWAY_PORT]);
|
||||
else
|
||||
amt->gw_port = htons(IANA_AMT_UDP_PORT);
|
||||
amt->gw_port = nla_get_be16_default(data[IFLA_AMT_GATEWAY_PORT],
|
||||
htons(IANA_AMT_UDP_PORT));
|
||||
|
||||
if (!amt->relay_port) {
|
||||
NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_AMT_DISCOVERY_IP],
|
||||
|
@ -84,7 +84,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
if (skb_copy_bits(skb, BAREUDP_BASE_HLEN, &ipversion,
|
||||
sizeof(ipversion))) {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
ipversion >>= 4;
|
||||
@ -94,7 +94,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
} else if (ipversion == 6 && bareudp->multi_proto_mode) {
|
||||
proto = htons(ETH_P_IPV6);
|
||||
} else {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
} else if (bareudp->ethertype == htons(ETH_P_MPLS_UC)) {
|
||||
@ -108,7 +108,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
ipv4_is_multicast(tunnel_hdr->daddr)) {
|
||||
proto = htons(ETH_P_MPLS_MC);
|
||||
} else {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
} else {
|
||||
@ -124,7 +124,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
(addr_type & IPV6_ADDR_MULTICAST)) {
|
||||
proto = htons(ETH_P_MPLS_MC);
|
||||
} else {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
@ -136,7 +136,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
proto,
|
||||
!net_eq(bareudp->net,
|
||||
dev_net(bareudp->dev)))) {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
tun_dst = udp_tun_rx_dst(skb, family, key, 0, 0);
|
||||
if (!tun_dst) {
|
||||
DEV_STATS_INC(bareudp->dev, rx_dropped);
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
skb_dst_set(skb, &tun_dst->dst);
|
||||
@ -317,7 +317,7 @@ static int bareudp_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
__be32 saddr;
|
||||
int err;
|
||||
|
||||
if (!skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
|
||||
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!sock)
|
||||
@ -387,7 +387,7 @@ static int bareudp6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
__be16 sport;
|
||||
int err;
|
||||
|
||||
if (!skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
|
||||
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!sock)
|
||||
|
@ -1480,7 +1480,7 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev)
|
||||
slave_disable_netpoll(slave);
|
||||
}
|
||||
|
||||
static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
|
||||
static int bond_netpoll_setup(struct net_device *dev)
|
||||
{
|
||||
struct bonding *bond = netdev_priv(dev);
|
||||
struct list_head *iter;
|
||||
@ -1549,6 +1549,7 @@ static void bond_compute_features(struct bonding *bond)
|
||||
{
|
||||
unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
|
||||
IFF_XMIT_DST_RELEASE_PERM;
|
||||
netdev_features_t gso_partial_features = NETIF_F_GSO_ESP;
|
||||
netdev_features_t vlan_features = BOND_VLAN_FEATURES;
|
||||
netdev_features_t enc_features = BOND_ENC_FEATURES;
|
||||
#ifdef CONFIG_XFRM_OFFLOAD
|
||||
@ -1581,6 +1582,9 @@ static void bond_compute_features(struct bonding *bond)
|
||||
BOND_XFRM_FEATURES);
|
||||
#endif /* CONFIG_XFRM_OFFLOAD */
|
||||
|
||||
if (slave->dev->hw_enc_features & NETIF_F_GSO_PARTIAL)
|
||||
gso_partial_features &= slave->dev->gso_partial_features;
|
||||
|
||||
mpls_features = netdev_increment_features(mpls_features,
|
||||
slave->dev->mpls_features,
|
||||
BOND_MPLS_FEATURES);
|
||||
@ -1594,6 +1598,11 @@ static void bond_compute_features(struct bonding *bond)
|
||||
}
|
||||
bond_dev->hard_header_len = max_hard_header_len;
|
||||
|
||||
if (gso_partial_features & NETIF_F_GSO_ESP)
|
||||
bond_dev->gso_partial_features |= NETIF_F_GSO_ESP;
|
||||
else
|
||||
bond_dev->gso_partial_features &= ~NETIF_F_GSO_ESP;
|
||||
|
||||
done:
|
||||
bond_dev->vlan_features = vlan_features;
|
||||
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
|
||||
@ -5690,8 +5699,11 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog,
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
if (!bond_xdp_check(bond))
|
||||
if (!bond_xdp_check(bond)) {
|
||||
BOND_NL_ERR(dev, extack,
|
||||
"No native XDP support for the current bonding mode");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
old_prog = bond->xdp_prog;
|
||||
bond->xdp_prog = prog;
|
||||
|
@ -188,14 +188,10 @@ static int vxcan_newlink(struct net *net, struct net_device *dev,
|
||||
|
||||
/* register peer device */
|
||||
if (data && data[VXCAN_INFO_PEER]) {
|
||||
struct nlattr *nla_peer;
|
||||
struct nlattr *nla_peer = data[VXCAN_INFO_PEER];
|
||||
|
||||
nla_peer = data[VXCAN_INFO_PEER];
|
||||
ifmp = nla_data(nla_peer);
|
||||
err = rtnl_nla_parse_ifinfomsg(peer_tb, nla_peer, extack);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
rtnl_nla_parse_ifinfomsg(peer_tb, nla_peer, extack);
|
||||
tbp = peer_tb;
|
||||
}
|
||||
|
||||
@ -208,9 +204,6 @@ static int vxcan_newlink(struct net *net, struct net_device *dev,
|
||||
}
|
||||
|
||||
peer_net = rtnl_link_get_net(net, tbp);
|
||||
if (IS_ERR(peer_net))
|
||||
return PTR_ERR(peer_net);
|
||||
|
||||
peer = rtnl_create_link(peer_net, ifname, name_assign_type,
|
||||
&vxcan_link_ops, tbp, extack);
|
||||
if (IS_ERR(peer)) {
|
||||
@ -302,6 +295,7 @@ static struct rtnl_link_ops vxcan_link_ops = {
|
||||
.newlink = vxcan_newlink,
|
||||
.dellink = vxcan_dellink,
|
||||
.policy = vxcan_policy,
|
||||
.peer_type = VXCAN_INFO_PEER,
|
||||
.maxtype = VXCAN_INFO_MAX,
|
||||
.get_link_net = vxcan_get_link_net,
|
||||
};
|
||||
|
@ -989,8 +989,7 @@ void b53_get_strings(struct dsa_switch *ds, int port, u32 stringset,
|
||||
|
||||
if (stringset == ETH_SS_STATS) {
|
||||
for (i = 0; i < mib_size; i++)
|
||||
strscpy(data + i * ETH_GSTRING_LEN,
|
||||
mibs[i].name, ETH_GSTRING_LEN);
|
||||
ethtool_puts(&data, mibs[i].name);
|
||||
} else if (stringset == ETH_SS_PHY_STATS) {
|
||||
phydev = b53_get_phy_device(ds, port);
|
||||
if (!phydev)
|
||||
|
@ -370,7 +370,7 @@ MODULE_DEVICE_TABLE(of, b53_mmap_of_table);
|
||||
|
||||
static struct platform_driver b53_mmap_driver = {
|
||||
.probe = b53_mmap_probe,
|
||||
.remove_new = b53_mmap_remove,
|
||||
.remove = b53_mmap_remove,
|
||||
.shutdown = b53_mmap_shutdown,
|
||||
.driver = {
|
||||
.name = "b53-switch",
|
||||
|
@ -682,7 +682,7 @@ static void b53_srab_shutdown(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver b53_srab_driver = {
|
||||
.probe = b53_srab_probe,
|
||||
.remove_new = b53_srab_remove,
|
||||
.remove = b53_srab_remove,
|
||||
.shutdown = b53_srab_shutdown,
|
||||
.driver = {
|
||||
.name = "b53-srab-switch",
|
||||
|
@ -513,12 +513,12 @@ static void bcm_sf2_crossbar_setup(struct bcm_sf2_priv *priv)
|
||||
u32 reg;
|
||||
int i;
|
||||
|
||||
mask = BIT(priv->num_crossbar_int_ports) - 1;
|
||||
mask = BIT(priv->num_crossbar_ext_bits) - 1;
|
||||
|
||||
reg = reg_readl(priv, REG_CROSSBAR);
|
||||
switch (priv->type) {
|
||||
case BCM4908_DEVICE_ID:
|
||||
shift = CROSSBAR_BCM4908_INT_P7 * priv->num_crossbar_int_ports;
|
||||
shift = CROSSBAR_BCM4908_INT_P7 * priv->num_crossbar_ext_bits;
|
||||
reg &= ~(mask << shift);
|
||||
if (0) /* FIXME */
|
||||
reg |= CROSSBAR_BCM4908_EXT_SERDES << shift;
|
||||
@ -536,7 +536,7 @@ static void bcm_sf2_crossbar_setup(struct bcm_sf2_priv *priv)
|
||||
|
||||
reg = reg_readl(priv, REG_CROSSBAR);
|
||||
for (i = 0; i < priv->num_crossbar_int_ports; i++) {
|
||||
shift = i * priv->num_crossbar_int_ports;
|
||||
shift = i * priv->num_crossbar_ext_bits;
|
||||
|
||||
dev_dbg(dev, "crossbar int port #%d - ext port #%d\n", i,
|
||||
(reg >> shift) & mask);
|
||||
@ -1183,8 +1183,8 @@ static void bcm_sf2_sw_get_strings(struct dsa_switch *ds, int port,
|
||||
int cnt = b53_get_sset_count(ds, port, stringset);
|
||||
|
||||
b53_get_strings(ds, port, stringset, data);
|
||||
bcm_sf2_cfp_get_strings(ds, port, stringset,
|
||||
data + cnt * ETH_GSTRING_LEN);
|
||||
data += cnt * ETH_GSTRING_LEN;
|
||||
bcm_sf2_cfp_get_strings(ds, port, stringset, &data);
|
||||
}
|
||||
|
||||
static void bcm_sf2_sw_get_ethtool_stats(struct dsa_switch *ds, int port,
|
||||
@ -1260,6 +1260,7 @@ struct bcm_sf2_of_data {
|
||||
unsigned int core_reg_align;
|
||||
unsigned int num_cfp_rules;
|
||||
unsigned int num_crossbar_int_ports;
|
||||
unsigned int num_crossbar_ext_bits;
|
||||
};
|
||||
|
||||
static const u16 bcm_sf2_4908_reg_offsets[] = {
|
||||
@ -1288,6 +1289,7 @@ static const struct bcm_sf2_of_data bcm_sf2_4908_data = {
|
||||
.reg_offsets = bcm_sf2_4908_reg_offsets,
|
||||
.num_cfp_rules = 256,
|
||||
.num_crossbar_int_ports = 2,
|
||||
.num_crossbar_ext_bits = 2,
|
||||
};
|
||||
|
||||
/* Register offsets for the SWITCH_REG_* block */
|
||||
@ -1399,6 +1401,7 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
|
||||
priv->core_reg_align = data->core_reg_align;
|
||||
priv->num_cfp_rules = data->num_cfp_rules;
|
||||
priv->num_crossbar_int_ports = data->num_crossbar_int_ports;
|
||||
priv->num_crossbar_ext_bits = data->num_crossbar_ext_bits;
|
||||
|
||||
priv->rcdev = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
||||
"switch");
|
||||
@ -1620,7 +1623,7 @@ static SIMPLE_DEV_PM_OPS(bcm_sf2_pm_ops,
|
||||
|
||||
static struct platform_driver bcm_sf2_driver = {
|
||||
.probe = bcm_sf2_sw_probe,
|
||||
.remove_new = bcm_sf2_sw_remove,
|
||||
.remove = bcm_sf2_sw_remove,
|
||||
.shutdown = bcm_sf2_sw_shutdown,
|
||||
.driver = {
|
||||
.name = "brcm-sf2",
|
||||
|
@ -75,6 +75,7 @@ struct bcm_sf2_priv {
|
||||
unsigned int core_reg_align;
|
||||
unsigned int num_cfp_rules;
|
||||
unsigned int num_crossbar_int_ports;
|
||||
unsigned int num_crossbar_ext_bits;
|
||||
|
||||
/* spinlock protecting access to the indirect registers */
|
||||
spinlock_t indir_lock;
|
||||
@ -227,8 +228,8 @@ int bcm_sf2_set_rxnfc(struct dsa_switch *ds, int port,
|
||||
int bcm_sf2_cfp_rst(struct bcm_sf2_priv *priv);
|
||||
void bcm_sf2_cfp_exit(struct dsa_switch *ds);
|
||||
int bcm_sf2_cfp_resume(struct dsa_switch *ds);
|
||||
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port,
|
||||
u32 stringset, uint8_t *data);
|
||||
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port, u32 stringset,
|
||||
uint8_t **data);
|
||||
void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
|
||||
uint64_t *data);
|
||||
int bcm_sf2_cfp_get_sset_count(struct dsa_switch *ds, int port, int sset);
|
||||
|
@ -1279,27 +1279,19 @@ static const struct bcm_sf2_cfp_stat {
|
||||
},
|
||||
};
|
||||
|
||||
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port,
|
||||
u32 stringset, uint8_t *data)
|
||||
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port, u32 stringset,
|
||||
uint8_t **data)
|
||||
{
|
||||
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
|
||||
unsigned int s = ARRAY_SIZE(bcm_sf2_cfp_stats);
|
||||
char buf[ETH_GSTRING_LEN];
|
||||
unsigned int i, j, iter;
|
||||
unsigned int i, j;
|
||||
|
||||
if (stringset != ETH_SS_STATS)
|
||||
return;
|
||||
|
||||
for (i = 1; i < priv->num_cfp_rules; i++) {
|
||||
for (j = 0; j < s; j++) {
|
||||
snprintf(buf, sizeof(buf),
|
||||
"CFP%03d_%sCntr",
|
||||
i, bcm_sf2_cfp_stats[j].name);
|
||||
iter = (i - 1) * s + j;
|
||||
strscpy(data + iter * ETH_GSTRING_LEN,
|
||||
buf, ETH_GSTRING_LEN);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < priv->num_cfp_rules; i++)
|
||||
for (j = 0; j < ARRAY_SIZE(bcm_sf2_cfp_stats); j++)
|
||||
ethtool_sprintf(data, "CFP%03d_%sCntr", i,
|
||||
bcm_sf2_cfp_stats[j].name);
|
||||
}
|
||||
|
||||
void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
|
||||
|
@ -121,8 +121,7 @@ static void dsa_loop_get_strings(struct dsa_switch *ds, int port,
|
||||
return;
|
||||
|
||||
for (i = 0; i < __DSA_LOOP_CNT_MAX; i++)
|
||||
memcpy(data + i * ETH_GSTRING_LEN,
|
||||
ps->ports[port].mib[i].name, ETH_GSTRING_LEN);
|
||||
ethtool_puts(&data, ps->ports[port].mib[i].name);
|
||||
}
|
||||
|
||||
static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,
|
||||
|
@ -294,12 +294,8 @@ static void hellcreek_get_strings(struct dsa_switch *ds, int port,
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hellcreek_counter); ++i) {
|
||||
const struct hellcreek_counter *counter = &hellcreek_counter[i];
|
||||
|
||||
strscpy(data + i * ETH_GSTRING_LEN,
|
||||
counter->name, ETH_GSTRING_LEN);
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(hellcreek_counter); ++i)
|
||||
ethtool_puts(&data, hellcreek_counter[i].name);
|
||||
}
|
||||
|
||||
static int hellcreek_get_sset_count(struct dsa_switch *ds, int port, int sset)
|
||||
@ -2105,7 +2101,7 @@ MODULE_DEVICE_TABLE(of, hellcreek_of_match);
|
||||
|
||||
static struct platform_driver hellcreek_driver = {
|
||||
.probe = hellcreek_probe,
|
||||
.remove_new = hellcreek_remove,
|
||||
.remove = hellcreek_remove,
|
||||
.shutdown = hellcreek_shutdown,
|
||||
.driver = {
|
||||
.name = "hellcreek",
|
||||
|
@ -2249,7 +2249,7 @@ MODULE_DEVICE_TABLE(of, gswip_of_match);
|
||||
|
||||
static struct platform_driver gswip_driver = {
|
||||
.probe = gswip_probe,
|
||||
.remove_new = gswip_remove,
|
||||
.remove = gswip_remove,
|
||||
.shutdown = gswip_shutdown,
|
||||
.driver = {
|
||||
.name = "gswip",
|
||||
|
@ -1131,6 +1131,10 @@ void ksz9477_config_cpu_port(struct dsa_switch *ds)
|
||||
if (i == dev->cpu_port)
|
||||
continue;
|
||||
ksz_port_stp_state_set(ds, i, BR_STATE_DISABLED);
|
||||
|
||||
/* Power down the internal PHY if port is unused. */
|
||||
if (dsa_is_unused_port(ds, i) && dev->info->internal_phy[i])
|
||||
ksz_pwrite16(dev, i, 0x100, BMCR_PDOWN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Microchip KSZ9477 series register access through I2C
|
||||
*
|
||||
* Copyright (C) 2018-2019 Microchip Technology Inc.
|
||||
* Copyright (C) 2018-2024 Microchip Technology Inc.
|
||||
*/
|
||||
|
||||
#include <linux/i2c.h>
|
||||
@ -16,6 +16,8 @@ KSZ_REGMAP_TABLE(ksz9477, not_used, 16, 0, 0);
|
||||
|
||||
static int ksz9477_i2c_probe(struct i2c_client *i2c)
|
||||
{
|
||||
const struct ksz_chip_data *chip;
|
||||
struct device *ddev = &i2c->dev;
|
||||
struct regmap_config rc;
|
||||
struct ksz_device *dev;
|
||||
int i, ret;
|
||||
@ -24,6 +26,12 @@ static int ksz9477_i2c_probe(struct i2c_client *i2c)
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
chip = device_get_match_data(ddev);
|
||||
if (!chip)
|
||||
return -EINVAL;
|
||||
|
||||
/* Save chip id to do special initialization when probing. */
|
||||
dev->chip_id = chip->chip_id;
|
||||
for (i = 0; i < __KSZ_NUM_REGMAPS; i++) {
|
||||
rc = ksz9477_regmap_config[i];
|
||||
rc.lock_arg = &dev->regmap_mutex;
|
||||
@ -111,6 +119,10 @@ static const struct of_device_id ksz9477_dt_ids[] = {
|
||||
.compatible = "microchip,ksz9567",
|
||||
.data = &ksz_switch_chips[KSZ9567]
|
||||
},
|
||||
{
|
||||
.compatible = "microchip,lan9646",
|
||||
.data = &ksz_switch_chips[LAN9646]
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user