mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: intel-wired-lan@lists.osuosl.org,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Tatyana Nikolova <tatyana.e.nikolova@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	Lee Trager <lee@trager.us>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
	Ahmed Zaki <ahmed.zaki@intel.com>,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Karlsson,
	Magnus" <magnus.karlsson@intel.com>,
	Emil Tantilov <emil.s.tantilov@intel.com>,
	Madhu Chittim <madhu.chittim@intel.com>,
	Josh Hay <joshua.a.hay@intel.com>,
	Milena Olech <milena.olech@intel.com>,
	pavan.kumar.linga@intel.com, "Singhai,
	Anjali" <anjali.singhai@intel.com>,
	Michal Kubiak <michal.kubiak@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 08/14] idpf: refactor idpf to use libie controlq and Xn APIs
Date: Fri, 25 Apr 2025 12:30:37 +0200	[thread overview]
Message-ID: <32f03225-636d-4677-b5f6-2dde8ab76b6d@molgen.mpg.de> (raw)
In-Reply-To: <aAtfVAp38hKWtx-n@soc-5CG4396X81.clients.intel.com>

Dear Larysa,


Am 25.04.25 um 12:11 schrieb Larysa Zaremba:
> On Thu, Apr 24, 2025 at 05:32:17PM +0200, Paul Menzel wrote:

>> Am 24.04.25 um 13:32 schrieb Larysa Zaremba:
>>> From: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
>>>
>>> Support to initialize and configure controlq, Xn manager,
>>> MMIO and reset APIs was introduced in libie. As part of it,
>>> most of the existing controlq structures are renamed and
>>> modified. Use those APIs in idpf and make all the necessary changes.
>>>
>>> Previously for the send and receive virtchnl messages, there
>>> used to be a memcpy involved in controlq code to copy the buffer
>>> info passed by the send function into the controlq specific
>>> buffers. There was no restriction to use automatic memory
>>> in that case. The new implementation in libie removed copying
>>> of the send buffer info and introduced DMA mapping of the
>>> send buffer itself. To accommodate it, use dynamic memory for
>>> the send buffers. In case of receive, idpf receives a page pool
>>> buffer allocated by the libie and care should be taken to
>>> release it after use in the idpf.
>>>
>>> The changes are fairly trivial and localized, with a notable exception
>>> being the consolidation of idpf_vc_xn_shutdown and idpf_deinit_dflt_mbx
>>> under the latter name. This has some additional consequences that are
>>> addressed in the following patches.
>>
>> (You could reflow the text above to have consistent line length.)

Re-flowing would save at least one line.

>> Also, how can your patchset be verified?
> 
> Just normal regression testing with kernel debug options enabled, a large
> portion of the touched code is covered by just loading-unloading the driver and
> doing a PCI reset, stuff like PTP needs to be checked separately, because it
> heavily uses control queue itself.
> 
>> Does the module size change?
> 
> idpf size does decrease, but overall size increases. It was 585728B for idpf,
> now it is 557056 + 16384 + 53248 [B], this amounts to +40KB of storage usage on
> systems that will not use ixd.
> 
> After
> *********
> idpf                  557056  0
> ixd                    40960  0
> libie_pci              16384  2 ixd,idpf
> libie_cp               53248  2 ixd,idpf
> libeth                 16384  2 idpf,libie_cp
> 
> Before
> *********
> idpf                  585728  0
> libeth                 16384  1 idpf
> 
>> Is the resource usage different for certain test cases?
> 
> We now pre-allocate small TX buffers, so that does increase the memory usage,
> but reduces the need to allocate. This results in additional 256 * 128B of
> memory permanently used, but our ctlq RX buffers need to be of size 4096B anyway
> (not changed by the patchset), so this is hardly noticable.
> 
> The worst-case memory usage should stay almost the same + abovementioned 32KB.
> As for the timings, we are mostly limited by the HW response time, which is far
> from instant.

Thank you for all these details. I’d love to see those in the commit 
message too.

