Skip to content

Commit 65ada09

Browse files
author
Martin KaFai Lau
committed
Merge branch 'bpf-next/net' into for-next
No conflicts. Signed-off-by: Martin KaFai Lau <[email protected]>
2 parents 7361c86 + 03de843 commit 65ada09

File tree

54 files changed

+1176
-443
lines changed

Some content is hidden

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

54 files changed

+1176
-443
lines changed

Documentation/admin-guide/sysctl/net.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ mem_pcpu_rsv
212212

213213
Per-cpu reserved forward alloc cache size in page units. Default 1MB per CPU.
214214

215+
bypass_prot_mem
216+
---------------
217+
218+
Skip charging socket buffers to the global per-protocol memory
219+
accounting controlled by net.ipv4.tcp_mem, net.ipv4.udp_mem, etc.
220+
221+
Default: 0 (off)
222+
215223
rmem_default
216224
------------
217225

@@ -406,6 +414,23 @@ to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
406414
If set to 1 (default), hash rethink is performed on listening socket.
407415
If set to 0, hash rethink is not performed.
408416

417+
txq_reselection_ms
418+
------------------
419+
420+
Controls how often (in ms) a busy connected flow can select another tx queue.
421+
422+
A resection is desirable when/if user thread has migrated and XPS
423+
would select a different queue. Same can occur without XPS
424+
if the flow hash has changed.
425+
426+
But switching txq can introduce reorders, especially if the
427+
old queue is under high pressure. Modern TCP stacks deal
428+
well with reorders if they happen not too often.
429+
430+
To disable this feature, set the value to 0.
431+
432+
Default : 1000
433+
409434
gro_normal_batch
410435
----------------
411436

Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
compatible:
1919
enum:
2020
- airoha,en7581-npu
21+
- airoha,an7583-npu
2122

