Skip to content

Commit aba74e6

Browse files
committed
Merge tag 'net-6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireles and netfilter. Nothing major here. Over the last two weeks we gathered only around two-thirds of our normal weekly fix count, but delaying sending these until -rc7 seemed like a really bad idea. AFAIK we have no bugs under investigation. One or two reverts for stuff for which we haven't gotten a proper fix will likely come in the next PR. Current release - fix to a fix: - netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext - eth: gve: trigger RX NAPI instead of TX NAPI in gve_xsk_wakeup Previous releases - regressions: - net: reenable NETIF_F_IPV6_CSUM offload for BIG TCP packets - mptcp: - fix sleeping rcvmsg sleeping forever after bad recvbuffer adjust - fix TCP options overflow - prevent excessive coalescing on receive, fix throughput - net: fix memory leak in tcp_conn_request() if map insertion fails - wifi: cw1200: fix potential NULL dereference after conversion to GPIO descriptors - phy: micrel: dynamically control external clock of KSZ PHY, fix suspend behavior Previous releases - always broken: - af_packet: fix VLAN handling with MSG_PEEK - net: restrict SO_REUSEPORT to inet sockets - netdev-genl: avoid empty messages in NAPI get - dsa: microchip: fix set_ageing_time function on KSZ9477 and LAN937X - eth: - gve: XDP fixes around transmit, queue wakeup etc. - ti: icssg-prueth: fix firmware load sequence to prevent time jump which breaks timesync related operations Misc: - netlink: specs: mptcp: add missing attr and improve documentation" * tag 'net-6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits) net: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init net: ti: icssg-prueth: Fix firmware load sequence. mptcp: prevent excessive coalescing on receive mptcp: don't always assume copied data in mptcp_cleanup_rbuf() mptcp: fix recvbuffer adjust on sleeping rcvmsg ila: serialize calls to nf_register_net_hooks() af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK af_packet: fix vlan_get_tci() vs MSG_PEEK net: wwan: iosm: Properly check for valid exec stage in ipc_mmio_init() net: restrict SO_REUSEPORT to inet sockets net: reenable NETIF_F_IPV6_CSUM offload for BIG TCP packets net: sfc: Correct key_len for efx_tc_ct_zone_ht_params net: wwan: t7xx: Fix FSM command timeout issue sky2: Add device ID 11ab:4373 for Marvell 88E8075 mptcp: fix TCP options overflow. net: mv643xx_eth: fix an OF node reference leak gve: trigger RX NAPI instead of TX NAPI in gve_xsk_wakeup eth: bcmsysport: fix call balance of priv->clk handling routines net: llc: reset skb->transport_header netlink: specs: mptcp: fix missing doc ...
2 parents ee063c2 + ce21419 commit aba74e6

File tree

59 files changed

+849
-381
lines changed

Some content is hidden

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

59 files changed

+849
-381
lines changed

