Skip to content

Commit 6e27831

Browse files
committed
Merge tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. Current release - regressions: - mtk_eth_soc: fix NULL pointer dereference Previous releases - regressions: - core: - skb_partial_csum_set() fix against transport header magic value - fix load-tearing on sk->sk_stamp in sock_recv_cmsgs(). - annotate sk->sk_err write from do_recvmmsg() - add vlan_get_protocol_and_depth() helper - netlink: annotate accesses to nlk->cb_running - netfilter: always release netdev hooks from notifier Previous releases - always broken: - core: deal with most data-races in sk_wait_event() - netfilter: fix possible bug_on with enable_hooks=1 - eth: bonding: fix send_peer_notif overflow - eth: xpcs: fix incorrect number of interfaces - eth: ipvlan: fix out-of-bounds caused by unclear skb->cb - eth: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register" * tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (31 commits) af_unix: Fix data races around sk->sk_shutdown. af_unix: Fix a data race of sk->sk_receive_queue->qlen. net: datagram: fix data-races in datagram_poll() net: mscc: ocelot: fix stat counter register values ipvlan:Fix out-of-bounds caused by unclear skb->cb docs: networking: fix x25-iface.rst heading & index order gve: Remove the code of clearing PBA bit tcp: add annotations around sk->sk_shutdown accesses net: add vlan_get_protocol_and_depth() helper net: pcs: xpcs: fix incorrect number of interfaces net: deal with most data-races in sk_wait_event() net: annotate sk->sk_err write from do_recvmmsg() netlink: annotate accesses to nlk->cb_running kselftest: bonding: add num_grat_arp test selftests: forwarding: lib: add netns support for tc rule handle stats get Documentation: bonding: fix the doc of peer_notif_delay bonding: fix send_peer_notif overflow net: ethernet: mtk_eth_soc: fix NULL pointer dereference selftests: nft_flowtable.sh: check ingress/egress chain too selftests: nft_flowtable.sh: monitor result file sizes ...
2 parents 691e1ee + cceac92 commit 6e27831

File tree

49 files changed

+361
-112
lines changed

Some content is hidden

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

49 files changed

+361
-112
lines changed

Documentation/networking/bonding.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,10 +776,11 @@ peer_notif_delay
776776
Specify the delay, in milliseconds, between each peer
777777
notification (gratuitous ARP and unsolicited IPv6 Neighbor
778778
Advertisement) when they are issued after a failover event.
779-
This delay should be a multiple of the link monitor interval
780-
(arp_interval or miimon, whichever is active). The default
781-
value is 0 which means to match the value of the link monitor
782-
interval.
779+
This delay should be a multiple of the MII link monitor interval
780+
(miimon).
781+
782+
The valid range is 0 - 300000. The default value is 0, which means
783+
to match the value of the MII link monitor interval.
783784

784785
prio
785786
Slave priority. A higher number means higher priority.

Documentation/networking/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Contents:
116116
udplite
117117
vrf
118118
vxlan
119-
x25-iface
120119
x25
120+
x25-iface
121121
xfrm_device
122122
xfrm_proc
123123
xfrm_sync

Documentation/networking/x25-iface.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
============================-
43
X.25 Device Driver Interface
5-
============================-
4+
============================
65

76
Version 1.1
87

drivers/net/bonding/bond_netlink.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ static int bond_fill_slave_info(struct sk_buff *skb,
8484
return -EMSGSIZE;
8585
}
8686

87+
/* Limit the max delay range to 300s */
88+
static struct netlink_range_validation delay_range = {
89+
.max = 300000,
90+
};
91+
8792
static const struct nla_policy bond_policy[IFLA_BOND_MAX + 1] = {
8893
[IFLA_BOND_MODE] = { .type = NLA_U8 },
8994
[IFLA_BOND_ACTIVE_SLAVE] = { .type = NLA_U32 },
@@ -114,7 +119,7 @@ static const struct nla_policy bond_policy[IFLA_BOND_MAX + 1] = {
114119
[IFLA_BOND_AD_ACTOR_SYSTEM] = { .type = NLA_BINARY,
115120
.len = ETH_ALEN },
116121
[IFLA_BOND_TLB_DYNAMIC_LB] = { .type = NLA_U8 },
117-
[IFLA_BOND_PEER_NOTIF_DELAY] = { .type = NLA_U32 },
122+
[IFLA_BOND_PEER_NOTIF_DELAY] = NLA_POLICY_FULL_RANGE(NLA_U32, &delay_range),
118123
[IFLA_BOND_MISSED_MAX] = { .type = NLA_U8 },
119124
[IFLA_BOND_NS_IP6_TARGET] = { .type = NLA_NESTED },
120125
};

drivers/net/bonding/bond_options.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ static const struct bond_opt_value bond_num_peer_notif_tbl[] = {
169169
{ NULL, -1, 0}
170170
};
171171

172+
static const struct bond_opt_value bond_peer_notif_delay_tbl[] = {
173+
{ "off", 0, 0},
174+
{ "maxval", 300000, BOND_VALFLAG_MAX},
175+
{ NULL, -1, 0}
176+
};
177+
172178
static const struct bond_opt_value bond_primary_reselect_tbl[] = {
173179
{ "always", BOND_PRI_RESELECT_ALWAYS, BOND_VALFLAG_DEFAULT},
174180
{ "better", BOND_PRI_RESELECT_BETTER, 0},
@@ -488,7 +494,7 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = {
488494
.id = BOND_OPT_PEER_NOTIF_DELAY,
489495
.name = "peer_notif_delay",
490496
.desc = "Delay between each peer notification on failover event, in milliseconds",
491-
.values = bond_intmax_tbl,
497+
.values = bond_peer_notif_delay_tbl,
492498
.set = bond_option_peer_notif_delay_set
493499
}
494500
};

drivers/net/ethernet/google/gve/gve_main.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi, int budget)
294294
bool reschedule = false;
295295
int work_done = 0;
296296

