1. 30 Mar, 2018 6 commits
    • David S. Miller's avatar
      Merge branch 'net-Broadcom-drivers-coalescing-fixes' · 95e623fd
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: Broadcom drivers coalescing fixes
      
      Following Tal's review of the adaptive RX/TX coalescing feature added to the
      SYSTEMPORT and GENET driver a number of things showed up:
      
      - adaptive TX coalescing is not actually a good idea with the current way
        the estimator will program the ring, this results in a higher CPU load, NAPI
        on TX already does a reasonably good job at maintaining the interrupt count low
      
      - both SYSTEMPORT and GENET would suffer from the same issues while configuring
        coalescing parameters where the values would just not be applied correctly
        based on user settings, so we fix that too
      
      Tal, thanks again for your feedback, I would appreciate if you could review that
      the new behavior appears to be implemented correctly.
      
      Thanks!
      
      Changes in v2:
      
      - added Tal's reviewed-by to the first patch
      - split DIM initialization from coalescing parameters initialization
      - avoid duplicating the same code in bcmgenet_set_coalesce() when configuring RX rings
      - fixed the condition where default DIM parameters would be applied when
        adaptive RX coalescing would be enabled, do this only if it was disabled before
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      95e623fd
    • Florian Fainelli's avatar
      net: bcmgenet: Fix coalescing settings handling · 5e6ce1f1
      Florian Fainelli authored
      There were a number of issues with setting the RX coalescing parameters:
      
      - we would not be preserving values that would have been configured
        across close/open calls, instead we would always reset to no timeout
        and 1 interrupt per packet, this would also prevent DIM from setting its
        default usec/pkts values
      
      - when adaptive RX would be turned on, we woud not be fetching the
        default parameters, we would stay with no timeout/1 packet per interrupt
        until the estimator kicks in and changes that
      
      - finally disabling adaptive RX coalescing while providing parameters
        would not be honored, and we would stay with whatever DIM had previously
        determined instead of the user requested parameters
      
      Fixes: 9f4ca058 ("net: bcmgenet: Add support for adaptive RX coalescing")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarTal Gilboa <talgi@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e6ce1f1
    • Florian Fainelli's avatar
      net: systemport: Fix coalescing settings handling · a8cdfbdf
      Florian Fainelli authored
      There were a number of issues with setting the RX coalescing parameters:
      
      - we would not be preserving values that would have been configured
        across close/open calls, instead we would always reset to no timeout
        and 1 interrupt per packet, this would also prevent DIM from setting its
        default usec/pkts values
      
      - when adaptive RX would be turned on, we woud not be fetching the
        default parameters, we would stay with no timeout/1 packet per
        interrupt until the estimator kicks in and changes that
      
      - finally disabling adaptive RX coalescing while providing parameters
        would not be honored, and we would stay with whatever DIM had
        previously determined instead of the user requested parameters
      
      Fixes: b6e0e875 ("net: systemport: Implement adaptive interrupt coalescing")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarTal Gilboa <talgi@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8cdfbdf
    • Florian Fainelli's avatar
      net: systemport: Remove adaptive TX coalescing · fd41f2bf
      Florian Fainelli authored
      Adaptive TX coalescing is not currently giving us any advantages and
      ends up making the CPU spin more frequently until TX completion. Deny
      and disable adaptive TX coalescing for now and rely on static
      configuration, we can always add it back later.
      Reviewed-by: default avatarTal Gilboa <talgi@mellanox.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd41f2bf
    • Gal Pressman's avatar
      net: Call add/kill vid ndo on vlan filter feature toggling · 9daae9bd
      Gal Pressman authored
      NETIF_F_HW_VLAN_[CS]TAG_FILTER features require more than just a bit
      flip in dev->features in order to keep the driver in a consistent state.
      These features notify the driver of each added/removed vlan, but toggling
      of vlan-filter does not notify the driver accordingly for each of the
      existing vlans.
      
      This patch implements a similar solution to NETIF_F_RX_UDP_TUNNEL_PORT
      behavior (which notifies the driver about UDP ports in the same manner
      that vids are reported).
      
      Each toggling of the features propagates to the 8021q module, which
      iterates over the vlans and call add/kill ndo accordingly.
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9daae9bd
    • Wei Yongjun's avatar
      cxgb4: fix error return code in adap_init0() · 004c3cf1
      Wei Yongjun authored
      Fix to return a negative error code from the hash filter init error
      handling case instead of 0, as done elsewhere in this function.
      
      Fixes: 5c31254e ("cxgb4: initialize hash-filter configuration")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      004c3cf1
  2. 29 Mar, 2018 34 commits