Documentation/netlink/specs/mptcp_pm.yaml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,65 +22,67 @@ definitions:
2222
doc: unused event
2323
-
2424
name: created
25-
doc:
26-
token, family, saddr4 | saddr6, daddr4 | daddr6, sport, dport
25+
doc: >-
2726
A new MPTCP connection has been created. It is the good time to
2827
allocate memory and send ADD_ADDR if needed. Depending on the
2928
traffic-patterns it can take a long time until the
3029
MPTCP_EVENT_ESTABLISHED is sent.
30+
Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport,
31+
dport, server-side.
3132
-
3233
name: established
33-
doc:
34-
token, family, saddr4 | saddr6, daddr4 | daddr6, sport, dport
34+
doc: >-
3535
A MPTCP connection is established (can start new subflows).
36+
Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport,
37+
dport, server-side.
3638
-
3739
name: closed
38-
doc:
39-
token
40+
doc: >-
4041
A MPTCP connection has stopped.
42+
Attribute: token.
4143
-
4244
name: announced
4345
value: 6
44-
doc:
45-
token, rem_id, family, daddr4 | daddr6 [, dport]
46+
doc: >-
4647
A new address has been announced by the peer.
48+
Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].
4749
-
4850
name: removed
49-
doc:
50-
token, rem_id
51+
doc: >-
5152
An address has been lost by the peer.
53+
Attributes: token, rem_id.
5254
-
5355
name: sub-established
5456
value: 10
55-
doc:
56-
token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 | daddr6, sport,
57-
dport, backup, if_idx [, error]
57+
doc: >-
5858
A new subflow has been established. 'error' should not be set.
59+
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
60+
daddr6, sport, dport, backup, if_idx [, error].
5961
-
6062
name: sub-closed
61-
doc:
62-
token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 | daddr6, sport,
63-
dport, backup, if_idx [, error]
63+
doc: >-
6464
A subflow has been closed. An error (copy of sk_err) could be set if an
6565
error has been detected for this subflow.
66+
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
67+
daddr6, sport, dport, backup, if_idx [, error].
6668
-
6769
name: sub-priority
6870
value: 13
69-
doc:
70-
token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 | daddr6, sport,
71-
dport, backup, if_idx [, error]
71+
doc: >-
7272
The priority of a subflow has changed. 'error' should not be set.
73+
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
74+
daddr6, sport, dport, backup, if_idx [, error].
7375
-
7476
name: listener-created
7577
value: 15
76-
doc:
77-
family, sport, saddr4 | saddr6
78+
doc: >-
7879
A new PM listener is created.
80+
Attributes: family, sport, saddr4 | saddr6.
7981
-
8082
name: listener-closed
81-
doc:
82-
family, sport, saddr4 | saddr6
83+
doc: >-
8384
A PM listener is closed.
85+
Attributes: family, sport, saddr4 | saddr6.
8486
8587
attribute-sets:
8688
-
@@ -306,8 +308,8 @@ operations:
306308
attributes:
307309
- addr
308310
-
309-
name: flush-addrs
310-
doc: flush addresses
311+
name: flush-addrs
312+
doc: Flush addresses
311313
attribute-set: endpoint
312314
dont-validate: [ strict ]
313315
flags: [ uns-admin-perm ]
@@ -351,7 +353,7 @@ operations:
351353
- addr-remote
352354
-
353355
name: announce
354-
doc: announce new sf
356+
doc: Announce new address
355357
attribute-set: attr
356358
dont-validate: [ strict ]
357359
flags: [ uns-admin-perm ]
@@ -362,7 +364,7 @@ operations:
362364
- token
363365
-
364366
name: remove
365-
doc: announce removal
367+
doc: Announce removal
366368
attribute-set: attr
367369
dont-validate: [ strict ]
368370
flags: [ uns-admin-perm ]
@@ -373,7 +375,7 @@ operations:
373375
- loc-id
374376
-
375377
name: subflow-create
376-
doc: todo
378+
doc: Create subflow
377379
attribute-set: attr
378380
dont-validate: [ strict ]
379381
flags: [ uns-admin-perm ]
@@ -385,7 +387,7 @@ operations:
385387
- addr-remote
386388
-
387389
name: subflow-destroy
388-
doc: todo
390+
doc: Destroy subflow
389391
attribute-set: attr
390392
dont-validate: [ strict ]
391393
flags: [ uns-admin-perm ]

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,6 +3607,7 @@ F: drivers/phy/qualcomm/phy-ath79-usb.c
36073607

36083608
ATHEROS ATH GENERIC UTILITIES
36093609
M: Kalle Valo <kvalo@kernel.org>
3610+
M: Jeff Johnson <jjohnson@kernel.org>
36103611
L: linux-wireless@vger.kernel.org
36113612
S: Supported
36123613
F: drivers/net/wireless/ath/*

drivers/net/dsa/microchip/ksz9477.c

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Microchip KSZ9477 switch driver main logic
44
*
5-
* Copyright (C) 2017-2019 Microchip Technology Inc.
5+
* Copyright (C) 2017-2024 Microchip Technology Inc.
66
*/
77

