Skip to content

Commit 66ad482

Browse files
committed
Merge tag 'net-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Quite smaller than usual. Notably it includes the fix for the unix regression from the past weeks. The TCP window fix will require some follow-up, already queued. Current release - regressions: - af_unix: fix garbage collection of embryos Previous releases - regressions: - af_unix: fix race between GC and receive path - ipv6: sr: fix missing sk_buff release in seg6_input_core - tcp: remove 64 KByte limit for initial tp->rcv_wnd value - eth: r8169: fix rx hangup - eth: lan966x: remove ptp traps in case the ptp is not enabled - eth: ixgbe: fix link breakage vs cisco switches - eth: ice: prevent ethtool from corrupting the channels Previous releases - always broken: - openvswitch: set the skbuff pkt_type for proper pmtud support - tcp: Fix shift-out-of-bounds in dctcp_update_alpha() Misc: - a bunch of selftests stabilization patches" * tag 'net-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (25 commits) r8169: Fix possible ring buffer corruption on fragmented Tx packets. idpf: Interpret .set_channels() input differently ice: Interpret .set_channels() input differently nfc: nci: Fix handling of zero-length payload packets in nci_rx_work() net: relax socket state check at accept time. tcp: remove 64 KByte limit for initial tp->rcv_wnd value net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe() tls: fix missing memory barrier in tls_init net: fec: avoid lock evasion when reading pps_enable Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI" testing: net-drv: use stats64 for testing net: mana: Fix the extra HZ in mana_hwc_send_request net: lan966x: Remove ptp traps in case the ptp is not enabled. openvswitch: Set the skbuff pkt_type for proper pmtud support. selftest: af_unix: Make SCM_RIGHTS into OOB data. af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS tcp: Fix shift-out-of-bounds in dctcp_update_alpha(). selftests/net: use tc rule to filter the na packet ipv6: sr: fix memleak in seg6_hmac_init_algo af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock. ...
2 parents 404001d + c71e3a5 commit 66ad482

File tree

26 files changed

+243
-245
lines changed

26 files changed

+243
-245
lines changed

drivers/net/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ obj-$(CONFIG_MHI_NET) += mhi_net.o
4949
obj-$(CONFIG_ARCNET) += arcnet/
5050
obj-$(CONFIG_CAIF) += caif/
5151
obj-$(CONFIG_CAN) += can/
52-
obj-$(CONFIG_NET_DSA) += dsa/
52+
ifdef CONFIG_NET_DSA
53+
obj-y += dsa/
54+
endif
5355
obj-$(CONFIG_ETHERNET) += ethernet/
5456
obj-$(CONFIG_FDDI) += fddi/
5557
obj-$(CONFIG_HIPPI) += hippi/

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,13 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
104104
struct timespec64 ts;
105105
u64 ns;
106106

107-
if (fep->pps_enable == enable)
108-
return 0;
109-
110-
fep->pps_channel = DEFAULT_PPS_CHANNEL;
111-
fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
112-
113107
spin_lock_irqsave(&fep->tmreg_lock, flags);
114108

