1. 01 Jul, 2017 22 commits
  2. 30 Jun, 2017 7 commits
    • David S. Miller's avatar
      Merge branch 'PTP-support-for-macb-driver' · 574a6020
      David S. Miller authored
      Rafal Ozieblo says:
      
      ====================
      PTP support for macb driver
      
      This patch series adds support for PTP synchronization protocol
      in Cadence GEM driver based on PHC.
      
      v2 changes:
      * removed alarm's support
      * removed external time stamp support
      * removed PTP event interrupt handling
      * removed ptp_hw_support flag
      * removed all extra sanity checks
      * removed unnecessary #ifdef
      * fixed coding style and alligment issues
      * renamed macb.c to macb_main.c
      
      v3 changes:
      * added checking NULL ptr from ptp_clock_register()
      * fixed error codes return
      * locals list in "upside down Christmas tree" style
      * fixed some other issues from review
      
      v4 changes:
      * respin to the newest next-next (28 Jun 2017)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      574a6020
    • Rafal Ozieblo's avatar
      net: macb: Add hardware PTP support · ab91f0a9
      Rafal Ozieblo authored
      This patch is based on original Harini's patch and Andrei's patch,
      implemented in a separate file to ease the review/maintanance
      and integration with other platforms.
      
      This driver supports GEM-GXL:
      - Register ptp clock framework
      - Initialize PTP related registers
      - HW time stamp on the PTP Ethernet packets are received using the
        SO_TIMESTAMPING API. Time stamps are obtained from the dma buffer
        descriptors
      - add macb_ptp to compilation chain
      Signed-off-by: default avatarRafal Ozieblo <rafalo@cadence.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab91f0a9
    • Rafal Ozieblo's avatar
      net: macb: macb.c changed to macb_main.c · b83f1527
      Rafal Ozieblo authored
      In case that macb is compiled as a module, macb.c has been renamed to
      macb_main.c to avoid naming confusion in Makefile.
      Signed-off-by: default avatarRafal Ozieblo <rafalo@cadence.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b83f1527
    • Rafal Ozieblo's avatar
      08729fde
    • Rafal Ozieblo's avatar
      net: macb: Add support for PTP timestamps in DMA descriptors · 7b429614
      Rafal Ozieblo authored
      This patch adds support for PTP timestamps in
      DMA buffer descriptors. It checks capability at runtime
      and uses appropriate buffer descriptor.
      Signed-off-by: default avatarRafal Ozieblo <rafalo@cadence.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b429614
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b0791159
      David S. Miller authored
      A set of overlapping changes in macvlan and the rocker
      driver, nothing serious.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0791159
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 52a623bd
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for your net-next
      tree. This batch contains connection tracking updates for the cleanup
      iteration path, patches from Florian Westphal:
      
      X) Skip unconfirmed conntracks in nf_ct_iterate_cleanup_net(), just set
         dying bit to let the CPU release them.
      
      X) Add nf_ct_iterate_destroy() to be used on module removal, to kill
         conntrack from all namespace.
      
      X) Restart iteration on hashtable resizing, since both may occur at
         the same time.
      
      X) Use the new nf_ct_iterate_destroy() to remove conntrack with NAT
         mapping on module removal.
      
      X) Use nf_ct_iterate_destroy() to remove conntrack entries helper
         module removal, from Liping Zhang.
      
      X) Use nf_ct_iterate_cleanup_net() to remove the timeout extension
         if user requests this, also from Liping.
      
      X) Add net_ns_barrier() and use it from FTP helper, so make sure
         no concurrent namespace removal happens at the same time while
         the helper module is being removed.
      
      X) Use NFPROTO_MAX in layer 3 conntrack protocol array, to reduce
         module size. Same thing in nf_tables.
      
      Updates for the nf_tables infrastructure:
      
      X) Prepare usage of the extended ACK reporting infrastructure for
         nf_tables.
      
      X) Remove unnecessary forward declaration in nf_tables hash set.
      
      X) Skip set size estimation if number of element is not specified.
      
      X) Changes to accomodate a (faster) unresizable hash set implementation,
         for anonymous sets and dynamic size fixed sets with no timeouts.
      
      X) Faster lookup function for unresizable hash table for 2 and 4
         bytes key.
      
      And, finally, a bunch of asorted small updates and cleanups:
      
      X) Do not hold reference to netdev from ipt_CLUSTER, instead subscribe
         to device events and look up for index from the packet path, this
         is fixing an issue that is present since the very beginning, patch
         from Xin Long.
      
      X) Use nf_register_net_hook() in ipt_CLUSTER, from Florian Westphal.
      
      X) Use ebt_invalid_target() whenever possible in the ebtables tree,
         from Gao Feng.
      
      X) Calm down compilation warning in nf_dup infrastructure, patch from
         stephen hemminger.
      
      X) Statify functions in nftables rt expression, also from stephen.
      
      X) Update Makefile to use canonical method to specify nf_tables-objs.
         From Jike Song.
      
      X) Use nf_conntrack_helpers_register() in amanda and H323.
      
      X) Space cleanup for ctnetlink, from linzhang.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52a623bd
  3. 29 Jun, 2017 11 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4d8a991d
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Need to access netdev->num_rx_queues behind an accessor in netvsc
          driver otherwise the build breaks with some configs, from Arnd
          Bergmann.
      
       2) Add dummy xfrm_dev_event() so that build doesn't fail when
          CONFIG_XFRM_OFFLOAD is not set. From Hangbin Liu.
      
       3) Don't OOPS when pfkey_msg2xfrm_state() signals an erros, from Dan
          Carpenter.
      
       4) Fix MCDI command size for filter operations in sfc driver, from
          Martin Habets.
      
       5) Fix UFO segmenting so that we don't calculate incorrect checksums,
          from Michal Kubecek.
      
       6) When ipv6 datagram connects fail, reset destination address and
          port. From Wei Wang.
      
       7) TCP disconnect must reset the cached receive DST, from WANG Cong.
      
       8) Fix sign extension bug on 32-bit in dev_get_stats(), from Eric
          Dumazet.
      
       9) fman driver has to depend on HAS_DMA, from Madalin Bucur.
      
      10) Fix bpf pointer leak with xadd in verifier, from Daniel Borkmann.
      
      11) Fix negative page counts with GFO, from Michal Kubecek.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
        sfc: fix attempt to translate invalid filter ID
        net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish()
        bpf: prevent leaking pointer via xadd on unpriviledged
        arcnet: com20020-pci: add missing pdev setup in netdev structure
        arcnet: com20020-pci: fix dev_id calculation
        arcnet: com20020: remove needless base_addr assignment
        Trivial fix to spelling mistake in arc_printk message
        arcnet: change irq handler to lock irqsave
        rocker: move dereference before free
        mlxsw: spectrum_router: Fix NULL pointer dereference
        net: sched: Fix one possible panic when no destroy callback
        virtio-net: serialize tx routine during reset
        net: usb: asix88179_178a: Add support for the Belkin B2B128
        fsl/fman: add dependency on HAS_DMA
        net: prevent sign extension in dev_get_stats()
        tcp: reset sk_rx_dst in tcp_disconnect()
        net: ipv6: reset daddr and dport in sk if connect() fails
        bnx2x: Don't log mc removal needlessly
        bnxt_en: Fix netpoll handling.
        bnxt_en: Add missing logic to handle TPA end error conditions.
        ...
      4d8a991d
    • Linus Torvalds's avatar
      Merge tag 'for-4.12/dm-fixes-5' of... · 27bc3440
      Linus Torvalds authored
      Merge tag 'for-4.12/dm-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - dm thinp fix for crash that will occur when metadata device failure
         races with discard passdown to the underlying data device.
      
       - dm raid fix to not access the superblock's >= 1.9.0 'sectors' member
         unconditionally.
      
      * tag 'for-4.12/dm-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm thin: do not queue freed thin mapping for next stage processing
        dm raid: fix oops on upgrading to extended superblock format
      27bc3440
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 374bf883
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Two fixes that should go into this release.
      
        One is an nvme regression fix from Keith, fixing a missing queue
        freeze if the controller is being reset. This causes the reset to
        hang.
      
        The other is a fix for a leak of the bio protection info, if smaller
        sized O_DIRECT is used. This fix should be more involved as we have
        other problematic paths in the kernel, but given as this isn't a
        regression in this series, we'll tackle those for 4.13"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: provide bio_uninit() free freeing integrity/task associations
        nvme/pci: Fix stuck nvme reset
      374bf883
    • Edward Cree's avatar
      sfc: fix attempt to translate invalid filter ID · d58299a4
      Edward Cree authored
      When filter insertion fails with no rollback, we were trying to convert
       EFX_EF10_FILTER_ID_INVALID to an id to store in 'ids' (which is either
       vlan->uc or vlan->mc).  This would WARN_ON_ONCE and then record a bogus
       filter ID of 0x1fff, neither of which is a good thing.
      
      Fixes: 0ccb998b ("sfc: fix filter_id misinterpretation in edge case")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d58299a4
    • David S. Miller's avatar
      Merge branch 'mlx4-dynamic-tc-tx-queues' · fcce2fdb
      David S. Miller authored
      Tariq Toukan says:
      
      ====================
      mlx4_en dynamic TC tx queues
      
      This patchset from Inbar aligns the number of TX queues
      to the actual need, according to the TC configuration.
      
      Series generated against net-next commit:
      2ee87db3 Merge branch 'nfp-get_phys_port_name-for-representors-and-SR-IOV-reorder'
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcce2fdb
    • Inbar Karmy's avatar
      net/mlx4_en: Do not allocate redundant TX queues when TC is disabled · ec327f7a
      Inbar Karmy authored
      Currently the number of TX queues that are allocated doesn't depend
      on the number of TCs, the module always loads with max num of UP
      per channel.
      In order to prevent the allocation of unnecessary memory, the
      module will load with minimum number of UPs per channel, and the
      user will be able to control the number of TX queues per channel
      by changing the number of TC to 8 using the tc command.
      The variable num_up will hold the information about the current
      number of UPs.
      Due to the change, needed to remove the lines that set the value of
      UP to be different than zero in the func "mlx4_en_select_queue",
      since now the num of TX queues that are allocated is only one per channel
      in default.
      In order not to force the UP to be zero in case of only one TC, added
      a condition before forcing it in the func "mlx4_en_fill_qp_context".
      
      Tested:
      After the module is loaded with minimum number of UP per channel, to
      increase num of TCs to 8, use:
      tc qdisc add dev ens8 root mqprio num_tc 8
      In order to decrease the number of TCs to minimum number of UP per channel,
      use:
      tc qdisc del dev ens8 root
      Signed-off-by: default avatarInbar Karmy <inbark@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Cc: Tarick Bedeir <tarick@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec327f7a
    • Inbar Karmy's avatar
      net/mlx4_en: Add dynamic variable to hold the number of user priorities (UP) · f21ad614
      Inbar Karmy authored
      Until this patch, the number of UPs was hard coded for eight.
      Replace this with a variable in struct "mlx4_en_port_profile".
      Currently, the variable will hold the maximum number of UP,
      as before.
      The patch creates an infrastructure to add an option for dynamic
      change of the actual number of TCs.
      Signed-off-by: default avatarInbar Karmy <inbark@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Cc: Tarick Bedeir <tarick@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f21ad614
    • Michal Kubeček's avatar
      net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish() · e44699d2
      Michal Kubeček authored
      Recently I started seeing warnings about pages with refcount -1. The
      problem was traced to packets being reused after their head was merged into
      a GRO packet by skb_gro_receive(). While bisecting the issue pointed to
      commit c21b48cc ("net: adjust skb->truesize in ___pskb_trim()") and
      I have never seen it on a kernel with it reverted, I believe the real
      problem appeared earlier when the option to merge head frag in GRO was
      implemented.
      
      Handling NAPI_GRO_FREE_STOLEN_HEAD state was only added to GRO_MERGED_FREE
      branch of napi_skb_finish() so that if the driver uses napi_gro_frags()
      and head is merged (which in my case happens after the skb_condense()
      call added by the commit mentioned above), the skb is reused including the
      head that has been merged. As a result, we release the page reference
      twice and eventually end up with negative page refcount.
      
      To fix the problem, handle NAPI_GRO_FREE_STOLEN_HEAD in napi_frags_finish()
      the same way it's done in napi_skb_finish().
      
      Fixes: d7e8883c ("net: make GRO aware of skb->head_frag")
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e44699d2
    • Arvind Yadav's avatar
      net: bridge: constify attribute_group structures. · cddbb79f
      Arvind Yadav authored
      attribute_groups are not supposed to change at runtime. All functions
      working with attribute_groups provided by <linux/sysfs.h> work with const
      attribute_group. So mark the non-const structs as const.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         2645	    896	      0	   3541	    dd5	net/bridge/br_sysfs_br.o
      
      File size After adding 'const':
         text	   data	    bss	    dec	    hex	filename
         2701	    832	      0	   3533	    dcd	net/bridge/br_sysfs_br.o
      Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cddbb79f
    • Arvind Yadav's avatar
      net: constify attribute_group structures. · 38ef00cc
      Arvind Yadav authored
      attribute_groups are not supposed to change at runtime. All functions
      working with attribute_groups provided by <linux/device.h> work with const
      attribute_group. So mark the non-const structs as const.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         9968	   3168	     16	  13152	   3360	net/core/net-sysfs.o
      
      File size After adding 'const':
         text	   data	    bss	    dec	    hex	filename
        10160	   2976	     16	  13152	   3360	net/core/net-sysfs.o
      Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38ef00cc
    • Arvind Yadav's avatar
      net: freescale: gianfar : constify dev_pm_ops structures. · ee27244b
      Arvind Yadav authored
      dev_pm_ops are not supposed to change at runtime. All functions
      working with dev_pm_ops provided by <linux/device.h> work with const
      dev_pm_ops. So mark the non-const structs as const.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
        19057	    392	      0	  19449	   4bf9	drivers/net/ethernet/freescale/gianfar.o
      
      File size After adding 'const':
         text	   data	    bss	    dec	    hex	filename
        19249	    192	      0	  19441	   4bf1	drivers/net/ethernet/freescale/gianfar.o
      Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee27244b