2223
reg:
2324
maxItems: 1
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/amd,xgbe-seattle-v1a.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: AMD XGBE Seattle v1a
8+
9+
maintainers:
10+
- Shyam Sundar S K <[email protected]>
11+
12+
allOf:
13+
- $ref: /schemas/net/ethernet-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
const: amd,xgbe-seattle-v1a
18+
19+
reg:
20+
items:
21+
- description: MAC registers
22+
- description: PCS registers
23+
- description: SerDes Rx/Tx registers
24+
- description: SerDes integration registers (1/2)
25+
- description: SerDes integration registers (2/2)
26+
27+
interrupts:
28+
description: Device interrupts. The first entry is the general device
29+
interrupt. If amd,per-channel-interrupt is specified, each DMA channel
30+
interrupt must be specified. The last entry is the PCS auto-negotiation
31+
interrupt.
32+
minItems: 2
33+
maxItems: 6
34+
35+
clocks:
36+
items:
37+
- description: DMA clock for the device
38+
- description: PTP clock for the device
39+
40+
clock-names:
41+
items:
42+
- const: dma_clk
43+
- const: ptp_clk
44+
45+
iommus:
46+
maxItems: 1
47+
48+
phy-mode: true
49+
50+
dma-coherent: true
51+
52+
amd,per-channel-interrupt:
53+
description: Indicates that Rx and Tx complete will generate a unique
54+
interrupt for each DMA channel.
55+
type: boolean
56+
57+
amd,speed-set:
58+
description: >
59+
Speed capabilities of the device.
60+
0 = 1GbE and 10GbE
61+
1 = 2.5GbE and 10GbE
62+
$ref: /schemas/types.yaml#/definitions/uint32
63+
enum: [0, 1]
64+
65+
amd,serdes-blwc:
66+
description: Baseline wandering correction enablement for each speed.
67+
$ref: /schemas/types.yaml#/definitions/uint32-array
68+
minItems: 3
69+
maxItems: 3
70+
items:
71+
enum: [0, 1]
72+
73+
amd,serdes-cdr-rate:
74+
description: CDR rate speed selection for each speed.
75+
$ref: /schemas/types.yaml#/definitions/uint32-array
76+
items:
77+
- description: CDR rate for 1GbE
78+
- description: CDR rate for 2.5GbE
79+
- description: CDR rate for 10GbE
80+
81+
amd,serdes-pq-skew:
82+
description: PQ data sampling skew for each speed.
83+
$ref: /schemas/types.yaml#/definitions/uint32-array
84+
items:
85+
- description: PQ skew for 1GbE
86+
- description: PQ skew for 2.5GbE
87+
- description: PQ skew for 10GbE
88+
89+
amd,serdes-tx-amp:
90+
description: TX amplitude boost for each speed.
91+
$ref: /schemas/types.yaml#/definitions/uint32-array
92+
items:
93+
- description: TX amplitude for 1GbE
94+
- description: TX amplitude for 2.5GbE
95+
- description: TX amplitude for 10GbE
96+
97+
amd,serdes-dfe-tap-config:
98+
description: DFE taps available to run for each speed.
99+
$ref: /schemas/types.yaml#/definitions/uint32-array
100+
items:
101+
- description: DFE taps available for 1GbE
102+
- description: DFE taps available for 2.5GbE
103+
- description: DFE taps available for 10GbE
104+
105+
amd,serdes-dfe-tap-enable:
106+
description: DFE taps to enable for each speed.
107+
$ref: /schemas/types.yaml#/definitions/uint32-array
108+
items:
109+
- description: DFE taps to enable for 1GbE
110+
- description: DFE taps to enable for 2.5GbE
111+
- description: DFE taps to enable for 10GbE
112+
113+
required:
114+
- compatible
115+
- reg
116+
- interrupts
117+
- clocks
118+
- clock-names
119+
- phy-mode
120+
121+
unevaluatedProperties: false
122+
123+
examples:
124+
- |
125+
ethernet@e0700000 {
126+
compatible = "amd,xgbe-seattle-v1a";
127+
reg = <0xe0700000 0x80000>,
128+
<0xe0780000 0x80000>,
129+
<0xe1240800 0x00400>,
130+
<0xe1250000 0x00060>,
131+
<0xe1250080 0x00004>;
132+
interrupts = <0 325 4>,
133+
<0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>,
134+
<0 323 4>;
135+
amd,per-channel-interrupt;
136+
clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>;
137+
clock-names = "dma_clk", "ptp_clk";
138+
phy-mode = "xgmii";
139+
mac-address = [ 02 a1 a2 a3 a4 a5 ];
140+
amd,speed-set = <0>;
141+
amd,serdes-blwc = <1>, <1>, <0>;
142+
amd,serdes-cdr-rate = <2>, <2>, <7>;
143+
amd,serdes-pq-skew = <10>, <10>, <30>;
144+
amd,serdes-tx-amp = <15>, <15>, <10>;
145+
amd,serdes-dfe-tap-config = <3>, <3>, <1>;
146+
amd,serdes-dfe-tap-enable = <0>, <0>, <127>;
147+
};

Documentation/devicetree/bindings/net/amd-xgbe.txt

Lines changed: 0 additions & 76 deletions
This file was deleted.

Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ properties:
4141
therefore discouraged.
4242
maxItems: 1
4343

44+
clocks:
45+
maxItems: 1
46+
4447
spi-cpha: true
4548
spi-cpol: true
4649

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5124,7 +5124,6 @@ F: Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
51245124
F: drivers/net/ethernet/broadcom/genet/
51255125
F: drivers/net/ethernet/broadcom/unimac.h
51265126
F: drivers/net/mdio/mdio-bcm-unimac.c
5127-
F: include/linux/platform_data/bcmgenet.h
51285127
F: include/linux/platform_data/mdio-bcm-unimac.h
51295128

51305129
BROADCOM IPROC ARM ARCHITECTURE

drivers/net/dsa/b53/b53_common.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,25 @@ static void b53_port_set_learning(struct b53_device *dev, int port,
632632
b53_write16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, reg);
633633
}
634634

