Skip to content

Commit d20f6b3

Browse files
committed
Merge tag 'net-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and netfilter. Slim pickings this time, probably a combination of summer, DevConf.cz, and the end of first half of the year at corporations. Current release - regressions: - Revert "igc: fix a log entry using uninitialized netdev", it traded lack of netdev name in a printk() for a crash Previous releases - regressions: - Bluetooth: L2CAP: fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ - geneve: fix incorrectly setting lengths of inner headers in the skb, confusing the drivers and causing mangled packets - sched: initialize noop_qdisc owner to avoid false-positive recursion detection (recursing on CPU 0), which bubbles up to user space as a sendmsg() error, while noop_qdisc should silently drop - netdevsim: fix backwards compatibility in nsim_get_iflink() Previous releases - always broken: - netfilter: ipset: fix race between namespace cleanup and gc in the list:set type" * tag 'net-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (35 commits) bnxt_en: Adjust logging of firmware messages in case of released token in __hwrm_send() af_unix: Read with MSG_PEEK loops if the first unread byte is OOB bnxt_en: Cap the size of HWRM_PORT_PHY_QCFG forwarded response gve: Clear napi->skb before dev_kfree_skb_any() ionic: fix use after netif_napi_del() Revert "igc: fix a log entry using uninitialized netdev" net: bridge: mst: fix suspicious rcu usage in br_mst_set_state net: bridge: mst: pass vlan group directly to br_mst_vlan_set_state net/ipv6: Fix the RT cache flush via sysctl using a previous delay net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters gve: ignore nonrelevant GSO type bits when processing TSO headers net: pse-pd: Use EOPNOTSUPP error code instead of ENOTSUPP netfilter: Use flowlabel flow key when re-routing mangled packets netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type netfilter: nft_inner: validate mandatory meta and payload tcp: use signed arithmetic in tcp_rtx_probe0_timed_out() mailmap: map Geliang's new email address mptcp: pm: update add_addr counters after connect mptcp: pm: inc RmAddr MIB counter once per RM_ADDR ID mptcp: ensure snd_una is properly initialized on connect ...
2 parents fd88e18 + a9b9741 commit d20f6b3

File tree

40 files changed

+294
-165
lines changed

40 files changed

+294
-165
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Geliang Tang <geliang@kernel.org> <geliang.tang@suse.com>
219219
Geliang Tang <geliang@kernel.org> <geliangtang@xiaomi.com>
220220
Geliang Tang <geliang@kernel.org> <geliangtang@gmail.com>
221221
Geliang Tang <geliang@kernel.org> <geliangtang@163.com>
222+
Geliang Tang <geliang@kernel.org> <tanggeliang@kylinos.cn>
222223
Georgi Djakov <djakov@kernel.org> <georgi.djakov@linaro.org>
223224
Gerald Schaefer <gerald.schaefer@linux.ibm.com> <geraldsc@de.ibm.com>
224225
Gerald Schaefer <gerald.schaefer@linux.ibm.com> <gerald.schaefer@de.ibm.com>

drivers/net/dsa/qca/qca8k-leds.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,11 @@ qca8k_parse_port_leds(struct qca8k_priv *priv, struct fwnode_handle *port, int p
431431
init_data.devicename = kasprintf(GFP_KERNEL, "%s:0%d",
432432
priv->internal_mdio_bus->id,
433433
port_num);
434-
if (!init_data.devicename)
434+
if (!init_data.devicename) {
435+
fwnode_handle_put(led);
436+
fwnode_handle_put(leds);
435437
return -ENOMEM;
438+
}
436439

437440
ret = devm_led_classdev_register_ext(priv->dev, &port_led->cdev, &init_data);
438441
if (ret)
@@ -441,6 +444,7 @@ qca8k_parse_port_leds(struct qca8k_priv *priv, struct fwnode_handle *port, int p
441444
kfree(init_data.devicename);
442445
}
443446

447+
fwnode_handle_put(leds);
444448
return 0;
445449
}
446450

@@ -471,9 +475,13 @@ qca8k_setup_led_ctrl(struct qca8k_priv *priv)
471475
* the correct port for LED setup.
472476
*/
473477
ret = qca8k_parse_port_leds(priv, port, qca8k_port_to_phy(port_num));
474-
if (ret)
478+
if (ret) {
479+
fwnode_handle_put(port);
480+
fwnode_handle_put(ports);
475481
return ret;
482+
}
476483
}
477484

485+
fwnode_handle_put(ports);
478486
return 0;
479487
}

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,57 @@ struct bnxt_l2_filter {
14341434
atomic_t refcnt;
14351435
};
14361436

