1. 27 Dec, 2017 16 commits
  2. 26 Dec, 2017 8 commits
  3. 22 Dec, 2017 1 commit
  4. 21 Dec, 2017 15 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ead68f21
      Linus Torvalds authored
      Pull networking fixes from David Miller"
       "What's a holiday weekend without some networking bug fixes? [1]
      
         1) Fix some eBPF JIT bugs wrt. SKB pointers across helper function
            calls, from Daniel Borkmann.
      
         2) Fix regression from errata limiting change to marvell PHY driver,
            from Zhao Qiang.
      
         3) Fix u16 overflow in SCTP, from Xin Long.
      
         4) Fix potential memory leak during bridge newlink, from Nikolay
            Aleksandrov.
      
         5) Fix BPF selftest build on s390, from Hendrik Brueckner.
      
         6) Don't append to cfg80211 automatically generated certs file,
            always write new ones from scratch. From Thierry Reding.
      
         7) Fix sleep in atomic in mac80211 hwsim, from Jia-Ju Bai.
      
         8) Fix hang on tg3 MTU change with certain chips, from Brian King.
      
         9) Add stall detection to arc emac driver and reset chip when this
            happens, from Alexander Kochetkov.
      
        10) Fix MTU limitng in GRE tunnel drivers, from Xin Long.
      
        11) Fix stmmac timestamping bug due to mis-shifting of field. From
            Fredrik Hallenberg.
      
        12) Fix metrics match when deleting an ipv4 route. The kernel sets
            some internal metrics bits which the user isn't going to set when
            it makes the delete request. From Phil Sutter.
      
        13) mvneta driver loop over RX queues limits on "txq_number" :-) Fix
            from Yelena Krivosheev.
      
        14) Fix double free and memory corruption in get_net_ns_by_id, from
            Eric W. Biederman.
      
        15) Flush ipv4 FIB tables in the reverse order. Some tables can share
            their actual backing data, in particular this happens for the MAIN
            and LOCAL tables. We have to kill the LOCAL table first, because
            it uses MAIN's backing memory. Fix from Ido Schimmel.
      
        16) Several eBPF verifier value tracking fixes, from Edward Cree, Jann
            Horn, and Alexei Starovoitov.
      
        17) Make changes to ipv6 autoflowlabel sysctl really propagate to
            sockets, unless the socket has set the per-socket value
            explicitly. From Shaohua Li.
      
        18) Fix leaks and double callback invocations of zerocopy SKBs, from
            Willem de Bruijn"
      
      [1] Is this a trick question? "Relaxing"? "Quiet"? "Fine"? - Linus.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits)
        skbuff: skb_copy_ubufs must release uarg even without user frags
        skbuff: orphan frags before zerocopy clone
        net: reevalulate autoflowlabel setting after sysctl setting
        openvswitch: Fix pop_vlan action for double tagged frames
        ipv6: Honor specified parameters in fibmatch lookup
        bpf: do not allow root to mangle valid pointers
        selftests/bpf: add tests for recent bugfixes
        bpf: fix integer overflows
        bpf: don't prune branches when a scalar is replaced with a pointer
        bpf: force strict alignment checks for stack pointers
        bpf: fix missing error return in check_stack_boundary()
        bpf: fix 32-bit ALU op verification
        bpf: fix incorrect tracking of register size truncation
        bpf: fix incorrect sign extension in check_alu_op()
        bpf/verifier: fix bounds calculation on BPF_RSH
        ipv4: Fix use-after-free when flushing FIB tables
        s390/qeth: fix error handling in checksum cmd callback
        tipc: remove joining group member from congested list
        selftests: net: Adding config fragment CONFIG_NUMA=y
        nfp: bpf: keep track of the offloaded program
        ...
      ead68f21
    • David S. Miller's avatar
      Merge branch 'flow_dissector-Provide-basic-batman-adv-unicast-handling' · 0a80f0c2
      David S. Miller authored
      Sven Eckelmann says:
      
      ====================
      flow_dissector: Provide basic batman-adv unicast handling
      
      we are currently starting to use batman-adv as mesh protocol on multicore
      embedded devices. These usually don't have a lot of CPU power per core but
      are reasonable fast when using multiple cores.
      
      It was noticed that sending was working very well but receiving was
      basically only using on CPU core per neighbor. The reason for that is
      format of the (normal) incoming packet:
      
        +--------------------+
        | ip(v6)hdr          |
        +--------------------+
        | inner ethhdr       |
        +--------------------+
        | batadv unicast hdr |
        +--------------------+
        | outer ethhdr       |
        +--------------------+
      
      The flow dissector will therefore stop after parsing the outer ethernet
      header and will not parse the actual ipv(4|6)/... header of the packet. Our
      assumption was now that it would help us to add minimal support to the flow
      dissector to jump over the batman-adv unicast and inner ethernet header
      (like in gre ETH_P_TEB). The patch was implemented in a slightly hacky
      way [1] and the results looked quite promising.
      
      I didn't get any feedback how the files should actually be named. So I am
      now just using the names from RFC v3
      
      The discussion of the RFC v3 can be found in the related patches of
      https://patchwork.ozlabs.org/cover/849345/
      
      The discussion of the RFC v2 can be found in the related patches of
      https://patchwork.ozlabs.org/cover/844783/
      
      Changes in v4:
      ==============
      
      * added  patch to change the u8/u16 to __u8/__u16 in
        include/uapi/linux/batadv_packet.h
        - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com>
      
      Changes in v3:
      ==============
      
      * removed change of uapi/linux/batman_adv.h to uapi/linux/batadv_genl.h
        - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com>
      * removed naming fixes for enums/defines in uapi/linux/batadv_genl.h
        - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com>
      * renamed uapi/linux/batadv.h to uapi/linux/batadv_packet.h
      * moved batadv dissector functionality in own function
        - requested by Tom Herbert <tom@herbertland.com>
      * added support for flags FLOW_DISSECTOR_F_STOP_AT_ENCAP and
        FLOW_DIS_ENCAPSULATION
        - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com>
      
      Changes in v2:
      ==============
      
      * removed the batman-adv unicast packet header definition from flow_dissector.c
      * moved the batman-adv packet.h/uapi headers around to provide the correct
        definitions to flow_dissector.c
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a80f0c2
    • Sven Eckelmann's avatar
      flow_dissector: Parse batman-adv unicast headers · 5b0890a9
      Sven Eckelmann authored
      The batman-adv unicast packets contain a full layer 2 frame in encapsulated
      form. The flow dissector must therefore be able to parse the batman-adv
      unicast header to reach the layer 2+3 information.
      
        +--------------------+
        | ip(v6)hdr          |
        +--------------------+
        | inner ethhdr       |
        +--------------------+
        | batadv unicast hdr |
        +--------------------+
        | outer ethhdr       |
        +--------------------+
      
      The obtained information from the upper layer can then be used by RPS to
      schedule the processing on separate cores. This allows better distribution
      of multiple flows from the same neighbor to different cores.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b0890a9
    • Sven Eckelmann's avatar
      batman-adv: Convert packet.h to uapi header · fec149f5
      Sven Eckelmann authored
      The header file is used by different userspace programs to inject packets
      or to decode sniffed packets. It should therefore be available to them as
      userspace header.
      
      Also other components in the kernel (like the flow dissector) require
      access to the packet definitions to be able to decode ETH_P_BATMAN ethernet
      packets.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fec149f5
    • Sven Eckelmann's avatar
      batman-adv: Remove kernel fixed width types in packet.h · adbf9b73
      Sven Eckelmann authored
      The uapi headers use the __u8/__u16/... version of the fixed width types
      instead of u8/u16/... The use of the latter must be avoided before
      packet.h is copied to include/uapi/linux/.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adbf9b73
    • Sven Eckelmann's avatar
      batman-adv: Remove usage of BIT(x) in packet.h · a6cb82b5
      Sven Eckelmann authored
      The BIT(x) macro is no longer available for uapi headers because it is
      defined outside of it (linux/bitops.h). The use of it must therefore be
      avoided and replaced by an appropriate other representation.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6cb82b5
    • Sven Eckelmann's avatar
      batman-adv: Let packet.h include its headers directly · 4e58452b
      Sven Eckelmann authored
      The headers used by packet.h should also be included by it directly. main.h
      is currently dealing with it in batman-adv, but this will no longer work
      when this header is moved to include/uapi/linux/.
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e58452b
    • David S. Miller's avatar
      Merge branch 'sfc-Medford2' · a0e2e75a
      David S. Miller authored
      Bert Kenward says:
      
      ====================
      sfc: support extra stats on Medford2
      
      X2000-series NICs add port stats for two new features: FEC (Forward Error
       Correction, used on 25G links) and CTPIO (cut-through programmed I/O).
      This patch series adds support for reporting both of these sets of stats
      
      v2: add additional Signed-off-by
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0e2e75a
    • Bert Kenward's avatar
      sfc: expose CTPIO stats on NICs that support them · 2c0b6ee8
      Bert Kenward authored
      While the Linux driver doesn't use CTPIO ('cut-through programmed I/O'),
       other drivers on the same port might, so if we're responsible for
       reporting per-port stats we need to include the CTPIO stats.
      Signed-off-by: default avatarBert Kenward <bkenward@solarflare.com>
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c0b6ee8
    • Edward Cree's avatar
      sfc: expose FEC stats on Medford2 · f411b54d
      Edward Cree authored
      There's no explicit capability bit, so we just condition them on having
       efx->num_mac_stats >= MC_CMD_MAC_NSTATS_V2.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarBert Kenward <bkenward@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f411b54d
    • Edward Cree's avatar
      sfc: support variable number of MAC stats · c1be4821
      Edward Cree authored
      Medford2 NICs support more than MC_CMD_MAC_NSTATS stats, and report the new
       count in a field of MC_CMD_GET_CAPABILITIES_V4.  This also means that the
       end generation count moves (it is, as before, the last 64 bits of the DMA
       buffer, but that is no longer MC_CMD_MAC_GENERATION_END).
      So read num_mac_stats from the GET_CAPABILITIES response, if present;
       otherwise assume MC_CMD_MAC_NSTATS; and always use num_mac_stats - 1 rather
       than MC_CMD_MAC_GENERATION_END.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarBert Kenward <bkenward@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1be4821
    • Edward Cree's avatar
      d31a5966
    • Ganesh Goudar's avatar
      cxgb4: add new T5 and T6 device id's · 6baa13df
      Ganesh Goudar authored
      Add device id's 0x50ac, 0x6087 for T5 and T6 cards
      respectively.
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6baa13df
    • Jie Deng's avatar
      net: dwc-xlgmac: Get rid of custom hex_dump_to_buffer() · 42afa0f8
      Jie Deng authored
      Get rid of custom hex_dump_to_buffer().
      
      The output is slightly changed, i.e. each byte followed by white space.
      
      Note, we don't use print_hex_dump() here since the original code uses
      nedev_dbg().
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarJie Deng <jiedeng@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42afa0f8
    • Russell King's avatar
      phylink: avoid attaching more than one PHY · fe1c3ef2
      Russell King authored
      Attaching more than one PHY to phylink is bad news, as we store a
      pointer to the PHY in a single location. Error out if more than one
      PHY is attempted to be attached.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe1c3ef2