88
#include <linux/kernel.h>
@@ -983,26 +983,51 @@ void ksz9477_get_caps(struct ksz_device *dev, int port,
983983
int ksz9477_set_ageing_time(struct ksz_device *dev, unsigned int msecs)
984984
{
985985
u32 secs = msecs / 1000;
986-
u8 value;
987-
u8 data;
986+
u8 data, mult, value;
987+
u32 max_val;
988988
int ret;
989989

990-
value = FIELD_GET(SW_AGE_PERIOD_7_0_M, secs);
990+
#define MAX_TIMER_VAL ((1 << 8) - 1)
991991

992-
ret = ksz_write8(dev, REG_SW_LUE_CTRL_3, value);
993-
if (ret < 0)
994-
return ret;
992+
/* The aging timer comprises a 3-bit multiplier and an 8-bit second
993+
* value. Either of them cannot be zero. The maximum timer is then
994+
* 7 * 255 = 1785 seconds.
995+
*/
996+
if (!secs)
997+
secs = 1;
995998

996-
data = FIELD_GET(SW_AGE_PERIOD_10_8_M, secs);
999+
/* Return error if too large. */
1000+
else if (secs > 7 * MAX_TIMER_VAL)
1001+
return -EINVAL;
9971002

9981003
ret = ksz_read8(dev, REG_SW_LUE_CTRL_0, &value);
9991004
if (ret < 0)
10001005
return ret;
10011006

1002-
value &= ~SW_AGE_CNT_M;
1003-
value |= FIELD_PREP(SW_AGE_CNT_M, data);
1007+
/* Check whether there is need to update the multiplier. */
1008+
mult = FIELD_GET(SW_AGE_CNT_M, value);
1009+
max_val = MAX_TIMER_VAL;
1010+
if (mult > 0) {
1011+
/* Try to use the same multiplier already in the register as
1012+
* the hardware default uses multiplier 4 and 75 seconds for
1013+
* 300 seconds.
1014+
*/
1015+
max_val = DIV_ROUND_UP(secs, mult);
1016+
if (max_val > MAX_TIMER_VAL || max_val * mult != secs)
1017+
max_val = MAX_TIMER_VAL;
1018+
}
1019+
1020+
data = DIV_ROUND_UP(secs, max_val);
1021+
if (mult != data) {
1022+
value &= ~SW_AGE_CNT_M;
1023+
value |= FIELD_PREP(SW_AGE_CNT_M, data);
1024+
ret = ksz_write8(dev, REG_SW_LUE_CTRL_0, value);
1025+
if (ret < 0)
1026+
return ret;
1027+
}
10041028

1005-
return ksz_write8(dev, REG_SW_LUE_CTRL_0, value);
1029+
value = DIV_ROUND_UP(secs, data);
1030+
return ksz_write8(dev, REG_SW_LUE_CTRL_3, value);
10061031
}
10071032

10081033
void ksz9477_port_queue_split(struct ksz_device *dev, int port)

drivers/net/dsa/microchip/ksz9477_reg.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Microchip KSZ9477 register definitions
44
*
5-
* Copyright (C) 2017-2018 Microchip Technology Inc.
5+
* Copyright (C) 2017-2024 Microchip Technology Inc.
66
*/
77

88
#ifndef __KSZ9477_REGS_H
@@ -165,8 +165,6 @@
165165
#define SW_VLAN_ENABLE BIT(7)
166166
#define SW_DROP_INVALID_VID BIT(6)
167167
#define SW_AGE_CNT_M GENMASK(5, 3)
168-
#define SW_AGE_CNT_S 3
169-
#define SW_AGE_PERIOD_10_8_M GENMASK(10, 8)
170168
#define SW_RESV_MCAST_ENABLE BIT(2)
171169
#define SW_HASH_OPTION_M 0x03
172170
#define SW_HASH_OPTION_CRC 1

drivers/net/dsa/microchip/lan937x_main.c

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Microchip LAN937X switch driver main logic
3-
* Copyright (C) 2019-2022 Microchip Technology Inc.
3+
* Copyright (C) 2019-2024 Microchip Technology Inc.
44
*/
55
#include <linux/kernel.h>
66
#include <linux/module.h>
@@ -461,10 +461,66 @@ int lan937x_change_mtu(struct ksz_device *dev, int port, int new_mtu)
461461

462462
int lan937x_set_ageing_time(struct ksz_device *dev, unsigned int msecs)
463463
{
464-
u32 secs = msecs / 1000;
465-
u32 value;
464+
u8 data, mult, value8;
465+
bool in_msec = false;
466+
u32 max_val, value;
467+
u32 secs = msecs;
466468
int ret;
467469

470+
#define MAX_TIMER_VAL ((1 << 20) - 1)
471+
472+
/* The aging timer comprises a 3-bit multiplier and a 20-bit second
473+
* value. Either of them cannot be zero. The maximum timer is then
474+
* 7 * 1048575 = 7340025 seconds. As this value is too large for
475+
* practical use it can be interpreted as microseconds, making the
476+
* maximum timer 7340 seconds with finer control. This allows for
477+
* maximum 122 minutes compared to 29 minutes in KSZ9477 switch.
478+
*/
479+
if (msecs % 1000)
480+
in_msec = true;
481+
else
482+
secs /= 1000;
483+
if (!secs)
484+
secs = 1;
485+
486+
/* Return error if too large. */
487+
else if (secs > 7 * MAX_TIMER_VAL)
488+
return -EINVAL;
489+
490+
/* Configure how to interpret the number value. */
491+
ret = ksz_rmw8(dev, REG_SW_LUE_CTRL_2, SW_AGE_CNT_IN_MICROSEC,
492+
in_msec ? SW_AGE_CNT_IN_MICROSEC : 0);
493+
if (ret < 0)
494+
return ret;
495+
496+
ret = ksz_read8(dev, REG_SW_LUE_CTRL_0, &value8);
497+
if (ret < 0)
498+
return ret;
499+
500+
/* Check whether there is need to update the multiplier. */
501+
mult = FIELD_GET(SW_AGE_CNT_M, value8);
502+
max_val = MAX_TIMER_VAL;
503+
if (mult > 0) {
504+
/* Try to use the same multiplier already in the register as
505+
* the hardware default uses multiplier 4 and 75 seconds for
506+
* 300 seconds.
507+
*/
508+
max_val = DIV_ROUND_UP(secs, mult);
509+
if (max_val > MAX_TIMER_VAL || max_val * mult != secs)
510+
max_val = MAX_TIMER_VAL;
511+
}
512+
513+
data = DIV_ROUND_UP(secs, max_val);
514+
if (mult != data) {
515+
value8 &= ~SW_AGE_CNT_M;
516+
value8 |= FIELD_PREP(SW_AGE_CNT_M, data);
517+
ret = ksz_write8(dev, REG_SW_LUE_CTRL_0, value8);
518+
if (ret < 0)
519+
return ret;
520+
}
521+
522+
secs = DIV_ROUND_UP(secs, data);
523+
468524
value = FIELD_GET(SW_AGE_PERIOD_7_0_M, secs);
469525

470526
ret = ksz_write8(dev, REG_SW_AGE_PERIOD__1, value);

drivers/net/dsa/microchip/lan937x_reg.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
22
/* Microchip LAN937X switch register definitions
3-
* Copyright (C) 2019-2021 Microchip Technology Inc.
3+
* Copyright (C) 2019-2024 Microchip Technology Inc.
44
*/
55
#ifndef __LAN937X_REG_H
66
#define __LAN937X_REG_H
@@ -56,8 +56,7 @@
5656

5757
#define SW_VLAN_ENABLE BIT(7)
5858
#define SW_DROP_INVALID_VID BIT(6)
59-
#define SW_AGE_CNT_M 0x7
60-
#define SW_AGE_CNT_S 3
59+
#define SW_AGE_CNT_M GENMASK(5, 3)
6160
#define SW_RESV_MCAST_ENABLE BIT(2)
6261

6362
#define REG_SW_LUE_CTRL_1 0x0311
@@ -70,6 +69,10 @@
7069
#define SW_FAST_AGING BIT(1)
7170
#define SW_LINK_AUTO_AGING BIT(0)
7271

72+
#define REG_SW_LUE_CTRL_2 0x0312
73+
74+
#define SW_AGE_CNT_IN_MICROSEC BIT(7)
75+
7376
#define REG_SW_AGE_PERIOD__1 0x0313
7477
#define SW_AGE_PERIOD_7_0_M GENMASK(7, 0)
7578

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,11 @@ static int bcm_sysport_open(struct net_device *dev)
19331933
unsigned int i;
19341934
int ret;
19351935

1936-
clk_prepare_enable(priv->clk);
1936+
ret = clk_prepare_enable(priv->clk);
1937+
if (ret) {
1938+
netdev_err(dev, "could not enable priv clock\n");
1939+
return ret;
1940+
}
19371941

19381942
/* Reset UniMAC */
19391943
umac_reset(priv);
@@ -2591,7 +2595,11 @@ static int bcm_sysport_probe(struct platform_device *pdev)
25912595
goto err_deregister_notifier;
25922596
}
25932597

2594-
clk_prepare_enable(priv->clk);
2598+
ret = clk_prepare_enable(priv->clk);
2599+
if (ret) {
2600+
dev_err(&pdev->dev, "could not enable priv clock\n");
2601+
goto err_deregister_netdev;
2602+
}
25952603

25962604
priv->rev = topctrl_readl(priv, REV_CNTL) & REV_MASK;
25972605
dev_info(&pdev->dev,
@@ -2605,6 +2613,8 @@ static int bcm_sysport_probe(struct platform_device *pdev)
26052613

26062614
return 0;
26072615

2616+
err_deregister_netdev:
2617+
unregister_netdev(dev);
26082618
err_deregister_notifier:
26092619
unregister_netdevice_notifier(&priv->netdev_notifier);
26102620
err_deregister_fixed_link:
@@ -2774,7 +2784,12 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
27742784
if (!netif_running(dev))
27752785
return 0;
27762786

2777-
clk_prepare_enable(priv->clk);
2787+
ret = clk_prepare_enable(priv->clk);
2788+
if (ret) {
2789+
netdev_err(dev, "could not enable priv clock\n");
2790+
return ret;
2791+
}
2792+
27782793
if (priv->wolopts)
27792794
clk_disable_unprepare(priv->wol_clk);
27802795

drivers/net/ethernet/google/gve/gve.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,7 @@ int gve_xdp_xmit_one(struct gve_priv *priv, struct gve_tx_ring *tx,
11401140
void gve_xdp_tx_flush(struct gve_priv *priv, u32 xdp_qid);
11411141
bool gve_tx_poll(struct gve_notify_block *block, int budget);
11421142
bool gve_xdp_poll(struct gve_notify_block *block, int budget);
1143+
int gve_xsk_tx_poll(struct gve_notify_block *block, int budget);
11431144
int gve_tx_alloc_rings_gqi(struct gve_priv *priv,
11441145
struct gve_tx_alloc_rings_cfg *cfg);
11451146
void gve_tx_free_rings_gqi(struct gve_priv *priv,

0 commit comments

Comments
 (0)