1437+
/* Compat version of hwrm_port_phy_qcfg_output capped at 96 bytes. The
1438+
* first 95 bytes are identical to hwrm_port_phy_qcfg_output in bnxt_hsi.h.
1439+
* The last valid byte in the compat version is different.
1440+
*/
1441+
struct hwrm_port_phy_qcfg_output_compat {
1442+
__le16 error_code;
1443+
__le16 req_type;
1444+
__le16 seq_id;
1445+
__le16 resp_len;
1446+
u8 link;
1447+
u8 active_fec_signal_mode;
1448+
__le16 link_speed;
1449+
u8 duplex_cfg;
1450+
u8 pause;
1451+
__le16 support_speeds;
1452+
__le16 force_link_speed;
1453+
u8 auto_mode;
1454+
u8 auto_pause;
1455+
__le16 auto_link_speed;
1456+
__le16 auto_link_speed_mask;
1457+
u8 wirespeed;
1458+
u8 lpbk;
1459+
u8 force_pause;
1460+
u8 module_status;
1461+
__le32 preemphasis;
1462+
u8 phy_maj;
1463+
u8 phy_min;
1464+
u8 phy_bld;
1465+
u8 phy_type;
1466+
u8 media_type;
1467+
u8 xcvr_pkg_type;
1468+
u8 eee_config_phy_addr;
1469+
u8 parallel_detect;
1470+
__le16 link_partner_adv_speeds;
1471+
u8 link_partner_adv_auto_mode;
1472+
u8 link_partner_adv_pause;
1473+
__le16 adv_eee_link_speed_mask;
1474+
__le16 link_partner_adv_eee_link_speed_mask;
1475+
__le32 xcvr_identifier_type_tx_lpi_timer;
1476+
__le16 fec_cfg;
1477+
u8 duplex_state;
1478+
u8 option_flags;
1479+
char phy_vendor_name[16];
1480+
char phy_vendor_partnumber[16];
1481+
__le16 support_pam4_speeds;
1482+
__le16 force_pam4_link_speed;
1483+
__le16 auto_pam4_link_speed_mask;
1484+
u8 link_partner_pam4_adv_speeds;
1485+
u8 valid;
1486+
};
1487+
14371488
struct bnxt_link_info {
14381489
u8 phy_type;
14391490
u8 media_type;

drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ static int __hwrm_send(struct bnxt *bp, struct bnxt_hwrm_ctx *ctx)
680680
req_type);
681681
else if (rc && rc != HWRM_ERR_CODE_PF_UNAVAILABLE)
682682
hwrm_err(bp, ctx, "hwrm req_type 0x%x seq id 0x%x error 0x%x\n",
683-
req_type, token->seq_id, rc);
683+
req_type, le16_to_cpu(ctx->req->seq_id), rc);
684684
rc = __hwrm_to_stderr(rc);
685685
exit:
686686
if (token)

drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,11 @@ static int bnxt_hwrm_fwd_resp(struct bnxt *bp, struct bnxt_vf_info *vf,
950950
struct hwrm_fwd_resp_input *req;
951951
int rc;
952952

953-
if (BNXT_FWD_RESP_SIZE_ERR(msg_size))
953+
if (BNXT_FWD_RESP_SIZE_ERR(msg_size)) {
954+
netdev_warn_once(bp->dev, "HWRM fwd response too big (%d bytes)\n",
955+
msg_size);
954956
return -EINVAL;
957+
}
955958

956959
rc = hwrm_req_init(bp, req, HWRM_FWD_RESP);
957960
if (!rc) {
@@ -1085,7 +1088,7 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf)
10851088
rc = bnxt_hwrm_exec_fwd_resp(
10861089
bp, vf, sizeof(struct hwrm_port_phy_qcfg_input));
10871090
} else {
1088-
struct hwrm_port_phy_qcfg_output phy_qcfg_resp = {0};
1091+
struct hwrm_port_phy_qcfg_output_compat phy_qcfg_resp = {};
10891092
struct hwrm_port_phy_qcfg_input *phy_qcfg_req;
10901093

10911094
phy_qcfg_req =
@@ -1096,6 +1099,11 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf)
10961099
mutex_unlock(&bp->link_lock);
10971100
phy_qcfg_resp.resp_len = cpu_to_le16(sizeof(phy_qcfg_resp));
10981101
phy_qcfg_resp.seq_id = phy_qcfg_req->seq_id;
1102+
/* New SPEEDS2 fields are beyond the legacy structure, so
1103+
* clear the SPEEDS2_SUPPORTED flag.
1104+
*/
1105+
phy_qcfg_resp.option_flags &=
1106+
~PORT_PHY_QCAPS_RESP_FLAGS2_SPEEDS2_SUPPORTED;
10991107
phy_qcfg_resp.valid = 1;
11001108

