1. 03 Apr, 2023 16 commits
  2. 02 Apr, 2023 7 commits
    • Tom Rix's avatar
      net: alteon: remove unused len variable · 51aaa682
      Tom Rix authored
      clang with W=1 reports
      drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable
        'len' set but not used [-Werror,-Wunused-but-set-variable]
                      int i, len = 0;
                             ^
      This variable is not used so remove it.
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51aaa682
    • David S. Miller's avatar
      Merge branch 'mlxsw-transceiver-trip-points' · f85b8824
      David S. Miller authored
      Petr Machata says:
      
      ====================
      mlxsw: Use static trip points for transceiver modules
      
      Ido Schimmel writes:
      
      See patch #1 for motivation and implementation details.
      
      Patches #2-#3 are simple cleanups as a result of the changes in the
      first patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f85b8824
    • Ido Schimmel's avatar
      mlxsw: core_thermal: Simplify transceiver module get_temp() callback · cc19439f
      Ido Schimmel authored
      The get_temp() callback of a thermal zone associated with a transceiver
      module no longer needs to read the temperature thresholds of the module.
      Therefore, simplify the callback by only reading the temperature.
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc19439f
    • Ido Schimmel's avatar
      mlxsw: core_thermal: Make mlxsw_thermal_module_init() void · c1536d85
      Ido Schimmel authored
      The function can no longer fail so make it void and remove the
      associated error path.
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1536d85
    • Ido Schimmel's avatar
      mlxsw: core_thermal: Use static trip points for transceiver modules · 5601ef91
      Ido Schimmel authored
      The driver registers a thermal zone for each transceiver module and
      tries to set the trip point temperatures according to the thresholds
      read from the transceiver. If a threshold cannot be read or if a
      transceiver is unplugged, the trip point temperature is set to zero,
      which means that it is disabled as far as the thermal subsystem is
      concerned.
      
      A recent change in the thermal core made it so that such trip points are
      no longer marked as disabled, which lead the thermal subsystem to
      incorrectly set the associated cooling devices to the their maximum
      state [1]. A fix to restore this behavior was merged in commit
      f1b80a38 ("thermal: core: Restore behavior regarding invalid trip
      points"). However, the thermal maintainer suggested to not rely on this
      behavior and instead always register a valid array of trip points [2].
      
      Therefore, create a static array of trip points with sane defaults
      (suggested by Vadim) and register it with the thermal zone of each
      transceiver module. User space can choose to override these defaults
      using the thermal zone sysfs interface since these files are writeable.
      
      Before:
      
       $ cat /sys/class/thermal/thermal_zone11/type
       mlxsw-module11
       $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp
       65000
       75000
       80000
      
      After:
      
       $ cat /sys/class/thermal/thermal_zone11/type
       mlxsw-module11
       $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp
       55000
       65000
       80000
      
      Also tested by reverting commit f1b80a38 ("thermal: core: Restore
      behavior regarding invalid trip points") and making sure that the
      associated cooling devices are not set to their maximum state.
      
      [1] https://lore.kernel.org/linux-pm/ZA3CFNhU4AbtsP4G@shredder/
      [2] https://lore.kernel.org/linux-pm/f78e6b70-a963-c0ca-a4b2-0d4c6aeef1fb@linaro.org/Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5601ef91
    • Jakub Kicinski's avatar
      net: minor reshuffle of napi_struct · dd2d6604
      Jakub Kicinski authored
      napi_id is read by GRO and drivers to mark skbs, and it currently
      sits at the end of the structure, in a mostly unused cache line.
      Move it up into a hole, and separate the clearly control path
      fields from the important ones.
      
      Before:
      
      struct napi_struct {
      	struct list_head           poll_list;            /*     0    16 */
      	long unsigned int          state;                /*    16     8 */
      	int                        weight;               /*    24     4 */
      	int                        defer_hard_irqs_count; /*    28     4 */
      	long unsigned int          gro_bitmask;          /*    32     8 */
      	int                        (*poll)(struct napi_struct *, int); /*    40     8 */
      	int                        poll_owner;           /*    48     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      
      	struct net_device *        dev;                  /*    56     8 */
      	/* --- cacheline 1 boundary (64 bytes) --- */
      	struct gro_list            gro_hash[8];          /*    64   192 */
      	/* --- cacheline 4 boundary (256 bytes) --- */
      	struct sk_buff *           skb;                  /*   256     8 */
      	struct list_head           rx_list;              /*   264    16 */
      	int                        rx_count;             /*   280     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      
      	struct hrtimer             timer;                /*   288    64 */
      
      	/* XXX last struct has 4 bytes of padding */
      
      	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
      	struct list_head           dev_list;             /*   352    16 */
      	struct hlist_node          napi_hash_node;       /*   368    16 */
      	/* --- cacheline 6 boundary (384 bytes) --- */
      	unsigned int               napi_id;              /*   384     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      
      	struct task_struct *       thread;               /*   392     8 */
      
      	/* size: 400, cachelines: 7, members: 17 */
      	/* sum members: 388, holes: 3, sum holes: 12 */
      	/* paddings: 1, sum paddings: 4 */
      	/* last cacheline: 16 bytes */
      };
      
      After:
      
      struct napi_struct {
      	struct list_head           poll_list;            /*     0    16 */
      	long unsigned int          state;                /*    16     8 */
      	int                        weight;               /*    24     4 */
      	int                        defer_hard_irqs_count; /*    28     4 */
      	long unsigned int          gro_bitmask;          /*    32     8 */
      	int                        (*poll)(struct napi_struct *, int); /*    40     8 */
      	int                        poll_owner;           /*    48     4 */
      
      	/* XXX 4 bytes hole, try to pack */
      
      	struct net_device *        dev;                  /*    56     8 */
      	/* --- cacheline 1 boundary (64 bytes) --- */
      	struct gro_list            gro_hash[8];          /*    64   192 */
      	/* --- cacheline 4 boundary (256 bytes) --- */
      	struct sk_buff *           skb;                  /*   256     8 */
      	struct list_head           rx_list;              /*   264    16 */
      	int                        rx_count;             /*   280     4 */
      	unsigned int               napi_id;              /*   284     4 */
      	struct hrtimer             timer;                /*   288    64 */
      
      	/* XXX last struct has 4 bytes of padding */
      
      	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
      	struct task_struct *       thread;               /*   352     8 */
      	struct list_head           dev_list;             /*   360    16 */
      	struct hlist_node          napi_hash_node;       /*   376    16 */
      
      	/* size: 392, cachelines: 7, members: 17 */
      	/* sum members: 388, holes: 1, sum holes: 4 */
      	/* paddings: 1, sum paddings: 4 */
      	/* forced alignments: 1 */
      	/* last cacheline: 8 bytes */
      } __attribute__((__aligned__(8)));
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd2d6604
    • Sylwester Dziedziuch's avatar
      i40e: Add support for VF to specify its primary MAC address · ceb29474
      Sylwester Dziedziuch authored
      Currently in the i40e driver there is no implementation of different
      MAC address handling depending on whether it is a legacy or primary.
      Introduce new checks for VF to be able to specify its primary MAC
      address based on the VIRTCHNL_ETHER_ADDR_PRIMARY type.
      
      Primary MAC address are treated differently compared to legacy
      ones in a scenario where:
      1. If a unicast MAC is being added and it's specified as
      VIRTCHNL_ETHER_ADDR_PRIMARY, then replace the current
      default_lan_addr.addr.
      2. If a unicast MAC is being deleted and it's type
      is specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then zero the
      hw_lan_addr.addr.
      Signed-off-by: default avatarSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
      Signed-off-by: default avatarMateusz Palczewski <mateusz.palczewski@intel.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ceb29474
  3. 01 Apr, 2023 1 commit
  4. 31 Mar, 2023 16 commits