lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3122DE794012D27B44C02A5EBD8DA@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Wed, 13 Dec 2023 02:58:01 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, "Brandeburg, Jesse"
	<jesse.brandeburg@...el.com>, Julia Lawall <Julia.Lawall@...ia.fr>, "Lobakin,
 Aleksander" <aleksander.lobakin@...el.com>, "marcin.szycik@...ux.intel.com"
	<marcin.szycik@...ux.intel.com>, "horms@...nel.org" <horms@...nel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2 06/15] ice: field prep
 conversion

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Jesse Brandeburg
> Sent: Wednesday, December 6, 2023 6:31 AM
>  To: intel-wired-lan@...ts.osuosl.org
> Cc: Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Brandeburg, Jesse <jesse.brandeburg@...el.com>; Julia Lawall <Julia.Lawall@...ia.fr>; Lobakin, Aleksander <aleksander.lobakin@...el.com>; marcin.szycik@...ux.intel.com; horms@...nel.org; netdev@...r.kernel.org
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 06/15] ice: field prep conversion
>
> Refactor ice driver to use FIELD_PREP(), which reduces lines of code
> and adds clarity of intent.
>
> This code was generated by the following coccinelle/spatch script and
> then manually repaired.
>
> Several places I changed to OR into a single variable with |= instead of
> using a multi-line statement with trailing OR operators, as it
> (subjectively) makes the code clearer.
>
> A local variable vmvf_and_timeout was created and used to avoid multiple
> logical ORs being __le16 converted, which shortened some lines and makes
> the code cleaner.
>
> Also clean up a couple of places where conversions were made to have the
> code read more clearly/consistently.
>
> @prep2@
> constant shift,mask;
> type T;
> expression a;
> @@
> -(((T)(a) << shift) & mask)
> +FIELD_PREP(mask, a)
>
> @prep@
> constant shift,mask;
> type T;
> expression a;
> @@
> -((T)((a) << shift) & mask)
> +FIELD_PREP(mask, a)
>
> Cc: Julia Lawall <Julia.Lawall@...ia.fr>
> CC: Alexander Lobakin <aleksander.lobakin@...el.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
> ---
> v2: added a couple more preps, some code cleanups found when looking for
> le32_set/encode opportunities.
> ---
>  drivers/net/ethernet/intel/ice/ice_base.c     | 20 ++---
>  drivers/net/ethernet/intel/ice/ice_common.c   | 35 ++++-----
>  drivers/net/ethernet/intel/ice/ice_dcb.c      |  3 +-
>  drivers/net/ethernet/intel/ice/ice_dcb_lib.c  |  2 +-
>  drivers/net/ethernet/intel/ice/ice_eswitch.c  |  4 +-
>  drivers/net/ethernet/intel/ice/ice_fdir.c     | 69 ++++++-----------
>  .../net/ethernet/intel/ice/ice_flex_pipe.c    |  8 +-
>  drivers/net/ethernet/intel/ice/ice_flow.c     |  2 +-
>  drivers/net/ethernet/intel/ice/ice_lag.c      |  7 +-
>  drivers/net/ethernet/intel/ice/ice_lib.c      | 52 +++++--------
>  drivers/net/ethernet/intel/ice/ice_ptp.c      |  9 +--
>  drivers/net/ethernet/intel/ice/ice_sriov.c    | 38 ++++------
>  drivers/net/ethernet/intel/ice/ice_switch.c   | 75 +++++++++----------
>  drivers/net/ethernet/intel/ice/ice_txrx.c     |  6 +-
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c |  8 +-
>  .../ethernet/intel/ice/ice_virtchnl_fdir.c    |  2 +-
>  .../net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 25 +++----
>  17 files changed, 147 insertions(+), 218 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