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]
Date: Tue, 8 Aug 2023 11:06:58 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	<intel-wired-lan@...ts.osuosl.org>
CC: <netdev@...r.kernel.org>, Jacob Keller <jacob.e.keller@...el.com>, "Simon
 Horman" <horms@...nel.org>
Subject: Re: [PATCH iwl-next v3 2/3] ice: embed &ice_rq_event_info event into
 struct ice_aq_task



On 8/7/2023 8:58 AM, Przemek Kitszel wrote:
> Expose struct ice_aq_task to callers,
> what takes burden of memory ownership out from AQ-wait family of functions,
> and reduces need for heap-based allocations.
> 
> Embed struct ice_rq_event_info event into struct ice_aq_task
> (instead of it being a ptr). to remove some more code from the callers.
> 
> Subsequent commit will improve more based on this one.
> 
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> 
> ---
> add/remove: 0/0 grow/shrink: 3/1 up/down: 266/-68 (198)
> ---
>   drivers/net/ethernet/intel/ice/ice.h          | 20 ++++++++-
>   .../net/ethernet/intel/ice/ice_fw_update.c    | 42 +++++++++----------
>   drivers/net/ethernet/intel/ice/ice_main.c     | 29 ++-----------
>   3 files changed, 42 insertions(+), 49 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> index 34be1cb1e28f..6346283c5d14 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -931,8 +931,24 @@ void ice_fdir_release_flows(struct ice_hw *hw);
>   void ice_fdir_replay_flows(struct ice_hw *hw);
>   void ice_fdir_replay_fltrs(struct ice_pf *pf);
>   int ice_fdir_create_dflt_rules(struct ice_pf *pf);
> -int ice_aq_wait_for_event(struct ice_pf *pf, u16 opcode, unsigned long timeout,
> -			  struct ice_rq_event_info *event);
> +
> +enum ice_aq_task_state {
> +	ICE_AQ_TASK_WAITING,
> +	ICE_AQ_TASK_COMPLETE,
> +	ICE_AQ_TASK_CANCELED,
> +};
> +
> +struct ice_aq_task {
> +	struct hlist_node entry;
> +	struct ice_rq_event_info event;
> +	enum ice_aq_task_state state;
> +	u16 opcode;
> +};
> +
> +

CHECK: Please don't use multiple blank lines

> +int ice_aq_wait_for_event(struct ice_pf *pf, struct ice_aq_task *task,
> +			  u16 opcode, unsigned long timeout);
> +
>   int ice_open(struct net_device *netdev);
>   int ice_open_internal(struct net_device *netdev);
>   int ice_stop(struct net_device *netdev);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