1. 13 Nov, 2017 18 commits
  2. 12 Nov, 2017 1 commit
  3. 11 Nov, 2017 21 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b3954568
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Use after free in vlan, from Cong Wang.
      
       2) Handle NAPI poll with a zero budget properly in mlx5 driver, from
          Saeed Mahameed.
      
       3) If DMA mapping fails in mlx5 driver, NULL out page, from Inbar
          Karmy.
      
       4) Handle overrun in RX FIFO of sun4i CAN driver, from Gerhard
          Bertelsmann.
      
       5) Missing return in mdb and vlan prepare phase of DSA layer, from
          Vivien Didelot.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        vlan: fix a use-after-free in vlan_device_event()
        net: dsa: return after vlan prepare phase
        net: dsa: return after mdb prepare phase
        can: ifi: Fix transmitter delay calculation
        tcp: fix tcp_fastretrans_alert warning
        tcp: gso: avoid refcount_t warning from tcp_gso_segment()
        can: peak: Add support for new PCIe/M2 CAN FD interfaces
        can: sun4i: handle overrun in RX FIFO
        can: c_can: don't indicate triple sampling support for D_CAN
        net/mlx5e: Increase Striding RQ minimum size limit to 4 multi-packet WQEs
        net/mlx5e: Set page to null in case dma mapping fails
        net/mlx5e: Fix napi poll with zero budget
        net/mlx5: Cancel health poll before sending panic teardown command
        net/mlx5: Loop over temp list to release delay events
        rds: ib: Fix NULL pointer dereference in debug code
      b3954568
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2017-11-11' of... · 7c5556de
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2017-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 4.15
      
      Last minute patches before the merge window. Not really anything
      special standing out, mostly fixes or cleanup and some minor new
      features.
      
      Major changes:
      
      iwlwifi
      
      * some new PCI IDs
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c5556de
    • Mat Martineau's avatar
      net: Remove unused skb_shared_info member · 39b17521
      Mat Martineau authored
      
      ip6_frag_id was only used by UFO, which has been removed.
      ipv6_proxy_select_ident() only existed to set ip6_frag_id and has no
      in-tree callers.
      Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39b17521
    • David S. Miller's avatar
      Merge branch 'l2tp-avoid-aliasing-tunnels-socket-pointer' · 973573c4
      David S. Miller authored
      
      Guillaume Nault says:
      
      ====================
      l2tp: avoid aliasing tunnels socket pointer
      
      We don't need to copy the tunnel's socket pointer in the pseudo-wire
      specific session structures. This uselessly complicates the code
      and hampers evolution.
      
      This series was part of an effort to protect tunnels socket pointer
      with RCU. But since it provides nice cleanup, I submit it separately.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      973573c4
    • Guillaume Nault's avatar
      l2tp: remove the .tunnel_sock field from struct pppol2tp_session · da9ca825
      Guillaume Nault authored
      
      The last user of .tunnel_sock is pppol2tp_connect() which defensively
      uses it to verify internal data consistency.
      
      This check isn't necessary: l2tp_session_get() guarantees that the
      returned session belongs to the tunnel passed as parameter. And
      .tunnel_sock is never updated, so checking that it still points to
      the parent tunnel socket is useless; that test can never fail.
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da9ca825
    • Guillaume Nault's avatar
      l2tp: avoid using ->tunnel_sock for getting session's parent tunnel · 7198c77a
      Guillaume Nault authored
      
      Sessions don't need to use l2tp_sock_to_tunnel(xxx->tunnel_sock) for
      accessing their parent tunnel. They have the .tunnel field in the
      l2tp_session structure for that. Furthermore, in all these cases, the
      session is registered, so we're guaranteed that .tunnel isn't NULL and
      that the session properly holds a reference on the tunnel.
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7198c77a
    • Guillaume Nault's avatar
      l2tp: remove .tunnel_sock from struct l2tp_eth · 8fdfd659
      Guillaume Nault authored
      
      This field has never been used.
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8fdfd659
    • David S. Miller's avatar
      Merge branch 'dsa-b53-Turn-on-Broadcom-tags' · 93f7ea74
      David S. Miller authored
      
      Florian Fainelli says:
      
      ====================
      net: dsa: b53: Turn on Broadcom tags
      
      This was long overdue, with this patch series, the b53 driver now
      turns on Broadcom tags except for 5325 and 5365 which use an older
      format that we do not support yet (TBD).
      
      First patch is necessary in order for bgmac, used on BCM5301X and Northstar
      Plus to work correctly and successfully send ARP packets back to the requsester.
      
      Second patch is actually a bug fix, but because net/master and net-next/master
      diverge in that area, I am targeting net-next/master here.
      
      Finally, the last patch enables Broadcom tags after checking that the CPU port
      selected is either, 5, 7 or 8, since those are the only valid combinations
      given currently supported HW.
      
      Changes in v3:
      
      - guarded padding with netdev_uses_dsa() to let the non-DSA use cases
        not have a performance hit for smaller packets
      
      - added missing select NET_DSA_TAG_BRCM to drivers/net/dsa/b53/Kconfig
      
      Changes in v2:
      
      - moved a hunk between patch 2 and patch 3 to avoid a bisectability issue
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93f7ea74
    • Florian Fainelli's avatar
      net: dsa: b53: Turn on Broadcom tags · 7edc58d6
      Florian Fainelli authored
      
      Enable Broadcom tags for b53 devices, except 5325 and 5365 which use a
      different Broadcom tag format not yet supported by net/dsa/tag_brcm.c.
      
      We also make sure that we can turn on Broadcom tags on a CPU port number
      that is capable of that: 5, 7 or 8.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7edc58d6
    • Florian Fainelli's avatar
      net: dsa: b53: Stop using dev->cpu_port incorrectly · c499696e
      Florian Fainelli authored
      dev->cpu_port is the driver local information that should only be used
      to look up register offsets for a particular port, when they differ
      (e.g: IMP port override), but it should certainly not be used in place
      of the DSA configured CPU port.
      
      Since the DSA switch layer calls port_vlan_{add,del}() on the CPU port
      as well, we can remove the specific setting of the CPU port within
      port_vlan_{add,del}.
      
      Fixes: ff39c2d6 ("net: dsa: b53: Add bridge support")
      Fixes: 967dd82f
      
       ("net: dsa: b53: Add support for Broadcom RoboSwitch")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c499696e
    • Florian Fainelli's avatar
      net: bgmac: Pad packets to a minimum size · 4d215ae7
      Florian Fainelli authored
      
      In preparation for enabling Broadcom tags with b53, pad packets to a
      minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to
      accept ingressing frames. Without this, we would typically be able to
      DHCP, but not resolve with ARP because packets are too small and get
      rejected by the switch.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d215ae7
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.14-20171110' of... · 92d28828
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.14-20171110' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2017-11-10
      
      this is a pull request for net/master.
      
      The first patch by Richard Schütz for the c_can driver removes the false
      indication to support triple sampling for d_can. Gerhard Bertelsmann's
      patch for the sun4i driver improves the RX overrun handling. The patch
      by Stephane Grosjean for the peak_canfd driver adds the PCI ids for
      various new PCIe/M2 interfaces. Marek Vasut's patch for the ifi driver
      fix transmitter delay calculation.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      92d28828
    • David S. Miller's avatar
      Merge branch 'dsa-lan9303-IGMP-handling' · f444ef51
      David S. Miller authored
      
      Egil Hjelmeland says:
      
      ====================
      net: dsa: lan9303: IGMP handling
      
      Set up the HW switch to trap IGMP packets to CPU port.
      And make sure skb->offload_fwd_mark is cleared for incoming IGMP packets.
      
      skb->offload_fwd_mark calculation is a candidate for consolidation into the
      DSA core. The calculation can probably be more polished when done at a point
      where DSA has updated skb.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f444ef51
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Clear offload_fwd_mark for IGMP · 4672cd36
      Egil Hjelmeland authored
      
      Now that IGMP packets no longer is flooded in HW, we want the SW bridge to
      forward packets based on bridge configuration. To make that happen,
      IGMP packets must have skb->offload_fwd_mark = 0.
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4672cd36
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Set up trapping of IGMP to CPU port · 2aee4307
      Egil Hjelmeland authored
      
      IGMP packets should be trapped to the CPU port. The SW bridge knows
      whether to forward to other ports.
      
      With "IGMP snooping for local traffic" merged, IGMP trapping is also
      required for stable IGMPv2 operation.
      
      LAN9303 does not trap IGMP packets by default.
      
      Enable IGMP trapping in lan9303_setup.
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2aee4307
    • Rahul Lakkireddy's avatar
      cxgb4: collect vpd info directly from hardware · 940c9c45
      Rahul Lakkireddy authored
      Collect vpd information directly from hardware instead of software
      adapter context. Move EEPROM physical address to virtual address
      translation logic to t4_hw.c and update relevant files.
      
      Fixes: 6f92a654
      
       ("cxgb4: collect hardware misc dumps")
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      940c9c45
    • David S. Miller's avatar
      Merge tag 'mlx5-fixes-2017-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · be234ba9
      David S. Miller authored
      
      Saeed Mahameed says:
      
      ====================
      Mellanox, mlx5 fixes 2017-11-08
      
      The following series includes some fixes for mlx5 core and etherent
      driver.
      
      Sorry for the late submission but as you can see i have some very
      critical fixes below that i would like them merged into this RC.
      
      Please pull and let me know if there is any problem.
      
      For -stable:
      ('net/mlx5e: Set page to null in case dma mapping fails') kernels >= 4.13
      ('net/mlx5: FPGA, return -EINVAL if size is zero') kernels >= 4.13
      ('net/mlx5: Cancel health poll before sending panic teardown command') kernels >= 4.13
      
      V1->V2:
      	- Fix Reviewed-by tag of the 2nd patch.
      	- Drop the FPGA 0 size fix, it needs some more change log info.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be234ba9
    • Cong Wang's avatar
      vlan: fix a use-after-free in vlan_device_event() · 052d41c0
      Cong Wang authored
      
      After refcnt reaches zero, vlan_vid_del() could free
      dev->vlan_info via RCU:
      
      	RCU_INIT_POINTER(dev->vlan_info, NULL);
      	call_rcu(&vlan_info->rcu, vlan_info_rcu_free);
      
      However, the pointer 'grp' still points to that memory
      since it is set before vlan_vid_del():
      
              vlan_info = rtnl_dereference(dev->vlan_info);
              if (!vlan_info)
                      goto out;
              grp = &vlan_info->grp;
      
      Depends on when that RCU callback is scheduled, we could
      trigger a use-after-free in vlan_group_for_each_dev()
      right following this vlan_vid_del().
      
      Fix it by moving vlan_vid_del() before setting grp. This
      is also symmetric to the vlan_vid_add() we call in
      vlan_device_event().
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Fixes: efc73f4b ("net: Fix memory leak - vlan_info struct")
      Cc: Alexander Duyck <alexander.duyck@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Girish Moodalbail <girish.moodalbail@oracle.com>
      Signed-off-by: Cong Wang ...
      052d41c0
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Fix stats histogram mode · 40cff8fc
      Andrew Lunn authored
      
      The statistics histogram mode was not being explicitly initialized on
      devices other than the 6390 family. Clearing the statistics then
      overwrote the default setting, setting the histogram to a reserved
      mode.
      
      Explicitly set the histogram mode for all devices. Change the
      statistics clear into a read/modify/write, and since it is now more
      complex, move it into global1.c.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40cff8fc
    • David S. Miller's avatar
      Merge branch 'mv88e6xxx-broadcast-flooding-in-hardware' · c311db92
      David S. Miller authored
      
      Andrew Lunn says:
      
      ====================
      mv88e6xxx broadcast flooding in hardware
      
      This patchset makes the mv88e6xxx driver perform flooding in hardware,
      rather than let the software bridge perform the flooding. This is a
      prerequisite for IGMP snooping on the bridge interface.
      
      In order to make hardware broadcasting work, a few other issues need
      fixing or improving. SWITCHDEV_ATTR_ID_PORT_PARENT_ID is broken, which
      is apparent when testing on the ZII devel board with multiple
      switches.
      
      Some of these patches are taken from a previous RFC patchset of IGMP
      support.
      
      Rebased onto net-next, with fixup for Vivien's refactoring.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c311db92
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Flood broadcast frames in hardware · 87fa886e
      Andrew Lunn authored
      
      By default, the switch does not flood broadcast frames. Instead the
      broadcast address is unknown in the ATU, so the frame gets forwarded
      out the cpu port. The software bridge then floods it back to the
      individual switch ports which are members of the bridge.
      
      Add an ATU entry in the switch so that it floods broadcast frames out
      ports, rather than have the software bridge do it. Also, send a copy
      out the cpu port and any dsa ports. Rely on the port vectors to
      prevent broadcast frames leaking between bridges, and separated ports.
      
      Additionally, when a VLAN is added, a new FID is allocated.  This
      represents a new table of ATU entries. A broadcast entry is added to
      the new FID.
      
      With offload_fwd_mark being set, the software bridge will not flood
      the frames it receives back to the switch.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87fa886e