netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	 Tony Nguyen <anthony.l.nguyen@intel.com>,
	Lukasz Czapnik <lukasz.czapnik@intel.com>,
	 Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	 Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
	 Wojciech Drewek <wojciech.drewek@intel.com>
Subject: Re: [PATCH iwl-next v1] ice: do not init struct ice_adapter more times than needed
Date: Wed, 19 Jun 2024 15:08:11 +0200	[thread overview]
Message-ID: <CADEbmW2D31pS16hegetagxSw+2ERs1Ze5P7WSnsaOGWegwku6A@mail.gmail.com> (raw)
In-Reply-To: <20240617132407.107292-1-przemyslaw.kitszel@intel.com>

On Mon, Jun 17, 2024 at 3:25 PM Przemek Kitszel
<przemyslaw.kitszel@intel.com> wrote:
> Allocate and initialize struct ice_adapter object only once per physical
> card instead of once per port. This is not a big deal by now, but we want
> to extend this struct more and more in the near future. Our plans include
> PTP stuff and a devlink instance representing whole-device/physical card.
>
> Transactions requiring to be sleep-able (like those doing user (here ice)
> memory allocation) must be performed with an additional (on top of xarray)
> mutex. Adding it here removes need to xa_lock() manually.
>
> Since this commit is a reimplementation of ice_adapter_get(), a rather new
> scoped_guard() wrapper for locking is used to simplify the logic.
>
> It's worth to mention that xa_insert() use gives us both slot reservation
> and checks if it is already filled, what simplifies code a tiny bit.
>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_adapter.c | 60 +++++++++-----------
>  1 file changed, 28 insertions(+), 32 deletions(-)

Reviewed-by: Michal Schmidt <mschmidt@redhat.com>


  parent reply	other threads:[~2024-06-19 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 13:24 [PATCH iwl-next v1] ice: do not init struct ice_adapter more times than needed Przemek Kitszel
2024-06-18 13:33 ` Simon Horman
2024-06-19 13:08 ` Michal Schmidt [this message]
2024-06-24  6:50 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy

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=CADEbmW2D31pS16hegetagxSw+2ERs1Ze5P7WSnsaOGWegwku6A@mail.gmail.com \
    --to=mschmidt@redhat.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=lukasz.czapnik@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sergey.temerkhanov@intel.com \
    --cc=wojciech.drewek@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;
as well as URLs for NNTP newsgroup(s).