1. 20 Mar, 2015 6 commits
    • Palik, Imre's avatar
      xen-netback: making the bandwidth limiter runtime settable · edafc132
      Palik, Imre authored
      With the current netback, the bandwidth limiter's parameters are only
      settable during vif setup time.  This patch register a watch on them, and
      thus makes them runtime changeable.
      
      When the watch fires, the timer is reset.  The timer's mutex is used for
      fencing the change.
      
      Cc: Anthony Liguori <aliguori@amazon.com>
      Signed-off-by: default avatarImre Palik <imrep@amazon.de>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      edafc132
    • David S. Miller's avatar
      Merge branch 'listener_refactor_part_14' · 750f2f91
      David S. Miller authored
      Eric Dumazet says:
      
      ====================
      inet: tcp listener refactoring part 14
      
      OK, we have serious patches here.
      
      We get rid of the central timer handling SYNACK rtx,
      which is killing us under even medium SYN flood.
      
      We still use the listener specific hash table.
      
      This will be done in next round ;)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      750f2f91
    • Eric Dumazet's avatar
      net: increase sk_[max_]ack_backlog · becb74f0
      Eric Dumazet authored
      sk_ack_backlog & sk_max_ack_backlog were 16bit fields, meaning
      listen() backlog was limited to 65535.
      
      It is time to increase the width to allow much bigger backlog,
      if admins change /proc/sys/net/core/somaxconn &
      /proc/sys/net/ipv4/tcp_max_syn_backlog default values.
      
      Tested:
      
      echo 5000000 >/proc/sys/net/core/somaxconn
      echo 5000000 >/proc/sys/net/ipv4/tcp_max_syn_backlog
      
      Ran a SYNFLOOD test against a listener using listen(fd, 5000000)
      
      myhost~# grep request_sock_TCP /proc/slabinfo
      request_sock_TCP  4185642 4411940    304   13    1 : tunables   54   27    8 : slabdata 339380 339380      0
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      becb74f0
    • Eric Dumazet's avatar
      inet: get rid of central tcp/dccp listener timer · fa76ce73
      Eric Dumazet authored
      One of the major issue for TCP is the SYNACK rtx handling,
      done by inet_csk_reqsk_queue_prune(), fired by the keepalive
      timer of a TCP_LISTEN socket.
      
      This function runs for awful long times, with socket lock held,
      meaning that other cpus needing this lock have to spin for hundred of ms.
      
      SYNACK are sent in huge bursts, likely to cause severe drops anyway.
      
      This model was OK 15 years ago when memory was very tight.
      
      We now can afford to have a timer per request sock.
      
      Timer invocations no longer need to lock the listener,
      and can be run from all cpus in parallel.
      
      With following patch increasing somaxconn width to 32 bits,
      I tested a listener with more than 4 million active request sockets,
      and a steady SYNFLOOD of ~200,000 SYN per second.
      Host was sending ~830,000 SYNACK per second.
      
      This is ~100 times more what we could achieve before this patch.
      
      Later, we will get rid of the listener hash and use ehash instead.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa76ce73
    • Eric Dumazet's avatar
      inet: drop prev pointer handling in request sock · 52452c54
      Eric Dumazet authored
      When request sock are put in ehash table, the whole notion
      of having a previous request to update dl_next is pointless.
      
      Also, following patch will get rid of big purge timer,
      so we want to delete a request sock without holding listener lock.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52452c54
    • Thomas Graf's avatar
      rhashtable: Round up/down min/max_size to ensure we respect limit · a998f712
      Thomas Graf authored
      Round up min_size respectively round down max_size to the next power
      of two to make sure we always respect the limit specified by the
      user. This is required because we compare the table size against the
      limit before we expand or shrink.
      
      Also fixes a minor bug where we modified min_size in the params
      provided instead of the copy stored in struct rhashtable.
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a998f712
  2. 19 Mar, 2015 27 commits
  3. 18 Mar, 2015 7 commits
    • David S. Miller's avatar
      Merge branch 'txq_max_rate' · 8f6320de
      David S. Miller authored
      Or Gerlitz says:
      
      ====================
      Add max rate TXQ attribute
      
      Add the ability to set a max-rate limitation for TX queues.
      The attribute name is maxrate and the units are Mbs, to make
      it similar to the existing max-rate limitation knobs (ETS and
      SRIOV ndo calls).
      
      changes from V2:
        - added Documentation (thanks Florian and Tom)
        - rebased to latest net-next to comply with the swdev ndo removal
        - addressed more feedback from Dave on the comments style
      
      changes from V1:
        - addressed feedback from Dave
      
      changes from V0:
        - addressed feedback from Sergei
      
      John Fastabend (1):
        net: Add max rate tx queue attribute
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f6320de
    • Or Gerlitz's avatar
      net/mlx4_en: Add tx queue maxrate support · c10e4fc6
      Or Gerlitz authored
      Add ndo_set_tx_maxrate support.
      
      To support per tx queue maxrate limit, we use the update-qp firmware
      command to do run-time rate setting for the qp that serves this tx ring.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarIdo Shamay <idos@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c10e4fc6
    • Or Gerlitz's avatar
      net/mlx4_core: Add basic support for QP max-rate limiting · fc31e256
      Or Gerlitz authored
      Add the low-level device commands and definitions used for QP max-rate limiting.
      
      This is done through the following elements:
      
        - read rate-limit device caps in QUERY_DEV_CAP: number of different
          rates and the min/max rates in Kbs/Mbs/Gbs units
      
        - enhance the QP context struct to contain rate limit units and value
      
        - allow to do run time rate-limit setting to QPs through the
          update-qp firmware command
      
        - QP rate-limiting is disallowed for VFs
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc31e256
    • John Fastabend's avatar
      net: Add max rate tx queue attribute · 822b3b2e
      John Fastabend authored
      This adds a tx_maxrate attribute to the tx queue sysfs entry allowing
      for max-rate limiting. Along with DCB-ETS and BQL this provides another
      knob to tune queue performance. The limit units are Mbps.
      
      By default it is disabled. To disable the rate limitation after it
      has been set for a queue, it should be set to zero.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      822b3b2e
    • Brad Campbell's avatar
      cc2520: Add support for CC2591 amplifier. · f0b7d43c
      Brad Campbell authored
      The TI CC2521 is an RF power amplifier that is designed to interface
      with the CC2520. Conveniently, it directly interfaces with the CC2520
      and does not require any pins to be connected to a
      microcontroller/processor. Adding a CC2591 increases the CC2520's range,
      which is useful for border router and other wall-powered applications.
      
      Using the CC2591 with the CC2520 requires configuring the CC2520 GPIOs
      that are connected to the CC2591 to correctly set the CC2591 into TX and
      RX modes. Further, TI recommends that the CC2520_TXPOWER and
      CC2520_AGCCTRL1 registers are set differently to maximize the CC2591's
      performance. These settings are covered in TI Application Note AN065.
      
      This patch adds an optional `amplified` field to the cc2520 entry in the
      device tree. If present, the CC2520 will be configured to operate with a
      CC2591.
      
      The expected pin mapping is:
      CC2520 GPIO0 --> CC2591 EN
      CC2520 GPIO5 --> CC2591 PAEN
      Signed-off-by: default avatarBrad Campbell <bradjc5@gmail.com>
      Acked-by: default avatarVarka Bhadram <varkabhadram@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      f0b7d43c
    • Brad Campbell's avatar
      cc2520: Do not store platform_data in spi_device · 0db055c9
      Brad Campbell authored
      Storing the `platform_data` struct inside of the SPI struct when using
      the device tree allows for a later function to edit the content of that
      struct. This patch refactors the `cc2520_get_platformat_data` function
      to accept a pointer to a `cc2520_platform_data` struct and populates
      the fields inside of it.
      
      This change mirrors commit aaa1c4d2
      ("at86rf230: copy pdata to driver allocated space").
      Signed-off-by: default avatarBrad Campbell <bradjc5@gmail.com>
      Acked-by: default avatarVarka Bhadram <varkabhadram@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      0db055c9
    • David S. Miller's avatar
      Merge branch 'rhashtable_remove_shift' · b65885d2
      David S. Miller authored
      Herbert Xu says:
      
      ====================
      rhashtable: Kill redundant shift parameter
      
      I was trying to squeeze bucket_table->rehash in by downsizing
      bucket_table->size, only to find that my spot had been taken
      over by bucket_table->shift.  These patches kill shift and makes
      me feel better :)
      
      v2 corrects the typo in the test_rhashtable changelog and also
      notes the min_shift parameter in the tipc patch changelog.
      ====================
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b65885d2