635+
static void b53_port_set_isolated(struct b53_device *dev, int port,
636+
bool isolated)
637+
{
638+
u8 offset;
639+
u16 reg;
640+
641+
if (is5325(dev))
642+
offset = B53_PROTECTED_PORT_SEL_25;
643+
else
644+
offset = B53_PROTECTED_PORT_SEL;
645+
646+
b53_read16(dev, B53_CTRL_PAGE, offset, &reg);
647+
if (isolated)
648+
reg |= BIT(port);
649+
else
650+
reg &= ~BIT(port);
651+
b53_write16(dev, B53_CTRL_PAGE, offset, reg);
652+
}
653+
635654
static void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
636655
{
637656
struct b53_device *dev = ds->priv;
@@ -652,6 +671,7 @@ int b53_setup_port(struct dsa_switch *ds, int port)
652671
b53_port_set_ucast_flood(dev, port, true);
653672
b53_port_set_mcast_flood(dev, port, true);
654673
b53_port_set_learning(dev, port, false);
674+
b53_port_set_isolated(dev, port, false);
655675

656676
/* Force all traffic to go to the CPU port to prevent the ASIC from
657677
* trying to forward to bridged ports on matching FDB entries, then
@@ -2318,7 +2338,7 @@ int b53_br_flags_pre(struct dsa_switch *ds, int port,
23182338
struct netlink_ext_ack *extack)
23192339
{
23202340
struct b53_device *dev = ds->priv;
2321-
unsigned long mask = (BR_FLOOD | BR_MCAST_FLOOD);
2341+
unsigned long mask = (BR_FLOOD | BR_MCAST_FLOOD | BR_ISOLATED);
23222342

23232343
if (!is5325(dev))
23242344
mask |= BR_LEARNING;
@@ -2343,6 +2363,9 @@ int b53_br_flags(struct dsa_switch *ds, int port,
23432363
if (flags.mask & BR_LEARNING)
23442364
b53_port_set_learning(ds->priv, port,
23452365
!!(flags.val & BR_LEARNING));
2366+
if (flags.mask & BR_ISOLATED)
2367+
b53_port_set_isolated(ds->priv, port,
2368+
!!(flags.val & BR_ISOLATED));
23462369

23472370
return 0;
23482371
}

drivers/net/dsa/b53/b53_regs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
#define B53_SWITCH_CTRL 0x22
121121
#define B53_MII_DUMB_FWDG_EN BIT(6)
122122

123+
/* Protected Port Selection (16 bit) */
124+
#define B53_PROTECTED_PORT_SEL 0x24
125+
#define B53_PROTECTED_PORT_SEL_25 0x26
126+
123127
/* (16 bit) */
124128
#define B53_UC_FLOOD_MASK 0x32
125129
#define B53_MC_FLOOD_MASK 0x34

drivers/net/ethernet/airoha/airoha_eth.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,8 +2036,12 @@ static void airoha_ethtool_get_mac_stats(struct net_device *dev,
20362036
airoha_update_hw_stats(port);
20372037
do {
20382038
start = u64_stats_fetch_begin(&port->stats.syncp);
2039+
stats->FramesTransmittedOK = port->stats.tx_ok_pkts;
2040+
stats->OctetsTransmittedOK = port->stats.tx_ok_bytes;
20392041
stats->MulticastFramesXmittedOK = port->stats.tx_multicast;
20402042
stats->BroadcastFramesXmittedOK = port->stats.tx_broadcast;
2043+
stats->FramesReceivedOK = port->stats.rx_ok_pkts;
2044+
stats->OctetsReceivedOK = port->stats.rx_ok_bytes;
20412045
stats->BroadcastFramesReceivedOK = port->stats.rx_broadcast;
20422046
} while (u64_stats_fetch_retry(&port->stats.syncp, start));
20432047
}
@@ -2780,6 +2784,7 @@ static const struct ethtool_ops airoha_ethtool_ops = {
27802784
.get_drvinfo = airoha_ethtool_get_drvinfo,
27812785
.get_eth_mac_stats = airoha_ethtool_get_mac_stats,
27822786
.get_rmon_stats = airoha_ethtool_get_rmon_stats,
2787+
.get_link = ethtool_op_get_link,
27832788
};
27842789

27852790
static int airoha_metadata_dst_alloc(struct airoha_gdm_port *port)

0 commit comments

Comments
 (0)