1. 19 Jun, 2019 3 commits
  2. 18 Jun, 2019 24 commits
  3. 17 Jun, 2019 13 commits
    • David S. Miller's avatar
      Merge branch 'UDP-GSO-audit-tests' · f97252a8
      David S. Miller authored
      Fred Klassen says:
      
      ====================
      UDP GSO audit tests
      
      Updates to UDP GSO selftests ot optionally stress test CMSG
      subsytem, and report the reliability and performance of both
      TX Timestamping and ZEROCOPY messages.
      ====================
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f97252a8
    • Fred Klassen's avatar
      net/udpgso_bench.sh test fails on error · 4ffc37f5
      Fred Klassen authored
      Ensure that failure on any individual test results in an overall
      failure of the test script.
      Signed-off-by: default avatarFred Klassen <fklassen@appneta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ffc37f5
    • Fred Klassen's avatar
      net/udpgso_bench.sh add UDP GSO audit tests · ade90d69
      Fred Klassen authored
      Audit tests count the total number of messages sent and compares
      with total number of CMSG received on error queue. Example:
      
          udp gso zerocopy timestamp audit
          udp rx:   1599 MB/s  1166414 calls/s
          udp tx:   1615 MB/s    27395 calls/s  27395 msg/s
          udp rx:   1634 MB/s  1192261 calls/s
          udp tx:   1633 MB/s    27699 calls/s  27699 msg/s
          udp rx:   1633 MB/s  1191358 calls/s
          udp tx:   1631 MB/s    27678 calls/s  27678 msg/s
          Summary over 4.000 seconds...
          sum udp tx:   1665 MB/s      82772 calls (27590/s)      82772 msgs (27590/s)
          Tx Timestamps:               82772 received                 0 errors
          Zerocopy acks:               82772 received
      
      Errors are thrown if CMSG count does not equal send count,
      example:
      
          Summary over 4.000 seconds...
          sum tcp tx:   7451 MB/s     493706 calls (123426/s)     493706 msgs (123426/s)
          ./udpgso_bench_tx: Unexpected number of Zerocopy completions:    493706 expected    493704 received
      
      Also reduce individual test time from 4 to 3 seconds so that
      overall test time does not increase significantly.
      
      v3: Enhancements as per Willem de Bruijn <willemb@google.com>
          - document -P option for TCP audit
      Signed-off-by: default avatarFred Klassen <fklassen@appneta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ade90d69
    • Fred Klassen's avatar
      net/udpgso_bench_tx: options to exercise TX CMSG · 79ebc3c2
      Fred Klassen authored
      This enhancement adds options that facilitate load testing with
      additional TX CMSG options, and to optionally print results of
      various send CMSG operations.
      
      These options are especially useful in isolating situations
      where error-queue messages are lost when combined with other
      CMSG operations (e.g. SO_ZEROCOPY).
      
      New options:
          -a - count all CMSG messages and match to sent messages
          -T - add TX CMSG that requests TX software timestamps
          -H - similar to -T except request TX hardware timestamps
          -P - call poll() before reading error queue
          -v - print detailed results
      
      v2: Enhancements as per Willem de Bruijn <willemb@google.com>
          - Updated control and buffer parameters for recvmsg
          - poll() parameter cleanup
          - fail on bad audit results
          - remove TOS options
          - improved reporting
      
      v3: Enhancements as per Willem de Bruijn <willemb@google.com>
          - add SOF_TIMESTAMPING_OPT_TSONLY to eliminate MSG_TRUNC
          - general code cleanup
      Signed-off-by: default avatarFred Klassen <fklassen@appneta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79ebc3c2
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 29f785ff
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "MS_MOVE regression fix + breakage in fsmount(2) (also introduced in
        this cycle, along with fsmount(2) itself).
      
        I'm still digging through the piles of mail, so there might be more
        fixes to follow, but these two are obvious and self-contained, so
        there's no point delaying those..."
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs/namespace: fix unprivileged mount propagation
        vfs: fsmount: add missing mntget()
      29f785ff
    • David S. Miller's avatar
      Merge branch 'net-ipv4-remove-erroneous-advancement-of-list-pointer' · 4bd366ce
      David S. Miller authored
      Florian Westphal says:
      
      ====================
      net: ipv4: remove erroneous advancement of list pointer
      
      Tariq reported a soft lockup on net-next that Mellanox was able to
      bisect to 2638eb8b ("net: ipv4: provide __rcu annotation for ifa_list").
      
      While reviewing above patch I found a regression when addresses have a
      lifetime specified.
      
      Second patch extends rtnetlink.sh to trigger crash
      (without first patch applied).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4bd366ce
    • Florian Westphal's avatar
      selftests: rtnetlink: add addresses with fixed life time · 3cfa1488
      Florian Westphal authored
      This exercises kernel code path that deal with addresses that have
      a limited lifetime.
      
      Without previous fix, this triggers following crash on net-next:
       BUG: KASAN: null-ptr-deref in check_lifetime+0x403/0x670
       Read of size 8 at addr 0000000000000010 by task kworker [..]
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3cfa1488
    • Florian Westphal's avatar
      net: ipv4: remove erroneous advancement of list pointer · 40008e92
      Florian Westphal authored
      Causes crash when lifetime expires on an adress as garbage is
      dereferenced soon after.
      
      This used to look like this:
      
       for (ifap = &ifa->ifa_dev->ifa_list;
            *ifap != NULL; ifap = &(*ifap)->ifa_next) {
                if (*ifap == ifa) ...
      
      but this was changed to:
      
      struct in_ifaddr *tmp;
      
      ifap = &ifa->ifa_dev->ifa_list;
      tmp = rtnl_dereference(*ifap);
      while (tmp) {
         tmp = rtnl_dereference(tmp->ifa_next); // Bogus
         if (rtnl_dereference(*ifap) == ifa) {
           ...
         ifap = &tmp->ifa_next;		// Can be NULL
         tmp = rtnl_dereference(*ifap);	// Dereference
         }
      }
      
      Remove the bogus assigment/list entry skip.
      
      Fixes: 2638eb8b ("net: ipv4: provide __rcu annotation for ifa_list")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40008e92
    • Arnd Bergmann's avatar
      net: dsa: sja1105: fix ptp link error · 78fe8a28
      Arnd Bergmann authored
      Due to a reversed dependency, it is possible to build
      the lower ptp driver as a loadable module and the actual
      driver using it as built-in, causing a link error:
      
      drivers/net/dsa/sja1105/sja1105_spi.o: In function `sja1105_static_config_upload':
      sja1105_spi.c:(.text+0x6f0): undefined reference to `sja1105_ptp_reset'
      drivers/net/dsa/sja1105/sja1105_spi.o:(.data+0x2d4): undefined reference to `sja1105et_ptp_cmd'
      drivers/net/dsa/sja1105/sja1105_spi.o:(.data+0x604): undefined reference to `sja1105pqrs_ptp_cmd'
      drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_remove':
      sja1105_main.c:(.text+0x8d4): undefined reference to `sja1105_ptp_clock_unregister'
      drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_rxtstamp_work':
      sja1105_main.c:(.text+0x964): undefined reference to `sja1105_tstamp_reconstruct'
      drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_setup':
      sja1105_main.c:(.text+0xb7c): undefined reference to `sja1105_ptp_clock_register'
      drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_port_deferred_xmit':
      sja1105_main.c:(.text+0x1fa0): undefined reference to `sja1105_ptpegr_ts_poll'
      sja1105_main.c:(.text+0x1fc4): undefined reference to `sja1105_tstamp_reconstruct'
      drivers/net/dsa/sja1105/sja1105_main.o:(.rodata+0x5b0): undefined reference to `sja1105_get_ts_info'
      
      Change the Makefile logic to always build the ptp module
      the same way as the rest. Another option would be to
      just add it to the same module and remove the exports,
      but I don't know if there was a good reason to keep them
      separate.
      
      Fixes: bb77f36a ("net: dsa: sja1105: Add support for the PTP clock")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78fe8a28
    • Arnd Bergmann's avatar
      net: stmmac: fix unused-variable warning · c63d1e5c
      Arnd Bergmann authored
      When building without CONFIG_OF, we get a harmless build warning:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_phy_setup':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:973:22: error: unused variable 'node' [-Werror=unused-variable]
        struct device_node *node = priv->plat->phy_node;
      
      Reword it so we always use the local variable, by making it the
      fwnode pointer instead of the device_node.
      
      Fixes: 74371272 ("net: stmmac: Convert to phylink and remove phylib logic")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c63d1e5c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · da0f3820
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Lots of bug fixes here:
      
         1) Out of bounds access in __bpf_skc_lookup, from Lorenz Bauer.
      
         2) Fix rate reporting in cfg80211_calculate_bitrate_he(), from John
            Crispin.
      
         3) Use after free in psock backlog workqueue, from John Fastabend.
      
         4) Fix source port matching in fdb peer flow rule of mlx5, from Raed
            Salem.
      
         5) Use atomic_inc_not_zero() in fl6_sock_lookup(), from Eric Dumazet.
      
         6) Network header needs to be set for packet redirect in nfp, from
            John Hurley.
      
         7) Fix udp zerocopy refcnt, from Willem de Bruijn.
      
         8) Don't assume linear buffers in vxlan and geneve error handlers,
            from Stefano Brivio.
      
         9) Fix TOS matching in mlxsw, from Jiri Pirko.
      
        10) More SCTP cookie memory leak fixes, from Neil Horman.
      
        11) Fix VLAN filtering in rtl8366, from Linus Walluij.
      
        12) Various TCP SACK payload size and fragmentation memory limit fixes
            from Eric Dumazet.
      
        13) Use after free in pneigh_get_next(), also from Eric Dumazet.
      
        14) LAPB control block leak fix from Jeremy Sowden"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (145 commits)
        lapb: fixed leak of control-blocks.
        tipc: purge deferredq list for each grp member in tipc_group_delete
        ax25: fix inconsistent lock state in ax25_destroy_timer
        neigh: fix use-after-free read in pneigh_get_next
        tcp: fix compile error if !CONFIG_SYSCTL
        hv_sock: Suppress bogus "may be used uninitialized" warnings
        be2net: Fix number of Rx queues used for flow hashing
        net: handle 802.1P vlan 0 packets properly
        tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
        tcp: add tcp_min_snd_mss sysctl
        tcp: tcp_fragment() should apply sane memory limits
        tcp: limit payload size of sacked skbs
        Revert "net: phylink: set the autoneg state in phylink_phy_change"
        bpf: fix nested bpf tracepoints with per-cpu data
        bpf: Fix out of bounds memory access in bpf_sk_storage
        vsock/virtio: set SOCK_DONE on peer shutdown
        net: dsa: rtl8366: Fix up VLAN filtering
        net: phylink: set the autoneg state in phylink_phy_change
        net: add high_order_alloc_disable sysctl/static key
        tcp: add tcp_tx_skb_cache sysctl
        ...
      da0f3820
    • Mitch Williams's avatar
      iavf: allow null RX descriptors · efa14c39
      Mitch Williams authored
      In some circumstances, the hardware can hand us a null receive
      descriptor, with no data attached but otherwise valid. Unfortunately,
      the driver was ill-equipped to handle such an event, and would stop
      processing packets at that point.
      
      To fix this, use the Descriptor Done bit instead of the size to
      determine whether or not a descriptor is ready to be processed. Add some
      checks to allow for unused buffers.
      Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      efa14c39
    • Paul Greenwalt's avatar
      iavf: add call to iavf_[add|del]_cloud_filter · 68dfe634
      Paul Greenwalt authored
      Add call to iavf_add_cloud_filter and iavf_del_cloud_filter from
      iavf_process_aq_command to clear aq_required
      IAVF_FLAG_AQ_ADD_CLOUD_FILTER and IAVF_FLAG_AQ_DEL_CLOUD_FILTER bits.
      
      aq_required IAVF_FLAG_AQ_DEL_CLOUD_FILTER bit is being set in
      iavf_down and iavf_delete_clsflower, and are never cleared.
      
      aq_required IAVF_FLAG_AQ_ADD_CLOUD_FILTER bit is being set in
      iavf_handle_reset and iavf_configure_clsflower, and are never
      cleared.
      
      Since the aq_required is not zero, iavf_watchdog_task is setting the
      queue_delayed_work to 20 msec instead of the longer delay.
      Signed-off-by: default avatarPaul Greenwalt <paul.greenwalt@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      68dfe634