109+
if (fep->pps_enable == enable) {
110+
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
111+
return 0;
112+
}
113+
115114
if (enable) {
116115
/* clear capture or output compare interrupt status if have.
117116
*/
@@ -532,6 +531,9 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,
532531
int ret = 0;
533532

534533
if (rq->type == PTP_CLK_REQ_PPS) {
534+
fep->pps_channel = DEFAULT_PPS_CHANNEL;
535+
fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
536+
535537
ret = fec_ptp_enable_pps(fep, on);
536538

537539
return ret;

drivers/net/ethernet/intel/ice/ice_ethtool.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,6 @@ static int ice_set_channels(struct net_device *dev, struct ethtool_channels *ch)
35933593
struct ice_pf *pf = vsi->back;
35943594
int new_rx = 0, new_tx = 0;
35953595
bool locked = false;
3596-
u32 curr_combined;
35973596
int ret = 0;
35983597

35993598
/* do not support changing channels in Safe Mode */
@@ -3615,22 +3614,8 @@ static int ice_set_channels(struct net_device *dev, struct ethtool_channels *ch)
36153614
return -EOPNOTSUPP;
36163615
}
36173616

3618-
curr_combined = ice_get_combined_cnt(vsi);
3619-
3620-
/* these checks are for cases where user didn't specify a particular
3621-
* value on cmd line but we get non-zero value anyway via
3622-
* get_channels(); look at ethtool.c in ethtool repository (the user
3623-
* space part), particularly, do_schannels() routine
3624-
*/
3625-
if (ch->rx_count == vsi->num_rxq - curr_combined)
3626-
ch->rx_count = 0;
3627-
if (ch->tx_count == vsi->num_txq - curr_combined)
3628-
ch->tx_count = 0;
3629-
if (ch->combined_count == curr_combined)
3630-
ch->combined_count = 0;
3631-
3632-
if (!(ch->combined_count || (ch->rx_count && ch->tx_count))) {
3633-
netdev_err(dev, "Please specify at least 1 Rx and 1 Tx channel\n");
3617+
if (ch->rx_count && ch->tx_count) {
3618+
netdev_err(dev, "Dedicated RX or TX channels cannot be used simultaneously\n");
36343619
return -EINVAL;
36353620
}
36363621

drivers/net/ethernet/intel/idpf/idpf_ethtool.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,19 @@ static int idpf_set_channels(struct net_device *netdev,
222222
struct ethtool_channels *ch)
223223
{
224224
struct idpf_vport_config *vport_config;
225-
u16 combined, num_txq, num_rxq;
226225
unsigned int num_req_tx_q;
227226
unsigned int num_req_rx_q;
228227
struct idpf_vport *vport;
228+
u16 num_txq, num_rxq;
229229
struct device *dev;
230230
int err = 0;
231231
u16 idx;
232232

233+
if (ch->rx_count && ch->tx_count) {
234+
netdev_err(netdev, "Dedicated RX or TX channels cannot be used simultaneously\n");
235+
return -EINVAL;
236+
}
237+
233238
idpf_vport_ctrl_lock(netdev);
234239
vport = idpf_netdev_to_vport(netdev);
235240

@@ -239,20 +244,6 @@ static int idpf_set_channels(struct net_device *netdev,
239244
num_txq = vport_config->user_config.num_req_tx_qs;
240245
num_rxq = vport_config->user_config.num_req_rx_qs;
241246

242-
combined = min(num_txq, num_rxq);
243-
244-
/* these checks are for cases where user didn't specify a particular
245-
* value on cmd line but we get non-zero value anyway via
246-
* get_channels(); look at ethtool.c in ethtool repository (the user
247-
* space part), particularly, do_schannels() routine
248-
*/
249-
if (ch->combined_count == combined)
250-
ch->combined_count = 0;
251-
if (ch->combined_count && ch->rx_count == num_rxq - combined)
252-
ch->rx_count = 0;
253-
if (ch->combined_count && ch->tx_count == num_txq - combined)
254-
ch->tx_count = 0;
255-
256247
num_req_tx_q = ch->combined_count + ch->tx_count;
257248
num_req_rx_q = ch->combined_count + ch->rx_count;
258249

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,9 +3675,7 @@ struct ixgbe_info {
36753675
#define IXGBE_KRM_LINK_S1(P) ((P) ? 0x8200 : 0x4200)
36763676
#define IXGBE_KRM_LINK_CTRL_1(P) ((P) ? 0x820C : 0x420C)
36773677
#define IXGBE_KRM_AN_CNTL_1(P) ((P) ? 0x822C : 0x422C)
3678-
#define IXGBE_KRM_AN_CNTL_4(P) ((P) ? 0x8238 : 0x4238)
36793678
#define IXGBE_KRM_AN_CNTL_8(P) ((P) ? 0x8248 : 0x4248)
3680-
#define IXGBE_KRM_PCS_KX_AN(P) ((P) ? 0x9918 : 0x5918)
36813679
#define IXGBE_KRM_SGMII_CTRL(P) ((P) ? 0x82A0 : 0x42A0)
36823680
#define IXGBE_KRM_LP_BASE_PAGE_HIGH(P) ((P) ? 0x836C : 0x436C)
36833681
#define IXGBE_KRM_DSP_TXFFE_STATE_4(P) ((P) ? 0x8634 : 0x4634)
@@ -3687,7 +3685,6 @@ struct ixgbe_info {
36873685
#define IXGBE_KRM_PMD_FLX_MASK_ST20(P) ((P) ? 0x9054 : 0x5054)
36883686
#define IXGBE_KRM_TX_COEFF_CTRL_1(P) ((P) ? 0x9520 : 0x5520)
36893687
#define IXGBE_KRM_RX_ANA_CTL(P) ((P) ? 0x9A00 : 0x5A00)
3690-
#define IXGBE_KRM_FLX_TMRS_CTRL_ST31(P) ((P) ? 0x9180 : 0x5180)
36913688

36923689
#define IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_DA ~(0x3 << 20)
36933690
#define IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_SR BIT(20)

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,59 +1722,9 @@ static int ixgbe_setup_sfi_x550a(struct ixgbe_hw *hw, ixgbe_link_speed *speed)
17221722
return -EINVAL;
17231723
}
17241724

1725-
(void)mac->ops.write_iosf_sb_reg(hw,
1726-
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
1727-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1728-
1729-
/* change mode enforcement rules to hybrid */
1730-
(void)mac->ops.read_iosf_sb_reg(hw,
1731-
IXGBE_KRM_FLX_TMRS_CTRL_ST31(hw->bus.lan_id),
1732-
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
1733-
reg_val |= 0x0400;
1734-
1735-
(void)mac->ops.write_iosf_sb_reg(hw,
1736-
IXGBE_KRM_FLX_TMRS_CTRL_ST31(hw->bus.lan_id),
1737-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1738-
1739-
/* manually control the config */
1740-
(void)mac->ops.read_iosf_sb_reg(hw,
1741-
IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
1742-
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
1743-
reg_val |= 0x20002240;
1744-
1745-
(void)mac->ops.write_iosf_sb_reg(hw,
1746-
IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
1747-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1748-
1749-
/* move the AN base page values */
1750-
(void)mac->ops.read_iosf_sb_reg(hw,
1751-
IXGBE_KRM_PCS_KX_AN(hw->bus.lan_id),
1752-
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
1753-
reg_val |= 0x1;
1754-
1755-
(void)mac->ops.write_iosf_sb_reg(hw,
1756-
IXGBE_KRM_PCS_KX_AN(hw->bus.lan_id),
1757-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1758-
1759-
/* set the AN37 over CB mode */
1760-
(void)mac->ops.read_iosf_sb_reg(hw,
1761-
IXGBE_KRM_AN_CNTL_4(hw->bus.lan_id),
1762-
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
1763-
reg_val |= 0x20000000;
1764-
1765-
(void)mac->ops.write_iosf_sb_reg(hw,
1766-
IXGBE_KRM_AN_CNTL_4(hw->bus.lan_id),
1767-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1768-
1769-
/* restart AN manually */
1770-
(void)mac->ops.read_iosf_sb_reg(hw,
1771-
IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
1772-
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
1773-
reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_RESTART;
1774-
1775-
(void)mac->ops.write_iosf_sb_reg(hw,
1776-
IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
1777-
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
1725+
status = mac->ops.write_iosf_sb_reg(hw,
1726+
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
1727+
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
17781728

17791729
/* Toggle port SW reset by AN reset. */
17801730
status = ixgbe_restart_an_internal_phy_x550em(hw);

drivers/net/ethernet/microchip/lan966x/lan966x_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,14 @@ static int lan966x_port_hwtstamp_set(struct net_device *dev,
474474
cfg->source != HWTSTAMP_SOURCE_PHYLIB)
475475
return -EOPNOTSUPP;
476476

477+
if (cfg->source == HWTSTAMP_SOURCE_NETDEV && !port->lan966x->ptp)
478+
return -EOPNOTSUPP;
479+
477480
err = lan966x_ptp_setup_traps(port, cfg);
478481
if (err)
479482
return err;
480483

481484
if (cfg->source == HWTSTAMP_SOURCE_NETDEV) {
482-
if (!port->lan966x->ptp)
483-
return -EOPNOTSUPP;
484-
485485
err = lan966x_ptp_hwtstamp_set(port, cfg, extack);
486486
if (err) {
487487
lan966x_ptp_del_traps(port);

drivers/net/ethernet/microsoft/mana/hw_channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ int mana_hwc_send_request(struct hw_channel_context *hwc, u32 req_len,
849849
}
850850

851851
if (!wait_for_completion_timeout(&ctx->comp_event,
852-
(msecs_to_jiffies(hwc->hwc_timeout) * HZ))) {
852+
(msecs_to_jiffies(hwc->hwc_timeout)))) {
853853
dev_err(hwc->dev, "HWC: Request timed out!\n");
854854
err = -ETIMEDOUT;
855855
goto out;

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4337,11 +4337,11 @@ static void rtl8169_doorbell(struct rtl8169_private *tp)
43374337
static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
43384338
struct net_device *dev)
43394339
{
4340-
unsigned int frags = skb_shinfo(skb)->nr_frags;
43414340
struct rtl8169_private *tp = netdev_priv(dev);
43424341
unsigned int entry = tp->cur_tx % NUM_TX_DESC;
43434342
struct TxDesc *txd_first, *txd_last;
43444343
bool stop_queue, door_bell;
4344+
unsigned int frags;
43454345
u32 opts[2];
43464346

43474347
if (unlikely(!rtl_tx_slots_avail(tp))) {
@@ -4364,6 +4364,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
43644364

43654365
txd_first = tp->TxDescArray + entry;
43664366

4367+
frags = skb_shinfo(skb)->nr_frags;
43674368
if (frags) {
43684369
if (rtl8169_xmit_frags(tp, skb, opts, entry))
43694370
goto err_dma_1;
@@ -4657,10 +4658,8 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
46574658
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
46584659
}
46594660

4660-
if (napi_schedule_prep(&tp->napi)) {
4661-
rtl_irq_disable(tp);
4662-
__napi_schedule(&tp->napi);
4663-
}
4661+
rtl_irq_disable(tp);
4662+
napi_schedule(&tp->napi);
46644663
out:
46654664
rtl_ack_events(tp, status);
46664665

drivers/net/ethernet/ti/icssg/icssg_prueth.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,12 @@ static int prueth_probe(struct platform_device *pdev)
10391039

10401040
prueth->registered_netdevs[PRUETH_MAC0] = prueth->emac[PRUETH_MAC0]->ndev;
10411041

1042-
emac_phy_connect(prueth->emac[PRUETH_MAC0]);
1042+
ret = emac_phy_connect(prueth->emac[PRUETH_MAC0]);
1043+
if (ret) {
1044+
dev_err(dev,
1045+
"can't connect to MII0 PHY, error -%d", ret);
1046+
goto netdev_unregister;
1047+
}
10431048
phy_attached_info(prueth->emac[PRUETH_MAC0]->ndev->phydev);
10441049
}
10451050

@@ -1051,7 +1056,12 @@ static int prueth_probe(struct platform_device *pdev)
10511056
}
10521057

10531058
prueth->registered_netdevs[PRUETH_MAC1] = prueth->emac[PRUETH_MAC1]->ndev;
1054-
emac_phy_connect(prueth->emac[PRUETH_MAC1]);
1059+
ret = emac_phy_connect(prueth->emac[PRUETH_MAC1]);
1060+
if (ret) {
1061+
dev_err(dev,
1062+
"can't connect to MII1 PHY, error %d", ret);
1063+
goto netdev_unregister;
1064+
}
10551065
phy_attached_info(prueth->emac[PRUETH_MAC1]->ndev->phydev);
10561066
}
10571067

net/ipv4/af_inet.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,9 @@ void __inet_accept(struct socket *sock, struct socket *newsock, struct sock *new
758758
sock_rps_record_flow(newsk);
759759
WARN_ON(!((1 << newsk->sk_state) &
760760
(TCPF_ESTABLISHED | TCPF_SYN_RECV |
761-
TCPF_CLOSE_WAIT | TCPF_CLOSE)));
761+
TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 |
762+
TCPF_CLOSING | TCPF_CLOSE_WAIT |
763+
TCPF_CLOSE)));
762764

763765
if (test_bit(SOCK_SUPPORT_ZC, &sock->flags))
764766
set_bit(SOCK_SUPPORT_ZC, &newsock->flags);

net/ipv4/tcp_dctcp.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,18 @@ struct dctcp {
5858
};
5959

6060
static unsigned int dctcp_shift_g __read_mostly = 4; /* g = 1/2^4 */
61-
module_param(dctcp_shift_g, uint, 0644);
61+
62+
static int dctcp_shift_g_set(const char *val, const struct kernel_param *kp)
63+
{
64+
return param_set_uint_minmax(val, kp, 0, 10);
65+
}
66+
67+
static const struct kernel_param_ops dctcp_shift_g_ops = {
68+
.set = dctcp_shift_g_set,
69+
.get = param_get_uint,
70+
};
71+
72+
module_param_cb(dctcp_shift_g, &dctcp_shift_g_ops, &dctcp_shift_g, 0644);
6273
MODULE_PARM_DESC(dctcp_shift_g, "parameter g for updating dctcp_alpha");
6374

6475
static unsigned int dctcp_alpha_on_init __read_mostly = DCTCP_MAX_ALPHA;

net/ipv4/tcp_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss,
232232
if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_workaround_signed_windows))
233233
(*rcv_wnd) = min(space, MAX_TCP_WINDOW);
234234
else
235-
(*rcv_wnd) = min_t(u32, space, U16_MAX);
235+
(*rcv_wnd) = space;
236236

237237
if (init_rcv_wnd)
238238
*rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss);

0 commit comments

Comments
 (0)