1. 12 6月, 2014 12 次提交
    • Y
      net/mlx4_en: Use affinity hint · 9e311e77
      Yuval Atias 提交于
      The “affinity hint” mechanism is used by the user space
      daemon, irqbalancer, to indicate a preferred CPU mask for irqs.
      Irqbalancer can use this hint to balance the irqs between the
      cpus indicated by the mask.
      
      We wish the HCA to preferentially map the IRQs it uses to numa cores
      close to it.  To accomplish this, we use cpumask_set_cpu_local_first(), that
      sets the affinity hint according the following policy:
      First it maps IRQs to “close” numa cores.  If these are exhausted, the
      remaining IRQs are mapped to “far” numa cores.
      Signed-off-by: NYuval Atias <yuvala@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e311e77
    • A
      cpumask: Utility function to set n'th cpu - local cpu first · da91309e
      Amir Vadai 提交于
      This function sets the n'th cpu - local cpu's first.
      For example: in a 16 cores server with even cpu's local, will get the
      following values:
      cpumask_set_cpu_local_first(0, numa, cpumask) => cpu 0 is set
      cpumask_set_cpu_local_first(1, numa, cpumask) => cpu 2 is set
      ...
      cpumask_set_cpu_local_first(7, numa, cpumask) => cpu 14 is set
      cpumask_set_cpu_local_first(8, numa, cpumask) => cpu 1 is set
      cpumask_set_cpu_local_first(9, numa, cpumask) => cpu 3 is set
      ...
      cpumask_set_cpu_local_first(15, numa, cpumask) => cpu 15 is set
      
      Curently this function will be used by multi queue networking devices to
      calculate the irq affinity mask, such that as many local cpu's as
      possible will be utilized to handle the mq device irq's.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da91309e
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · d4f38620
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-06-11
      
      This series contains updates to igb, i40e and i40evf.
      
      Todd makes a change to igb to un-hide invariant returns by getting rid of
      the E1000_SUCCESS define and converting those returns to return 0.
      
      Jacob separates the hardware logic from the set function, so that we can
      re-use it during a ptp_reset in igb.  This enables the reset to return
      functionality to the last know timestamp mode, rather than resetting the
      value.
      
      Ashish implements context flags for headwb and headwb_addr so that we
      do not have to keep them always enabled.
      
      Shannon updates the admin queue API for the new firmware, which adds
      set_pf_content, nvm_config_read/write, replaces set_phy_reset with
      set_phy_debug and removes nvm_read/write_reg_se.  Cleans up the driver
      to use the stored base_queue value since there is no need to read the
      PCI register for the PF's base queue on every single transmit queue
      enable and disable as we already have the value stored from reading
      the capability features at startup.
      
      Anjali changes the notion of source and destination for FD_SB in ethtool
      to align i40e with other drivers.  Adds flow director statistics to
      the PF stats.  Fixes a bug in ethtool for flow director drop packet
      filter where the drop action comes down as a ring_cookie value, so allow
      it as a special value that can be used to configure destination control.
      
      Mitch fixes the i40evf to keep the driver from going down when it is
      already in a down state.  This prevents a CPU soft lock in napi_disable().
      Also change the i40evf to check the admin queue error bits since the
      firmware can indicate any admin queue error states to the driver via
      some bits in the length registers.
      
      Neerav separates out the DCB capability and enabled flags because currently
      if the firmware reports DCB capability the driver enables
      I40E_FLAG_DCB_ENABLED flag.  When this flag is enabled the driver inserts
      a tag when transmitting a packet from the port even if there are no DCB
      traffic classes configured at the port.  So by adding the additional flag,
      I40E_FLAG_DCB_CAPABLE, that will be set when the DCB capability is present
      and the existing enabled flag will only be set if there are more than one
      traffic classes configured at the port.
      
      Greg fixes the i40e driver to not automatically accept tagged packets by
      default so that the system must request a VLAN tag packet filter to get
      packets with that tag.  Greg also converts i40e to use the in-kernel
      ether_addr_copy() instead of mempcy().
      
      Jesse removes the FTYPE field from the receive descriptor to match the
      hardware implementation.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4f38620
    • D
      Merge branch 'sctp-next' · 813ebbbf
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      SCTP update
      
      This set contains transport path selection improvements in
      SCTP. Please see individual patches for details.
      ====================
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      813ebbbf
    • D
      net: sctp: fix incorrect type in gfp initializer · 9b87d465
      Daniel Borkmann 提交于
      This fixes the following sparse warning:
      
        net/sctp/associola.c:1556:29: warning: incorrect type in initializer (different base types)
        net/sctp/associola.c:1556:29:    expected bool [unsigned] [usertype] preload
        net/sctp/associola.c:1556:29:    got restricted gfp_t
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b87d465
    • D
      net: sctp: improve sctp_select_active_and_retran_path selection · a7288c4d
      Daniel Borkmann 提交于
      In function sctp_select_active_and_retran_path(), we walk the
      transport list in order to look for the two most recently used
      ACTIVE transports (trans_pri, trans_sec). In case we didn't find
      anything ACTIVE, we currently just camp on a possibly PF or
      INACTIVE transport that is primary path; this behavior actually
      dates back to linux-history tree of the very early days of
      lksctp, and can yield a behavior that chooses suboptimal
      transport paths.
      
      Instead, be a bit more clever by reusing and extending the
      recently introduced sctp_trans_elect_best() handler. In case
      both transports are evaluated to have the same score resulting
      from their states, break the tie by looking at: 1) transport
      patch error count 2) last_time_heard value from each transport.
      
      This is analogous to Nishida's Quick Failover draft [1],
      section 5.1, 3:
      
        The sender SHOULD avoid data transmission to PF destinations.
        When all destinations are in either PF or Inactive state,
        the sender MAY either move the destination from PF to active
        state (and transmit data to the active destination) or the
        sender MAY transmit data to a PF destination. In the former
        scenario, (i) the sender MUST NOT notify the ULP about the
        state transition, and (ii) MUST NOT clear the destination's
        error counter. It is recommended that the sender picks the
        PF destination with least error count (fewest consecutive
        timeouts) for data transmission. In case of a tie (multiple PF
        destinations with same error count), the sender MAY choose the
        last active destination.
      
      Thus for sctp_select_active_and_retran_path(), we keep track of
      the best, if any, transport that is in PF state and in case no
      ACTIVE transport has been found (hence trans_{pri,sec} is NULL),
      we select the best out of the three: current primary_path and
      retran_path as well as a possible PF transport.
      
      The secondary may still camp on the original primary_path as
      before. The change in sctp_trans_elect_best() with a more fine
      grained tie selection also improves at the same time path selection
      for sctp_assoc_update_retran_path() in case of non-ACTIVE states.
      
        [1] http://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7288c4d
    • D
      net: sctp: migrate most recently used transport to ktime · e575235f
      Daniel Borkmann 提交于
      Be more precise in transport path selection and use ktime
      helpers instead of jiffies to compare and pick the better
      primary and secondary recently used transports. This also
      avoids any side-effects during a possible roll-over, and
      could lead to better path decision-making.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e575235f
    • D
      net: sctp: refactor active path selection · b82e8f31
      Daniel Borkmann 提交于
      This patch just refactors and moves the code for the active
      path selection into its own helper function outside of
      sctp_assoc_control_transport() which is already big enough.
      No functional changes here.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b82e8f31
    • D
      ktime: add ktime_after and ktime_before helper · 67cb9366
      Daniel Borkmann 提交于
      Add two minimal helper functions analogous to time_before() and
      time_after() that will later on both be needed by SCTP code.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67cb9366
    • D
      Merge branch 'mac802154' · 9181a6bd
      David S. Miller 提交于
      Phoebe Buckheister says:
      
      ====================
      Recent llsec code introduced a memory leak on decryption failures during rx.
      This fixes said leak, and optimizes the receive loops for monitor and wpan
      devices to only deliver skbs to devices that are actually up. Also changes a
      dev_kfree_skb to kfree_skb when an invalid packet is dropped before being
      pushed into the stack.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9181a6bd
    • P
      mac802154: don't deliver packets to devices that are down · 2d3b5b0a
      Phoebe Buckheister 提交于
      Only one WPAN devices can be active at any given time, so only deliver
      packets to that one interface that is actually up. Multiple monitors may
      be up at any given time, but we don't have to deliver to monitors that
      are down either.
      Signed-off-by: NPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d3b5b0a
    • P
      mac802154: properly free incoming skbs on decryption failure · a374eeb5
      Phoebe Buckheister 提交于
      mac802154 RX did not free skbs on decryption failure, assuming that the
      caller would when the local rx handler returned _DROP. This was false.
      Signed-off-by: NPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a374eeb5
  2. 11 6月, 2014 28 次提交