Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Merge in late fixes to prepare for the 6.13 net-next PR.

Conflicts:

include/linux/phy.h
41ffcd95015f net: phy: fix phylib's dual eee_enabled
721aa69e708b net: phy: convert eee_broken_modes to a linkmode bitmap
https://lore.kernel.org/all/20241118135512.1039208b@canb.auug.org.au/

drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
2160428bcb20 net: txgbe: fix null pointer to pcs
2160428bcb20 net: txgbe: remove GPIO interrupt controller

Adjacent commits:

include/linux/phy.h
41ffcd95015f net: phy: fix phylib's dual eee_enabled
516a5f11eb97 net: phy: respect cached advertising when re-enabling EEE

Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+102 -30
+3
MAINTAINERS
··· 16091 16091 F: include/uapi/linux/netdev* 16092 16092 F: tools/testing/selftests/drivers/net/ 16093 16093 X: Documentation/devicetree/bindings/net/bluetooth/ 16094 + X: Documentation/devicetree/bindings/net/can/ 16094 16095 X: Documentation/devicetree/bindings/net/wireless/ 16096 + X: drivers/net/can/ 16095 16097 X: drivers/net/wireless/ 16096 16098 16097 16099 NETWORKING DRIVERS (WIRELESS) ··· 16182 16180 X: include/net/wext.h 16183 16181 X: net/9p/ 16184 16182 X: net/bluetooth/ 16183 + X: net/can/ 16185 16184 X: net/mac80211/ 16186 16185 X: net/rfkill/ 16187 16186 X: net/wireless/
+2 -2
drivers/net/ethernet/google/gve/gve_adminq.c
··· 1248 1248 sizeof(struct gve_adminq_configure_flow_rule), 1249 1249 flow_rule_cmd); 1250 1250 1251 - if (err) { 1251 + if (err == -ETIME) { 1252 1252 dev_err(&priv->pdev->dev, "Timeout to configure the flow rule, trigger reset"); 1253 1253 gve_reset(priv, true); 1254 - } else { 1254 + } else if (!err) { 1255 1255 priv->flow_rules_cache.rules_cache_synced = false; 1256 1256 } 1257 1257
+1 -1
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 5299 5299 } 5300 5300 5301 5301 flags_complete: 5302 - bitmap_xor(changed_flags, pf->flags, orig_flags, I40E_PF_FLAGS_NBITS); 5302 + bitmap_xor(changed_flags, new_flags, orig_flags, I40E_PF_FLAGS_NBITS); 5303 5303 5304 5304 if (test_bit(I40E_FLAG_FW_LLDP_DIS, changed_flags)) 5305 5305 reset_needed = I40E_PF_RESET_AND_REBUILD_FLAG;
-2
drivers/net/ethernet/meta/fbnic/fbnic_pci.c
··· 334 334 free_irqs: 335 335 fbnic_free_irqs(fbd); 336 336 free_fbd: 337 - pci_disable_device(pdev); 338 337 fbnic_devlink_free(fbd); 339 338 340 339 return err; ··· 366 367 fbnic_fw_disable_mbx(fbd); 367 368 fbnic_free_irqs(fbd); 368 369 369 - pci_disable_device(pdev); 370 370 fbnic_devlink_free(fbd); 371 371 } 372 372
+1 -1
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
··· 162 162 struct wx *wx = phylink_to_wx(config); 163 163 struct txgbe *txgbe = wx->priv; 164 164 165 - if (interface == PHY_INTERFACE_MODE_10GBASER) 165 + if (wx->media_type != sp_media_copper) 166 166 return txgbe->pcs; 167 167 168 168 return NULL;
+17 -3
drivers/net/phy/dp83869.c
··· 153 153 int mode; 154 154 }; 155 155 156 + static int dp83869_config_aneg(struct phy_device *phydev) 157 + { 158 + struct dp83869_private *dp83869 = phydev->priv; 159 + 160 + if (dp83869->mode != DP83869_RGMII_1000_BASE) 161 + return genphy_config_aneg(phydev); 162 + 163 + return genphy_c37_config_aneg(phydev); 164 + } 165 + 156 166 static int dp83869_read_status(struct phy_device *phydev) 157 167 { 158 168 struct dp83869_private *dp83869 = phydev->priv; 169 + bool changed; 159 170 int ret; 171 + 172 + if (dp83869->mode == DP83869_RGMII_1000_BASE) 173 + return genphy_c37_read_status(phydev, &changed); 160 174 161 175 ret = genphy_read_status(phydev); 162 176 if (ret) 163 177 return ret; 164 178 165 - if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) { 179 + if (dp83869->mode == DP83869_RGMII_100_BASE) { 166 180 if (phydev->link) { 167 - if (dp83869->mode == DP83869_RGMII_100_BASE) 168 - phydev->speed = SPEED_100; 181 + phydev->speed = SPEED_100; 169 182 } else { 170 183 phydev->speed = SPEED_UNKNOWN; 171 184 phydev->duplex = DUPLEX_UNKNOWN; ··· 911 898 .soft_reset = dp83869_phy_reset, \ 912 899 .config_intr = dp83869_config_intr, \ 913 900 .handle_interrupt = dp83869_handle_interrupt, \ 901 + .config_aneg = dp83869_config_aneg, \ 914 902 .read_status = dp83869_read_status, \ 915 903 .get_tunable = dp83869_get_tunable, \ 916 904 .set_tunable = dp83869_set_tunable, \
+1 -3
drivers/net/phy/phy-c45.c
··· 941 941 */ 942 942 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev) 943 943 { 944 - if (!phydev->eee_enabled) { 944 + if (!phydev->eee_cfg.eee_enabled) { 945 945 __ETHTOOL_DECLARE_LINK_MODE_MASK(adv) = {}; 946 946 947 947 return genphy_c45_write_eee_adv(phydev, adv); ··· 1570 1570 phy_advertise_eee_all(phydev); 1571 1571 } 1572 1572 } 1573 - 1574 - phydev->eee_enabled = data->eee_enabled; 1575 1573 1576 1574 ret = genphy_c45_an_config_eee_aneg(phydev); 1577 1575 if (ret > 0) {
+2 -2
drivers/net/phy/phy_device.c
··· 3589 3589 /* There is no "enabled" flag. If PHY is advertising, assume it is 3590 3590 * kind of enabled. 3591 3591 */ 3592 - phydev->eee_enabled = !linkmode_empty(phydev->advertising_eee); 3592 + phydev->eee_cfg.eee_enabled = !linkmode_empty(phydev->advertising_eee); 3593 3593 3594 3594 /* Some PHYs may advertise, by default, not support EEE modes. So, 3595 3595 * we need to clean them. 3596 3596 */ 3597 - if (phydev->eee_enabled) 3597 + if (phydev->eee_cfg.eee_enabled) 3598 3598 linkmode_and(phydev->advertising_eee, phydev->supported_eee, 3599 3599 phydev->advertising_eee); 3600 3600
+1 -1
include/linux/netpoll.h
··· 73 73 { 74 74 struct net_device *dev = napi->dev; 75 75 76 - if (dev && dev->npinfo) { 76 + if (dev && rcu_access_pointer(dev->npinfo)) { 77 77 int owner = smp_processor_id(); 78 78 79 79 while (cmpxchg(&napi->poll_owner, -1, owner) != -1)
-2
include/linux/phy.h
··· 601 601 * @adv_old: Saved advertised while power saving for WoL 602 602 * @supported_eee: supported PHY EEE linkmodes 603 603 * @advertising_eee: Currently advertised EEE linkmodes 604 - * @eee_enabled: Flag indicating whether the EEE feature is enabled 605 604 * @enable_tx_lpi: When True, MAC should transmit LPI to PHY 606 605 * @eee_cfg: User configuration of EEE 607 606 * @lp_advertising: Current link partner advertised linkmodes ··· 722 723 __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising_eee); 723 724 /* Energy efficient ethernet modes which should be prohibited */ 724 725 __ETHTOOL_DECLARE_LINK_MODE_MASK(eee_broken_modes); 725 - bool eee_enabled; 726 726 bool enable_tx_lpi; 727 727 struct eee_config eee_cfg; 728 728
+2
net/core/netdev-genl.c
··· 233 233 return -ENOMEM; 234 234 235 235 rtnl_lock(); 236 + rcu_read_lock(); 236 237 237 238 napi = napi_by_id(napi_id); 238 239 if (napi) { ··· 243 242 err = -ENOENT; 244 243 } 245 244 245 + rcu_read_unlock(); 246 246 rtnl_unlock(); 247 247 248 248 if (err)
+1 -1
net/core/netpoll.c
··· 634 634 goto out; 635 635 } 636 636 637 - if (!ndev->npinfo) { 637 + if (!rcu_access_pointer(ndev->npinfo)) { 638 638 npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL); 639 639 if (!npinfo) { 640 640 err = -ENOMEM;
+2 -2
net/core/skmsg.c
··· 1117 1117 if (tls_sw_has_ctx_rx(sk)) { 1118 1118 psock->saved_data_ready(sk); 1119 1119 } else { 1120 - write_lock_bh(&sk->sk_callback_lock); 1120 + read_lock_bh(&sk->sk_callback_lock); 1121 1121 strp_data_ready(&psock->strp); 1122 - write_unlock_bh(&sk->sk_callback_lock); 1122 + read_unlock_bh(&sk->sk_callback_lock); 1123 1123 } 1124 1124 } 1125 1125 rcu_read_unlock();
+2 -5
net/netfilter/ipset/ip_set_bitmap_ip.c
··· 163 163 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); 164 164 if (ret) 165 165 return ret; 166 - if (ip > ip_to) { 166 + if (ip > ip_to) 167 167 swap(ip, ip_to); 168 - if (ip < map->first_ip) 169 - return -IPSET_ERR_BITMAP_RANGE; 170 - } 171 168 } else if (tb[IPSET_ATTR_CIDR]) { 172 169 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); 173 170 ··· 175 178 ip_to = ip; 176 179 } 177 180 178 - if (ip_to > map->last_ip) 181 + if (ip < map->first_ip || ip_to > map->last_ip) 179 182 return -IPSET_ERR_BITMAP_RANGE; 180 183 181 184 for (; !before(ip_to, ip); ip += map->hosts) {
+6 -5
net/xdp/xsk.c
··· 675 675 len = desc->len; 676 676 677 677 if (!skb) { 678 + first_frag = true; 679 + 678 680 hr = max(NET_SKB_PAD, L1_CACHE_ALIGN(dev->needed_headroom)); 679 681 tr = dev->needed_tailroom; 680 682 skb = sock_alloc_send_skb(&xs->sk, hr + len + tr, 1, &err); ··· 687 685 skb_put(skb, len); 688 686 689 687 err = skb_store_bits(skb, 0, buffer, len); 690 - if (unlikely(err)) { 691 - kfree_skb(skb); 688 + if (unlikely(err)) 692 689 goto free_err; 693 - } 694 - 695 - first_frag = true; 696 690 } else { 697 691 int nr_frags = skb_shinfo(skb)->nr_frags; 698 692 struct page *page; ··· 756 758 return skb; 757 759 758 760 free_err: 761 + if (first_frag && skb) 762 + kfree_skb(skb); 763 + 759 764 if (err == -EOVERFLOW) { 760 765 /* Drop the packet */ 761 766 xsk_set_destructor_arg(xs->skb);
+54
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
··· 501 501 test_sockmap_pass_prog__destroy(skel); 502 502 } 503 503 504 + static void test_sockmap_stream_pass(void) 505 + { 506 + int zero = 0, sent, recvd; 507 + int verdict, parser; 508 + int err, map; 509 + int c = -1, p = -1; 510 + struct test_sockmap_pass_prog *pass = NULL; 511 + char snd[256] = "0123456789"; 512 + char rcv[256] = "0"; 513 + 514 + pass = test_sockmap_pass_prog__open_and_load(); 515 + verdict = bpf_program__fd(pass->progs.prog_skb_verdict); 516 + parser = bpf_program__fd(pass->progs.prog_skb_parser); 517 + map = bpf_map__fd(pass->maps.sock_map_rx); 518 + 519 + err = bpf_prog_attach(parser, map, BPF_SK_SKB_STREAM_PARSER, 0); 520 + if (!ASSERT_OK(err, "bpf_prog_attach stream parser")) 521 + goto out; 522 + 523 + err = bpf_prog_attach(verdict, map, BPF_SK_SKB_STREAM_VERDICT, 0); 524 + if (!ASSERT_OK(err, "bpf_prog_attach stream verdict")) 525 + goto out; 526 + 527 + err = create_pair(AF_INET, SOCK_STREAM, &c, &p); 528 + if (err) 529 + goto out; 530 + 531 + /* sk_data_ready of 'p' will be replaced by strparser handler */ 532 + err = bpf_map_update_elem(map, &zero, &p, BPF_NOEXIST); 533 + if (!ASSERT_OK(err, "bpf_map_update_elem(p)")) 534 + goto out_close; 535 + 536 + /* 537 + * as 'prog_skb_parser' return the original skb len and 538 + * 'prog_skb_verdict' return SK_PASS, the kernel will just 539 + * pass it through to original socket 'p' 540 + */ 541 + sent = xsend(c, snd, sizeof(snd), 0); 542 + ASSERT_EQ(sent, sizeof(snd), "xsend(c)"); 543 + 544 + recvd = recv_timeout(p, rcv, sizeof(rcv), SOCK_NONBLOCK, 545 + IO_TIMEOUT_SEC); 546 + ASSERT_EQ(recvd, sizeof(rcv), "recv_timeout(p)"); 547 + 548 + out_close: 549 + close(c); 550 + close(p); 551 + 552 + out: 553 + test_sockmap_pass_prog__destroy(pass); 554 + } 555 + 504 556 static void test_sockmap_skb_verdict_fionread(bool pass_prog) 505 557 { 506 558 int err, map, verdict, c0 = -1, c1 = -1, p0 = -1, p1 = -1; ··· 975 923 test_sockmap_progs_query(BPF_SK_SKB_VERDICT); 976 924 if (test__start_subtest("sockmap skb_verdict shutdown")) 977 925 test_sockmap_skb_verdict_shutdown(); 926 + if (test__start_subtest("sockmap stream parser and verdict pass")) 927 + test_sockmap_stream_pass(); 978 928 if (test__start_subtest("sockmap skb_verdict fionread")) 979 929 test_sockmap_skb_verdict_fionread(true); 980 930 if (test__start_subtest("sockmap skb_verdict fionread on drop"))
+1
tools/testing/selftests/net/netfilter/.gitignore
··· 2 2 audit_logread 3 3 connect_close 4 4 conntrack_dump_flush 5 + conntrack_reverse_clash 5 6 sctp_collision 6 7 nf_queue
+6
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
··· 43 43 mnl_attr_nest_end(nlh, nest_proto); 44 44 45 45 mnl_attr_nest_end(nlh, nest); 46 + 47 + return 0; 46 48 } 47 49 48 50 static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, ··· 73 71 mnl_attr_nest_end(nlh, nest_proto); 74 72 75 73 mnl_attr_nest_end(nlh, nest); 74 + 75 + return 0; 76 76 } 77 77 78 78 static int build_cta_proto(struct nlmsghdr *nlh) ··· 94 90 mnl_attr_nest_end(nlh, nest_proto); 95 91 96 92 mnl_attr_nest_end(nlh, nest); 93 + 94 + return 0; 97 95 } 98 96 99 97 static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh,