Skip to content

Commit acc4d5f

Browse files
committed
Merge tag 'net-6.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Rather tiny pull request, mostly so that we can get into our trees your fix to the x86 Makefile. Current release - regressions: - Revert "tcp: avoid atomic operations on sk->sk_rmem_alloc", error queue accounting was missed Current release - new code bugs: - 5 fixes for the netdevice instance locking work Previous releases - regressions: - usbnet: restore usb%d name exception for local mac addresses Previous releases - always broken: - rtnetlink: allocate vfinfo size for VF GUIDs when supported, avoid spurious GET_LINK failures - eth: mana: Switch to page pool for jumbo frames - phy: broadcom: Correct BCM5221 PHY model detection Misc: - selftests: drv-net: replace helpers for referring to other files" * tag 'net-6.15-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (22 commits) Revert "tcp: avoid atomic operations on sk->sk_rmem_alloc" bnxt_en: bring back rtnl lock in bnxt_shutdown eth: gve: add missing netdev locks on reset and shutdown paths selftests: mptcp: ignore mptcp_diag binary selftests: mptcp: close fd_in before returning in main_loop selftests: mptcp: fix incorrect fd checks in main_loop mptcp: fix NULL pointer in can_accept_new_subflow octeontx2-af: Free NIX_AF_INT_VEC_GEN irq octeontx2-af: Fix mbox INTR handler when num VFs > 64 net: fix use-after-free in the netdev_nl_sock_priv_destroy() selftests: net: use Path helpers in ping selftests: net: use the dummy bpf from net/lib selftests: drv-net: replace the rpath helper with Path objects net: lapbether: use netdev_lockdep_set_classes() helper net: phy: broadcom: Correct BCM5221 PHY model detection net: usb: usbnet: restore usb%d name exception for local mac addresses net/mlx5e: SHAMPO, Make reserved size independent of page size net: mana: Switch to page pool for jumbo frames MAINTAINERS: Add dedicated entries for phy_link_topology net: move replay logic to tc_modify_qdisc ...
2 parents 3491aa0 + f278b6d commit acc4d5f

File tree

33 files changed

+141
-205
lines changed

33 files changed

+141
-205
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16806,6 +16806,13 @@ F: net/ethtool/mm.c
1680616806
F: tools/testing/selftests/drivers/net/hw/ethtool_mm.sh
1680716807
K: ethtool_mm
1680816808

16809+
NETWORKING [ETHTOOL PHY TOPOLOGY]
16810+
M: Maxime Chevallier <maxime.chevallier@bootlin.com>
16811+
F: Documentation/networking/phy-link-topology.rst
16812+
F: drivers/net/phy/phy_link_topology.c
16813+
F: include/linux/phy_link_topology.h
16814+
F: net/ethtool/phy.c
16815+
1680916816
NETWORKING [GENERAL]
1681016817
M: "David S. Miller" <davem@davemloft.net>
1681116818
M: Eric Dumazet <edumazet@google.com>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16698,6 +16698,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
1669816698
if (!dev)
1669916699
return;
1670016700

16701+
rtnl_lock();
1670116702
netdev_lock(dev);
1670216703
bp = netdev_priv(dev);
1670316704
if (!bp)
@@ -16717,6 +16718,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
1671716718

1671816719
shutdown_exit:
1671916720
netdev_unlock(dev);
16721+
rtnl_unlock();
1672016722
}
1672116723

1672216724
#ifdef CONFIG_PM_SLEEP

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,9 @@ static void gve_handle_reset(struct gve_priv *priv)
20772077

20782078
if (gve_get_do_reset(priv)) {
20792079
rtnl_lock();
2080+
netdev_lock(priv->dev);
20802081
gve_reset(priv, false);
2082+
netdev_unlock(priv->dev);
20812083
rtnl_unlock();
20822084
}
20832085
}
@@ -2714,13 +2716,15 @@ static void gve_shutdown(struct pci_dev *pdev)
27142716
bool was_up = netif_running(priv->dev);
27152717

27162718
rtnl_lock();
2719+
netdev_lock(netdev);
27172720
if (was_up && gve_close(priv->dev)) {
27182721
/* If the dev was up, attempt to close, if close fails, reset */
27192722
gve_reset_and_teardown(priv, was_up);
27202723
} else {
27212724
/* If the dev wasn't up or close worked, finish tearing down */
27222725
gve_teardown_priv_resources(priv);
27232726
}
2727+
netdev_unlock(netdev);
27242728
rtnl_unlock();
27252729
}
27262730

drivers/net/ethernet/marvell/octeontx2/af/rvu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2634,7 +2634,7 @@ static irqreturn_t rvu_mbox_intr_handler(int irq, void *rvu_irq)
26342634
rvupf_write64(rvu, RVU_PF_VFPF_MBOX_INTX(1), intr);
26352635

26362636
rvu_queue_work(&rvu->afvf_wq_info, 64, vfs, intr);
2637-
vfs -= 64;
2637+
vfs = 64;
26382638
}
26392639

26402640
intr = rvupf_read64(rvu, RVU_PF_VFPF_MBOX_INTX(0));

drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void rvu_nix_unregister_interrupts(struct rvu *rvu)
207207
rvu->irq_allocated[offs + NIX_AF_INT_VEC_RVU] = false;
208208
}
209209

