1. 27 12月, 2017 22 次提交
  2. 23 12月, 2017 1 次提交
  3. 22 12月, 2017 17 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ead68f21
      Linus Torvalds 提交于
      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
    • D
      Merge branch 'flow_dissector-Provide-basic-batman-adv-unicast-handling' · 0a80f0c2
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      0a80f0c2
    • S
      flow_dissector: Parse batman-adv unicast headers · 5b0890a9
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b0890a9
    • S
      batman-adv: Convert packet.h to uapi header · fec149f5
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fec149f5
    • S
      batman-adv: Remove kernel fixed width types in packet.h · adbf9b73
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      adbf9b73
    • S
      batman-adv: Remove usage of BIT(x) in packet.h · a6cb82b5
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6cb82b5
    • S
      batman-adv: Let packet.h include its headers directly · 4e58452b
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e58452b
    • D
      Merge branch 'sfc-Medford2' · a0e2e75a
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      a0e2e75a
    • B
      sfc: expose CTPIO stats on NICs that support them · 2c0b6ee8
      Bert Kenward 提交于
      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: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c0b6ee8
    • E
      sfc: expose FEC stats on Medford2 · f411b54d
      Edward Cree 提交于
      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: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f411b54d
    • E
      sfc: support variable number of MAC stats · c1be4821
      Edward Cree 提交于
      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: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1be4821
    • E
      sfc: update MCDI protocol headers · d31a5966
      Edward Cree 提交于
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d31a5966
    • G
      cxgb4: add new T5 and T6 device id's · 6baa13df
      Ganesh Goudar 提交于
      Add device id's 0x50ac, 0x6087 for T5 and T6 cards
      respectively.
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6baa13df
    • J
      net: dwc-xlgmac: Get rid of custom hex_dump_to_buffer() · 42afa0f8
      Jie Deng 提交于
      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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NJie Deng <jiedeng@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42afa0f8
    • R
      phylink: avoid attaching more than one PHY · fe1c3ef2
      Russell King 提交于
      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: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe1c3ef2
    • D
      Merge branch 'net-zerocopy-fixes' · c50b7c47
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ===================
      Mellanox, mlx5 fixes 2017-12-19
      
      The follwoing series includes some fixes for mlx5 core and etherent
      driver.
      
      Please pull and let me know if there is any problem.
      
      This series doesn't introduce any conflict with the ongoing mlx5 for-next
      submission.
      
      For -stable:
      
      kernels >= v4.7.y
          ("net/mlx5e: Fix possible deadlock of VXLAN lock")
          ("net/mlx5e: Add refcount to VXLAN structure")
          ("net/mlx5e: Prevent possible races in VXLAN control flow")
          ("net/mlx5e: Fix features check of IPv6 traffic")
      
      kernels >= v4.9.y
          ("net/mlx5: Fix error flow in CREATE_QP command")
          ("net/mlx5: Fix rate limit packet pacing naming and struct")
      
      kernels >= v4.13.y
          ("net/mlx5: FPGA, return -EINVAL if size is zero")
      
      kernels >= v4.14.y
          ("Revert "mlx5: move affinity hints assignments to generic code")
      
      All above patches apply and compile with no issues on corresponding -stable.
      ===================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c50b7c47
    • W
      skbuff: skb_copy_ubufs must release uarg even without user frags · b90ddd56
      Willem de Bruijn 提交于
      skb_copy_ubufs creates a private copy of frags[] to release its hold
      on user frags, then calls uarg->callback to notify the owner.
      
      Call uarg->callback even when no frags exist. This edge case can
      happen when zerocopy_sg_from_iter finds enough room in skb_headlen
      to copy all the data.
      
      Fixes: 3ece7826 ("sock: skb_copy_ubufs support for compound pages")
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b90ddd56