1. 28 Oct, 2015 17 commits
    • Tycho Andersen's avatar
      seccomp, ptrace: add support for dumping seccomp filters · f8e529ed
      Tycho Andersen authored
      This patch adds support for dumping a process' (classic BPF) seccomp
      filters via ptrace.
      
      PTRACE_SECCOMP_GET_FILTER allows the tracer to dump the user's classic BPF
      seccomp filters. addr should be an integer which represents the ith seccomp
      filter (0 is the most recently installed filter). data should be a struct
      sock_filter * with enough room for the ith filter, or NULL, in which case
      the filter is not saved. The return value for this command is the number of
      BPF instructions the program represents, or negative in the case of errors.
      Command specific errors are ENOENT: which indicates that there is no ith
      filter in this seccomp tree, and EMEDIUMTYPE, which indicates that the ith
      filter was not installed as a classic BPF filter.
      
      A caveat with this approach is that there is no way to get explicitly at
      the heirarchy of seccomp filters, and users need to memcmp() filters to
      decide which are inherited. This means that a task which installs two of
      the same filter can potentially confuse users of this interface.
      
      v2: * make save_orig const
          * check that the orig_prog exists (not necessary right now, but when
             grows eBPF support it will be)
          * s/n/filter_off and make it an unsigned long to match ptrace
          * count "down" the tree instead of "up" when passing a filter offset
      
      v3: * don't take the current task's lock for inspecting its seccomp mode
          * use a 0x42** constant for the ptrace command value
      
      v4: * don't copy to userspace while holding spinlocks
      
      v5: * add another condition to WARN_ON
      
      v6: * rebase on net-next
      Signed-off-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      CC: Will Drewry <wad@chromium.org>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Pavel Emelyanov <xemul@parallels.com>
      CC: Serge E. Hallyn <serge.hallyn@ubuntu.com>
      CC: Alexei Starovoitov <ast@kernel.org>
      CC: Daniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8e529ed
    • David S. Miller's avatar
      Merge branch 'mpls-multipath-improvements' · 5b9e3bd5
      David S. Miller authored
      Robert Shearman says:
      
      ====================
      mpls: mulipath improvements
      
      Two improvements to the recently added mpls multipath support. The
      first is a fix for missing initialisation the nexthop address length
      for the v4 and v6 explicit null label routes, and the second is to
      reduce the amount of memory used by mpls routes by changing the way
      the via addresses are stored.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b9e3bd5
    • Robert Shearman's avatar
      mpls: reduce memory usage of routes · cf4b24f0
      Robert Shearman authored
      Nexthops for MPLS routes have a via address field sized for the
      largest via address that is expected, which is 32 bytes. This means
      that in the most common case of having ipv4 via addresses, 28 bytes of
      memory more than required are used per nexthop. In the other common
      case of an ipv6 nexthop then 16 bytes more than required are
      used. With large numbers of MPLS routes this extra memory usage could
      start to become significant.
      
      To avoid allocating memory for a maximum length via address when not
      all of it is required and to allow for ease of iterating over
      nexthops, then the via addresses are changed to be stored in the same
      memory block as the route and nexthops, but in an array after the end
      of the array of nexthops. New accessors are provided to retrieve a
      pointer to the via address.
      
      To allow for O(1) access without having to store a pointer or offset
      per nh, the via address for each nexthop is sized according to the
      maximum via address for any nexthop in the route, which is stored in a
      new route field, rt_max_alen, but this is in an existing hole in
      struct mpls_route so it doesn't increase the size of the
      structure. Each via address is ensured to be aligned to VIA_ALEN_ALIGN
      to account for architectures that don't allow unaligned accesses.
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf4b24f0
    • Robert Shearman's avatar
      mpls: fix forwarding using v4/v6 explicit null · b4e04fc7
      Robert Shearman authored
      Fill in the via address length for the predefined IPv4 and IPv6
      explicit-null label routes.
      
      Fixes: f8efb73c ("mpls: multipath route support")
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b4e04fc7
    • Bert Kenward's avatar
      sfc: replace spinlocks with bit ops for busy poll locking · c0f9c7e4
      Bert Kenward authored
      This patch reduces the overhead of locking for busy poll.
      Previously the state was protected by a lock, whereas now
      it's manipulated solely with atomic operations.
      Signed-off-by: default avatarShradha Shah <sshah@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0f9c7e4
    • Hannes Frederic Sowa's avatar
      sock: don't enable netstamp for af_unix sockets · 080a270f
      Hannes Frederic Sowa authored
      netstamp_needed is toggled for all socket families if they request
      timestamping. But some protocols don't need the lower-layer timestamping
      code at all. This patch starts disabling it for af-unix.
      
      E.g. systemd enables timestamping during boot-up on the journald af-unix
      sockets, thus causing the system to globally enable timestamping in the
      lower networking stack. Still, it is very probable that timestamping
      gets activated, by e.g. dhclient or various NTP implementations.
      Reported-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      080a270f
    • David S. Miller's avatar
      Merge branch 'qed-driver' · 6092db1a
      David S. Miller authored
      Ariel Elior says:
      
      ====================
      Add new drivers: qed & qede
      
      This series implements the driver set for Qlogic's new QL4xxx series.
      These are 10/20/25/40/50/100 Gig capable converged nics, supporting
      ethernet (obviously), iscsi, fcoe, roce and iwarp protocols.
      
      The overall driver design includes a common module ('qed') and protocol
      specific dependent modules for ethernet ('qede'), fcoe ('qedf'),
      iscsi ('qedi') and roce ('qedr').
      The common module contains all of the common logic, e.g. initialization,
      cleanup, infrastructure for interrupt handling, link management, slowpath
      etc. as well as protocol agnostic features, and supplying an abstraction
      layer for other modules.
      The protocol specific modules can be compiled and operated independently
      of each other, with the exception of the rdma modules which are dependent
      on the ethernet module, in accordance with the kernel rdma stack design.
      
      This series only adds the core and ethernet modules, with basic L2
      capabilities. Future series will add the rest of the modules and enhance
      the L2 functionality.
      
      Ths patch series is constructed of the following patches:
      qed:  Add module with basic common support
      qed:  Add basic L2 interface
      qede: Add basic Network driver
      qed:  Add slowpath L2 support
      qede: Add basic network device support
      qede: Add classification configuration
      qed:  Add link support
      qede: Add support for link
      qed:  Add statistics support
      qede: Add basic ethtool support
      
      This project is a team effort, thanks go to Yuval Mintz, Dmitry Kravkov,
      Michal Kalderon, Tomer Tayar, Manish Chopra, Sudarsana Kalluru,
      Rajesh Borundia, Sony Chacko, Artum Zolotushko, Harish Patil, Rasesh Mody,
      Sergey Ukhterov and Elad Manela, as well as former team members,
      Eilon Greenstein and Shmulik Ravid.
      
      Changes from previos version:
      -----------------------------
      
      From Version 7:
        - Various small fixes according to Dave's suggestions; Largest change
          [code-wise] - don't use tabs for indenting function arguments.
      
      From Version 6:
        - Reduced the number of arguments for functions with exceptionally
          high number of parameters.
      
      From Version 5:
        - Style change and fixes [mostly in 1, 4 and 7].
          Thanks go to Francois Romieu, a mere mortal. ;-)
      
      From Version 4:
        - Drop dependency for x86_64.
      
      From Version 3:
        - Limit support of initial submission to x86_64.
        - Fix endian problems appearing via sparse [although no BE support yet].
        - Fix small issues suggested by the kbuild test robot.
      
      From Version 2:
        - Removed U64_{HI,LO}; Using {upper,lower}_32_bits instead.
        - Use regular napi weight definition.
        - [We still use the __le variants for variables, since we didn't get
           a reply regarding the change into non-user API types].
      
      From Version 1:
        - Removed private license file; Instead revised comments at source headers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6092db1a
    • Sudarsana Kalluru's avatar
      qede: Add basic ethtool support · 133fac0e
      Sudarsana Kalluru authored
      This adds basic ethtool operations to the qed driver, allowing support in:
       - Statistics gathering [ethtool -S]
       - Setting of debug level [ethtool -s <interface> msglvl]
       - Getting basic information [ethtool, ethtool -i]
      
      In addition it adds the ability to change the MTU.
      Signed-off-by: default avatarSudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      133fac0e
    • Manish Chopra's avatar
      qed: Add statistics support · 9df2ed04
      Manish Chopra authored
      Device statistics can be gathered on-demand. This adds the qed support for
      reading the statistics [both function and port] from the device, and adds
      to the public API a method for requesting the current statistics.
      Signed-off-by: default avatarManish Chopra <Manish.Chopra@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9df2ed04
    • Sudarsana Kalluru's avatar
      qede: Add support for link · a2ec6172
      Sudarsana Kalluru authored
      This adds basic link functionality to qede - driver still doesn't provide
      users with an API to change any link property, but it does request qed to
      initialize the link using default configuration, and registers a callback
      that allows it to get link notifications.
      
      This patch adds the ability of the driver to set the carrier as active and
      to enable traffic as a result of async. link notifications.
      Following this patch, driver should be capable of running traffic.
      Signed-off-by: default avatarSudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2ec6172
    • Yuval Mintz's avatar
      qed: Add link support · cc875c2e
      Yuval Mintz authored
      Physical link is handled by the management Firmware.
      This patch lays the infrastructure for attention handling in the driver,
      as link change notifications arrive via async. attentions,
      as well the handling of such notifications.
      
      This patch also extends the API with the protocol drivers by adding
      registered callbacks which the protocol driver passes to qed in order
      to be notified of async. events originating from the FW/HW.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc875c2e
    • Sudarsana Kalluru's avatar
      qede: classification configuration · 0d8e0aa0
      Sudarsana Kalluru authored
      Add the ability to configure basic classification in driver by
      implementing ndo_set_mac_address() and ndo_set_rx_mode().
      Signed-off-by: default avatarSudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d8e0aa0
    • Yuval Mintz's avatar
      qede: Add basic network device support · 2950219d
      Yuval Mintz authored
      This patch includes the basic Rx/Tx support for the driver [although
      carrier will still never be turned on].
      Following this patch the driver registers a network device, initializes
      it and prepares it for traffic.
      Signed-off-by: default avatarSudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2950219d
    • Manish Chopra's avatar
      qed: Add slowpath L2 support · cee4d264
      Manish Chopra authored
      This patch adds to the qed the support to configure various L2 elements,
      such as channels and basic filtering conditions.
      It also enhances its public API to allow qede to later utilize this
      functionality.
      Signed-off-by: default avatarManish Chopra <Manish.Chopra@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cee4d264
    • Yuval Mintz's avatar
      qede: Add basic Network driver · e712d52b
      Yuval Mintz authored
      The Qlogic Everest Driver for Ethernet is the Ethernet specific module for
      QL4xxx ethernet products by Qlogic.
      
      This patch adds a very minimal PCI driver, one that doesn't yet register
      a network device, but one that does interact with qed and does a basic
      initialization of the HW.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e712d52b
    • Yuval Mintz's avatar
      qed: Add basic L2 interface · 25c089d7
      Yuval Mintz authored
      This patch adds a public API for a network driver to work on top of QED.
      The interface itself is very minimal - it's mostly infrastructure, as the
      only content it has after this patch is a query for HW-based information
      required for the creation of a network interface [I.e., no actual
      protocol-specific configurations are supported].
      Signed-off-by: default avatarManish Chopra <Manish.Chopra@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25c089d7
    • Yuval Mintz's avatar
      qed: Add module with basic common support · fe56b9e6
      Yuval Mintz authored
      The Qlogic Everest Driver is the backend module for the QL4xxx ethernet
      products by Qlogic.
      
      This module serves two main purposes:
       1. It's responsible to contain all the common code that will be shared
          between the various drivers that would be used with said line of
          products. Flows such as chip initialization and de-initialization
          fall under this category.
      
       2. It would abstract the protocol-specific HW & FW components, allowing
          the protocol drivers to have a clean APIs which is detached in its
          slowpath configuration from the actual HSI.
      
      This adds a very basic module without any protocol-specific bits.
      I.e., this adds a basic implementation that almost entirely falls under
      the first category.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe56b9e6
  2. 27 Oct, 2015 7 commits
  3. 26 Oct, 2015 11 commits
  4. 25 Oct, 2015 2 commits
  5. 24 Oct, 2015 3 commits
    • David S. Miller's avatar
      Merge branch 'tipc-next' · 687f079a
      David S. Miller authored
      Jon Maloy says:
      
      ====================
      tipc: improve broadcast implementation
      
      The TIPC broadcast link implementation is currently complex and hard to
      follow. It also incurs some amount of code and structure duplication,
      something that can be reduced significantly with a little effort.
      
      This commit series introduces a number of improvements which address
      both the locking structure, the code/structure duplication issue, and
      the overall readbility of the code.
      
      The series consists of three main parts:
      
      1-7: Adaptation to the new link structure, and preparation for the next
           step. In particular, we want the broadcast transmission link to
           have a life cycle that is longer than any of its potential (unicast
           and broadcast receive links) users. This eliminates the need to
           always test for the presence of this link before accessing it.
      
      8-10: This is what is really new in this series. Commit #9 is by far
            the largest and most important one, because it moves most of
            the broadcast functionality into link.c, partially reusing the
            fields and functionality of the unicast link. The removal of
            the "node_map" infrastructure in commit #10 is also an important
            achievement.
      
      11-16: Some improvements leveraging the changes made in the previous
             commits.
      
      The series needs commit 53387c4e ("tipc: extend broadcast link window size")
      and commit e5356794 ("tipc: conditionally expand buffer headroom over udp tunnel")
      which are both present in 'net' but not yet in 'net-next', to apply cleanly.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      687f079a
    • Jon Paul Maloy's avatar
      tipc: clean up unused code and structures · 2af5ae37
      Jon Paul Maloy authored
      After the previous changes in this series, we can now remove some
      unused code and structures, both in the broadcast, link aggregation
      and link code.
      
      There are no functional changes in this commit.
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2af5ae37
    • Jon Paul Maloy's avatar
      tipc: ensure binding table initial distribution is sent via first link · c49a0a84
      Jon Paul Maloy authored
      Correct synchronization of the broadcast link at first contact between
      two nodes is dependent on the assumption that the binding table "bulk"
      update passes via the same link as the initial broadcast syncronization
      message, i.e., via the first link that is established.
      
      This is not guaranteed in the current implementation. If two link
      come up very close to each other in time, the "bulk" may quite well
      pass via the second link, and hence void the guarantee of a correct
      initial synchronization before the broadcast link is opened.
      
      This commit makes two small changes to strengthen this guarantee.
      
      1) We let the second established link occupy slot 1 of the
         "active_links" array, while the first link will retain slot 0.
         (This is in reality a cosmetic change, we could just as well keep
          the current, opposite order)
      
      2) We let the name distributor always use link selector/slot 0 when
         it sends it binding table updates.
      
      The extra traffic bias on the first link caused by this change should
      be negligible, since binding table updates constitutes a very small
      fraction of the total traffic.
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c49a0a84