1. 10 Oct, 2021 10 commits
    • David S. Miller's avatar
      Merge branch 'ionic-vlanid-mgmt' · 154ee116
      David S. Miller authored
      Shannon Nelson says:
      
      ====================
      ionic: add vlanid overflow management
      
      Add vlans to the existing rx_filter_sync mechanics currently
      used for managing mac filters.
      
      Older versions of our firmware had no enforced limits on the
      number of vlans that the driver could request, but requesting
      large numbers of vlans caused issues in FW memory management,
      so an arbitrary limit was added in the FW.  The FW now
      returns -ENOSPC when it hits that limit, which the driver
      needs to handle.
      
      Unfortunately, the FW doesn't advertise the vlan id limit,
      as it does with mac filters, so the driver won't know the
      limit until it bumps into it.  We'll grab the current vlan id
      count and use that as the limit from there on and thus prevent
      getting any more -ENOSPC errors.
      
      Just as is done for the mac filters, the device puts the device
      into promiscuous mode when -ENOSPC is seen for vlan ids, and
      the driver will track the vlans that aren't synced to the FW.
      When vlans are removed, the driver will retry the un-synced
      vlans.  If all outstanding vlans are synced, the promiscuous
      mode will be disabled.
      
      The first 6 patches rework the existing filter management to
      make it flexible enough for additional filter types.  Next
      we add the vlan ids into the management.  The last 2 patches
      allow us to catch the max vlan -ENOSPC error without adding
      an unnecessary error message to the kernel log.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      154ee116
    • Shannon Nelson's avatar
      ionic: tame the filter no space message · f91958cc
      Shannon Nelson authored
      Override the automatic AdminQ error message in order to
      capture the potential No Space message when we hit the
      max vlan limit, and add additional messaging to detail
      what filter failed.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f91958cc
    • Shannon Nelson's avatar
      ionic: allow adminq requests to override default error message · 8c9d956a
      Shannon Nelson authored
      The AdminQ handler has an error handler that automatically prints
      an error message when the request has failed.  However, there are
      situations where the caller can expect that it might fail and has
      an alternative strategy, thus may not want the error message sent
      to the log, such as hitting -ENOSPC when adding a new vlan id.
      
      We add a new interface to the AdminQ API to allow for override of
      the default behavior, and an interface to the use standard error
      message formatting.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c9d956a
    • Shannon Nelson's avatar
      ionic: handle vlan id overflow · 9b0b6ba6
      Shannon Nelson authored
      Add vlans to the existing rx_filter_sync mechanics currently
      used for managing mac filters.
      
      Older versions of our firmware had no enforced limits on the
      number of vlans that the LIF could request, but requesting large
      numbers of vlans caused issues in FW memory management, so an
      arbitrary limit was added in the FW.  The FW now returns -ENOSPC
      when it hits that limit, which the driver needs to handle.
      
      Unfortunately, the FW doesn't advertise the vlan id limit,
      as it does with mac filters, so the driver won't know the
      limit until it bumps into it.  We'll grab the current vlan id
      count and use that as the limit from there on and thus prevent
      getting any more -ENOSPC errors.
      
      Just as is done for the mac filters, the device puts the device
      into promiscuous mode when -ENOSPC is seen for vlan ids, and
      the driver will track the vlans that aren't synced to the FW.
      When vlans are removed, the driver will retry the un-synced
      vlans.  If all outstanding vlans are synced, the promiscuous
      mode will be disabled.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b0b6ba6
    • Shannon Nelson's avatar
      ionic: generic filter delete · c2b63d34
      Shannon Nelson authored
      Similar to the filter add, make a generic filter delete.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2b63d34
    • Shannon Nelson's avatar
      ionic: generic filter add · eba688b1
      Shannon Nelson authored
      In preparation for adding vlan overflow management, rework
      the ionic_lif_addr_add() function to something a little more
      generic that can be used for other filter types.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eba688b1
    • Shannon Nelson's avatar
      ionic: add generic filter search · ff542fbe
      Shannon Nelson authored
      In preparation for enhancing vlan filter management,
      add a filter search routine that can figure out for
      itself which type of filter search is needed.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff542fbe
    • Shannon Nelson's avatar
      ionic: remove mac overflow flags · 4ed642cc
      Shannon Nelson authored
      The overflow flags really aren't useful and we don't need lif
      struct elements to track them.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ed642cc
    • Shannon Nelson's avatar
      ionic: move lif mac address functions · 1d4ddc4a
      Shannon Nelson authored
      The routines that add and delete mac addresses from the
      firmware really should be in the file with the rest of
      the filter management.  This simply moves the functions
      with no logic changes.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d4ddc4a
    • Shannon Nelson's avatar
      ionic: add filterlist to debugfs · c1634b11
      Shannon Nelson authored
      Dump the filter list to debugfs - includes the device-assigned
      filter id and the sync'd-to-hardware status.
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1634b11
  2. 09 Oct, 2021 9 commits
  3. 08 Oct, 2021 21 commits