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

Pull networking fixes from David Miller:

1) Use after free in rxrpc_put_local(), from David Howells.

2) Fix 64-bit division error in mlxsw, from Nathan Chancellor.

3) Make sure we clear various bits of TCP state in response to
tcp_disconnect(). From Eric Dumazet.

4) Fix netlink attribute policy in cls_rsvp, from Eric Dumazet.

5) txtimer must be deleted in stmmac suspend(), from Nicolin Chen.

6) Fix TC queue mapping in bnxt_en driver, from Michael Chan.

7) Various netdevsim fixes from Taehee Yoo (use of uninitialized data,
snapshot panics, stack out of bounds, etc.)

8) cls_tcindex changes hash table size after allocating the table, fix
from Cong Wang.

9) Fix regression in the enforcement of session ID uniqueness in l2tp.
We only have to enforce uniqueness for IP based tunnels not UDP
ones. From Ridge Kennedy.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits)
gtp: use __GFP_NOWARN to avoid memalloc warning
l2tp: Allow duplicate session creation with UDP
r8152: Add MAC passthrough support to new device
net_sched: fix an OOB access in cls_tcindex
qed: Remove set but not used variable 'p_link'
tc-testing: add missing 'nsPlugin' to basic.json
tc-testing: fix eBPF tests failure on linux fresh clones
net: hsr: fix possible NULL deref in hsr_handle_frame()
netdevsim: remove unused sdev code
netdevsim: use __GFP_NOWARN to avoid memalloc warning
netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs
netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init()
netdevsim: fix panic in nsim_dev_take_snapshot_write()
netdevsim: disable devlink reload when resources are being used
netdevsim: fix using uninitialized resources
bnxt_en: Fix TC queue mapping.
bnxt_en: Fix logic that disables Bus Master during firmware reset.
bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset.
bnxt_en: Refactor logic to re-enable SRIOV after firmware reset detected.
net: stmmac: Delete txtimer in suspend()
...

