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

Merge in late fixes in preparation for the net-next PR.

Conflicts:

include/net/sch_generic.h
  a6bd339dbb ("net_sched: fix skb memory leak in deferred qdisc drops")
  ff2998f29f ("net: sched: introduce qdisc-specific drop reason tracing")
https://lore.kernel.org/adz0iX85FHMz0HdO@sirena.org.uk

drivers/net/ethernet/airoha/airoha_eth.c
  1acdfbdb51 ("net: airoha: Fix VIP configuration for AN7583 SoC")
  bf3471e6e6 ("net: airoha: Make flow control source port mapping dependent on nbq parameter")

Adjacent changes:

drivers/net/ethernet/airoha/airoha_ppe.c
  f44218cd5e ("net: airoha: Reset PPE cpu port configuration in airoha_ppe_hw_init()")
  7da62262ec ("inet: add ip_local_port_step_width sysctl to improve port usage distribution")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski
2026-04-14 11:54:21 -07:00
60 changed files with 1204 additions and 250 deletions

View File

@@ -554,6 +554,36 @@ static int nsim_stop(struct net_device *dev)
return 0;
}
static int nsim_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
{
struct netdevsim *ns = netdev_priv(dev);
if (vid >= VLAN_N_VID)
return -EINVAL;
if (proto == htons(ETH_P_8021Q))
WARN_ON_ONCE(test_and_set_bit(vid, ns->vlan.ctag));
else if (proto == htons(ETH_P_8021AD))
WARN_ON_ONCE(test_and_set_bit(vid, ns->vlan.stag));
return 0;
}
static int nsim_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
{
struct netdevsim *ns = netdev_priv(dev);
if (vid >= VLAN_N_VID)
return -EINVAL;
if (proto == htons(ETH_P_8021Q))
WARN_ON_ONCE(!test_and_clear_bit(vid, ns->vlan.ctag));
else if (proto == htons(ETH_P_8021AD))
WARN_ON_ONCE(!test_and_clear_bit(vid, ns->vlan.stag));
return 0;
}
static int nsim_shaper_set(struct net_shaper_binding *binding,
const struct net_shaper *shaper,
struct netlink_ext_ack *extack)
@@ -611,6 +641,8 @@ static const struct net_device_ops nsim_netdev_ops = {
.ndo_bpf = nsim_bpf,
.ndo_open = nsim_open,
.ndo_stop = nsim_stop,
.ndo_vlan_rx_add_vid = nsim_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = nsim_vlan_rx_kill_vid,
.net_shaper_ops = &nsim_shaper_ops,
};
@@ -622,6 +654,8 @@ static const struct net_device_ops nsim_vf_netdev_ops = {
.ndo_change_mtu = nsim_change_mtu,
.ndo_setup_tc = nsim_setup_tc,
.ndo_set_features = nsim_set_features,
.ndo_vlan_rx_add_vid = nsim_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = nsim_vlan_rx_kill_vid,
};
/* We don't have true per-queue stats, yet, so do some random fakery here.
@@ -919,6 +953,20 @@ static const struct file_operations nsim_pp_hold_fops = {
.owner = THIS_MODULE,
};
static int nsim_vlan_show(struct seq_file *s, void *data)
{
struct netdevsim *ns = s->private;
int vid;
for_each_set_bit(vid, ns->vlan.ctag, VLAN_N_VID)
seq_printf(s, "ctag %d\n", vid);
for_each_set_bit(vid, ns->vlan.stag, VLAN_N_VID)
seq_printf(s, "stag %d\n", vid);
return 0;
}
DEFINE_SHOW_ATTRIBUTE(nsim_vlan);
static void nsim_setup(struct net_device *dev)
{
ether_setup(dev);
@@ -931,14 +979,18 @@ static void nsim_setup(struct net_device *dev)
NETIF_F_FRAGLIST |
NETIF_F_HW_CSUM |
NETIF_F_LRO |
NETIF_F_TSO;
NETIF_F_TSO |
NETIF_F_HW_VLAN_CTAG_FILTER |
NETIF_F_HW_VLAN_STAG_FILTER;
dev->hw_features |= NETIF_F_HW_TC |
NETIF_F_SG |
NETIF_F_FRAGLIST |
NETIF_F_HW_CSUM |
NETIF_F_LRO |
NETIF_F_TSO |
NETIF_F_LOOPBACK;
NETIF_F_LOOPBACK |
NETIF_F_HW_VLAN_CTAG_FILTER |
NETIF_F_HW_VLAN_STAG_FILTER;
dev->pcpu_stat_type = NETDEV_PCPU_STAT_DSTATS;
dev->max_mtu = ETH_MAX_MTU;
dev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_HW_OFFLOAD;
@@ -1105,6 +1157,8 @@ struct netdevsim *nsim_create(struct nsim_dev *nsim_dev,
ns->qr_dfs = debugfs_create_file("queue_reset", 0200,
nsim_dev_port->ddir, ns,
&nsim_qreset_fops);
ns->vlan_dfs = debugfs_create_file("vlan", 0400, nsim_dev_port->ddir,
ns, &nsim_vlan_fops);
return ns;
err_free_netdev:
@@ -1116,7 +1170,9 @@ void nsim_destroy(struct netdevsim *ns)
{
struct net_device *dev = ns->netdev;
struct netdevsim *peer;
u16 vid;
debugfs_remove(ns->vlan_dfs);
debugfs_remove(ns->qr_dfs);
debugfs_remove(ns->pp_dfs);
@@ -1142,6 +1198,11 @@ void nsim_destroy(struct netdevsim *ns)
if (nsim_dev_port_is_pf(ns->nsim_dev_port))
nsim_exit_netdevsim(ns);
for_each_set_bit(vid, ns->vlan.ctag, VLAN_N_VID)
WARN_ON_ONCE(1);
for_each_set_bit(vid, ns->vlan.stag, VLAN_N_VID)
WARN_ON_ONCE(1);
/* Put this intentionally late to exercise the orphaning path */
if (ns->page) {
page_pool_put_full_page(pp_page_to_nmdesc(ns->page)->pp,