11011109
if (vf->flags & BNXT_VF_LINK_UP) {

drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,12 @@ lio_vf_rep_copy_packet(struct octeon_device *oct,
272272
pg_info->page_offset;
273273
memcpy(skb->data, va, MIN_SKB_SIZE);
274274
skb_put(skb, MIN_SKB_SIZE);
275+
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
276+
pg_info->page,
277+
pg_info->page_offset + MIN_SKB_SIZE,
278+
len - MIN_SKB_SIZE,
279+
LIO_RXBUFFER_SZ);
275280
}
276-
277-
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
278-
pg_info->page,
279-
pg_info->page_offset + MIN_SKB_SIZE,
280-
len - MIN_SKB_SIZE,
281-
LIO_RXBUFFER_SZ);
282281
} else {
283282
struct octeon_skb_page_info *pg_info =
284283
((struct octeon_skb_page_info *)(skb->cb));

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,13 @@ static void gve_rx_skb_hash(struct sk_buff *skb,
647647
skb_set_hash(skb, le32_to_cpu(compl_desc->hash), hash_type);
648648
}
649649

650-
static void gve_rx_free_skb(struct gve_rx_ring *rx)
650+
static void gve_rx_free_skb(struct napi_struct *napi, struct gve_rx_ring *rx)
651651
{
652652
if (!rx->ctx.skb_head)
653653
return;
654654

655+
if (rx->ctx.skb_head == napi->skb)
656+
napi->skb = NULL;
655657
dev_kfree_skb_any(rx->ctx.skb_head);
656658
rx->ctx.skb_head = NULL;
657659
rx->ctx.skb_tail = NULL;
@@ -950,7 +952,7 @@ int gve_rx_poll_dqo(struct gve_notify_block *block, int budget)
950952

951953
err = gve_rx_dqo(napi, rx, compl_desc, complq->head, rx->q_num);
952954
if (err < 0) {
953-
gve_rx_free_skb(rx);
955+
gve_rx_free_skb(napi, rx);
954956
u64_stats_update_begin(&rx->statss);
955957
if (err == -ENOMEM)
956958
rx->rx_skb_alloc_fail++;
@@ -993,7 +995,7 @@ int gve_rx_poll_dqo(struct gve_notify_block *block, int budget)
993995

994996
/* gve_rx_complete_skb() will consume skb if successful */
995997
if (gve_rx_complete_skb(rx, napi, compl_desc, feat) != 0) {
996-
gve_rx_free_skb(rx);
998+
gve_rx_free_skb(napi, rx);
997999
u64_stats_update_begin(&rx->statss);
9981000
rx->rx_desc_err_dropped_pkt++;
9991001
u64_stats_update_end(&rx->statss);

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -555,28 +555,18 @@ static int gve_prep_tso(struct sk_buff *skb)
555555
if (unlikely(skb_shinfo(skb)->gso_size < GVE_TX_MIN_TSO_MSS_DQO))
556556
return -1;
557557

558+
if (!(skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
559+
return -EINVAL;
560+
558561
/* Needed because we will modify header. */
559562
err = skb_cow_head(skb, 0);
560563
if (err < 0)
561564
return err;
562565

563566
tcp = tcp_hdr(skb);
564-
565-
/* Remove payload length from checksum. */
566567
paylen = skb->len - skb_transport_offset(skb);
567-
568-
switch (skb_shinfo(skb)->gso_type) {
569-
case SKB_GSO_TCPV4:
570-
case SKB_GSO_TCPV6:
571-
csum_replace_by_diff(&tcp->check,
572-
(__force __wsum)htonl(paylen));
573-
574-
/* Compute length of segmentation header. */
575-
header_len = skb_tcp_all_headers(skb);
576-
break;
577-
default:
578-
return -EINVAL;
579-
}
568+
csum_replace_by_diff(&tcp->check, (__force __wsum)htonl(paylen));
569+
header_len = skb_tcp_all_headers(skb);
580570

581571
if (unlikely(header_len > GVE_TX_MAX_HDR_SIZE_DQO))
582572
return -EINVAL;

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3535,6 +3535,9 @@ static int hns3_alloc_ring_buffers(struct hns3_enet_ring *ring)
35353535
ret = hns3_alloc_and_attach_buffer(ring, i);
35363536
if (ret)
35373537
goto out_buffer_fail;
3538+
3539+
if (!(i % HNS3_RESCHED_BD_NUM))
3540+
cond_resched();
35383541
}
35393542

35403543
return 0;
@@ -5107,6 +5110,7 @@ int hns3_init_all_ring(struct hns3_nic_priv *priv)
51075110
}
51085111

51095112
u64_stats_init(&priv->ring[i].syncp);
5113+
cond_resched();
51105114
}
51115115

51125116
return 0;

drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ enum hns3_nic_state {
214214
#define HNS3_CQ_MODE_EQE 1U
215215
#define HNS3_CQ_MODE_CQE 0U
216216

217+
#define HNS3_RESCHED_BD_NUM 1024
218+
217219
enum hns3_pkt_l2t_type {
218220
HNS3_L2_TYPE_UNICAST,
219221
HNS3_L2_TYPE_MULTICAST,

0 commit comments

Comments
 (0)