1. Aug 20, 2016
  2. Aug 19, 2016
    • David S. Miller's avatar
      Merge branch 'cxgb-crypto' · 363dc396
      David S. Miller authored
      
      
      Hariprasad Shenai says:
      
      ====================
      crypto/chcr: Add support for Chelsio Crypto Driver
      
      This patch series adds support for Chelsio Crypto driver.
      
      The patch series has been created against net-next tree and includes
      patches for Chelsio Low Level Driver(cxgb4) and adds the new crypto
      Upper Layer Driver(chcr) under a new directory drivers/crypto/chelsio.
      
      Patch 1/4 ("cxgb4: Add support for dynamic allocation of resources for
      ULD") adds support for dynamic allocation of resources for ULD. The
      objective of this patch is to provide generic interface for upper layer
      drivers to allocate and initialize hardware resources.
      
      The present cxgb4 (network driver) apart from network functionality, also
      initializes hardware and thus acts as lower layer driver for other drivers
      to use hardware resources. Thus it acts as both a Low level driver for
      Upper layer driver's like iw_cxgb4, cxgb4i and cxgb4it and a Network Driver.
      
      Right now the allocation of resources for Upper layer driver's is done
      statically. Patch 1/4 adds a new infrastructure for dynamic allocation of
      resources. cxgb4 will read the hardware capability through firmware and
      allocate/free the queues for Upper layer drivers when the respective
      driver's are loaded and freed when unloaded.
      
      Patch 2/3, 3/4 and 4/4 adds support for Chelsio Crypto Driver. The Crypto
      driver will act as another ULD on top of cxgb4.
      
      In this patch series, the ULD API framework is used only by crypto and other
      ULD's will make use of it in the next series.
      
      This patch series is only for review, if this looks ok we will test it
      thoroughly and send request for merge.
      
      We have included all the maintainers of respective drivers. Kindly
      review the changes and provide feedback on the same.
      
      V3: - Removed crypto queues from cxgb4 and added support for dynamic
            allocation of resources for Upper layer drivers
          - Dependency fix in Kconfig.
      
      V2: - Some residual code cleanup
          - Adds pr_fmt with chcr (KBUILD_MODNAME) added
          - Changes var name to accomodate them <80 columns in the chcr_register_alg
          - Support for printing the crypto queue stats
          - Fix compile warnings reported by kbuild bot for certain architectures
          - Dependency fix in Kconfig.
          - If the request has the MAY_BACKLOG bit set and hardware queue is
            full the request is queued up else -EBUSY is returned to throttle
            the user. The queue when executed and processed returns -EINPROGRESS
            in completion.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      363dc396
    • Hariprasad Shenai's avatar
      crypto: Added Chelsio Menu to the Kconfig file · 02038fd6
      Hariprasad Shenai authored
      
      
      Adds the config entry for the Chelsio Crypto Driver, Makefile changes
      for the same.
      
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02038fd6
    • Hariprasad Shenai's avatar
      chcr: Support for Chelsio's Crypto Hardware · 324429d7
      Hariprasad Shenai authored
      
      
      The Chelsio's Crypto Hardware can perform the following operations:
      SHA1, SHA224, SHA256, SHA384 and SHA512, HMAC(SHA1), HMAC(SHA224),
      HMAC(SHA256), HMAC(SHA384), HAMC(SHA512), AES-128-CBC, AES-192-CBC,
      AES-256-CBC, AES-128-XTS, AES-256-XTS
      
      This patch implements the driver for above mentioned features. This
      driver is an Upper Layer Driver which is attached to Chelsio's LLD
      (cxgb4) and uses the queue allocated by the LLD for sending the crypto
      requests to the Hardware and receiving the responses from it.
      
      The crypto operations can be performed by Chelsio's hardware from the
      userspace applications and/or from within the kernel space using the
      kernel's crypto API.
      
      The above mentioned crypto features have been tested using kernel's
      tests mentioned in testmgr.h. They also have been tested from user
      space using libkcapi and Openssl.
      
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      324429d7
    • Hariprasad Shenai's avatar
    • Hariprasad Shenai's avatar
      cxgb4: Add support for dynamic allocation of resources for ULD · 94cdb8bb
      Hariprasad Shenai authored
      
      
      Add a new commmon infrastructure to allocate reosurces dynamically to
      Upper layer driver's(ULD) when they register with cxgb4 driver and free
      them during unregistering. All the queues and the interrupts for
      them will be allocated during ULD probe only and freed during remove.
      
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94cdb8bb
    • LABBE Corentin's avatar
      atm: fore200e: Do not drop const qualifier · b65b24d4
      LABBE Corentin authored
      
      
      The data member of structure firmware is const and this constness is
      dropped by some cast.
      This patch add some const for keeping the const information.
      
      Signed-off-by: default avatarLABBE Corentin <clabbe.montjoie@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b65b24d4
    • David S. Miller's avatar
      Merge branch 'bpf-next' · f1c89c03
      David S. Miller authored
      
      
      Daniel Borkmann says:
      
      ====================
      BPF helper improvements and cleanups
      
      This set adds various improvements to BPF helpers, a cleanup to use
      skb_pkt_type_ok() helper, addition of bpf_skb_change_tail(), a follow
      up for event output helper and removing ifdefs around the cgroupv2
      helper bits. For details please see individual patches.
      
      The set is based against net-next tree, but requires a merge of net
      into net-next first.
      
      Thanks a lot!
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1c89c03
    • Daniel Borkmann's avatar
      bpf: get rid of cgroup helper related ifdefs · 54fd9c2d
      Daniel Borkmann authored
      
      
      As recently discussed during the task_under_cgroup_hierarchy() addition,
      we should get rid of the ifdefs surrounding the bpf_skb_under_cgroup()
      helper. If related functionality is not built-in, the helper cannot be
      used anyway, which is also in line with what we do for all other helpers.
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54fd9c2d
    • Daniel Borkmann's avatar
      bpf: enable event output helper also for xdp types · 4de16969
      Daniel Borkmann authored
      Follow-up to 555c8a86
      
       ("bpf: avoid stack copy and use skb ctx for
      event output") for also adding the event output helper for XDP typed
      programs. The event output helper has been very useful in particular for
      debugging or event notification purposes, since it's much faster and
      flexible than regular trace printk due to programmatically being able to
      attach meta data. Same flags structure applies as with tc BPF programs.
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4de16969
    • Daniel Borkmann's avatar
      bpf: add bpf_skb_change_tail helper · 5293efe6
      Daniel Borkmann authored
      
      
      This work adds a bpf_skb_change_tail() helper for tc BPF programs. The
      basic idea is to expand or shrink the skb in a controlled manner. The
      eBPF program can then rewrite the rest via helpers like bpf_skb_store_bytes(),
      bpf_lX_csum_replace() and others rather than passing a raw buffer for
      writing here.
      
      bpf_skb_change_tail() is really a slow path helper and intended for
      replies with f.e. ICMP control messages. Concept is similar to other
      helpers like bpf_skb_change_proto() helper to keep the helper without
      protocol specifics and let the BPF program mangle the remaining parts.
      A flags field has been added and is reserved for now should we extend
      the helper in future.
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5293efe6
    • Daniel Borkmann's avatar
      bpf: use skb_pkt_type_ok helper in bpf_skb_change_type · 45c7fffa
      Daniel Borkmann authored
      Since we have a skb_pkt_type_ok() helper for checking the type before
      mangling, make use of it instead of open coding. Follow-up to commit
      8b10cab6 ("net: simplify and make pkt_type_ok() available for other
      users") that came in after d2485c42
      
       ("bpf: add bpf_skb_change_type
      helper").
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45c7fffa
    • Richard Alpe's avatar
      tipc: add peer removal functionality · b3404022
      Richard Alpe authored
      
      
      Add TIPC_NL_PEER_REMOVE netlink command. This command can remove
      an offline peer node from the internal data structures.
      
      This will be supported by the tipc user space tool in iproute2.
      
      Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3404022
    • Eric Dumazet's avatar
      tcp: refine tcp_prune_ofo_queue() to not drop all packets · 36a6503f
      Eric Dumazet authored
      
      
      Over the years, TCP BDP has increased a lot, and is typically
      in the order of ~10 Mbytes with help of clever Congestion Control
      modules.
      
      In presence of packet losses, TCP stores incoming packets into an out of
      order queue, and number of skbs sitting there waiting for the missing
      packets to be received can match the BDP (~10 Mbytes)
      
      In some cases, TCP needs to make room for incoming skbs, and current
      strategy can simply remove all skbs in the out of order queue as a last
      resort, incurring a huge penalty, both for receiver and sender.
      
      Unfortunately these 'last resort events' are quite frequent, forcing
      sender to send all packets again, stalling the flow and wasting a lot of
      resources.
      
      This patch cleans only a part of the out of order queue in order
      to meet the memory constraints.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Soheil Hassas Yeganeh <soheil@google.com>
      Cc: C. Stephen Gun <csg@google.com>
      Cc: Van Jacobson <vanj@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36a6503f
    • Rafał Miłecki's avatar
      net: bgmac: make it clear when setting interface type to RMII · e2d8f646
      Rafał Miłecki authored
      
      
      It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is
      equal to 0. It make code a bit clener, so far when reading it one could
      think we forgot to set a proper mode. It also keeps this mode code in
      sync with other ones.
      
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2d8f646
    • Rafał Miłecki's avatar
      net: bgmac: support Ethernet core on BCM53573 SoCs · 1cb94db3
      Rafał Miłecki authored
      
      
      BCM53573 is a new series of Broadcom's SoCs. It's based on ARM and can
      be found in two packages (versions): BCM53573 and BCM47189. It shares
      some code with the Northstar family, but also requires some new quirks.
      
      First of all there can be up to 2 Ethernet cores on this SoC. If that is
      the case, they are connected to two different switch ports allowing some
      more complex/optimized setups. It seems the second unit doesn't come
      fully configured and requires some IRQ quirk.
      
      Other than that only the first core is connected to the PHY. For the
      second one we have to register fixed PHY (similarly to the Northstar),
      otherwise generic PHY driver would get some invalid info.
      
      This has been successfully tested on Tenda AC9 (BCM47189B0).
      
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cb94db3