210-
for (i = NIX_AF_INT_VEC_AF_ERR; i < NIX_AF_INT_VEC_CNT; i++)
210+
for (i = NIX_AF_INT_VEC_GEN; i < NIX_AF_INT_VEC_CNT; i++)
211211
if (rvu->irq_allocated[offs + i]) {
212212
free_irq(pci_irq_vector(rvu->pdev, offs + i), rvu_dl);
213213
rvu->irq_allocated[offs + i] = false;

drivers/net/ethernet/mellanox/mlx5/core/en/params.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ u8 mlx5e_shampo_get_log_pkt_per_rsrv(struct mlx5_core_dev *mdev,
430430
struct mlx5e_params *params)
431431
{
432432
u32 resrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
433-
PAGE_SIZE;
433+
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
434434

435435
return order_base_2(DIV_ROUND_UP(resrv_size, params->sw_mtu));
436436
}
@@ -834,7 +834,8 @@ static u32 mlx5e_shampo_get_log_cq_size(struct mlx5_core_dev *mdev,
834834
struct mlx5e_params *params,
835835
struct mlx5e_xsk_param *xsk)
836836
{
837-
int rsrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) * PAGE_SIZE;
837+
int rsrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
838+
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
838839
u16 num_strides = BIT(mlx5e_mpwqe_get_log_num_strides(mdev, params, xsk));
839840
int pkt_per_rsrv = BIT(mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
840841
u8 log_stride_sz = mlx5e_mpwqe_get_log_stride_size(mdev, params, xsk);
@@ -1043,7 +1044,8 @@ u32 mlx5e_shampo_hd_per_wqe(struct mlx5_core_dev *mdev,
10431044
struct mlx5e_params *params,
10441045
struct mlx5e_rq_param *rq_param)
10451046
{
1046-
int resv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) * PAGE_SIZE;
1047+
int resv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
1048+
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
10471049
u16 num_strides = BIT(mlx5e_mpwqe_get_log_num_strides(mdev, params, NULL));
10481050
int pkt_per_resv = BIT(mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
10491051
u8 log_stride_sz = mlx5e_mpwqe_get_log_stride_size(mdev, params, NULL);

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

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -661,30 +661,16 @@ int mana_pre_alloc_rxbufs(struct mana_port_context *mpc, int new_mtu, int num_qu
661661
mpc->rxbpre_total = 0;
662662

663663
for (i = 0; i < num_rxb; i++) {
664-
if (mpc->rxbpre_alloc_size > PAGE_SIZE) {
665-
va = netdev_alloc_frag(mpc->rxbpre_alloc_size);
666-
if (!va)
667-
goto error;
668-
669-
page = virt_to_head_page(va);
670-
/* Check if the frag falls back to single page */
671-
if (compound_order(page) <
672-
get_order(mpc->rxbpre_alloc_size)) {
673-
put_page(page);
674-
goto error;
675-
}
676-
} else {
677-
page = dev_alloc_page();
678-
if (!page)
679-
goto error;
664+
page = dev_alloc_pages(get_order(mpc->rxbpre_alloc_size));
665+
if (!page)
666+
goto error;
680667

681-
va = page_to_virt(page);
682-
}
668+
va = page_to_virt(page);
683669

684670
da = dma_map_single(dev, va + mpc->rxbpre_headroom,
685671
mpc->rxbpre_datasize, DMA_FROM_DEVICE);
686672
if (dma_mapping_error(dev, da)) {
687-
put_page(virt_to_head_page(va));
673+
put_page(page);
688674
goto error;
689675
}
690676

@@ -1676,7 +1662,7 @@ static void mana_rx_skb(void *buf_va, bool from_pool,
16761662
}
16771663

16781664
static void *mana_get_rxfrag(struct mana_rxq *rxq, struct device *dev,
1679-
dma_addr_t *da, bool *from_pool, bool is_napi)
1665+
dma_addr_t *da, bool *from_pool)
16801666
{
16811667
struct page *page;
16821668
void *va;
@@ -1687,21 +1673,6 @@ static void *mana_get_rxfrag(struct mana_rxq *rxq, struct device *dev,
16871673
if (rxq->xdp_save_va) {
16881674
va = rxq->xdp_save_va;
16891675
rxq->xdp_save_va = NULL;
1690-
} else if (rxq->alloc_size > PAGE_SIZE) {
1691-
if (is_napi)
1692-
va = napi_alloc_frag(rxq->alloc_size);
1693-
else
1694-
va = netdev_alloc_frag(rxq->alloc_size);
1695-
1696-
if (!va)
1697-
return NULL;
1698-
1699-
page = virt_to_head_page(va);
1700-
/* Check if the frag falls back to single page */
1701-
if (compound_order(page) < get_order(rxq->alloc_size)) {
1702-
put_page(page);
1703-
return NULL;
1704-
}
17051676
} else {
17061677
page = page_pool_dev_alloc_pages(rxq->page_pool);
17071678
if (!page)
@@ -1734,7 +1705,7 @@ static void mana_refill_rx_oob(struct device *dev, struct mana_rxq *rxq,
17341705
dma_addr_t da;
17351706
void *va;
17361707

1737-
va = mana_get_rxfrag(rxq, dev, &da, &from_pool, true);
1708+
va = mana_get_rxfrag(rxq, dev, &da, &from_pool);
17381709
if (!va)
17391710
return;
17401711

@@ -2176,7 +2147,7 @@ static int mana_fill_rx_oob(struct mana_recv_buf_oob *rx_oob, u32 mem_key,
21762147
if (mpc->rxbufs_pre)
21772148
va = mana_get_rxbuf_pre(rxq, &da);
21782149
else
2179-
va = mana_get_rxfrag(rxq, dev, &da, &from_pool, false);
2150+
va = mana_get_rxfrag(rxq, dev, &da, &from_pool);
21802151

21812152
if (!va)
21822153
return -ENOMEM;
@@ -2262,6 +2233,7 @@ static int mana_create_page_pool(struct mana_rxq *rxq, struct gdma_context *gc)
22622233
pprm.nid = gc->numa_node;
22632234
pprm.napi = &rxq->rx_cq.napi;
22642235
pprm.netdev = rxq->ndev;
2236+
pprm.order = get_order(rxq->alloc_size);
22652237

22662238
rxq->page_pool = page_pool_create(&pprm);
22672239

drivers/net/phy/broadcom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
859859
return reg;
860860

861861
/* Unmask events we are interested in and mask interrupts globally. */
862-
if (phydev->phy_id == PHY_ID_BCM5221)
862+
if (phydev->drv->phy_id == PHY_ID_BCM5221)
863863
reg = MII_BRCM_FET_IR_ENABLE |
864864
MII_BRCM_FET_IR_MASK;
865865
else
@@ -888,7 +888,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
888888
return err;
889889
}
890890

891-
if (phydev->phy_id != PHY_ID_BCM5221) {
891+
if (phydev->drv->phy_id != PHY_ID_BCM5221) {
892892
/* Set the LED mode */
893893
reg = __phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4);
894894
if (reg < 0) {
@@ -1009,7 +1009,7 @@ static int brcm_fet_suspend(struct phy_device *phydev)
10091009
return err;
10101010
}
10111011

1012-
if (phydev->phy_id == PHY_ID_BCM5221)
1012+
if (phydev->drv->phy_id == PHY_ID_BCM5221)
10131013
/* Force Low Power Mode with clock enabled */
10141014
reg = BCM5221_SHDW_AM4_EN_CLK_LPM | BCM5221_SHDW_AM4_FORCE_LPM;
10151015
else

drivers/net/usb/rndis_host.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,16 @@ static const struct driver_info zte_rndis_info = {
630630
.tx_fixup = rndis_tx_fixup,
631631
};
632632

633+
static const struct driver_info wwan_rndis_info = {
634+
.description = "Mobile Broadband RNDIS device",
635+
.flags = FLAG_WWAN | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT,
636+
.bind = rndis_bind,
637+
.unbind = rndis_unbind,
638+
.status = rndis_status,
639+
.rx_fixup = rndis_rx_fixup,
640+
.tx_fixup = rndis_tx_fixup,
641+
};
642+
633643
/*-------------------------------------------------------------------------*/
634644

635645
static const struct usb_device_id products [] = {
@@ -666,9 +676,11 @@ static const struct usb_device_id products [] = {
666676
USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3),
667677
.driver_info = (unsigned long) &rndis_info,
668678
}, {
669-
/* Novatel Verizon USB730L */
679+
/* Mobile Broadband Modem, seen in Novatel Verizon USB730L and
680+
* Telit FN990A (RNDIS)
681+
*/
670682
USB_INTERFACE_INFO(USB_CLASS_MISC, 4, 1),
671-
.driver_info = (unsigned long) &rndis_info,
683+
.driver_info = (unsigned long)&wwan_rndis_info,
672684
},
673685
{ }, // END
674686
};

drivers/net/usb/usbnet.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,17 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
178178
}
179179
EXPORT_SYMBOL_GPL(usbnet_get_ethernet_addr);
180180

181+
static bool usbnet_needs_usb_name_format(struct usbnet *dev, struct net_device *net)
182+
{
183+
/* Point to point devices which don't have a real MAC address
184+
* (or report a fake local one) have historically used the usb%d
185+
* naming. Preserve this..
186+
*/
187+
return (dev->driver_info->flags & FLAG_POINTTOPOINT) != 0 &&
188+
(is_zero_ether_addr(net->dev_addr) ||
189+
is_local_ether_addr(net->dev_addr));
190+
}
191+
181192
static void intr_complete (struct urb *urb)
182193
{
183194
struct usbnet *dev = urb->context;
@@ -1762,13 +1773,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
17621773
if (status < 0)
17631774
goto out1;
17641775

1765-
// heuristic: "usb%d" for links we know are two-host,
1766-
// else "eth%d" when there's reasonable doubt. userspace
1767-
// can rename the link if it knows better.
1776+
/* heuristic: rename to "eth%d" if we are not sure this link
1777+
* is two-host (these links keep "usb%d")
1778+
*/
17681779
if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
1769-
((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 ||
1770-
/* somebody touched it*/
1771-
!is_zero_ether_addr(net->dev_addr)))
1780+
!usbnet_needs_usb_name_format(dev, net))
17721781
strscpy(net->name, "eth%d", sizeof(net->name));
17731782
/* WLAN devices should always be named "wlan%d" */
17741783
if ((dev->driver_info->flags & FLAG_WLAN) != 0)

0 commit comments

Comments
 (0)