Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: netdev@vger.kernel.org, Simon Horman <horms@kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 2/3] ice: embed &ice_rq_event_info event into struct ice_aq_task
Date: Tue, 8 Aug 2023 11:06:58 -0700	[thread overview]
Message-ID: <a902ec36-2302-1f98-6d8d-455eea083658@intel.com> (raw)
In-Reply-To: <20230807155848.90907-3-przemyslaw.kitszel@intel.com>



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@intel.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);

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-08-08 18:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 15:58 [Intel-wired-lan] [PATCH iwl-next v3 0/3] ice: split ice_aq_wait_for_event() func into two Przemek Kitszel
2023-08-07 15:58 ` [Intel-wired-lan] [PATCH iwl-next v3 1/3] ice: ice_aq_check_events: fix off-by-one check when filling buffer Przemek Kitszel
2023-08-08 18:06   ` Tony Nguyen
2023-08-08 21:14     ` Przemek Kitszel
2023-08-07 15:58 ` [Intel-wired-lan] [PATCH iwl-next v3 2/3] ice: embed &ice_rq_event_info event into struct ice_aq_task Przemek Kitszel
2023-08-08 18:06   ` Tony Nguyen [this message]
2023-08-07 15:58 ` [Intel-wired-lan] [PATCH iwl-next v3 3/3] ice: split ice_aq_wait_for_event() func into two Przemek Kitszel
2023-08-07 16:45 ` [Intel-wired-lan] [PATCH iwl-next v3 0/3] " Keller, Jacob E

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a902ec36-2302-1f98-6d8d-455eea083658@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox