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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull networking fixes from David Miller:

1) Receive packet length needs to be adjust by 2 on RX to accomodate
the two padding bytes in altera_tse driver. From Vlastimil Setka.

2) If rx frame is dropped due to out of memory in macb driver, we leave
the receive ring descriptors in an undefined state. From Punnaiah
Choudary Kalluri

3) Some netlink subsystems erroneously signal NLM_F_MULTI. That is
only for dumps. Fix from Nicolas Dichtel.

4) Fix mis-use of raw rt->rt_pmtu value in ipv4, one must always go via
the ipv4_mtu() helper. From Herbert Xu.

5) Fix null deref in bridge netfilter, and miscalculated lengths in
jump/goto nf_tables verdicts. From Florian Westphal.

6) Unhash ping sockets properly.

7) Software implementation of BPF divide did 64/32 rather than 64/64
bit divide. The JITs got it right. Fix from Alexei Starovoitov.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits)
ipv4: Missing sk_nulls_node_init() in ping_unhash().
net: fec: Fix RGMII-ID mode
net/mlx4_en: Schedule napi when RX buffers allocation fails
netxen_nic: use spin_[un]lock_bh around tx_clean_lock
net/mlx4_core: Fix unaligned accesses
mlx4_en: Use correct loop cursor in error path.
cxgb4: Fix MC1 memory offset calculation
bnx2x: Delay during kdump load
net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
net: dsa: Fix scope of eeprom-length property
net: macb: Fix race condition in driver when Rx frame is dropped
hv_netvsc: Fix a bug in netvsc_start_xmit()
altera_tse: Correct rx packet length
mlx4: Fix tx ring affinity_mask creation
tipc: fix problem with parallel link synchronization mechanism
tipc: remove wrong use of NLM_F_MULTI
bridge/nl: remove wrong use of NLM_F_MULTI
bridge/mdb: remove wrong use of NLM_F_MULTI
net: sched: act_connmark: don't zap skb->nfct
trivial: net: systemport: bcmsysport.h: fix 0x0x prefix
...

+224 -159
+10
drivers/net/bonding/bond_main.c
··· 4544 4544 int bond_create(struct net *net, const char *name) 4545 4545 { 4546 4546 struct net_device *bond_dev; 4547 + struct bonding *bond; 4548 + struct alb_bond_info *bond_info; 4547 4549 int res; 4548 4550 4549 4551 rtnl_lock(); ··· 4558 4556 rtnl_unlock(); 4559 4557 return -ENOMEM; 4560 4558 } 4559 + 4560 + /* 4561 + * Initialize rx_hashtbl_used_head to RLB_NULL_INDEX. 4562 + * It is set to 0 by default which is wrong. 4563 + */ 4564 + bond = netdev_priv(bond_dev); 4565 + bond_info = &(BOND_ALB_INFO(bond)); 4566 + bond_info->rx_hashtbl_used_head = RLB_NULL_INDEX; 4561 4567 4562 4568 dev_net_set(bond_dev, net); 4563 4569 bond_dev->rtnl_link_ops = &bond_link_ops;
+6
drivers/net/ethernet/altera/altera_tse_main.c
··· 391 391 "RCV pktstatus %08X pktlength %08X\n", 392 392 pktstatus, pktlength); 393 393 394 + /* DMA trasfer from TSE starts with 2 aditional bytes for 395 + * IP payload alignment. Status returned by get_rx_status() 396 + * contains DMA transfer length. Packet is 2 bytes shorter. 397 + */ 398 + pktlength -= 2; 399 + 394 400 count++; 395 401 next_entry = (++priv->rx_cons) % priv->rx_ring_size; 396 402
+1 -1
drivers/net/ethernet/atheros/atl1e/atl1e_hw.h
··· 129 129 #define TWSI_CTRL_LD_SLV_ADDR_SHIFT 8 130 130 #define TWSI_CTRL_SW_LDSTART 0x800 131 131 #define TWSI_CTRL_HW_LDSTART 0x1000 132 - #define TWSI_CTRL_SMB_SLV_ADDR_MASK 0x0x7F 132 + #define TWSI_CTRL_SMB_SLV_ADDR_MASK 0x7F 133 133 #define TWSI_CTRL_SMB_SLV_ADDR_SHIFT 15 134 134 #define TWSI_CTRL_LD_EXIST 0x400000 135 135 #define TWSI_CTRL_READ_FREQ_SEL_MASK 0x3
+1 -1
drivers/net/ethernet/broadcom/bcmsysport.h
··· 543 543 u32 jbr; /* RO # of xmited jabber count*/ 544 544 u32 bytes; /* RO # of xmited byte count */ 545 545 u32 pok; /* RO # of xmited good pkt */ 546 - u32 uc; /* RO (0x0x4f0)# of xmited unitcast pkt */ 546 + u32 uc; /* RO (0x4f0) # of xmited unicast pkt */ 547 547 }; 548 548 549 549 struct bcm_sysport_mib {
+1 -3
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
··· 521 521 }; 522 522 523 523 enum bnx2x_tpa_mode_t { 524 + TPA_MODE_DISABLED, 524 525 TPA_MODE_LRO, 525 526 TPA_MODE_GRO 526 527 }; ··· 590 589 591 590 /* TPA related */ 592 591 struct bnx2x_agg_info *tpa_info; 593 - u8 disable_tpa; 594 592 #ifdef BNX2X_STOP_ON_ERROR 595 593 u64 tpa_queue_used; 596 594 #endif ··· 1545 1545 #define USING_MSIX_FLAG (1 << 5) 1546 1546 #define USING_MSI_FLAG (1 << 6) 1547 1547 #define DISABLE_MSI_FLAG (1 << 7) 1548 - #define TPA_ENABLE_FLAG (1 << 8) 1549 1548 #define NO_MCP_FLAG (1 << 9) 1550 - #define GRO_ENABLE_FLAG (1 << 10) 1551 1549 #define MF_FUNC_DIS (1 << 11) 1552 1550 #define OWN_CNIC_IRQ (1 << 12) 1553 1551 #define NO_ISCSI_OOO_FLAG (1 << 13)
+26 -41
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
··· 947 947 u16 frag_size, pages; 948 948 #ifdef BNX2X_STOP_ON_ERROR 949 949 /* sanity check */ 950 - if (fp->disable_tpa && 950 + if (fp->mode == TPA_MODE_DISABLED && 951 951 (CQE_TYPE_START(cqe_fp_type) || 952 952 CQE_TYPE_STOP(cqe_fp_type))) 953 - BNX2X_ERR("START/STOP packet while disable_tpa type %x\n", 953 + BNX2X_ERR("START/STOP packet while TPA disabled, type %x\n", 954 954 CQE_TYPE(cqe_fp_type)); 955 955 #endif 956 956 ··· 1396 1396 DP(NETIF_MSG_IFUP, 1397 1397 "mtu %d rx_buf_size %d\n", bp->dev->mtu, fp->rx_buf_size); 1398 1398 1399 - if (!fp->disable_tpa) { 1399 + if (fp->mode != TPA_MODE_DISABLED) { 1400 1400 /* Fill the per-aggregation pool */ 1401 1401 for (i = 0; i < MAX_AGG_QS(bp); i++) { 1402 1402 struct bnx2x_agg_info *tpa_info = ··· 1410 1410 BNX2X_ERR("Failed to allocate TPA skb pool for queue[%d] - disabling TPA on this queue!\n", 1411 1411 j); 1412 1412 bnx2x_free_tpa_pool(bp, fp, i); 1413 - fp->disable_tpa = 1; 1413 + fp->mode = TPA_MODE_DISABLED; 1414 1414 break; 1415 1415 } 1416 1416 dma_unmap_addr_set(first_buf, mapping, 0); ··· 1438 1438 ring_prod); 1439 1439 bnx2x_free_tpa_pool(bp, fp, 1440 1440 MAX_AGG_QS(bp)); 1441 - fp->disable_tpa = 1; 1441 + fp->mode = TPA_MODE_DISABLED; 1442 1442 ring_prod = 0; 1443 1443 break; 1444 1444 } ··· 1560 1560 1561 1561 bnx2x_free_rx_bds(fp); 1562 1562 1563 - if (!fp->disable_tpa) 1563 + if (fp->mode != TPA_MODE_DISABLED) 1564 1564 bnx2x_free_tpa_pool(bp, fp, MAX_AGG_QS(bp)); 1565 1565 } 1566 1566 } ··· 2477 2477 /* set the tpa flag for each queue. The tpa flag determines the queue 2478 2478 * minimal size so it must be set prior to queue memory allocation 2479 2479 */ 2480 - fp->disable_tpa = !(bp->flags & TPA_ENABLE_FLAG || 2481 - (bp->flags & GRO_ENABLE_FLAG && 2482 - bnx2x_mtu_allows_gro(bp->dev->mtu))); 2483 - if (bp->flags & TPA_ENABLE_FLAG) 2480 + if (bp->dev->features & NETIF_F_LRO) 2484 2481 fp->mode = TPA_MODE_LRO; 2485 - else if (bp->flags & GRO_ENABLE_FLAG) 2482 + else if (bp->dev->features & NETIF_F_GRO && 2483 + bnx2x_mtu_allows_gro(bp->dev->mtu)) 2486 2484 fp->mode = TPA_MODE_GRO; 2485 + else 2486 + fp->mode = TPA_MODE_DISABLED; 2487 2487 2488 2488 /* We don't want TPA if it's disabled in bp 2489 2489 * or if this is an FCoE L2 ring. 2490 2490 */ 2491 2491 if (bp->disable_tpa || IS_FCOE_FP(fp)) 2492 - fp->disable_tpa = 1; 2492 + fp->mode = TPA_MODE_DISABLED; 2493 2493 } 2494 2494 2495 2495 int bnx2x_load_cnic(struct bnx2x *bp) ··· 2610 2610 /* 2611 2611 * Zero fastpath structures preserving invariants like napi, which are 2612 2612 * allocated only once, fp index, max_cos, bp pointer. 2613 - * Also set fp->disable_tpa and txdata_ptr. 2613 + * Also set fp->mode and txdata_ptr. 2614 2614 */ 2615 2615 DP(NETIF_MSG_IFUP, "num queues: %d", bp->num_queues); 2616 2616 for_each_queue(bp, i) ··· 3249 3249 3250 3250 if ((bp->state == BNX2X_STATE_CLOSED) || 3251 3251 (bp->state == BNX2X_STATE_ERROR) || 3252 - (bp->flags & (TPA_ENABLE_FLAG | GRO_ENABLE_FLAG))) 3252 + (bp->dev->features & (NETIF_F_LRO | NETIF_F_GRO))) 3253 3253 return LL_FLUSH_FAILED; 3254 3254 3255 3255 if (!bnx2x_fp_lock_poll(fp)) ··· 4545 4545 * In these cases we disable the queue 4546 4546 * Min size is different for OOO, TPA and non-TPA queues 4547 4547 */ 4548 - if (ring_size < (fp->disable_tpa ? 4548 + if (ring_size < (fp->mode == TPA_MODE_DISABLED ? 4549 4549 MIN_RX_SIZE_NONTPA : MIN_RX_SIZE_TPA)) { 4550 4550 /* release memory allocated for this queue */ 4551 4551 bnx2x_free_fp_mem_at(bp, index); ··· 4834 4834 features &= ~NETIF_F_GRO; 4835 4835 } 4836 4836 4837 - /* Note: do not disable SW GRO in kernel when HW GRO is off */ 4838 - if (bp->disable_tpa) 4839 - features &= ~NETIF_F_LRO; 4840 - 4841 4837 return features; 4842 4838 } 4843 4839 4844 4840 int bnx2x_set_features(struct net_device *dev, netdev_features_t features) 4845 4841 { 4846 4842 struct bnx2x *bp = netdev_priv(dev); 4847 - u32 flags = bp->flags; 4848 - u32 changes; 4843 + netdev_features_t changes = features ^ dev->features; 4849 4844 bool bnx2x_reload = false; 4850 - 4851 - if (features & NETIF_F_LRO) 4852 - flags |= TPA_ENABLE_FLAG; 4853 - else 4854 - flags &= ~TPA_ENABLE_FLAG; 4855 - 4856 - if (features & NETIF_F_GRO) 4857 - flags |= GRO_ENABLE_FLAG; 4858 - else 4859 - flags &= ~GRO_ENABLE_FLAG; 4845 + int rc; 4860 4846 4861 4847 /* VFs or non SRIOV PFs should be able to change loopback feature */ 4862 4848 if (!pci_num_vf(bp->pdev)) { ··· 4859 4873 } 4860 4874 } 4861 4875 4862 - changes = flags ^ bp->flags; 4863 - 4864 4876 /* if GRO is changed while LRO is enabled, don't force a reload */ 4865 - if ((changes & GRO_ENABLE_FLAG) && (flags & TPA_ENABLE_FLAG)) 4866 - changes &= ~GRO_ENABLE_FLAG; 4877 + if ((changes & NETIF_F_GRO) && (features & NETIF_F_LRO)) 4878 + changes &= ~NETIF_F_GRO; 4867 4879 4868 4880 /* if GRO is changed while HW TPA is off, don't force a reload */ 4869 - if ((changes & GRO_ENABLE_FLAG) && bp->disable_tpa) 4870 - changes &= ~GRO_ENABLE_FLAG; 4881 + if ((changes & NETIF_F_GRO) && bp->disable_tpa) 4882 + changes &= ~NETIF_F_GRO; 4871 4883 4872 4884 if (changes) 4873 4885 bnx2x_reload = true; 4874 4886 4875 - bp->flags = flags; 4876 - 4877 4887 if (bnx2x_reload) { 4878 - if (bp->recovery_state == BNX2X_RECOVERY_DONE) 4879 - return bnx2x_reload_if_running(dev); 4888 + if (bp->recovery_state == BNX2X_RECOVERY_DONE) { 4889 + dev->features = features; 4890 + rc = bnx2x_reload_if_running(dev); 4891 + return rc ? rc : 1; 4892 + } 4880 4893 /* else: bnx2x_nic_load() will be called at end of recovery */ 4881 4894 } 4882 4895
+1 -1
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
··· 969 969 { 970 970 int i; 971 971 972 - if (fp->disable_tpa) 972 + if (fp->mode == TPA_MODE_DISABLED) 973 973 return; 974 974 975 975 for (i = 0; i < last; i++)
+10 -7
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
··· 3128 3128 __set_bit(BNX2X_Q_FLG_FORCE_DEFAULT_PRI, &flags); 3129 3129 } 3130 3130 3131 - if (!fp->disable_tpa) { 3131 + if (fp->mode != TPA_MODE_DISABLED) { 3132 3132 __set_bit(BNX2X_Q_FLG_TPA, &flags); 3133 3133 __set_bit(BNX2X_Q_FLG_TPA_IPV6, &flags); 3134 3134 if (fp->mode == TPA_MODE_GRO) ··· 3176 3176 u16 sge_sz = 0; 3177 3177 u16 tpa_agg_size = 0; 3178 3178 3179 - if (!fp->disable_tpa) { 3179 + if (fp->mode != TPA_MODE_DISABLED) { 3180 3180 pause->sge_th_lo = SGE_TH_LO(bp); 3181 3181 pause->sge_th_hi = SGE_TH_HI(bp); 3182 3182 ··· 3304 3304 /* This flag is relevant for E1x only. 3305 3305 * E2 doesn't have a TPA configuration in a function level. 3306 3306 */ 3307 - flags |= (bp->flags & TPA_ENABLE_FLAG) ? FUNC_FLG_TPA : 0; 3307 + flags |= (bp->dev->features & NETIF_F_LRO) ? FUNC_FLG_TPA : 0; 3308 3308 3309 3309 func_init.func_flgs = flags; 3310 3310 func_init.pf_id = BP_FUNC(bp); ··· 12107 12107 12108 12108 /* Set TPA flags */ 12109 12109 if (bp->disable_tpa) { 12110 - bp->flags &= ~(TPA_ENABLE_FLAG | GRO_ENABLE_FLAG); 12110 + bp->dev->hw_features &= ~NETIF_F_LRO; 12111 12111 bp->dev->features &= ~NETIF_F_LRO; 12112 - } else { 12113 - bp->flags |= (TPA_ENABLE_FLAG | GRO_ENABLE_FLAG); 12114 - bp->dev->features |= NETIF_F_LRO; 12115 12112 } 12116 12113 12117 12114 if (CHIP_IS_E1(bp)) ··· 13367 13370 int max_cos_est; 13368 13371 bool is_vf; 13369 13372 int cnic_cnt; 13373 + 13374 + /* Management FW 'remembers' living interfaces. Allow it some time 13375 + * to forget previously living interfaces, allowing a proper re-load. 13376 + */ 13377 + if (is_kdump_kernel()) 13378 + msleep(5000); 13370 13379 13371 13380 /* An estimated maximum supported CoS number according to the chip 13372 13381 * version.
+1 -1
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
··· 594 594 bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SETUP_Q, sizeof(*req)); 595 595 596 596 /* select tpa mode to request */ 597 - if (!fp->disable_tpa) { 597 + if (fp->mode != TPA_MODE_DISABLED) { 598 598 flags |= VFPF_QUEUE_FLG_TPA; 599 599 flags |= VFPF_QUEUE_FLG_TPA_IPV6; 600 600 if (fp->mode == TPA_MODE_GRO)
+3
drivers/net/ethernet/cadence/macb.c
··· 707 707 708 708 /* properly align Ethernet header */ 709 709 skb_reserve(skb, NET_IP_ALIGN); 710 + } else { 711 + bp->rx_ring[entry].addr &= ~MACB_BIT(RX_USED); 712 + bp->rx_ring[entry].ctrl = 0; 710 713 } 711 714 } 712 715
+1 -1
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
··· 492 492 memoffset = (mtype * (edc_size * 1024 * 1024)); 493 493 else { 494 494 mc_size = EXT_MEM0_SIZE_G(t4_read_reg(adap, 495 - MA_EXT_MEMORY1_BAR_A)); 495 + MA_EXT_MEMORY0_BAR_A)); 496 496 memoffset = (MEM_MC0 * edc_size + mc_size) * 1024 * 1024; 497 497 } 498 498
+3 -2
drivers/net/ethernet/emulex/benet/be_main.c
··· 4846 4846 } 4847 4847 4848 4848 static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 4849 - struct net_device *dev, u32 filter_mask) 4849 + struct net_device *dev, u32 filter_mask, 4850 + int nlflags) 4850 4851 { 4851 4852 struct be_adapter *adapter = netdev_priv(dev); 4852 4853 int status = 0; ··· 4869 4868 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, 4870 4869 hsw_mode == PORT_FWD_TYPE_VEPA ? 4871 4870 BRIDGE_MODE_VEPA : BRIDGE_MODE_VEB, 4872 - 0, 0); 4871 + 0, 0, nlflags); 4873 4872 } 4874 4873 4875 4874 #ifdef CONFIG_BE2NET_VXLAN
+4 -1
drivers/net/ethernet/freescale/fec_main.c
··· 988 988 rcntl |= 0x40000000 | 0x00000020; 989 989 990 990 /* RGMII, RMII or MII */ 991 - if (fep->phy_interface == PHY_INTERFACE_MODE_RGMII) 991 + if (fep->phy_interface == PHY_INTERFACE_MODE_RGMII || 992 + fep->phy_interface == PHY_INTERFACE_MODE_RGMII_ID || 993 + fep->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID || 994 + fep->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) 992 995 rcntl |= (1 << 6); 993 996 else if (fep->phy_interface == PHY_INTERFACE_MODE_RMII) 994 997 rcntl |= (1 << 8);
+4 -3
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 8053 8053 #ifdef HAVE_BRIDGE_FILTER 8054 8054 static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 8055 8055 struct net_device *dev, 8056 - u32 __always_unused filter_mask) 8056 + u32 __always_unused filter_mask, int nlflags) 8057 8057 #else 8058 8058 static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 8059 - struct net_device *dev) 8059 + struct net_device *dev, int nlflags) 8060 8060 #endif /* HAVE_BRIDGE_FILTER */ 8061 8061 { 8062 8062 struct i40e_netdev_priv *np = netdev_priv(dev); ··· 8078 8078 if (!veb) 8079 8079 return 0; 8080 8080 8081 - return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode); 8081 + return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode, 8082 + nlflags); 8082 8083 } 8083 8084 #endif /* HAVE_BRIDGE_ATTRIBS */ 8084 8085
+2 -2
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 8044 8044 8045 8045 static int ixgbe_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 8046 8046 struct net_device *dev, 8047 - u32 filter_mask) 8047 + u32 filter_mask, int nlflags) 8048 8048 { 8049 8049 struct ixgbe_adapter *adapter = netdev_priv(dev); 8050 8050 ··· 8052 8052 return 0; 8053 8053 8054 8054 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, 8055 - adapter->bridge_mode, 0, 0); 8055 + adapter->bridge_mode, 0, 0, nlflags); 8056 8056 } 8057 8057 8058 8058 static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
+2 -1
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
··· 1467 1467 if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) 1468 1468 mlx4_en_ptp_overflow_check(mdev); 1469 1469 1470 + mlx4_en_recover_from_oom(priv); 1470 1471 queue_delayed_work(mdev->workqueue, &priv->service_task, 1471 1472 SERVICE_TASK_DELAY); 1472 1473 } ··· 1722 1721 cq_err: 1723 1722 while (rx_index--) { 1724 1723 mlx4_en_deactivate_cq(priv, priv->rx_cq[rx_index]); 1725 - mlx4_en_free_affinity_hint(priv, i); 1724 + mlx4_en_free_affinity_hint(priv, rx_index); 1726 1725 } 1727 1726 for (i = 0; i < priv->rx_ring_num; i++) 1728 1727 mlx4_en_deactivate_rx_ring(priv, priv->rx_ring[i]);
+24 -2
drivers/net/ethernet/mellanox/mlx4/en_rx.c
··· 244 244 return mlx4_en_alloc_frags(priv, rx_desc, frags, ring->page_alloc, gfp); 245 245 } 246 246 247 + static inline bool mlx4_en_is_ring_empty(struct mlx4_en_rx_ring *ring) 248 + { 249 + BUG_ON((u32)(ring->prod - ring->cons) > ring->actual_size); 250 + return ring->prod == ring->cons; 251 + } 252 + 247 253 static inline void mlx4_en_update_rx_prod_db(struct mlx4_en_rx_ring *ring) 248 254 { 249 255 *ring->wqres.db.db = cpu_to_be32(ring->prod & 0xffff); ··· 321 315 ring->cons, ring->prod); 322 316 323 317 /* Unmap and free Rx buffers */ 324 - BUG_ON((u32) (ring->prod - ring->cons) > ring->actual_size); 325 - while (ring->cons != ring->prod) { 318 + while (!mlx4_en_is_ring_empty(ring)) { 326 319 index = ring->cons & ring->size_mask; 327 320 en_dbg(DRV, priv, "Processing descriptor:%d\n", index); 328 321 mlx4_en_free_rx_desc(priv, ring, index); ··· 494 489 ring_ind--; 495 490 } 496 491 return err; 492 + } 493 + 494 + /* We recover from out of memory by scheduling our napi poll 495 + * function (mlx4_en_process_cq), which tries to allocate 496 + * all missing RX buffers (call to mlx4_en_refill_rx_buffers). 497 + */ 498 + void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv) 499 + { 500 + int ring; 501 + 502 + if (!priv->port_up) 503 + return; 504 + 505 + for (ring = 0; ring < priv->rx_ring_num; ring++) { 506 + if (mlx4_en_is_ring_empty(priv->rx_ring[ring])) 507 + napi_reschedule(&priv->rx_cq[ring]->napi); 508 + } 497 509 } 498 510 499 511 void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
+5 -3
drivers/net/ethernet/mellanox/mlx4/en_tx.c
··· 143 143 ring->hwtstamp_tx_type = priv->hwtstamp_config.tx_type; 144 144 ring->queue_index = queue_index; 145 145 146 - if (queue_index < priv->num_tx_rings_p_up && cpu_online(queue_index)) 147 - cpumask_set_cpu(queue_index, &ring->affinity_mask); 146 + if (queue_index < priv->num_tx_rings_p_up) 147 + cpumask_set_cpu_local_first(queue_index, 148 + priv->mdev->dev->numa_node, 149 + &ring->affinity_mask); 148 150 149 151 *pring = ring; 150 152 return 0; ··· 215 213 216 214 err = mlx4_qp_to_ready(mdev->dev, &ring->wqres.mtt, &ring->context, 217 215 &ring->qp, &ring->qp_state); 218 - if (!user_prio && cpu_online(ring->queue_index)) 216 + if (!cpumask_empty(&ring->affinity_mask)) 219 217 netif_set_xps_queue(priv->dev, &ring->affinity_mask, 220 218 ring->queue_index); 221 219
+14 -4
drivers/net/ethernet/mellanox/mlx4/fw.c
··· 56 56 #define MLX4_GET(dest, source, offset) \ 57 57 do { \ 58 58 void *__p = (char *) (source) + (offset); \ 59 + u64 val; \ 59 60 switch (sizeof (dest)) { \ 60 61 case 1: (dest) = *(u8 *) __p; break; \ 61 62 case 2: (dest) = be16_to_cpup(__p); break; \ 62 63 case 4: (dest) = be32_to_cpup(__p); break; \ 63 - case 8: (dest) = be64_to_cpup(__p); break; \ 64 + case 8: val = get_unaligned((u64 *)__p); \ 65 + (dest) = be64_to_cpu(val); break; \ 64 66 default: __buggy_use_of_MLX4_GET(); \ 65 67 } \ 66 68 } while (0) ··· 1607 1605 * swaps each 4-byte word before passing it back to 1608 1606 * us. Therefore we need to swab it before printing. 1609 1607 */ 1610 - for (i = 0; i < 4; ++i) 1611 - ((u32 *) board_id)[i] = 1612 - swab32(*(u32 *) (vsd + VSD_OFFSET_MLX_BOARD_ID + i * 4)); 1608 + u32 *bid_u32 = (u32 *)board_id; 1609 + 1610 + for (i = 0; i < 4; ++i) { 1611 + u32 *addr; 1612 + u32 val; 1613 + 1614 + addr = (u32 *) (vsd + VSD_OFFSET_MLX_BOARD_ID + i * 4); 1615 + val = get_unaligned(addr); 1616 + val = swab32(val); 1617 + put_unaligned(val, &bid_u32[i]); 1618 + } 1613 1619 } 1614 1620 } 1615 1621
+1
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
··· 774 774 void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv, 775 775 struct mlx4_en_tx_ring *ring); 776 776 void mlx4_en_set_num_rx_rings(struct mlx4_en_dev *mdev); 777 + void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv); 777 778 int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, 778 779 struct mlx4_en_rx_ring **pring, 779 780 u32 size, u16 stride, int node);
+2 -2
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
··· 135 135 int i, j; 136 136 struct nx_host_tx_ring *tx_ring = adapter->tx_ring; 137 137 138 - spin_lock(&adapter->tx_clean_lock); 138 + spin_lock_bh(&adapter->tx_clean_lock); 139 139 cmd_buf = tx_ring->cmd_buf_arr; 140 140 for (i = 0; i < tx_ring->num_desc; i++) { 141 141 buffrag = cmd_buf->frag_array; ··· 159 159 } 160 160 cmd_buf++; 161 161 } 162 - spin_unlock(&adapter->tx_clean_lock); 162 + spin_unlock_bh(&adapter->tx_clean_lock); 163 163 } 164 164 165 165 void netxen_free_sw_resources(struct netxen_adapter *adapter)
+3 -2
drivers/net/ethernet/rocker/rocker.c
··· 4176 4176 4177 4177 static int rocker_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 4178 4178 struct net_device *dev, 4179 - u32 filter_mask) 4179 + u32 filter_mask, int nlflags) 4180 4180 { 4181 4181 struct rocker_port *rocker_port = netdev_priv(dev); 4182 4182 u16 mode = BRIDGE_MODE_UNDEF; 4183 4183 u32 mask = BR_LEARNING | BR_LEARNING_SYNC; 4184 4184 4185 4185 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 4186 - rocker_port->brport_flags, mask); 4186 + rocker_port->brport_flags, mask, 4187 + nlflags); 4187 4188 } 4188 4189 4189 4190 static int rocker_port_get_phys_port_name(struct net_device *dev,
+6 -2
drivers/net/ethernet/ti/netcp_ethss.c
··· 1765 1765 ALE_PORT_STATE, 1766 1766 ALE_PORT_STATE_FORWARD); 1767 1767 1768 - if (ndev && slave->open) 1768 + if (ndev && slave->open && 1769 + slave->link_interface != SGMII_LINK_MAC_PHY && 1770 + slave->link_interface != XGMII_LINK_MAC_PHY) 1769 1771 netif_carrier_on(ndev); 1770 1772 } else { 1771 1773 writel(mac_control, GBE_REG_ADDR(slave, emac_regs, ··· 1775 1773 cpsw_ale_control_set(gbe_dev->ale, slave->port_num, 1776 1774 ALE_PORT_STATE, 1777 1775 ALE_PORT_STATE_DISABLE); 1778 - if (ndev) 1776 + if (ndev && 1777 + slave->link_interface != SGMII_LINK_MAC_PHY && 1778 + slave->link_interface != XGMII_LINK_MAC_PHY) 1779 1779 netif_carrier_off(ndev); 1780 1780 } 1781 1781
+12 -1
drivers/net/hyperv/hyperv_net.h
··· 128 128 struct hv_netvsc_packet { 129 129 /* Bookkeeping stuff */ 130 130 u32 status; 131 - bool part_of_skb; 132 131 133 132 bool is_data_pkt; 134 133 bool xmit_more; /* from skb */ ··· 611 612 u32 count; /* counter of batched packets */ 612 613 }; 613 614 615 + /* The context of the netvsc device */ 616 + struct net_device_context { 617 + /* point back to our device context */ 618 + struct hv_device *device_ctx; 619 + struct delayed_work dwork; 620 + struct work_struct work; 621 + u32 msg_enable; /* debug level */ 622 + }; 623 + 614 624 /* Per netvsc device */ 615 625 struct netvsc_device { 616 626 struct hv_device *dev; ··· 675 667 struct multi_send_data msd[NR_CPUS]; 676 668 u32 max_pkt; /* max number of pkt in one send, e.g. 8 */ 677 669 u32 pkt_align; /* alignment bytes, e.g. 8 */ 670 + 671 + /* The net device context */ 672 + struct net_device_context *nd_ctx; 678 673 }; 679 674 680 675 /* NdisInitialize message */
+3 -5
drivers/net/hyperv/netvsc.c
··· 889 889 } else { 890 890 packet->page_buf_cnt = 0; 891 891 packet->total_data_buflen += msd_len; 892 - if (!packet->part_of_skb) { 893 - skb = (struct sk_buff *)(unsigned long)packet-> 894 - send_completion_tid; 895 - packet->send_completion_tid = 0; 896 - } 897 892 } 898 893 899 894 if (msdp->pkt) ··· 1191 1196 * in struct netvsc_device *. 1192 1197 */ 1193 1198 ndev = net_device->ndev; 1199 + 1200 + /* Add netvsc_device context to netvsc_device */ 1201 + net_device->nd_ctx = netdev_priv(ndev); 1194 1202 1195 1203 /* Initialize the NetVSC channel extension */ 1196 1204 init_completion(&net_device->channel_init_wait);
+21 -26
drivers/net/hyperv/netvsc_drv.c
··· 40 40 41 41 #include "hyperv_net.h" 42 42 43 - struct net_device_context { 44 - /* point back to our device context */ 45 - struct hv_device *device_ctx; 46 - struct delayed_work dwork; 47 - struct work_struct work; 48 - }; 49 43 50 44 #define RING_SIZE_MIN 64 51 45 static int ring_size = 128; 52 46 module_param(ring_size, int, S_IRUGO); 53 47 MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); 48 + 49 + static const u32 default_msg = NETIF_MSG_DRV | NETIF_MSG_PROBE | 50 + NETIF_MSG_LINK | NETIF_MSG_IFUP | 51 + NETIF_MSG_IFDOWN | NETIF_MSG_RX_ERR | 52 + NETIF_MSG_TX_ERR; 53 + 54 + static int debug = -1; 55 + module_param(debug, int, S_IRUGO); 56 + MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 54 57 55 58 static void do_set_multicast(struct work_struct *w) 56 59 { ··· 238 235 struct sk_buff *skb = (struct sk_buff *) 239 236 (unsigned long)packet->send_completion_tid; 240 237 241 - if (!packet->part_of_skb) 242 - kfree(packet); 243 - 244 238 if (skb) 245 239 dev_kfree_skb_any(skb); 246 240 } ··· 389 389 u32 net_trans_info; 390 390 u32 hash; 391 391 u32 skb_length; 392 - u32 head_room; 393 392 u32 pkt_sz; 394 393 struct hv_page_buffer page_buf[MAX_PAGE_BUFFER_COUNT]; 395 394 ··· 401 402 402 403 check_size: 403 404 skb_length = skb->len; 404 - head_room = skb_headroom(skb); 405 405 num_data_pgs = netvsc_get_slots(skb) + 2; 406 406 if (num_data_pgs > MAX_PAGE_BUFFER_COUNT && linear) { 407 407 net_alert_ratelimited("packet too big: %u pages (%u bytes)\n", ··· 419 421 420 422 pkt_sz = sizeof(struct hv_netvsc_packet) + RNDIS_AND_PPI_SIZE; 421 423 422 - if (head_room < pkt_sz) { 423 - packet = kmalloc(pkt_sz, GFP_ATOMIC); 424 - if (!packet) { 425 - /* out of memory, drop packet */ 426 - netdev_err(net, "unable to alloc hv_netvsc_packet\n"); 427 - ret = -ENOMEM; 428 - goto drop; 429 - } 430 - packet->part_of_skb = false; 431 - } else { 432 - /* Use the headroom for building up the packet */ 433 - packet = (struct hv_netvsc_packet *)skb->head; 434 - packet->part_of_skb = true; 424 + ret = skb_cow_head(skb, pkt_sz); 425 + if (ret) { 426 + netdev_err(net, "unable to alloc hv_netvsc_packet\n"); 427 + ret = -ENOMEM; 428 + goto drop; 435 429 } 430 + /* Use the headroom for building up the packet */ 431 + packet = (struct hv_netvsc_packet *)skb->head; 436 432 437 433 packet->status = 0; 438 434 packet->xmit_more = skb->xmit_more; ··· 583 591 net->stats.tx_bytes += skb_length; 584 592 net->stats.tx_packets++; 585 593 } else { 586 - if (packet && !packet->part_of_skb) 587 - kfree(packet); 588 594 if (ret != -EAGAIN) { 589 595 dev_kfree_skb_any(skb); 590 596 net->stats.tx_dropped++; ··· 878 888 879 889 net_device_ctx = netdev_priv(net); 880 890 net_device_ctx->device_ctx = dev; 891 + net_device_ctx->msg_enable = netif_msg_init(debug, default_msg); 892 + if (netif_msg_probe(net_device_ctx)) 893 + netdev_dbg(net, "netvsc msg_enable: %d\n", 894 + net_device_ctx->msg_enable); 895 + 881 896 hv_set_drvdata(dev, net); 882 897 INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change); 883 898 INIT_WORK(&net_device_ctx->work, do_set_multicast);
+2 -1
drivers/net/hyperv/rndis_filter.c
··· 429 429 430 430 rndis_msg = pkt->data; 431 431 432 - dump_rndis_message(dev, rndis_msg); 432 + if (netif_msg_rx_err(net_dev->nd_ctx)) 433 + dump_rndis_message(dev, rndis_msg); 433 434 434 435 switch (rndis_msg->ndis_msg_type) { 435 436 case RNDIS_MSG_PACKET:
+4 -2
include/linux/netdevice.h
··· 977 977 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh, 978 978 * u16 flags) 979 979 * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, 980 - * struct net_device *dev, u32 filter_mask) 980 + * struct net_device *dev, u32 filter_mask, 981 + * int nlflags) 981 982 * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, 982 983 * u16 flags); 983 984 * ··· 1174 1173 int (*ndo_bridge_getlink)(struct sk_buff *skb, 1175 1174 u32 pid, u32 seq, 1176 1175 struct net_device *dev, 1177 - u32 filter_mask); 1176 + u32 filter_mask, 1177 + int nlflags); 1178 1178 int (*ndo_bridge_dellink)(struct net_device *dev, 1179 1179 struct nlmsghdr *nlh, 1180 1180 u16 flags);
+14 -2
include/linux/netfilter_bridge.h
··· 39 39 40 40 static inline int nf_bridge_get_physinif(const struct sk_buff *skb) 41 41 { 42 - return skb->nf_bridge ? skb->nf_bridge->physindev->ifindex : 0; 42 + struct nf_bridge_info *nf_bridge; 43 + 44 + if (skb->nf_bridge == NULL) 45 + return 0; 46 + 47 + nf_bridge = skb->nf_bridge; 48 + return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0; 43 49 } 44 50 45 51 static inline int nf_bridge_get_physoutif(const struct sk_buff *skb) 46 52 { 47 - return skb->nf_bridge ? skb->nf_bridge->physoutdev->ifindex : 0; 53 + struct nf_bridge_info *nf_bridge; 54 + 55 + if (skb->nf_bridge == NULL) 56 + return 0; 57 + 58 + nf_bridge = skb->nf_bridge; 59 + return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0; 48 60 } 49 61 50 62 static inline struct net_device *
+1 -1
include/linux/rtnetlink.h
··· 122 122 123 123 extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 124 124 struct net_device *dev, u16 mode, 125 - u32 flags, u32 mask); 125 + u32 flags, u32 mask, int nlflags); 126 126 #endif /* __LINUX_RTNETLINK_H */
+6 -6
kernel/bpf/core.c
··· 357 357 ALU64_MOD_X: 358 358 if (unlikely(SRC == 0)) 359 359 return 0; 360 - tmp = DST; 361 - DST = do_div(tmp, SRC); 360 + div64_u64_rem(DST, SRC, &tmp); 361 + DST = tmp; 362 362 CONT; 363 363 ALU_MOD_X: 364 364 if (unlikely(SRC == 0)) ··· 367 367 DST = do_div(tmp, (u32) SRC); 368 368 CONT; 369 369 ALU64_MOD_K: 370 - tmp = DST; 371 - DST = do_div(tmp, IMM); 370 + div64_u64_rem(DST, IMM, &tmp); 371 + DST = tmp; 372 372 CONT; 373 373 ALU_MOD_K: 374 374 tmp = (u32) DST; ··· 377 377 ALU64_DIV_X: 378 378 if (unlikely(SRC == 0)) 379 379 return 0; 380 - do_div(DST, SRC); 380 + DST = div64_u64(DST, SRC); 381 381 CONT; 382 382 ALU_DIV_X: 383 383 if (unlikely(SRC == 0)) ··· 387 387 DST = (u32) tmp; 388 388 CONT; 389 389 ALU64_DIV_K: 390 - do_div(DST, IMM); 390 + DST = div64_u64(DST, IMM); 391 391 CONT; 392 392 ALU_DIV_K: 393 393 tmp = (u32) DST;
+1 -1
net/bridge/br_mdb.c
··· 170 170 struct br_port_msg *bpm; 171 171 struct nlattr *nest, *nest2; 172 172 173 - nlh = nlmsg_put(skb, pid, seq, type, sizeof(*bpm), NLM_F_MULTI); 173 + nlh = nlmsg_put(skb, pid, seq, type, sizeof(*bpm), 0); 174 174 if (!nlh) 175 175 return -EMSGSIZE; 176 176
+2 -2
net/bridge/br_netlink.c
··· 394 394 * Dump information about all ports, in response to GETLINK 395 395 */ 396 396 int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, 397 - struct net_device *dev, u32 filter_mask) 397 + struct net_device *dev, u32 filter_mask, int nlflags) 398 398 { 399 399 struct net_bridge_port *port = br_port_get_rtnl(dev); 400 400 ··· 402 402 !(filter_mask & RTEXT_FILTER_BRVLAN_COMPRESSED)) 403 403 return 0; 404 404 405 - return br_fill_ifinfo(skb, port, pid, seq, RTM_NEWLINK, NLM_F_MULTI, 405 + return br_fill_ifinfo(skb, port, pid, seq, RTM_NEWLINK, nlflags, 406 406 filter_mask, dev); 407 407 } 408 408
+1 -1
net/bridge/br_private.h
··· 828 828 int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags); 829 829 int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags); 830 830 int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, struct net_device *dev, 831 - u32 filter_mask); 831 + u32 filter_mask, int nlflags); 832 832 833 833 #ifdef CONFIG_SYSFS 834 834 /* br_sysfs_if.c */
+7 -5
net/core/rtnetlink.c
··· 2854 2854 2855 2855 int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, 2856 2856 struct net_device *dev, u16 mode, 2857 - u32 flags, u32 mask) 2857 + u32 flags, u32 mask, int nlflags) 2858 2858 { 2859 2859 struct nlmsghdr *nlh; 2860 2860 struct ifinfomsg *ifm; ··· 2863 2863 u8 operstate = netif_running(dev) ? dev->operstate : IF_OPER_DOWN; 2864 2864 struct net_device *br_dev = netdev_master_upper_dev_get(dev); 2865 2865 2866 - nlh = nlmsg_put(skb, pid, seq, RTM_NEWLINK, sizeof(*ifm), NLM_F_MULTI); 2866 + nlh = nlmsg_put(skb, pid, seq, RTM_NEWLINK, sizeof(*ifm), nlflags); 2867 2867 if (nlh == NULL) 2868 2868 return -EMSGSIZE; 2869 2869 ··· 2969 2969 if (br_dev && br_dev->netdev_ops->ndo_bridge_getlink) { 2970 2970 if (idx >= cb->args[0] && 2971 2971 br_dev->netdev_ops->ndo_bridge_getlink( 2972 - skb, portid, seq, dev, filter_mask) < 0) 2972 + skb, portid, seq, dev, filter_mask, 2973 + NLM_F_MULTI) < 0) 2973 2974 break; 2974 2975 idx++; 2975 2976 } ··· 2978 2977 if (ops->ndo_bridge_getlink) { 2979 2978 if (idx >= cb->args[0] && 2980 2979 ops->ndo_bridge_getlink(skb, portid, seq, dev, 2981 - filter_mask) < 0) 2980 + filter_mask, 2981 + NLM_F_MULTI) < 0) 2982 2982 break; 2983 2983 idx++; 2984 2984 } ··· 3020 3018 goto errout; 3021 3019 } 3022 3020 3023 - err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0); 3021 + err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0, 0); 3024 3022 if (err < 0) 3025 3023 goto errout; 3026 3024
+1 -1
net/dsa/dsa.c
··· 633 633 if (cd->sw_addr > PHY_MAX_ADDR) 634 634 continue; 635 635 636 - if (!of_property_read_u32(np, "eeprom-length", &eeprom_len)) 636 + if (!of_property_read_u32(child, "eeprom-length", &eeprom_len)) 637 637 cd->eeprom_len = eeprom_len; 638 638 639 639 for_each_available_child_of_node(child, port) {
+1
net/ipv4/ping.c
··· 158 158 if (sk_hashed(sk)) { 159 159 write_lock_bh(&ping_table.lock); 160 160 hlist_nulls_del(&sk->sk_nulls_node); 161 + sk_nulls_node_init(&sk->sk_nulls_node); 161 162 sock_put(sk); 162 163 isk->inet_num = 0; 163 164 isk->inet_sport = 0;
+1 -4
net/ipv4/route.c
··· 962 962 if (dst_metric_locked(dst, RTAX_MTU)) 963 963 return; 964 964 965 - if (dst->dev->mtu < mtu) 966 - return; 967 - 968 - if (rt->rt_pmtu && rt->rt_pmtu < mtu) 965 + if (ipv4_mtu(dst) < mtu) 969 966 return; 970 967 971 968 if (mtu < ip_rt_min_pmtu)
+1 -2
net/netfilter/nf_tables_api.c
··· 4340 4340 case NFT_CONTINUE: 4341 4341 case NFT_BREAK: 4342 4342 case NFT_RETURN: 4343 - desc->len = sizeof(data->verdict); 4344 4343 break; 4345 4344 case NFT_JUMP: 4346 4345 case NFT_GOTO: ··· 4354 4355 4355 4356 chain->use++; 4356 4357 data->verdict.chain = chain; 4357 - desc->len = sizeof(data); 4358 4358 break; 4359 4359 } 4360 4360 4361 + desc->len = sizeof(data->verdict); 4361 4362 desc->type = NFT_DATA_VERDICT; 4362 4363 return 0; 4363 4364 }
-2
net/sched/act_connmark.c
··· 63 63 skb->mark = c->mark; 64 64 /* using overlimits stats to count how many packets marked */ 65 65 ca->tcf_qstats.overlimits++; 66 - nf_ct_put(c); 67 66 goto out; 68 67 } 69 68 ··· 81 82 nf_ct_put(c); 82 83 83 84 out: 84 - skb->nfct = NULL; 85 85 spin_unlock(&ca->tcf_lock); 86 86 return ca->tcf_action; 87 87 }
+9 -8
net/tipc/bearer.c
··· 591 591 592 592 /* Caller should hold rtnl_lock to protect the bearer */ 593 593 static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg, 594 - struct tipc_bearer *bearer) 594 + struct tipc_bearer *bearer, int nlflags) 595 595 { 596 596 void *hdr; 597 597 struct nlattr *attrs; 598 598 struct nlattr *prop; 599 599 600 600 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, 601 - NLM_F_MULTI, TIPC_NL_BEARER_GET); 601 + nlflags, TIPC_NL_BEARER_GET); 602 602 if (!hdr) 603 603 return -EMSGSIZE; 604 604 ··· 657 657 if (!bearer) 658 658 continue; 659 659 660 - err = __tipc_nl_add_bearer(&msg, bearer); 660 + err = __tipc_nl_add_bearer(&msg, bearer, NLM_F_MULTI); 661 661 if (err) 662 662 break; 663 663 } ··· 705 705 goto err_out; 706 706 } 707 707 708 - err = __tipc_nl_add_bearer(&msg, bearer); 708 + err = __tipc_nl_add_bearer(&msg, bearer, 0); 709 709 if (err) 710 710 goto err_out; 711 711 rtnl_unlock(); ··· 857 857 } 858 858 859 859 static int __tipc_nl_add_media(struct tipc_nl_msg *msg, 860 - struct tipc_media *media) 860 + struct tipc_media *media, int nlflags) 861 861 { 862 862 void *hdr; 863 863 struct nlattr *attrs; 864 864 struct nlattr *prop; 865 865 866 866 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, 867 - NLM_F_MULTI, TIPC_NL_MEDIA_GET); 867 + nlflags, TIPC_NL_MEDIA_GET); 868 868 if (!hdr) 869 869 return -EMSGSIZE; 870 870 ··· 916 916 917 917 rtnl_lock(); 918 918 for (; media_info_array[i] != NULL; i++) { 919 - err = __tipc_nl_add_media(&msg, media_info_array[i]); 919 + err = __tipc_nl_add_media(&msg, media_info_array[i], 920 + NLM_F_MULTI); 920 921 if (err) 921 922 break; 922 923 } ··· 964 963 goto err_out; 965 964 } 966 965 967 - err = __tipc_nl_add_media(&msg, media); 966 + err = __tipc_nl_add_media(&msg, media, 0); 968 967 if (err) 969 968 goto err_out; 970 969 rtnl_unlock();
+6 -9
net/tipc/link.c
··· 1145 1145 } 1146 1146 /* Synchronize with parallel link if applicable */ 1147 1147 if (unlikely((l_ptr->flags & LINK_SYNCHING) && !msg_dup(msg))) { 1148 - link_handle_out_of_seq_msg(l_ptr, skb); 1149 - if (link_synch(l_ptr)) 1150 - link_retrieve_defq(l_ptr, &head); 1151 - skb = NULL; 1152 - goto unlock; 1148 + if (!link_synch(l_ptr)) 1149 + goto unlock; 1153 1150 } 1154 1151 l_ptr->next_in_no++; 1155 1152 if (unlikely(!skb_queue_empty(&l_ptr->deferdq))) ··· 2010 2013 2011 2014 /* Caller should hold appropriate locks to protect the link */ 2012 2015 static int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg, 2013 - struct tipc_link *link) 2016 + struct tipc_link *link, int nlflags) 2014 2017 { 2015 2018 int err; 2016 2019 void *hdr; ··· 2019 2022 struct tipc_net *tn = net_generic(net, tipc_net_id); 2020 2023 2021 2024 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, 2022 - NLM_F_MULTI, TIPC_NL_LINK_GET); 2025 + nlflags, TIPC_NL_LINK_GET); 2023 2026 if (!hdr) 2024 2027 return -EMSGSIZE; 2025 2028 ··· 2092 2095 if (!node->links[i]) 2093 2096 continue; 2094 2097 2095 - err = __tipc_nl_add_link(net, msg, node->links[i]); 2098 + err = __tipc_nl_add_link(net, msg, node->links[i], NLM_F_MULTI); 2096 2099 if (err) 2097 2100 return err; 2098 2101 } ··· 2206 2209 goto err_out; 2207 2210 } 2208 2211 2209 - err = __tipc_nl_add_link(net, &msg, link); 2212 + err = __tipc_nl_add_link(net, &msg, link, 0); 2210 2213 if (err) 2211 2214 goto err_out; 2212 2215