1. 02 Jul, 2020 35 commits
  2. 01 Jul, 2020 5 commits
    • Bruce Allan's avatar
      ice: replace single-element array used for C struct hack · 66486d89
      Bruce Allan authored
      Convert the pre-C90-extension "C struct hack" method (using a single-
      element array at the end of a structure for implementing variable-length
      types) to the preferred use of C99 flexible array member.
      
      Additional code cleanups were done near areas affected by this change.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      66486d89
    • Bruce Allan's avatar
      ice: avoid unnecessary single-member variable-length structs · b3c38904
      Bruce Allan authored
      There are a number of structures that consist of a one-element array as the
      only struct member.  Some of those are unused so remove them. Others are
      used to index into a buffer/array consisting of a variable number of a
      different data or structure type.  Those are unnecessary since we can use
      simple pointer arithmetic or index directly into the buffer to access
      individual elements of the buffer/array.
      
      Additional code cleanups were done near areas affected by this change.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b3c38904
    • Jarod Wilson's avatar
      bonding: allow xfrm offload setup post-module-load · a3b658cf
      Jarod Wilson authored
      At the moment, bonding xfrm crypto offload can only be set up if the bonding
      module is loaded with active-backup mode already set. We need to be able to
      make this work with bonds set to AB after the bonding driver has already
      been loaded.
      
      So what's done here is:
      
      1) move #define BOND_XFRM_FEATURES to net/bonding.h so it can be used
      by both bond_main.c and bond_options.c
      2) set BOND_XFRM_FEATURES in bond_dev->hw_features universally, rather than
      only when loading in AB mode
      3) wire up xfrmdev_ops universally too
      4) disable BOND_XFRM_FEATURES in bond_dev->features if not AB
      5) exit early (non-AB case) from bond_ipsec_offload_ok, to prevent a
      performance hit from traversing into the underlying drivers
      5) toggle BOND_XFRM_FEATURES in bond_dev->wanted_features and call
      netdev_change_features() from bond_option_mode_set()
      
      In my local testing, I can change bonding modes back and forth on the fly,
      have hardware offload work when I'm in AB, and see no performance penalty
      to non-AB software encryption, despite having xfrm bits all wired up for
      all modes now.
      
      Fixes: 18cb261a ("bonding: support hardware encryption offload to slaves")
      Reported-by: default avatarHuy Nguyen <huyn@mellanox.com>
      CC: Saeed Mahameed <saeedm@mellanox.com>
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Jakub Kicinski <kuba@kernel.org>
      CC: Steffen Klassert <steffen.klassert@secunet.com>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: netdev@vger.kernel.org
      CC: intel-wired-lan@lists.osuosl.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3b658cf
    • Jacob Keller's avatar
      ice: implement snapshot for device capabilities · 8d7aab35
      Jacob Keller authored
      Add a new devlink region used for capturing a snapshot of the device
      capabilities buffer which is reported by the firmware over the AdminQ.
      This information can useful in debugging driver and firmware
      interactions.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      8d7aab35
    • David S. Miller's avatar
      Merge branch 'net-ipa-endpoint-configuration-updates' · 651f8bd4
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: endpoint configuration updates
      
      This series updates code that configures IPA endpoints.  The changes
      made mainly affect access to registers that are valid only for RX, or
      only for TX endpoints.
      
      The first three patches avoid writing endpoint registers if they are
      not defined to be valid.  The fourth patch slightly modifies the
      parameters for the offset macros used for these endpoint registers,
      to make it explicit when only some endpoints are valid.
      
      The last patch just tweaks one line of code so it uses a convention
      used everywhere else in the driver.
      
      Version 2 of this series eliminates some of the "assert()" comments
      that Jakub inquired about.  The ones removed will actually go away
      in an upcoming (not-yet-posted) patch series anyway.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      651f8bd4