+568 -245
+1 -1
Documentation/networking/nf_flowtable.txt
··· 76 76 77 77 table inet x { 78 78 flowtable f { 79 - hook ingress priority 0 devices = { eth0, eth1 }; 79 + hook ingress priority 0; devices = { eth0, eth1 }; 80 80 } 81 81 chain y { 82 82 type filter hook forward priority 0; policy accept;
+5 -4
MAINTAINERS
··· 7658 7658 F: drivers/net/usb/hso.c 7659 7659 7660 7660 HSR NETWORK PROTOCOL 7661 - M: Arvid Brodin <arvid.brodin@alten.se> 7662 7661 L: netdev@vger.kernel.org 7663 - S: Maintained 7662 + S: Orphan 7664 7663 F: net/hsr/ 7665 7664 7666 7665 HT16K33 LED CONTROLLER DRIVER ··· 8908 8909 L: netdev@vger.kernel.org 8909 8910 W: http://www.isdn4linux.de 8910 8911 S: Maintained 8911 - F: drivers/isdn/mISDN 8912 - F: drivers/isdn/hardware 8912 + F: drivers/isdn/mISDN/ 8913 + F: drivers/isdn/hardware/ 8914 + F: drivers/isdn/Kconfig 8915 + F: drivers/isdn/Makefile 8913 8916 8914 8917 ISDN/CMTP OVER BLUETOOTH 8915 8918 M: Karsten Keil <isdn@linux-pingi.de>
+24 -13
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 7893 7893 int tcs, i; 7894 7894 7895 7895 tcs = netdev_get_num_tc(dev); 7896 - if (tcs > 1) { 7896 + if (tcs) { 7897 7897 int i, off, count; 7898 7898 7899 7899 for (i = 0; i < tcs; i++) { ··· 9241 9241 bnxt_free_mem(bp, false); 9242 9242 } 9243 9243 9244 + static void bnxt_reenable_sriov(struct bnxt *bp) 9245 + { 9246 + if (BNXT_PF(bp)) { 9247 + struct bnxt_pf_info *pf = &bp->pf; 9248 + int n = pf->active_vfs; 9249 + 9250 + if (n) 9251 + bnxt_cfg_hw_sriov(bp, &n, true); 9252 + } 9253 + } 9254 + 9244 9255 static int bnxt_open(struct net_device *dev) 9245 9256 { 9246 9257 struct bnxt *bp = netdev_priv(dev); ··· 9270 9259 bnxt_hwrm_if_change(bp, false); 9271 9260 } else { 9272 9261 if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state)) { 9273 - if (BNXT_PF(bp)) { 9274 - struct bnxt_pf_info *pf = &bp->pf; 9275 - int n = pf->active_vfs; 9276 - 9277 - if (n) 9278 - bnxt_cfg_hw_sriov(bp, &n, true); 9279 - } 9280 - if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) 9262 + if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) { 9281 9263 bnxt_ulp_start(bp, 0); 9264 + bnxt_reenable_sriov(bp); 9265 + } 9282 9266 } 9283 9267 bnxt_hwmon_open(bp); 9284 9268 } ··· 9313 9307 bnxt_debug_dev_exit(bp); 9314 9308 bnxt_disable_napi(bp); 9315 9309 del_timer_sync(&bp->timer); 9316 - if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state) && 9317 - pci_is_enabled(bp->pdev)) 9318 - pci_disable_device(bp->pdev); 9319 - 9320 9310 bnxt_free_skbs(bp); 9321 9311 9322 9312 /* Save ring stats before shutdown */ ··· 10098 10096 static void bnxt_fw_reset_close(struct bnxt *bp) 10099 10097 { 10100 10098 bnxt_ulp_stop(bp); 10099 + /* When firmware is fatal state, disable PCI device to prevent 10100 + * any potential bad DMAs before freeing kernel memory. 10101 + */ 10102 + if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) 10103 + pci_disable_device(bp->pdev); 10101 10104 __bnxt_close_nic(bp, true, false); 10102 10105 bnxt_clear_int_mode(bp); 10103 10106 bnxt_hwrm_func_drv_unrgtr(bp); 10107 + if (pci_is_enabled(bp->pdev)) 10108 + pci_disable_device(bp->pdev); 10104 10109 bnxt_free_ctx_mem(bp); 10105 10110 kfree(bp->ctx); 10106 10111 bp->ctx = NULL; ··· 10840 10831 smp_mb__before_atomic(); 10841 10832 clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); 10842 10833 bnxt_ulp_start(bp, rc); 10834 + if (!rc) 10835 + bnxt_reenable_sriov(bp); 10843 10836 bnxt_dl_health_recovery_done(bp); 10844 10837 bnxt_dl_health_status_update(bp, true); 10845 10838 rtnl_unlock();
+2 -2
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
··· 171 171 } 172 172 173 173 msghdr = otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr); 174 - if (!msghdr) { 174 + if (IS_ERR(msghdr)) { 175 175 otx2_mbox_unlock(&pfvf->mbox); 176 - return -ENOMEM; 176 + return PTR_ERR(msghdr); 177 177 } 178 178 rsp = (struct nix_get_mac_addr_rsp *)msghdr; 179 179 ether_addr_copy(netdev->dev_addr, rsp->mac_addr);
+1 -1
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
··· 614 614 /* TBF interface is in bytes/s, whereas Spectrum ASIC is configured in 615 615 * Kbits/s. 616 616 */ 617 - return p->rate.rate_bytes_ps / 1000 * 8; 617 + return div_u64(p->rate.rate_bytes_ps, 1000) * 8; 618 618 } 619 619 620 620 static int
+1 -1
drivers/net/ethernet/pensando/ionic/ionic_if.h
··· 866 866 #define IONIC_RXQ_COMP_CSUM_F_VLAN 0x40 867 867 #define IONIC_RXQ_COMP_CSUM_F_CALC 0x80 868 868 u8 pkt_type_color; 869 - #define IONIC_RXQ_COMP_PKT_TYPE_MASK 0x0f 869 + #define IONIC_RXQ_COMP_PKT_TYPE_MASK 0x7f 870 870 }; 871 871 872 872 enum ionic_pkt_type {
-3
drivers/net/ethernet/qlogic/qed/qed_cxt.c
··· 1398 1398 { 1399 1399 struct qed_qm_info *qm_info = &p_hwfn->qm_info; 1400 1400 struct qed_qm_pf_rt_init_params params; 1401 - struct qed_mcp_link_state *p_link; 1402 1401 struct qed_qm_iids iids; 1403 1402 1404 1403 memset(&iids, 0, sizeof(iids)); 1405 1404 qed_cxt_qm_iids(p_hwfn, &iids); 1406 - 1407 - p_link = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output; 1408 1405 1409 1406 memset(&params, 0, sizeof(params)); 1410 1407 params.port_id = p_hwfn->port_id;
+1
drivers/net/ethernet/qlogic/qed/qed_dev.c
··· 3114 3114 if (!p_hwfn->fw_overlay_mem) { 3115 3115 DP_NOTICE(p_hwfn, 3116 3116 "Failed to allocate fw overlay memory\n"); 3117 + rc = -ENOMEM; 3117 3118 goto load_err; 3118 3119 } 3119 3120
+4
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 4974 4974 { 4975 4975 struct net_device *ndev = dev_get_drvdata(dev); 4976 4976 struct stmmac_priv *priv = netdev_priv(ndev); 4977 + u32 chan; 4977 4978 4978 4979 if (!ndev || !netif_running(ndev)) 4979 4980 return 0; ··· 4987 4986 stmmac_stop_all_queues(priv); 4988 4987 4989 4988 stmmac_disable_all_queues(priv); 4989 + 4990 + for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) 4991 + del_timer_sync(&priv->tx_queue[chan].txtimer); 4990 4992 4991 4993 /* Stop TX/RX DMA */ 4992 4994 stmmac_stop_all_dma(priv);
+2 -2
drivers/net/gtp.c
··· 767 767 int i; 768 768 769 769 gtp->addr_hash = kmalloc_array(hsize, sizeof(struct hlist_head), 770 - GFP_KERNEL); 770 + GFP_KERNEL | __GFP_NOWARN); 771 771 if (gtp->addr_hash == NULL) 772 772 return -ENOMEM; 773 773 774 774 gtp->tid_hash = kmalloc_array(hsize, sizeof(struct hlist_head), 775 - GFP_KERNEL); 775 + GFP_KERNEL | __GFP_NOWARN); 776 776 if (gtp->tid_hash == NULL) 777 777 goto err1; 778 778
+6 -4
drivers/net/netdevsim/bpf.c
··· 218 218 { 219 219 struct nsim_bpf_bound_prog *state; 220 220 char name[16]; 221 + int ret; 221 222 222 223 state = kzalloc(sizeof(*state), GFP_KERNEL); 223 224 if (!state) ··· 231 230 /* Program id is not populated yet when we create the state. */ 232 231 sprintf(name, "%u", nsim_dev->prog_id_gen++); 233 232 state->ddir = debugfs_create_dir(name, nsim_dev->ddir_bpf_bound_progs); 234 - if (IS_ERR_OR_NULL(state->ddir)) { 233 + if (IS_ERR(state->ddir)) { 234 + ret = PTR_ERR(state->ddir); 235 235 kfree(state); 236 - return -ENOMEM; 236 + return ret; 237 237 } 238 238 239 239 debugfs_create_u32("id", 0400, state->ddir, &prog->aux->id); ··· 589 587 590 588 nsim_dev->ddir_bpf_bound_progs = debugfs_create_dir("bpf_bound_progs", 591 589 nsim_dev->ddir); 592 - if (IS_ERR_OR_NULL(nsim_dev->ddir_bpf_bound_progs)) 593 - return -ENOMEM; 590 + if (IS_ERR(nsim_dev->ddir_bpf_bound_progs)) 591 + return PTR_ERR(nsim_dev->ddir_bpf_bound_progs); 594 592 595 593 nsim_dev->bpf_dev = bpf_offload_dev_create(&nsim_bpf_dev_ops, nsim_dev); 596 594 err = PTR_ERR_OR_ZERO(nsim_dev->bpf_dev);
+60 -4
drivers/net/netdevsim/bus.c
··· 17 17 static DEFINE_IDA(nsim_bus_dev_ids); 18 18 static LIST_HEAD(nsim_bus_dev_list); 19 19 static DEFINE_MUTEX(nsim_bus_dev_list_lock); 20 + static bool nsim_bus_enable; 20 21 21 22 static struct nsim_bus_dev *to_nsim_bus_dev(struct device *dev) 22 23 { ··· 29 28 { 30 29 nsim_bus_dev->vfconfigs = kcalloc(num_vfs, 31 30 sizeof(struct nsim_vf_config), 32 - GFP_KERNEL); 31 + GFP_KERNEL | __GFP_NOWARN); 33 32 if (!nsim_bus_dev->vfconfigs) 34 33 return -ENOMEM; 35 34 nsim_bus_dev->num_vfs = num_vfs; ··· 97 96 const char *buf, size_t count) 98 97 { 99 98 struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev); 99 + struct nsim_dev *nsim_dev = dev_get_drvdata(dev); 100 + struct devlink *devlink; 100 101 unsigned int port_index; 101 102 int ret; 102 103 104 + /* Prevent to use nsim_bus_dev before initialization. */ 105 + if (!smp_load_acquire(&nsim_bus_dev->init)) 106 + return -EBUSY; 103 107 ret = kstrtouint(buf, 0, &port_index); 104 108 if (ret) 105 109 return ret; 110 + 111 + devlink = priv_to_devlink(nsim_dev); 112 + 113 + mutex_lock(&nsim_bus_dev->nsim_bus_reload_lock); 114 + devlink_reload_disable(devlink); 106 115 ret = nsim_dev_port_add(nsim_bus_dev, port_index); 116 + devlink_reload_enable(devlink); 117 + mutex_unlock(&nsim_bus_dev->nsim_bus_reload_lock); 107 118 return ret ? ret : count; 108 119 } 109 120 ··· 126 113 const char *buf, size_t count) 127 114 { 128 115 struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev); 116 + struct nsim_dev *nsim_dev = dev_get_drvdata(dev); 117 + struct devlink *devlink; 129 118 unsigned int port_index; 130 119 int ret; 131 120 121 + /* Prevent to use nsim_bus_dev before initialization. */ 122 + if (!smp_load_acquire(&nsim_bus_dev->init)) 123 + return -EBUSY; 132 124 ret = kstrtouint(buf, 0, &port_index); 133 125 if (ret) 134 126 return ret; 127 + 128 + devlink = priv_to_devlink(nsim_dev); 129 + 130 + mutex_lock(&nsim_bus_dev->nsim_bus_reload_lock); 131 + devlink_reload_disable(devlink); 135 132 ret = nsim_dev_port_del(nsim_bus_dev, port_index); 133 + devlink_reload_enable(devlink); 134 + mutex_unlock(&nsim_bus_dev->nsim_bus_reload_lock); 136 135 return ret ? ret : count; 137 136 } 138 137 ··· 204 179 pr_err("Format for adding new device is \"id port_count\" (uint uint).\n"); 205 180 return -EINVAL; 206 181 } 207 - nsim_bus_dev = nsim_bus_dev_new(id, port_count); 208 - if (IS_ERR(nsim_bus_dev)) 209 - return PTR_ERR(nsim_bus_dev); 210 182 211 183 mutex_lock(&nsim_bus_dev_list_lock); 184 + /* Prevent to use resource before initialization. */ 185 + if (!smp_load_acquire(&nsim_bus_enable)) { 186 + err = -EBUSY; 187 + goto err; 188 + } 189 + 190 + nsim_bus_dev = nsim_bus_dev_new(id, port_count); 191 + if (IS_ERR(nsim_bus_dev)) { 192 + err = PTR_ERR(nsim_bus_dev); 193 + goto err; 194 + } 195 + 196 + /* Allow using nsim_bus_dev */ 197 + smp_store_release(&nsim_bus_dev->init, true); 198 + 212 199 list_add_tail(&nsim_bus_dev->list, &nsim_bus_dev_list); 213 200 mutex_unlock(&nsim_bus_dev_list_lock); 214 201 215 202 return count; 203 + err: 204 + mutex_unlock(&nsim_bus_dev_list_lock); 205 + return err; 216 206 } 217 207 static BUS_ATTR_WO(new_device); 218 208 ··· 255 215 256 216 err = -ENOENT; 257 217 mutex_lock(&nsim_bus_dev_list_lock); 218 + /* Prevent to use resource before initialization. */ 219 + if (!smp_load_acquire(&nsim_bus_enable)) { 220 + mutex_unlock(&nsim_bus_dev_list_lock); 221 + return -EBUSY; 222 + } 258 223 list_for_each_entry_safe(nsim_bus_dev, tmp, &nsim_bus_dev_list, list) { 259 224 if (nsim_bus_dev->dev.id != id) 260 225 continue; ··· 329 284 nsim_bus_dev->dev.type = &nsim_bus_dev_type; 330 285 nsim_bus_dev->port_count = port_count; 331 286 nsim_bus_dev->initial_net = current->nsproxy->net_ns; 287 + mutex_init(&nsim_bus_dev->nsim_bus_reload_lock); 288 + /* Disallow using nsim_bus_dev */ 289 + smp_store_release(&nsim_bus_dev->init, false); 332 290 333 291 err = device_register(&nsim_bus_dev->dev); 334 292 if (err) ··· 347 299 348 300 static void nsim_bus_dev_del(struct nsim_bus_dev *nsim_bus_dev) 349 301 { 302 + /* Disallow using nsim_bus_dev */ 303 + smp_store_release(&nsim_bus_dev->init, false); 350 304 device_unregister(&nsim_bus_dev->dev); 351 305 ida_free(&nsim_bus_dev_ids, nsim_bus_dev->dev.id); 352 306 kfree(nsim_bus_dev); ··· 370 320 err = driver_register(&nsim_driver); 371 321 if (err) 372 322 goto err_bus_unregister; 323 + /* Allow using resources */ 324 + smp_store_release(&nsim_bus_enable, true); 373 325 return 0; 374 326 375 327 err_bus_unregister: ··· 383 331 { 384 332 struct nsim_bus_dev *nsim_bus_dev, *tmp; 385 333 334 + /* Disallow using resources */ 335 + smp_store_release(&nsim_bus_enable, false); 336 + 386 337 mutex_lock(&nsim_bus_dev_list_lock); 387 338 list_for_each_entry_safe(nsim_bus_dev, tmp, &nsim_bus_dev_list, list) { 388 339 list_del(&nsim_bus_dev->list); 389 340 nsim_bus_dev_del(nsim_bus_dev); 390 341 } 391 342 mutex_unlock(&nsim_bus_dev_list_lock); 343 + 392 344 driver_unregister(&nsim_driver); 393 345 bus_unregister(&nsim_bus); 394 346 }
+20 -11
drivers/net/netdevsim/dev.c
··· 73 73 74 74 static int nsim_dev_debugfs_init(struct nsim_dev *nsim_dev) 75 75 { 76 - char dev_ddir_name[16]; 76 + char dev_ddir_name[sizeof(DRV_NAME) + 10]; 77 77 78 78 sprintf(dev_ddir_name, DRV_NAME "%u", nsim_dev->nsim_bus_dev->dev.id); 79 79 nsim_dev->ddir = debugfs_create_dir(dev_ddir_name, nsim_dev_ddir); 80 - if (IS_ERR_OR_NULL(nsim_dev->ddir)) 81 - return PTR_ERR_OR_ZERO(nsim_dev->ddir) ?: -EINVAL; 80 + if (IS_ERR(nsim_dev->ddir)) 81 + return PTR_ERR(nsim_dev->ddir); 82 82 nsim_dev->ports_ddir = debugfs_create_dir("ports", nsim_dev->ddir); 83 - if (IS_ERR_OR_NULL(nsim_dev->ports_ddir)) 84 - return PTR_ERR_OR_ZERO(nsim_dev->ports_ddir) ?: -EINVAL; 83 + if (IS_ERR(nsim_dev->ports_ddir)) 84 + return PTR_ERR(nsim_dev->ports_ddir); 85 85 debugfs_create_bool("fw_update_status", 0600, nsim_dev->ddir, 86 86 &nsim_dev->fw_update_status); 87 87 debugfs_create_u32("max_macs", 0600, nsim_dev->ddir, 88 88 &nsim_dev->max_macs); 89 89 debugfs_create_bool("test1", 0600, nsim_dev->ddir, 90 90 &nsim_dev->test1); 91 - debugfs_create_file("take_snapshot", 0200, nsim_dev->ddir, nsim_dev, 92 - &nsim_dev_take_snapshot_fops); 91 + nsim_dev->take_snapshot = debugfs_create_file("take_snapshot", 92 + 0200, 93 + nsim_dev->ddir, 94 + nsim_dev, 95 + &nsim_dev_take_snapshot_fops); 93 96 debugfs_create_bool("dont_allow_reload", 0600, nsim_dev->ddir, 94 97 &nsim_dev->dont_allow_reload); 95 98 debugfs_create_bool("fail_reload", 0600, nsim_dev->ddir, ··· 115 112 sprintf(port_ddir_name, "%u", nsim_dev_port->port_index); 116 113 nsim_dev_port->ddir = debugfs_create_dir(port_ddir_name, 117 114 nsim_dev->ports_ddir); 118 - if (IS_ERR_OR_NULL(nsim_dev_port->ddir)) 119 - return -ENOMEM; 115 + if (IS_ERR(nsim_dev_port->ddir)) 116 + return PTR_ERR(nsim_dev_port->ddir); 120 117 121 118 sprintf(dev_link_name, "../../../" DRV_NAME "%u", 122 119 nsim_dev->nsim_bus_dev->dev.id); ··· 743 740 if (err) 744 741 goto err_health_exit; 745 742 743 + nsim_dev->take_snapshot = debugfs_create_file("take_snapshot", 744 + 0200, 745 + nsim_dev->ddir, 746 + nsim_dev, 747 + &nsim_dev_take_snapshot_fops); 746 748 return 0; 747 749 748 750 err_health_exit: ··· 861 853 862 854 if (devlink_is_reload_failed(devlink)) 863 855 return; 856 + debugfs_remove(nsim_dev->take_snapshot); 864 857 nsim_dev_port_del_all(nsim_dev); 865 858 nsim_dev_health_exit(nsim_dev); 866 859 nsim_dev_traps_exit(devlink); ··· 934 925 int nsim_dev_init(void) 935 926 { 936 927 nsim_dev_ddir = debugfs_create_dir(DRV_NAME, NULL); 937 - if (IS_ERR_OR_NULL(nsim_dev_ddir)) 938 - return -ENOMEM; 928 + if (IS_ERR(nsim_dev_ddir)) 929 + return PTR_ERR(nsim_dev_ddir); 939 930 return 0; 940 931 } 941 932
+3 -3
drivers/net/netdevsim/health.c
··· 82 82 if (err) 83 83 return err; 84 84 85 - binary = kmalloc(binary_len, GFP_KERNEL); 85 + binary = kmalloc(binary_len, GFP_KERNEL | __GFP_NOWARN); 86 86 if (!binary) 87 87 return -ENOMEM; 88 88 get_random_bytes(binary, binary_len); ··· 285 285 } 286 286 287 287 health->ddir = debugfs_create_dir("health", nsim_dev->ddir); 288 - if (IS_ERR_OR_NULL(health->ddir)) { 289 - err = PTR_ERR_OR_ZERO(health->ddir) ?: -EINVAL; 288 + if (IS_ERR(health->ddir)) { 289 + err = PTR_ERR(health->ddir); 290 290 goto err_dummy_reporter_destroy; 291 291 } 292 292
+4
drivers/net/netdevsim/netdevsim.h
··· 160 160 struct nsim_trap_data *trap_data; 161 161 struct dentry *ddir; 162 162 struct dentry *ports_ddir; 163 + struct dentry *take_snapshot; 163 164 struct bpf_offload_dev *bpf_dev; 164 165 bool bpf_bind_accept; 165 166 u32 bpf_bind_verifier_delay; ··· 241 240 */ 242 241 unsigned int num_vfs; 243 242 struct nsim_vf_config *vfconfigs; 243 + /* Lock for devlink->reload_enabled in netdevsim module */ 244 + struct mutex nsim_bus_reload_lock; 245 + bool init; 244 246 }; 245 247 246 248 int nsim_bus_init(void);
-69
drivers/net/netdevsim/sdev.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* Copyright (c) 2019 Mellanox Technologies. All rights reserved */ 3 - 4 - #include <linux/debugfs.h> 5 - #include <linux/err.h> 6 - #include <linux/kernel.h> 7 - #include <linux/slab.h> 8 - 9 - #include "netdevsim.h" 10 - 11 - static struct dentry *nsim_sdev_ddir; 12 - 13 - static u32 nsim_sdev_id; 14 - 15 - struct netdevsim_shared_dev *nsim_sdev_get(struct netdevsim *joinns) 16 - { 17 - struct netdevsim_shared_dev *sdev; 18 - char sdev_ddir_name[10]; 19 - int err; 20 - 21 - if (joinns) { 22 - if (WARN_ON(!joinns->sdev)) 23 - return ERR_PTR(-EINVAL); 24 - sdev = joinns->sdev; 25 - sdev->refcnt++; 26 - return sdev; 27 - } 28 - 29 - sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); 30 - if (!sdev) 31 - return ERR_PTR(-ENOMEM); 32 - sdev->refcnt = 1; 33 - sdev->switch_id = nsim_sdev_id++; 34 - 35 - sprintf(sdev_ddir_name, "%u", sdev->switch_id); 36 - sdev->ddir = debugfs_create_dir(sdev_ddir_name, nsim_sdev_ddir); 37 - if (IS_ERR_OR_NULL(sdev->ddir)) { 38 - err = PTR_ERR_OR_ZERO(sdev->ddir) ?: -EINVAL; 39 - goto err_sdev_free; 40 - } 41 - 42 - return sdev; 43 - 44 - err_sdev_free: 45 - nsim_sdev_id--; 46 - kfree(sdev); 47 - return ERR_PTR(err); 48 - } 49 - 50 - void nsim_sdev_put(struct netdevsim_shared_dev *sdev) 51 - { 52 - if (--sdev->refcnt) 53 - return; 54 - debugfs_remove_recursive(sdev->ddir); 55 - kfree(sdev); 56 - } 57 - 58 - int nsim_sdev_init(void) 59 - { 60 - nsim_sdev_ddir = debugfs_create_dir(DRV_NAME "_sdev", NULL); 61 - if (IS_ERR_OR_NULL(nsim_sdev_ddir)) 62 - return -ENOMEM; 63 - return 0; 64 - } 65 - 66 - void nsim_sdev_exit(void) 67 - { 68 - debugfs_remove_recursive(nsim_sdev_ddir); 69 - }
+11
drivers/net/phy/at803x.c
··· 489 489 return at803x_parse_dt(phydev); 490 490 } 491 491 492 + static void at803x_remove(struct phy_device *phydev) 493 + { 494 + struct at803x_priv *priv = phydev->priv; 495 + 496 + if (priv->vddio) 497 + regulator_disable(priv->vddio); 498 + } 499 + 492 500 static int at803x_clk_out_config(struct phy_device *phydev) 493 501 { 494 502 struct at803x_priv *priv = phydev->priv; ··· 719 711 .name = "Qualcomm Atheros AR8035", 720 712 .phy_id_mask = AT803X_PHY_ID_MASK, 721 713 .probe = at803x_probe, 714 + .remove = at803x_remove, 722 715 .config_init = at803x_config_init, 723 716 .set_wol = at803x_set_wol, 724 717 .get_wol = at803x_get_wol, ··· 735 726 .name = "Qualcomm Atheros AR8030", 736 727 .phy_id_mask = AT803X_PHY_ID_MASK, 737 728 .probe = at803x_probe, 729 + .remove = at803x_remove, 738 730 .config_init = at803x_config_init, 739 731 .link_change_notify = at803x_link_change_notify, 740 732 .set_wol = at803x_set_wol, ··· 751 741 .name = "Qualcomm Atheros AR8031/AR8033", 752 742 .phy_id_mask = AT803X_PHY_ID_MASK, 753 743 .probe = at803x_probe, 744 + .remove = at803x_remove, 754 745 .config_init = at803x_config_init, 755 746 .set_wol = at803x_set_wol, 756 747 .get_wol = at803x_get_wol,
+7
drivers/net/phy/mii_timestamper.c
··· 111 111 struct mii_timestamping_desc *desc; 112 112 struct list_head *this; 113 113 114 + /* mii_timestamper statically registered by the PHY driver won't use the 115 + * register_mii_timestamper() and thus don't have ->device set. Don't 116 + * try to unregister these. 117 + */ 118 + if (!mii_ts->device) 119 + return; 120 + 114 121 mutex_lock(&tstamping_devices_lock); 115 122 list_for_each(this, &mii_timestamping_devices) { 116 123 desc = list_entry(this, struct mii_timestamping_desc, list);
+10 -3
drivers/net/usb/r8152.c
··· 698 698 #define VENDOR_ID_NVIDIA 0x0955 699 699 #define VENDOR_ID_TPLINK 0x2357 700 700 701 + #define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2 0x3082 702 + #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387 703 + 701 704 #define MCU_TYPE_PLA 0x0100 702 705 #define MCU_TYPE_USB 0x0000 703 706 ··· 6762 6759 netdev->hw_features &= ~NETIF_F_RXCSUM; 6763 6760 } 6764 6761 6765 - if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO && 6766 - le16_to_cpu(udev->descriptor.idProduct) == 0x3082) 6767 - set_bit(LENOVO_MACPASSTHRU, &tp->flags); 6762 + if (le16_to_cpu(udev->descriptor.idVendor) == VENDOR_ID_LENOVO) { 6763 + switch (le16_to_cpu(udev->descriptor.idProduct)) { 6764 + case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: 6765 + case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: 6766 + set_bit(LENOVO_MACPASSTHRU, &tp->flags); 6767 + } 6768 + } 6768 6769 6769 6770 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial && 6770 6771 (!strcmp(udev->serial, "000001000000") ||
+13 -4
drivers/of/of_mdio.c
··· 81 81 else 82 82 phy = get_phy_device(mdio, addr, is_c45); 83 83 if (IS_ERR(phy)) { 84 - unregister_mii_timestamper(mii_ts); 84 + if (mii_ts) 85 + unregister_mii_timestamper(mii_ts); 85 86 return PTR_ERR(phy); 86 87 } 87 88 88 89 rc = of_irq_get(child, 0); 89 90 if (rc == -EPROBE_DEFER) { 90 - unregister_mii_timestamper(mii_ts); 91 + if (mii_ts) 92 + unregister_mii_timestamper(mii_ts); 91 93 phy_device_free(phy); 92 94 return rc; 93 95 } ··· 118 116 * register it */ 119 117 rc = phy_device_register(phy); 120 118 if (rc) { 121 - unregister_mii_timestamper(mii_ts); 119 + if (mii_ts) 120 + unregister_mii_timestamper(mii_ts); 122 121 phy_device_free(phy); 123 122 of_node_put(child); 124 123 return rc; 125 124 } 126 - phy->mii_ts = mii_ts; 125 + 126 + /* phy->mii_ts may already be defined by the PHY driver. A 127 + * mii_timestamper probed via the device tree will still have 128 + * precedence. 129 + */ 130 + if (mii_ts) 131 + phy->mii_ts = mii_ts; 127 132 128 133 dev_dbg(&mdio->dev, "registered phy %pOFn at address %i\n", 129 134 child, addr);
+2
net/hsr/hsr_slave.c
··· 27 27 28 28 rcu_read_lock(); /* hsr->node_db, hsr->ports */ 29 29 port = hsr_port_get_rcu(skb->dev); 30 + if (!port) 31 + goto finish_pass; 30 32 31 33 if (hsr_addr_is_self(port->hsr, eth_hdr(skb)->h_source)) { 32 34 /* Directly kill frames sent by ourselves */
+6
net/ipv4/tcp.c
··· 2622 2622 tp->snd_cwnd = TCP_INIT_CWND; 2623 2623 tp->snd_cwnd_cnt = 0; 2624 2624 tp->window_clamp = 0; 2625 + tp->delivered = 0; 2625 2626 tp->delivered_ce = 0; 2626 2627 tcp_set_ca_state(sk, TCP_CA_Open); 2627 2628 tp->is_sack_reneg = 0; 2628 2629 tcp_clear_retrans(tp); 2630 + tp->total_retrans = 0; 2629 2631 inet_csk_delack_init(sk); 2630 2632 /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0 2631 2633 * issue in __tcp_select_window() ··· 2639 2637 sk->sk_rx_dst = NULL; 2640 2638 tcp_saved_syn_free(tp); 2641 2639 tp->compressed_ack = 0; 2640 + tp->segs_in = 0; 2641 + tp->segs_out = 0; 2642 2642 tp->bytes_sent = 0; 2643 2643 tp->bytes_acked = 0; 2644 2644 tp->bytes_received = 0; 2645 2645 tp->bytes_retrans = 0; 2646 + tp->data_segs_in = 0; 2647 + tp->data_segs_out = 0; 2646 2648 tp->duplicate_sack[0].start_seq = 0; 2647 2649 tp->duplicate_sack[0].end_seq = 0; 2648 2650 tp->dsack_dups = 0;
+7 -1
net/ipv4/tcp_input.c
··· 5908 5908 * the segment and return)" 5909 5909 */ 5910 5910 if (!after(TCP_SKB_CB(skb)->ack_seq, tp->snd_una) || 5911 - after(TCP_SKB_CB(skb)->ack_seq, tp->snd_nxt)) 5911 + after(TCP_SKB_CB(skb)->ack_seq, tp->snd_nxt)) { 5912 + /* Previous FIN/ACK or RST/ACK might be ignored. */ 5913 + if (icsk->icsk_retransmits == 0) 5914 + inet_csk_reset_xmit_timer(sk, 5915 + ICSK_TIME_RETRANS, 5916 + TCP_TIMEOUT_MIN, TCP_RTO_MAX); 5912 5917 goto reset_and_undo; 5918 + } 5913 5919 5914 5920 if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && 5915 5921 !between(tp->rx_opt.rcv_tsecr, tp->retrans_stamp,
+6 -1
net/l2tp/l2tp_core.c
··· 320 320 321 321 spin_lock_bh(&pn->l2tp_session_hlist_lock); 322 322 323 + /* IP encap expects session IDs to be globally unique, while 324 + * UDP encap doesn't. 325 + */ 323 326 hlist_for_each_entry(session_walk, g_head, global_hlist) 324 - if (session_walk->session_id == session->session_id) { 327 + if (session_walk->session_id == session->session_id && 328 + (session_walk->tunnel->encap == L2TP_ENCAPTYPE_IP || 329 + tunnel->encap == L2TP_ENCAPTYPE_IP)) { 325 330 err = -EEXIST; 326 331 goto err_tlock_pnlock; 327 332 }
+21 -20
net/netfilter/ipset/ip_set_core.c
··· 1483 1483 }; 1484 1484 1485 1485 static int 1486 - dump_init(struct netlink_callback *cb, struct ip_set_net *inst) 1486 + ip_set_dump_start(struct netlink_callback *cb) 1487 1487 { 1488 1488 struct nlmsghdr *nlh = nlmsg_hdr(cb->skb); 1489 1489 int min_len = nlmsg_total_size(sizeof(struct nfgenmsg)); 1490 1490 struct nlattr *cda[IPSET_ATTR_CMD_MAX + 1]; 1491 1491 struct nlattr *attr = (void *)nlh + min_len; 1492 + struct sk_buff *skb = cb->skb; 1493 + struct ip_set_net *inst = ip_set_pernet(sock_net(skb->sk)); 1492 1494 u32 dump_type; 1493 - ip_set_id_t index; 1494 1495 int ret; 1495 1496 1496 1497 ret = nla_parse(cda, IPSET_ATTR_CMD_MAX, attr, 1497 1498 nlh->nlmsg_len - min_len, 1498 1499 ip_set_dump_policy, NULL); 1499 1500 if (ret) 1500 - return ret; 1501 + goto error; 1501 1502 1502 1503 cb->args[IPSET_CB_PROTO] = nla_get_u8(cda[IPSET_ATTR_PROTOCOL]); 1503 1504 if (cda[IPSET_ATTR_SETNAME]) { 1505 + ip_set_id_t index; 1504 1506 struct ip_set *set; 1505 1507 1506 1508 set = find_set_and_id(inst, nla_data(cda[IPSET_ATTR_SETNAME]), 1507 1509 &index); 1508 - if (!set) 1509 - return -ENOENT; 1510 - 1510 + if (!set) { 1511 + ret = -ENOENT; 1512 + goto error; 1513 + } 1511 1514 dump_type = DUMP_ONE; 1512 1515 cb->args[IPSET_CB_INDEX] = index; 1513 1516 } else { ··· 1526 1523 cb->args[IPSET_CB_DUMP] = dump_type; 1527 1524 1528 1525 return 0; 1526 + 1527 + error: 1528 + /* We have to create and send the error message manually :-( */ 1529 + if (nlh->nlmsg_flags & NLM_F_ACK) { 1530 + netlink_ack(cb->skb, nlh, ret, NULL); 1531 + } 1532 + return ret; 1529 1533 } 1530 1534 1531 1535 static int 1532 - ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb) 1536 + ip_set_dump_do(struct sk_buff *skb, struct netlink_callback *cb) 1533 1537 { 1534 1538 ip_set_id_t index = IPSET_INVALID_ID, max; 1535 1539 struct ip_set *set = NULL; ··· 1547 1537 bool is_destroyed; 1548 1538 int ret = 0; 1549 1539 1550 - if (!cb->args[IPSET_CB_DUMP]) { 1551 - ret = dump_init(cb, inst); 1552 - if (ret < 0) { 1553 - nlh = nlmsg_hdr(cb->skb); 1554 - /* We have to create and send the error message 1555 - * manually :-( 1556 - */ 1557 - if (nlh->nlmsg_flags & NLM_F_ACK) 1558 - netlink_ack(cb->skb, nlh, ret, NULL); 1559 - return ret; 1560 - } 1561 - } 1540 + if (!cb->args[IPSET_CB_DUMP]) 1541 + return -EINVAL; 1562 1542 1563 1543 if (cb->args[IPSET_CB_INDEX] >= inst->ip_set_max) 1564 1544 goto out; ··· 1684 1684 1685 1685 { 1686 1686 struct netlink_dump_control c = { 1687 - .dump = ip_set_dump_start, 1687 + .start = ip_set_dump_start, 1688 + .dump = ip_set_dump_do, 1688 1689 .done = ip_set_dump_done, 1689 1690 }; 1690 1691 return netlink_dump_start(ctnl, skb, nlh, &c);
+1 -2
net/netfilter/nf_conntrack_core.c
··· 2248 2248 BUILD_BUG_ON(sizeof(struct hlist_nulls_head) != sizeof(struct hlist_head)); 2249 2249 nr_slots = *sizep = roundup(*sizep, PAGE_SIZE / sizeof(struct hlist_nulls_head)); 2250 2250 2251 - hash = kvmalloc_array(nr_slots, sizeof(struct hlist_nulls_head), 2252 - GFP_KERNEL | __GFP_ZERO); 2251 + hash = kvcalloc(nr_slots, sizeof(struct hlist_nulls_head), GFP_KERNEL); 2253 2252 2254 2253 if (hash && nulls) 2255 2254 for (i = 0; i < nr_slots; i++)
+2 -1
net/netfilter/nf_flow_table_core.c
··· 529 529 static void nf_flow_table_iterate_cleanup(struct nf_flowtable *flowtable, 530 530 struct net_device *dev) 531 531 { 532 - nf_flow_table_offload_flush(flowtable); 533 532 nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev); 534 533 flush_delayed_work(&flowtable->gc_work); 534 + nf_flow_table_offload_flush(flowtable); 535 535 } 536 536 537 537 void nf_flow_table_cleanup(struct net_device *dev) ··· 553 553 cancel_delayed_work_sync(&flow_table->gc_work); 554 554 nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL); 555 555 nf_flow_table_iterate(flow_table, nf_flow_offload_gc_step, flow_table); 556 + nf_flow_table_offload_flush(flow_table); 556 557 rhashtable_destroy(&flow_table->rhashtable); 557 558 } 558 559 EXPORT_SYMBOL_GPL(nf_flow_table_free);
+1
net/netfilter/nf_flow_table_offload.c
··· 675 675 { 676 676 flow_offload_tuple_del(offload, FLOW_OFFLOAD_DIR_ORIGINAL); 677 677 flow_offload_tuple_del(offload, FLOW_OFFLOAD_DIR_REPLY); 678 + set_bit(NF_FLOW_HW_DEAD, &offload->flow->flags); 678 679 } 679 680 680 681 static void flow_offload_tuple_stats(struct flow_offload_work *offload,
+2 -2
net/netfilter/x_tables.c
··· 939 939 * 940 940 * @size: number of entries 941 941 * 942 - * Return: NULL or kmalloc'd or vmalloc'd array 942 + * Return: NULL or zeroed kmalloc'd or vmalloc'd array 943 943 */ 944 944 unsigned int *xt_alloc_entry_offsets(unsigned int size) 945 945 { 946 946 if (size > XT_MAX_TABLE_SIZE / sizeof(unsigned int)) 947 947 return NULL; 948 948 949 - return kvmalloc_array(size, sizeof(unsigned int), GFP_KERNEL | __GFP_ZERO); 949 + return kvcalloc(size, sizeof(unsigned int), GFP_KERNEL); 950 950 951 951 } 952 952 EXPORT_SYMBOL(xt_alloc_entry_offsets);
+2
net/rxrpc/af_rxrpc.c
··· 194 194 service_in_use: 195 195 write_unlock(&local->services_lock); 196 196 rxrpc_unuse_local(local); 197 + rxrpc_put_local(local); 197 198 ret = -EADDRINUSE; 198 199 error_unlock: 199 200 release_sock(&rx->sk); ··· 900 899 rxrpc_purge_queue(&sk->sk_receive_queue); 901 900 902 901 rxrpc_unuse_local(rx->local); 902 + rxrpc_put_local(rx->local); 903 903 rx->local = NULL; 904 904 key_put(rx->key); 905 905 rx->key = NULL;
+11
net/rxrpc/ar-internal.h
··· 490 490 RXRPC_CALL_RX_HEARD, /* The peer responded at least once to this call */ 491 491 RXRPC_CALL_RX_UNDERRUN, /* Got data underrun */ 492 492 RXRPC_CALL_IS_INTR, /* The call is interruptible */ 493 + RXRPC_CALL_DISCONNECTED, /* The call has been disconnected */ 493 494 }; 494 495 495 496 /* ··· 1021 1020 void rxrpc_unuse_local(struct rxrpc_local *); 1022 1021 void rxrpc_queue_local(struct rxrpc_local *); 1023 1022 void rxrpc_destroy_all_locals(struct rxrpc_net *); 1023 + 1024 + static inline bool __rxrpc_unuse_local(struct rxrpc_local *local) 1025 + { 1026 + return atomic_dec_return(&local->active_users) == 0; 1027 + } 1028 + 1029 + static inline bool __rxrpc_use_local(struct rxrpc_local *local) 1030 + { 1031 + return atomic_fetch_add_unless(&local->active_users, 1, 0) != 0; 1032 + } 1024 1033 1025 1034 /* 1026 1035 * misc.c
+2 -2
net/rxrpc/call_object.c
··· 493 493 494 494 _debug("RELEASE CALL %p (%d CONN %p)", call, call->debug_id, conn); 495 495 496 - if (conn) 496 + if (conn && !test_bit(RXRPC_CALL_DISCONNECTED, &call->flags)) 497 497 rxrpc_disconnect_call(call); 498 498 if (call->security) 499 499 call->security->free_call_crypto(call); ··· 569 569 struct rxrpc_call *call = container_of(rcu, struct rxrpc_call, rcu); 570 570 struct rxrpc_net *rxnet = call->rxnet; 571 571 572 + rxrpc_put_connection(call->conn); 572 573 rxrpc_put_peer(call->peer); 573 574 kfree(call->rxtx_buffer); 574 575 kfree(call->rxtx_annotations); ··· 591 590 592 591 ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE); 593 592 ASSERT(test_bit(RXRPC_CALL_RELEASED, &call->flags)); 594 - ASSERTCMP(call->conn, ==, NULL); 595 593 596 594 rxrpc_cleanup_ring(call); 597 595 rxrpc_free_skb(call->tx_pending, rxrpc_skb_cleaned);
+1 -2
net/rxrpc/conn_client.c
··· 785 785 u32 cid; 786 786 787 787 spin_lock(&conn->channel_lock); 788 + set_bit(RXRPC_CALL_DISCONNECTED, &call->flags); 788 789 789 790 cid = call->cid; 790 791 if (cid) { ··· 793 792 chan = &conn->channels[channel]; 794 793 } 795 794 trace_rxrpc_client(conn, channel, rxrpc_client_chan_disconnect); 796 - call->conn = NULL; 797 795 798 796 /* Calls that have never actually been assigned a channel can simply be 799 797 * discarded. If the conn didn't get used either, it will follow ··· 908 908 spin_unlock(&rxnet->client_conn_cache_lock); 909 909 out_2: 910 910 spin_unlock(&conn->channel_lock); 911 - rxrpc_put_connection(conn); 912 911 _leave(""); 913 912 return; 914 913
+20 -10
net/rxrpc/conn_event.c
··· 438 438 /* 439 439 * connection-level event processor 440 440 */ 441 - void rxrpc_process_connection(struct work_struct *work) 441 + static void rxrpc_do_process_connection(struct rxrpc_connection *conn) 442 442 { 443 - struct rxrpc_connection *conn = 444 - container_of(work, struct rxrpc_connection, processor); 445 443 struct sk_buff *skb; 446 444 u32 abort_code = RX_PROTOCOL_ERROR; 447 445 int ret; 448 - 449 - rxrpc_see_connection(conn); 450 446 451 447 if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events)) 452 448 rxrpc_secure_connection(conn); ··· 471 475 } 472 476 } 473 477 474 - out: 475 - rxrpc_put_connection(conn); 476 - _leave(""); 477 478 return; 478 479 479 480 requeue_and_leave: 480 481 skb_queue_head(&conn->rx_queue, skb); 481 - goto out; 482 + return; 482 483 483 484 protocol_error: 484 485 if (rxrpc_abort_connection(conn, ret, abort_code) < 0) 485 486 goto requeue_and_leave; 486 487 rxrpc_free_skb(skb, rxrpc_skb_freed); 487 - goto out; 488 + return; 489 + } 490 + 491 + void rxrpc_process_connection(struct work_struct *work) 492 + { 493 + struct rxrpc_connection *conn = 494 + container_of(work, struct rxrpc_connection, processor); 495 + 496 + rxrpc_see_connection(conn); 497 + 498 + if (__rxrpc_use_local(conn->params.local)) { 499 + rxrpc_do_process_connection(conn); 500 + rxrpc_unuse_local(conn->params.local); 501 + } 502 + 503 + rxrpc_put_connection(conn); 504 + _leave(""); 505 + return; 488 506 }
+2 -2
net/rxrpc/conn_object.c
··· 171 171 172 172 _enter("%d,%x", conn->debug_id, call->cid); 173 173 174 + set_bit(RXRPC_CALL_DISCONNECTED, &call->flags); 175 + 174 176 if (rcu_access_pointer(chan->call) == call) { 175 177 /* Save the result of the call so that we can repeat it if necessary 176 178 * through the channel, whilst disposing of the actual call record. ··· 225 223 __rxrpc_disconnect_call(conn, call); 226 224 spin_unlock(&conn->channel_lock); 227 225 228 - call->conn = NULL; 229 226 conn->idle_timestamp = jiffies; 230 - rxrpc_put_connection(conn); 231 227 } 232 228 233 229 /*
+2 -4
net/rxrpc/input.c
··· 599 599 false, true, 600 600 rxrpc_propose_ack_input_data); 601 601 602 - if (seq0 == READ_ONCE(call->rx_hard_ack) + 1) { 603 - trace_rxrpc_notify_socket(call->debug_id, serial); 604 - rxrpc_notify_socket(call); 605 - } 602 + trace_rxrpc_notify_socket(call->debug_id, serial); 603 + rxrpc_notify_socket(call); 606 604 607 605 unlock: 608 606 spin_unlock(&call->input_lock);
+11 -12
net/rxrpc/local_object.c
··· 364 364 void rxrpc_put_local(struct rxrpc_local *local) 365 365 { 366 366 const void *here = __builtin_return_address(0); 367 + unsigned int debug_id; 367 368 int n; 368 369 369 370 if (local) { 371 + debug_id = local->debug_id; 372 + 370 373 n = atomic_dec_return(&local->usage); 371 - trace_rxrpc_local(local->debug_id, rxrpc_local_put, n, here); 374 + trace_rxrpc_local(debug_id, rxrpc_local_put, n, here); 372 375 373 376 if (n == 0) 374 377 call_rcu(&local->rcu, rxrpc_local_rcu); ··· 383 380 */ 384 381 struct rxrpc_local *rxrpc_use_local(struct rxrpc_local *local) 385 382 { 386 - unsigned int au; 387 - 388 383 local = rxrpc_get_local_maybe(local); 389 384 if (!local) 390 385 return NULL; 391 386 392 - au = atomic_fetch_add_unless(&local->active_users, 1, 0); 393 - if (au == 0) { 387 + if (!__rxrpc_use_local(local)) { 394 388 rxrpc_put_local(local); 395 389 return NULL; 396 390 } ··· 401 401 */ 402 402 void rxrpc_unuse_local(struct rxrpc_local *local) 403 403 { 404 - unsigned int au; 405 - 406 404 if (local) { 407 - au = atomic_dec_return(&local->active_users); 408 - if (au == 0) 405 + if (__rxrpc_unuse_local(local)) { 406 + rxrpc_get_local(local); 409 407 rxrpc_queue_local(local); 410 - else 411 - rxrpc_put_local(local); 408 + } 412 409 } 413 410 } 414 411 ··· 462 465 463 466 do { 464 467 again = false; 465 - if (atomic_read(&local->active_users) == 0) { 468 + if (!__rxrpc_use_local(local)) { 466 469 rxrpc_local_destroyer(local); 467 470 break; 468 471 } ··· 476 479 rxrpc_process_local_events(local); 477 480 again = true; 478 481 } 482 + 483 + __rxrpc_unuse_local(local); 479 484 } while (again); 480 485 481 486 rxrpc_put_local(local);
+9 -18
net/rxrpc/output.c
··· 129 129 int rxrpc_send_ack_packet(struct rxrpc_call *call, bool ping, 130 130 rxrpc_serial_t *_serial) 131 131 { 132 - struct rxrpc_connection *conn = NULL; 132 + struct rxrpc_connection *conn; 133 133 struct rxrpc_ack_buffer *pkt; 134 134 struct msghdr msg; 135 135 struct kvec iov[2]; ··· 139 139 int ret; 140 140 u8 reason; 141 141 142 - spin_lock_bh(&call->lock); 143 - if (call->conn) 144 - conn = rxrpc_get_connection_maybe(call->conn); 145 - spin_unlock_bh(&call->lock); 146 - if (!conn) 142 + if (test_bit(RXRPC_CALL_DISCONNECTED, &call->flags)) 147 143 return -ECONNRESET; 148 144 149 145 pkt = kzalloc(sizeof(*pkt), GFP_KERNEL); 150 - if (!pkt) { 151 - rxrpc_put_connection(conn); 146 + if (!pkt) 152 147 return -ENOMEM; 153 - } 148 + 149 + conn = call->conn; 154 150 155 151 msg.msg_name = &call->peer->srx.transport; 156 152 msg.msg_namelen = call->peer->srx.transport_len; ··· 240 244 } 241 245 242 246 out: 243 - rxrpc_put_connection(conn); 244 247 kfree(pkt); 245 248 return ret; 246 249 } ··· 249 254 */ 250 255 int rxrpc_send_abort_packet(struct rxrpc_call *call) 251 256 { 252 - struct rxrpc_connection *conn = NULL; 257 + struct rxrpc_connection *conn; 253 258 struct rxrpc_abort_buffer pkt; 254 259 struct msghdr msg; 255 260 struct kvec iov[1]; ··· 266 271 test_bit(RXRPC_CALL_TX_LAST, &call->flags)) 267 272 return 0; 268 273 269 - spin_lock_bh(&call->lock); 270 - if (call->conn) 271 - conn = rxrpc_get_connection_maybe(call->conn); 272 - spin_unlock_bh(&call->lock); 273 - if (!conn) 274 + if (test_bit(RXRPC_CALL_DISCONNECTED, &call->flags)) 274 275 return -ECONNRESET; 276 + 277 + conn = call->conn; 275 278 276 279 msg.msg_name = &call->peer->srx.transport; 277 280 msg.msg_namelen = call->peer->srx.transport_len; ··· 305 312 trace_rxrpc_tx_packet(call->debug_id, &pkt.whdr, 306 313 rxrpc_tx_point_call_abort); 307 314 rxrpc_tx_backoff(call, ret); 308 - 309 - rxrpc_put_connection(conn); 310 315 return ret; 311 316 } 312 317
+22 -18
net/rxrpc/peer_event.c
··· 364 364 if (!rxrpc_get_peer_maybe(peer)) 365 365 continue; 366 366 367 - spin_unlock_bh(&rxnet->peer_hash_lock); 367 + if (__rxrpc_use_local(peer->local)) { 368 + spin_unlock_bh(&rxnet->peer_hash_lock); 368 369 369 - keepalive_at = peer->last_tx_at + RXRPC_KEEPALIVE_TIME; 370 - slot = keepalive_at - base; 371 - _debug("%02x peer %u t=%d {%pISp}", 372 - cursor, peer->debug_id, slot, &peer->srx.transport); 370 + keepalive_at = peer->last_tx_at + RXRPC_KEEPALIVE_TIME; 371 + slot = keepalive_at - base; 372 + _debug("%02x peer %u t=%d {%pISp}", 373 + cursor, peer->debug_id, slot, &peer->srx.transport); 373 374 374 - if (keepalive_at <= base || 375 - keepalive_at > base + RXRPC_KEEPALIVE_TIME) { 376 - rxrpc_send_keepalive(peer); 377 - slot = RXRPC_KEEPALIVE_TIME; 375 + if (keepalive_at <= base || 376 + keepalive_at > base + RXRPC_KEEPALIVE_TIME) { 377 + rxrpc_send_keepalive(peer); 378 + slot = RXRPC_KEEPALIVE_TIME; 379 + } 380 + 381 + /* A transmission to this peer occurred since last we 382 + * examined it so put it into the appropriate future 383 + * bucket. 384 + */ 385 + slot += cursor; 386 + slot &= mask; 387 + spin_lock_bh(&rxnet->peer_hash_lock); 388 + list_add_tail(&peer->keepalive_link, 389 + &rxnet->peer_keepalive[slot & mask]); 390 + rxrpc_unuse_local(peer->local); 378 391 } 379 - 380 - /* A transmission to this peer occurred since last we examined 381 - * it so put it into the appropriate future bucket. 382 - */ 383 - slot += cursor; 384 - slot &= mask; 385 - spin_lock_bh(&rxnet->peer_hash_lock); 386 - list_add_tail(&peer->keepalive_link, 387 - &rxnet->peer_keepalive[slot & mask]); 388 392 rxrpc_put_peer_locked(peer); 389 393 } 390 394
+2 -4
net/sched/cls_rsvp.h
··· 463 463 464 464 static const struct nla_policy rsvp_policy[TCA_RSVP_MAX + 1] = { 465 465 [TCA_RSVP_CLASSID] = { .type = NLA_U32 }, 466 - [TCA_RSVP_DST] = { .type = NLA_BINARY, 467 - .len = RSVP_DST_LEN * sizeof(u32) }, 468 - [TCA_RSVP_SRC] = { .type = NLA_BINARY, 469 - .len = RSVP_DST_LEN * sizeof(u32) }, 466 + [TCA_RSVP_DST] = { .len = RSVP_DST_LEN * sizeof(u32) }, 467 + [TCA_RSVP_SRC] = { .len = RSVP_DST_LEN * sizeof(u32) }, 470 468 [TCA_RSVP_PINFO] = { .len = sizeof(struct tc_rsvp_pinfo) }, 471 469 }; 472 470
+20 -20
net/sched/cls_tcindex.c
··· 333 333 cp->fall_through = p->fall_through; 334 334 cp->tp = tp; 335 335 336 + if (tb[TCA_TCINDEX_HASH]) 337 + cp->hash = nla_get_u32(tb[TCA_TCINDEX_HASH]); 338 + 339 + if (tb[TCA_TCINDEX_MASK]) 340 + cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]); 341 + 342 + if (tb[TCA_TCINDEX_SHIFT]) 343 + cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]); 344 + 345 + if (!cp->hash) { 346 + /* Hash not specified, use perfect hash if the upper limit 347 + * of the hashing index is below the threshold. 348 + */ 349 + if ((cp->mask >> cp->shift) < PERFECT_HASH_THRESHOLD) 350 + cp->hash = (cp->mask >> cp->shift) + 1; 351 + else 352 + cp->hash = DEFAULT_HASH_SIZE; 353 + } 354 + 336 355 if (p->perfect) { 337 356 int i; 338 357 339 358 if (tcindex_alloc_perfect_hash(net, cp) < 0) 340 359 goto errout; 341 - for (i = 0; i < cp->hash; i++) 360 + for (i = 0; i < min(cp->hash, p->hash); i++) 342 361 cp->perfect[i].res = p->perfect[i].res; 343 362 balloc = 1; 344 363 } ··· 368 349 goto errout1; 369 350 if (old_r) 370 351 cr = r->res; 371 - 372 - if (tb[TCA_TCINDEX_HASH]) 373 - cp->hash = nla_get_u32(tb[TCA_TCINDEX_HASH]); 374 - 375 - if (tb[TCA_TCINDEX_MASK]) 376 - cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]); 377 - 378 - if (tb[TCA_TCINDEX_SHIFT]) 379 - cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]); 380 352 381 353 err = -EBUSY; 382 354 ··· 385 375 err = -EINVAL; 386 376 if (tb[TCA_TCINDEX_FALL_THROUGH]) 387 377 cp->fall_through = nla_get_u32(tb[TCA_TCINDEX_FALL_THROUGH]); 388 - 389 - if (!cp->hash) { 390 - /* Hash not specified, use perfect hash if the upper limit 391 - * of the hashing index is below the threshold. 392 - */ 393 - if ((cp->mask >> cp->shift) < PERFECT_HASH_THRESHOLD) 394 - cp->hash = (cp->mask >> cp->shift) + 1; 395 - else 396 - cp->hash = DEFAULT_HASH_SIZE; 397 - } 398 378 399 379 if (!cp->perfect && !cp->h) 400 380 cp->alloc_hash = cp->hash;
+1
tools/testing/selftests/net/.gitignore
··· 22 22 so_txtime 23 23 tcp_fastopen_backup_key 24 24 nettest 25 + fin_ack_lat
+2
tools/testing/selftests/net/Makefile
··· 11 11 TEST_PROGS += udpgro_bench.sh udpgro.sh test_vxlan_under_vrf.sh reuseport_addr_any.sh 12 12 TEST_PROGS += test_vxlan_fdb_changelink.sh so_txtime.sh ipv6_flowlabel.sh 13 13 TEST_PROGS += tcp_fastopen_backup_key.sh fcnal-test.sh l2tp.sh traceroute.sh 14 + TEST_PROGS += fin_ack_lat.sh 14 15 TEST_PROGS_EXTENDED := in_netns.sh 15 16 TEST_GEN_FILES = socket nettest 16 17 TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy reuseport_addr_any ··· 19 18 TEST_GEN_FILES += udpgso udpgso_bench_tx udpgso_bench_rx ip_defrag 20 19 TEST_GEN_FILES += so_txtime ipv6_flowlabel ipv6_flowlabel_mgr 21 20 TEST_GEN_FILES += tcp_fastopen_backup_key 21 + TEST_GEN_FILES += fin_ack_lat 22 22 TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa 23 23 TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls 24 24
+151
tools/testing/selftests/net/fin_ack_lat.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + #include <arpa/inet.h> 4 + #include <errno.h> 5 + #include <error.h> 6 + #include <netinet/in.h> 7 + #include <netinet/tcp.h> 8 + #include <signal.h> 9 + #include <stdio.h> 10 + #include <stdlib.h> 11 + #include <sys/socket.h> 12 + #include <sys/time.h> 13 + #include <unistd.h> 14 + 15 + static int child_pid; 16 + 17 + static unsigned long timediff(struct timeval s, struct timeval e) 18 + { 19 + unsigned long s_us, e_us; 20 + 21 + s_us = s.tv_sec * 1000000 + s.tv_usec; 22 + e_us = e.tv_sec * 1000000 + e.tv_usec; 23 + if (s_us > e_us) 24 + return 0; 25 + return e_us - s_us; 26 + } 27 + 28 + static void client(int port) 29 + { 30 + int sock = 0; 31 + struct sockaddr_in addr, laddr; 32 + socklen_t len = sizeof(laddr); 33 + struct linger sl; 34 + int flag = 1; 35 + int buffer; 36 + struct timeval start, end; 37 + unsigned long lat, sum_lat = 0, nr_lat = 0; 38 + 39 + while (1) { 40 + gettimeofday(&start, NULL); 41 + 42 + sock = socket(AF_INET, SOCK_STREAM, 0); 43 + if (sock < 0) 44 + error(-1, errno, "socket creation"); 45 + 46 + sl.l_onoff = 1; 47 + sl.l_linger = 0; 48 + if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) 49 + error(-1, errno, "setsockopt(linger)"); 50 + 51 + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, 52 + &flag, sizeof(flag))) 53 + error(-1, errno, "setsockopt(nodelay)"); 54 + 55 + addr.sin_family = AF_INET; 56 + addr.sin_port = htons(port); 57 + 58 + if (inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr) <= 0) 59 + error(-1, errno, "inet_pton"); 60 + 61 + if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) 62 + error(-1, errno, "connect"); 63 + 64 + send(sock, &buffer, sizeof(buffer), 0); 65 + if (read(sock, &buffer, sizeof(buffer)) == -1) 66 + error(-1, errno, "waiting read"); 67 + 68 + gettimeofday(&end, NULL); 69 + lat = timediff(start, end); 70 + sum_lat += lat; 71 + nr_lat++; 72 + if (lat < 100000) 73 + goto close; 74 + 75 + if (getsockname(sock, (struct sockaddr *)&laddr, &len) == -1) 76 + error(-1, errno, "getsockname"); 77 + printf("port: %d, lat: %lu, avg: %lu, nr: %lu\n", 78 + ntohs(laddr.sin_port), lat, 79 + sum_lat / nr_lat, nr_lat); 80 + close: 81 + fflush(stdout); 82 + close(sock); 83 + } 84 + } 85 + 86 + static void server(int sock, struct sockaddr_in address) 87 + { 88 + int accepted; 89 + int addrlen = sizeof(address); 90 + int buffer; 91 + 92 + while (1) { 93 + accepted = accept(sock, (struct sockaddr *)&address, 94 + (socklen_t *)&addrlen); 95 + if (accepted < 0) 96 + error(-1, errno, "accept"); 97 + 98 + if (read(accepted, &buffer, sizeof(buffer)) == -1) 99 + error(-1, errno, "read"); 100 + close(accepted); 101 + } 102 + } 103 + 104 + static void sig_handler(int signum) 105 + { 106 + kill(SIGTERM, child_pid); 107 + exit(0); 108 + } 109 + 110 + int main(int argc, char const *argv[]) 111 + { 112 + int sock; 113 + int opt = 1; 114 + struct sockaddr_in address; 115 + struct sockaddr_in laddr; 116 + socklen_t len = sizeof(laddr); 117 + 118 + if (signal(SIGTERM, sig_handler) == SIG_ERR) 119 + error(-1, errno, "signal"); 120 + 121 + sock = socket(AF_INET, SOCK_STREAM, 0); 122 + if (sock < 0) 123 + error(-1, errno, "socket"); 124 + 125 + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, 126 + &opt, sizeof(opt)) == -1) 127 + error(-1, errno, "setsockopt"); 128 + 129 + address.sin_family = AF_INET; 130 + address.sin_addr.s_addr = INADDR_ANY; 131 + /* dynamically allocate unused port */ 132 + address.sin_port = 0; 133 + 134 + if (bind(sock, (struct sockaddr *)&address, sizeof(address)) < 0) 135 + error(-1, errno, "bind"); 136 + 137 + if (listen(sock, 3) < 0) 138 + error(-1, errno, "listen"); 139 + 140 + if (getsockname(sock, (struct sockaddr *)&laddr, &len) == -1) 141 + error(-1, errno, "getsockname"); 142 + 143 + fprintf(stderr, "server port: %d\n", ntohs(laddr.sin_port)); 144 + child_pid = fork(); 145 + if (!child_pid) 146 + client(ntohs(laddr.sin_port)); 147 + else 148 + server(sock, laddr); 149 + 150 + return 0; 151 + }
+35
tools/testing/selftests/net/fin_ack_lat.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: GPL-2.0 3 + # 4 + # Test latency spikes caused by FIN/ACK handling race. 5 + 6 + set +x 7 + set -e 8 + 9 + tmpfile=$(mktemp /tmp/fin_ack_latency.XXXX.log) 10 + 11 + cleanup() { 12 + kill $(pidof fin_ack_lat) 13 + rm -f $tmpfile 14 + } 15 + 16 + trap cleanup EXIT 17 + 18 + do_test() { 19 + RUNTIME=$1 20 + 21 + ./fin_ack_lat | tee $tmpfile & 22 + PID=$! 23 + 24 + sleep $RUNTIME 25 + NR_SPIKES=$(wc -l $tmpfile | awk '{print $1}') 26 + if [ $NR_SPIKES -gt 0 ] 27 + then 28 + echo "FAIL: $NR_SPIKES spikes detected" 29 + return 1 30 + fi 31 + return 0 32 + } 33 + 34 + do_test "30" 35 + echo "test done"
+1 -1
tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py
··· 54 54 shell=True, 55 55 stdout=subprocess.PIPE, 56 56 stderr=subprocess.PIPE, 57 - env=ENVIR) 57 + env=os.environ.copy()) 58 58 (rawout, serr) = proc.communicate() 59 59 60 60 if proc.returncode != 0 and len(serr) > 0:
+51
tools/testing/selftests/tc-testing/tc-tests/filters/basic.json
··· 6 6 "filter", 7 7 "basic" 8 8 ], 9 + "plugins": { 10 + "requires": "nsPlugin" 11 + }, 9 12 "setup": [ 10 13 "$TC qdisc add dev $DEV1 ingress" 11 14 ], ··· 28 25 "filter", 29 26 "basic" 30 27 ], 28 + "plugins": { 29 + "requires": "nsPlugin" 30 + }, 31 31 "setup": [ 32 32 "$TC qdisc add dev $DEV1 ingress" 33 33 ], ··· 50 44 "filter", 51 45 "basic" 52 46 ], 47 + "plugins": { 48 + "requires": "nsPlugin" 49 + }, 53 50 "setup": [ 54 51 "$TC qdisc add dev $DEV1 ingress" 55 52 ], ··· 72 63 "filter", 73 64 "basic" 74 65 ], 66 + "plugins": { 67 + "requires": "nsPlugin" 68 + }, 75 69 "setup": [ 76 70 "$TC qdisc add dev $DEV1 ingress" 77 71 ], ··· 94 82 "filter", 95 83 "basic" 96 84 ], 85 + "plugins": { 86 + "requires": "nsPlugin" 87 + }, 97 88 "setup": [ 98 89 "$TC qdisc add dev $DEV1 ingress" 99 90 ], ··· 116 101 "filter", 117 102 "basic" 118 103 ], 104 + "plugins": { 105 + "requires": "nsPlugin" 106 + }, 119 107 "setup": [ 120 108 "$TC qdisc add dev $DEV1 ingress" 121 109 ], ··· 138 120 "filter", 139 121 "basic" 140 122 ], 123 + "plugins": { 124 + "requires": "nsPlugin" 125 + }, 141 126 "setup": [ 142 127 "$TC qdisc add dev $DEV1 ingress" 143 128 ], ··· 160 139 "filter", 161 140 "basic" 162 141 ], 142 + "plugins": { 143 + "requires": "nsPlugin" 144 + }, 163 145 "setup": [ 164 146 "$TC qdisc add dev $DEV1 ingress" 165 147 ], ··· 182 158 "filter", 183 159 "basic" 184 160 ], 161 + "plugins": { 162 + "requires": "nsPlugin" 163 + }, 185 164 "setup": [ 186 165 "$TC qdisc add dev $DEV1 ingress" 187 166 ], ··· 204 177 "filter", 205 178 "basic" 206 179 ], 180 + "plugins": { 181 + "requires": "nsPlugin" 182 + }, 207 183 "setup": [ 208 184 "$TC qdisc add dev $DEV1 ingress" 209 185 ], ··· 226 196 "filter", 227 197 "basic" 228 198 ], 199 + "plugins": { 200 + "requires": "nsPlugin" 201 + }, 229 202 "setup": [ 230 203 "$TC qdisc add dev $DEV1 ingress" 231 204 ], ··· 248 215 "filter", 249 216 "basic" 250 217 ], 218 + "plugins": { 219 + "requires": "nsPlugin" 220 + }, 251 221 "setup": [ 252 222 "$TC qdisc add dev $DEV1 ingress" 253 223 ], ··· 270 234 "filter", 271 235 "basic" 272 236 ], 237 + "plugins": { 238 + "requires": "nsPlugin" 239 + }, 273 240 "setup": [ 274 241 "$TC qdisc add dev $DEV1 ingress" 275 242 ], ··· 292 253 "filter", 293 254 "basic" 294 255 ], 256 + "plugins": { 257 + "requires": "nsPlugin" 258 + }, 295 259 "setup": [ 296 260 "$TC qdisc add dev $DEV1 ingress" 297 261 ], ··· 314 272 "filter", 315 273 "basic" 316 274 ], 275 + "plugins": { 276 + "requires": "nsPlugin" 277 + }, 317 278 "setup": [ 318 279 "$TC qdisc add dev $DEV1 ingress" 319 280 ], ··· 336 291 "filter", 337 292 "basic" 338 293 ], 294 + "plugins": { 295 + "requires": "nsPlugin" 296 + }, 339 297 "setup": [ 340 298 "$TC qdisc add dev $DEV1 ingress" 341 299 ], ··· 358 310 "filter", 359 311 "basic" 360 312 ], 313 + "plugins": { 314 + "requires": "nsPlugin" 315 + }, 361 316 "setup": [ 362 317 "$TC qdisc add dev $DEV1 ingress" 363 318 ],