1. 17 May, 2014 5 commits
    • Bjørn Mork's avatar
      net: cdc_ncm: use ethtool to tune coalescing settings · 6c4e548f
      Bjørn Mork authored
      Datagram coalescing is an integral part of the NCM and MBIM
      protocols, intended to reduce the interrupt load primarily
      on the device end of the USB link.  As with all coalescing
      solutions, there is a trade-off between buffering and
      interrupts.
      
      The current defaults are based on the assumption that device
      side buffers should be the limiting factor.  However, many
      modern high speed LTE modems suffers from buffer-bloat,
      making this assumption fail. This results in sub-optimal
      performance due to excessive coalescing.  And in cases where
      such modems are connected to cheap embedded hosts there is
      often severe buffer allocation issues, giving very noticeable
      performance degradation .
      
      A start on improving this is going from build time hard
      coded limits to per device user configurable limits.  The
      ethtool coalescing API was selected as user interface
      because, although the tuned values are buffer sizes, these
      settings directly control datagram coalescing.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c4e548f
    • Bjørn Mork's avatar
      net: cdc_ncm: support rx_max/tx_max updates when running · 68864abf
      Bjørn Mork authored
      Finish the rx_max/tx_max setup by flushing buffers and
      informing usbnet about the changes.  This way, the settings
      can be modified while the netdev is up and running.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68864abf
    • Bjørn Mork's avatar
      net: cdc_ncm: split .bind device initialization · 08c74fc9
      Bjørn Mork authored
      Now that we have split out the part of the device setup
      which MUST be done with the data interface in altsetting 0,
      we can delay the rest of the initialization. This allows us
      to move some of post-init buffer size config from bind to
      the appropriate setup function.
      
      The purpose of this refactoring is to collect all code
      adjusting the rx_max and tx_max buffers in one place, so
      that it is easier to call it from multiple call sites.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      08c74fc9
    • Bjørn Mork's avatar
      net: cdc_ncm: factor out one-time device initialization · f8afb73d
      Bjørn Mork authored
      Split the parts of setup dealing with device initialization from
      parts just setting defaults for attributes which might be
      changed after initialization.
      
      Some commands of the device initialization are only allowed when
      the data interface is in its disabled altsetting, so we must
      separate them out of we are to allow rerunning parts of setup.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8afb73d
    • Bjørn Mork's avatar
      net: cdc_ncm: split out rx_max/tx_max update of setup · 5aa73d5d
      Bjørn Mork authored
      Split out the part of setup dealing with updating the rx_max
      and tx_max buffer sizes so that this code can be reused for
      dynamically updating the limits.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5aa73d5d
  2. 16 May, 2014 35 commits