1. 28 Aug, 2015 15 commits
    • David Ahern's avatar
      net: Add ethernet header for pass through VRF device · 8f58336d
      David Ahern authored
      The change to use a custom dst broke tcpdump captures on the VRF device:
      
      $ tcpdump -n -i vrf10
      ...
      05:32:29.009362 IP 10.2.1.254 > 10.2.1.2: ICMP echo request, id 21989, seq 1, length 64
      05:32:29.009855 00:00:40:01:8d:36 > 45:00:00:54:d6:6f, ethertype Unknown (0x0a02), length 84:
      	0x0000:  0102 0a02 01fe 0000 9181 55e5 0001 bd11  ..........U.....
      	0x0010:  da55 0000 0000 bb5d 0700 0000 0000 1011  .U.....]........
      	0x0020:  1213 1415 1617 1819 1a1b 1c1d 1e1f 2021  ...............!
      	0x0030:  2223 2425 2627 2829 2a2b 2c2d 2e2f 3031  "#$%&'()*+,-./01
      	0x0040:  3233 3435 3637                           234567
      
      Local packets going through the VRF device are missing an ethernet header.
      Fix by adding one and then stripping it off before pushing back to the IP
      stack. With this patch you get the expected dumps:
      
      ...
      05:36:15.713944 IP 10.2.1.254 > 10.2.1.2: ICMP echo request, id 23795, seq 1, length 64
      05:36:15.714160 IP 10.2.1.2 > 10.2.1.254: ICMP echo reply, id 23795, seq 1, length 64
      ...
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f58336d
    • Chas Williams's avatar
      net/xen-netfront: only napi_synchronize() if running · 274b0455
      Chas Williams authored
      If an interface isn't running napi_synchronize() will hang forever.
      
      [  392.248403] rmmod           R  running task        0   359    343 0x00000000
      [  392.257671]  ffff88003760fc88 ffff880037193b40 ffff880037193160 ffff88003760fc88
      [  392.267644]  ffff880037610000 ffff88003760fcd8 0000000100014c22 ffffffff81f75c40
      [  392.277524]  0000000000bc7010 ffff88003760fca8 ffffffff81796927 ffffffff81f75c40
      [  392.287323] Call Trace:
      [  392.291599]  [<ffffffff81796927>] schedule+0x37/0x90
      [  392.298553]  [<ffffffff8179985b>] schedule_timeout+0x14b/0x280
      [  392.306421]  [<ffffffff810f91b9>] ? irq_free_descs+0x69/0x80
      [  392.314006]  [<ffffffff811084d0>] ? internal_add_timer+0xb0/0xb0
      [  392.322125]  [<ffffffff81109d07>] msleep+0x37/0x50
      [  392.329037]  [<ffffffffa00ec79a>] xennet_disconnect_backend.isra.24+0xda/0x390 [xen_netfront]
      [  392.339658]  [<ffffffffa00ecadc>] xennet_remove+0x2c/0x80 [xen_netfront]
      [  392.348516]  [<ffffffff81481c69>] xenbus_dev_remove+0x59/0xc0
      [  392.356257]  [<ffffffff814e7217>] __device_release_driver+0x87/0x120
      [  392.364645]  [<ffffffff814e7cf8>] driver_detach+0xb8/0xc0
      [  392.371989]  [<ffffffff814e6e69>] bus_remove_driver+0x59/0xe0
      [  392.379883]  [<ffffffff814e84f0>] driver_unregister+0x30/0x70
      [  392.387495]  [<ffffffff814814b2>] xenbus_unregister_driver+0x12/0x20
      [  392.395908]  [<ffffffffa00ed89b>] netif_exit+0x10/0x775 [xen_netfront]
      [  392.404877]  [<ffffffff81124e08>] SyS_delete_module+0x1d8/0x230
      [  392.412804]  [<ffffffff8179a8ee>] system_call_fastpath+0x12/0x71
      Signed-off-by: default avatarChas Williams <3chas3@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      274b0455
    • Philip Downey's avatar
      IGMP: Inhibit reports for local multicast groups · df2cf4a7
      Philip Downey authored
      The range of addresses between 224.0.0.0 and 224.0.0.255 inclusive, is
      reserved for the use of routing protocols and other low-level topology
      discovery or maintenance protocols, such as gateway discovery and
      group membership reporting.  Multicast routers should not forward any
      multicast datagram with destination addresses in this range,
      regardless of its TTL.
      
      Currently, IGMP reports are generated for this reserved range of
      addresses even though a router will ignore this information since it
      has no purpose.  However, the presence of reserved group addresses in
      an IGMP membership report uses up network bandwidth and can also
      obscure addresses of interest when inspecting membership reports using
      packet inspection or debug messages.
      
      Although the RFCs for the various version of IGMP (e.g.RFC 3376 for
      v3) do not specify that the reserved addresses be excluded from
      membership reports, it should do no harm in doing so.  In particular
      there should be no adverse effect in any IGMP snooping functionality
      since 224.0.0.x is specifically excluded as per RFC 4541 (IGMP and MLD
      Snooping Switches Considerations) section 2.1.2. Data Forwarding
      Rules:
      
          2) Packets with a destination IP (DIP) address in the 224.0.0.X
             range which are not IGMP must be forwarded on all ports.
      
      IGMP reports for local multicast groups can now be optionally
      inhibited by means of a system control variable (by setting the value
      to zero) e.g.:
          echo 0 > /proc/sys/net/ipv4/igmp_link_local_mcast_reports
      
      To retain backwards compatibility the previous behaviour is retained
      by default on system boot or reverted by setting the value back to
      non-zero e.g.:
          echo 1 >  /proc/sys/net/ipv4/igmp_link_local_mcast_reports
      Signed-off-by: default avatarPhilip Downey <pdowney@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df2cf4a7
    • Corinna Vinschen's avatar
      r8169: Add software counter for multicast packages · d7d2d89d
      Corinna Vinschen authored
      The multicast hardware counter on 8168/8111 chips is only 32 bit while the
      statistics in struct rtnl_link_stats64 are 64 bit.  Given that statistics
      are requested on an irregular basis, an overflow of the hardware counter
      can go unnoticed.  To count even very large numbers of multicast packets
      reliably, add a software counter and remove previously applied code to
      fill the multicast field requested by @rtl8169_get_stats64 with the values
      read from the rx_multicast hardware counter.
      Signed-off-by: default avatarCorinna Vinschen <vinschen@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7d2d89d
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 4941b8f0
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fix MSI/MSI-X on pseries from Guilherme"
      
      * tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case
        PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code
      4941b8f0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e001d708
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Some straggler bug fixes here:
      
         1) Netlink_sendmsg() doesn't check iterator type properly in mmap
            case, from Ken-ichirou MATSUZAWA.
      
         2) Don't sleep in atomic context in bcmgenet driver, from Florian
            Fainelli.
      
         3) The pfkey_broadcast() code patch can't actually ever use anything
            other than GFP_ATOMIC.  And the cases that right now pass
            GFP_KERNEL or similar will currently trigger an RCU splat.  Just
            use GFP_ATOMIC unconditionally.  From David Ahern.
      
         4) Fix FD bit timings handling in pcan_usb driver, from Marc
            Kleine-Budde.
      
         5) Cache dst leaked in ip6_gre tunnel removal, fix from Huaibin Wang.
      
         6) Traversal into drivers/net/ethernet/renesas should be triggered by
            CONFIG_NET_VENDOR_RENESAS, not a particular driver's config
            option.  From Kazuya Mizuguchi.
      
         7) Fix regression in handling of igmp_join errors in vxlan, from
            Marcelo Ricardo Leitner.
      
         8) Make phy_{read,write}_mmd_indirect() properly take the mdio_lock
            mutex when programming the registers.  From Russell King.
      
         9) Fix non-forced handling in u32_destroy(), from WANG Cong.
      
        10) Test the EVENT_NO_RUNTIME_PM flag before it is cleared in
            usbnet_stop(), from Eugene Shatokhin.
      
        11) In sfc driver, don't fetch statistics firmware isn't capable of,
            from Bert Kenward.
      
        12) Verify ASCONF address parameter location in SCTP, from Xin Long"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state
        sctp: asconf's process should verify address parameter is in the beginning
        sfc: only use vadaptor stats if firmware is capable
        net: phy: fixed: propagate fixed link values to struct
        usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
        drivers: net: xgene: fix: Oops in linkwatch_fire_event
        cls_u32: complete the check for non-forced case in u32_destroy()
        net: fec: use reinit_completion() in mdio accessor functions
        net: phy: add locking to phy_read_mmd_indirect()/phy_write_mmd_indirect()
        vxlan: re-ignore EADDRINUSE from igmp_join
        net: compile renesas directory if NET_VENDOR_RENESAS is configured
        ip6_gre: release cached dst on tunnel removal
        phylib: Make PHYs children of their MDIO bus, not the bus' parent.
        can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters
        net: Fix RCU splat in af_key
        net: bcmgenet: fix uncleaned dma flags
        net: bcmgenet: Avoid sleeping in bcmgenet_timeout
        netlink: mmap: fix tx type check
      e001d708
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 5c98bcce
      Linus Torvalds authored
      Pull nvdimm fixlet from Dan Williams:
       "This is a libnvdimm ABI fixup.
      
        I pushed back on this change quite hard given the late date, that it
        appears to be purely cosmetic, sysfs is not necessarily meant to be a
        user friendly UI, and the kernel interprets the reversed polarity of
        the ACPI_NFIT_MEM_ARMED flag correctly.  When this flag is set, the
        energy source of an NVDIMM is not armed and any new writes to the DIMM
        may not be preserved.
      
        However, Bob Moore warned me that it is important to get these things
        named correctly wherever they appear otherwise we run the risk of a
        less than cautious firmware engineer implementing the polarity the
        wrong way.  Once a mistake like that escapes into production platforms
        the flag becomes useless and we need to move to a new bit position.
      
        Bob has agreed to take a change through ACPICA to rename
        ACPI_NFIT_MEM_ARMED to ACPI_NFIT_MEM_NOT_ARMED, and the patch below
        from Toshi brings the sysfs representation of these flags in line with
        their respective polarities.
      
        Please pull for 4.2 as this is the first kernel to expose the ACPI
        NFIT sysfs representation, and this is likely a kernel that firmware
        developers will be using for checking out their NVDIMM enabling"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit: Clarify memory device state flags strings
      5c98bcce
    • David S. Miller's avatar
      Merge branch 'iff_no_queue_fixups' · 55f14da6
      David S. Miller authored
      Phil Sutter says:
      
      ====================
      fixup IFF_NO_QUEUE conversion
      
      This series serves two purposes:
      
      On one hand it fixes a quite embarrassing bug around the warning I added for
      drivers still setting tx_queue_len = 0 to achieve noqueue operation. It turned
      out to be quite useless as due to using alloc_netdev(), many in-kernel drivers
      fell into the trap by accident, as well. Instead this place serves pretty well
      as a sanitizing point to set IFF_NO_QUEUE for drivers not initializing
      tx_queue_len, which in turn allows to drop all special treatment of the latter
      being zero since that can not happen anymore without IFF_NO_QUEUE being set.
      
      On the other hand, it provides a better solution for Eric Dumazet's concern
      regarding how to assign noqueue to an interface which does not default to it
      already. In order to make this possible, noqueue is being registered so users
      can 'tc qd add dev eth0 root noqueue'. In addition, it resolves the ugly
      situation of 'tc qd show' not showing noqueue. Finally, the former changes
      allow for some code cleanup.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55f14da6
    • Phil Sutter's avatar
      net: sched: simplify attach_one_default_qdisc() · 3e692f21
      Phil Sutter authored
      Now that noqueue qdisc can be attached just like any other qdisc, no
      special treatment is necessary anymore when attaching it as default
      qdisc.
      
      This change has the added benefit that 'tc qdisc show' prints noqueue
      instead of nothing for devices defaulting to noqueue.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e692f21
    • Phil Sutter's avatar
      net: sched: register noqueue qdisc · d66d6c31
      Phil Sutter authored
      This way users can attach noqueue just like any other qdisc using tc
      without having to mess with tx_queue_len first.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d66d6c31
    • Phil Sutter's avatar
      net: sched: ignore tx_queue_len when assigning default qdisc · db4094bc
      Phil Sutter authored
      Since alloc_netdev_mqs() sets IFF_NO_QUEUE for drivers not initializing
      tx_queue_len, it is safe to assume that if tx_queue_len is zero,
      dev->priv flags always contains IFF_NO_QUEUE.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db4094bc
    • Phil Sutter's avatar
      net: fix IFF_NO_QUEUE for drivers using alloc_netdev · f84bb1ea
      Phil Sutter authored
      Printing a warning in alloc_netdev_mqs() if tx_queue_len is zero and
      IFF_NO_QUEUE not set is not appropriate since drivers may use one of the
      alloc_netdev* macros instead of alloc_etherdev*, thereby not
      intentionally leaving tx_queue_len uninitialized. Instead check here if
      tx_queue_len is zero and set IFF_NO_QUEUE, so the value of tx_queue_len
      can be ignored in net/sched_generic.c.
      
      Fixes: 906470c1 ("net: warn if drivers set tx_queue_len = 0")
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f84bb1ea
    • Jean Sacren's avatar
      sock: fix kernel doc error · 69dba9bb
      Jean Sacren authored
      The symbol '__sk_reclaim' is not present in the current tree. Apparently
      '__sk_reclaim' was meant to be '__sk_mem_reclaim', so fix it with the
      right symbol name for the kernel doc.
      Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
      Cc: Hideo Aoki <haoki@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69dba9bb
    • lucien's avatar
      sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state · f648f807
      lucien authored
      Commit f8d96052 ("sctp: Enforce retransmission limit during shutdown")
      fixed a problem with excessive retransmissions in the SHUTDOWN_PENDING by not
      resetting the association overall_error_count.  This allowed the association
      to better enforce assoc.max_retrans limit.
      
      However, the same issue still exists when the association is in SHUTDOWN_RECEIVED
      state.  In this state, HB-ACKs will continue to reset the overall_error_count
      for the association would extend the lifetime of association unnecessarily.
      
      This patch solves this by resetting the overall_error_count whenever the current
      state is small then SCTP_STATE_SHUTDOWN_PENDING.  As a small side-effect, we
      end up also handling SCTP_STATE_SHUTDOWN_ACK_SENT and SCTP_STATE_SHUTDOWN_SENT
      states, but they are not really impacted because we disable Heartbeats in those
      states.
      
      Fixes: Commit f8d96052 ("sctp: Enforce retransmission limit during shutdown")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f648f807
  2. 27 Aug, 2015 25 commits