297-
/* Clear PCI MSI-X Pending Bit Array (PBA)
298-
*
299-
* This bit is set if an interrupt event occurs while the vector is
300-
* masked. If this bit is set and we reenable the interrupt, it will
301-
* fire again. Since we're just about to poll the queue state, we don't
302-
* need it to fire again.
303-
*
304-
* Under high softirq load, it's possible that the interrupt condition
305-
* is triggered twice before we got the chance to process it.
306-
*/
307-
gve_write_irq_doorbell_dqo(priv, block,
308-
GVE_ITR_NO_UPDATE_DQO | GVE_ITR_CLEAR_PBA_BIT_DQO);
309-
310297
if (block->tx)
311298
reschedule |= gve_tx_poll_dqo(block, /*do_clean=*/true);
312299

drivers/net/ethernet/mediatek/mtk_wed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ __mtk_wed_detach(struct mtk_wed_device *dev)
654654
BIT(hw->index), BIT(hw->index));
655655
}
656656

657-
if (!hw_list[!hw->index]->wed_dev &&
657+
if ((!hw_list[!hw->index] || !hw_list[!hw->index]->wed_dev) &&
658658
hw->eth->dma_dev != hw->eth->dev)
659659
mtk_eth_set_dma_device(hw->eth, hw->eth->dev);
660660

drivers/net/ethernet/mscc/vsc7514_regs.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,15 @@ static const u32 vsc7514_sys_regmap[] = {
307307
REG(SYS_COUNT_DROP_YELLOW_PRIO_4, 0x000218),
308308
REG(SYS_COUNT_DROP_YELLOW_PRIO_5, 0x00021c),
309309
REG(SYS_COUNT_DROP_YELLOW_PRIO_6, 0x000220),
310-
REG(SYS_COUNT_DROP_YELLOW_PRIO_7, 0x000214),
311-
REG(SYS_COUNT_DROP_GREEN_PRIO_0, 0x000218),
312-
REG(SYS_COUNT_DROP_GREEN_PRIO_1, 0x00021c),
313-
REG(SYS_COUNT_DROP_GREEN_PRIO_2, 0x000220),
314-
REG(SYS_COUNT_DROP_GREEN_PRIO_3, 0x000224),
315-
REG(SYS_COUNT_DROP_GREEN_PRIO_4, 0x000228),
316-
REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00022c),
317-
REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000230),
318-
REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000234),
310+
REG(SYS_COUNT_DROP_YELLOW_PRIO_7, 0x000224),
311+
REG(SYS_COUNT_DROP_GREEN_PRIO_0, 0x000228),
312+
REG(SYS_COUNT_DROP_GREEN_PRIO_1, 0x00022c),
313+
REG(SYS_COUNT_DROP_GREEN_PRIO_2, 0x000230),
314+
REG(SYS_COUNT_DROP_GREEN_PRIO_3, 0x000234),
315+
REG(SYS_COUNT_DROP_GREEN_PRIO_4, 0x000238),
316+
REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00023c),
317+
REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000240),
318+
REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000244),
319319
REG(SYS_RESET_CFG, 0x000508),
320320
REG(SYS_CMID, 0x00050c),
321321
REG(SYS_VLAN_ETYPE_CFG, 0x000510),

drivers/net/ethernet/stmicro/stmmac/dwmac4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ enum power_event {
181181
#define GMAC4_LPI_CTRL_STATUS 0xd0
182182
#define GMAC4_LPI_TIMER_CTRL 0xd4
183183
#define GMAC4_LPI_ENTRY_TIMER 0xd8
184+
#define GMAC4_MAC_ONEUS_TIC_COUNTER 0xdc
184185

185186
/* LPI control and status defines */
186187
#define GMAC4_LPI_CTRL_STATUS_LPITCSE BIT(21) /* LPI Tx Clock Stop Enable */

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static void dwmac4_core_init(struct mac_device_info *hw,
2525
struct stmmac_priv *priv = netdev_priv(dev);
2626
void __iomem *ioaddr = hw->pcsr;
2727
u32 value = readl(ioaddr + GMAC_CONFIG);
28+
u32 clk_rate;
2829

2930
value |= GMAC_CORE_INIT;
3031

@@ -47,6 +48,10 @@ static void dwmac4_core_init(struct mac_device_info *hw,
4748

4849
writel(value, ioaddr + GMAC_CONFIG);
4950

51+
/* Configure LPI 1us counter to number of CSR clock ticks in 1us - 1 */
52+
clk_rate = clk_get_rate(priv->plat->stmmac_clk);
53+
writel((clk_rate / 1000000) - 1, ioaddr + GMAC4_MAC_ONEUS_TIC_COUNTER);
54+
5055
/* Enable GMAC interrupts */
5156
value = GMAC_INT_DEFAULT_ENABLE;
5257

0 commit comments

Comments
 (0)