>>> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
>>> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
>>> Co-developed-by: Larysa Zaremba <larysa.zaremba@intel.com>
>>> Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
>>> ---
>>>    drivers/net/ethernet/intel/idpf/Kconfig       |    1 +
>>>    drivers/net/ethernet/intel/idpf/Makefile      |    2 -
>>>    drivers/net/ethernet/intel/idpf/idpf.h        |   42 +-
>>>    .../net/ethernet/intel/idpf/idpf_controlq.c   |  624 -------
>>>    .../net/ethernet/intel/idpf/idpf_controlq.h   |  130 --
>>>    .../ethernet/intel/idpf/idpf_controlq_api.h   |  177 --
>>>    .../ethernet/intel/idpf/idpf_controlq_setup.c |  171 --
>>>    drivers/net/ethernet/intel/idpf/idpf_dev.c    |   91 +-
>>>    drivers/net/ethernet/intel/idpf/idpf_lib.c    |   49 +-
>>>    drivers/net/ethernet/intel/idpf/idpf_main.c   |   87 +-
>>>    drivers/net/ethernet/intel/idpf/idpf_mem.h    |   20 -
>>>    drivers/net/ethernet/intel/idpf/idpf_txrx.h   |    2 +-
>>>    drivers/net/ethernet/intel/idpf/idpf_vf_dev.c |   89 +-
>>>    .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 1622 ++++++-----------
>>>    .../net/ethernet/intel/idpf/idpf_virtchnl.h   |   89 +-
>>>    .../ethernet/intel/idpf/idpf_virtchnl_ptp.c   |  303 ++-
>>>    16 files changed, 886 insertions(+), 2613 deletions(-)
>>>    delete mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.c
>>>    delete mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.h
>>>    delete mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_api.h
>>>    delete mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
>>>    delete mode 100644 drivers/net/ethernet/intel/idpf/idpf_mem.h
>>
>> […]

Kind regards,

Paul

  reply	other threads:[~2025-04-25 10:32 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 11:32 [PATCH iwl-next v2 00/14] Introduce iXD driver Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 01/14] virtchnl: create 'include/linux/intel' and move necessary header files Larysa Zaremba
2025-04-28 16:15   ` Simon Horman
2025-04-29 18:47     ` [Intel-wired-lan] " Jacob Keller
2025-04-30  8:55       ` Simon Horman
2025-05-05  7:56         ` Larysa Zaremba
2025-05-06 15:59           ` Simon Horman
2025-05-07  7:13             ` Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 02/14] virtchnl: introduce control plane version fields Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 03/14] libie: add PCI device initialization helpers to libie Larysa Zaremba
2025-04-28 16:56   ` Simon Horman
2025-05-05  6:56     ` Larysa Zaremba
2025-05-06 15:56       ` Simon Horman
2025-04-24 11:32 ` [PATCH iwl-next v2 04/14] libeth: allow to create fill queues without NAPI Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 05/14] libie: add control queue support Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 06/14] libie: add bookkeeping support for control queue messages Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 07/14] idpf: remove 'vport_params_reqd' field Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 08/14] idpf: refactor idpf to use libie controlq and Xn APIs Larysa Zaremba
2025-04-24 15:32   ` [Intel-wired-lan] " Paul Menzel
2025-04-24 15:37     ` Keller, Jacob E
2025-04-25 10:22       ` Larysa Zaremba
2025-04-25 10:11     ` Larysa Zaremba
2025-04-25 10:30       ` Paul Menzel [this message]
2025-04-28 18:03   ` Simon Horman
2025-05-05  7:09     ` Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 09/14] idpf: make mbx_task queueing and cancelling more consistent Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 10/14] idpf: print a debug message and bail in case of non-event ctlq message Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 11/14] ixd: add basic driver framework for Intel(R) Control Plane Function Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 12/14] ixd: add reset checks and initialize the mailbox Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 13/14] ixd: add the core initialization Larysa Zaremba
2025-04-24 11:32 ` [PATCH iwl-next v2 14/14] ixd: add devlink support Larysa Zaremba

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=32f03225-636d-4677-b5f6-2dde8ab76b6d@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=ahmed.zaki@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anjali.singhai@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=joshua.a.hay@intel.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=lee@trager.us \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=maddy@linux.ibm.com \
    --cc=madhu.chittim@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=mateusz.polchlopek@intel.com \
    --cc=michal.kubiak@intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=milena.olech@intel.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.kumar.linga@intel.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=tatyana.e.nikolova@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

all inboxes | Powered by JetHome®