DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v1 6/6] net/ice: centralize flow rule memory management
Date: Wed, 21 Oct 2026 12:07:56 +0200	[thread overview]
Message-ID: <99fdb74e-501b-429b-9ab2-57222df2b232@intel.com> (raw)
In-Reply-To: <atiNHzWR1DQZ6Dl8@bricha3-mobl1.ger.corp.intel.com>

On 10/21/2026 11:59 AM, Bruce Richardson wrote:
> On Tue, Oct 20, 2026 at 01:11:09PM +0100, Anatoly Burakov wrote:
>> Flow engines manage rule memory independently, with parsers returning
>> either temporary metadata or shared scratch storage. This spreads
>> ownership and cleanup across parsing, creation, destruction and
>> uninitialization across the flow infrastructure, which is difficult to
>> verify, reason about, and may have hidden bugs.
>>
>> Make parsers allocate the final rule and transfer ownership to the
>> generic flow layer on success. Free rules centrally after validation,
>> failed creation, successful destruction and uninitialization, retaining
>> them when destruction fails. Parsers clean up their own allocations on
>> failure.
>>
>> Some engines, in addition to the rule itself, will also allocate additional
>> data for the flow (e.g. RAW pattern buffer in FDIR engine). We can make the
>> flow memory management centralized in generic flow, but this additional
>> data is engine-specific, so use the `free` callbacks to release only said
>> additional flow data. Remove the RSS and ACL callbacks, the FDIR and ACL
>> scratch storage, and the redundant allocations and copies during rule
>> creation, and use stack storage where appropriate.
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> After this cleanup, it looks like the flow parameter to each engine can be
> removed completely, since all four engines mark it as __rte_unused now.
> 
Yes, true. In ice, flows are basically two (or more) allocations - the 
flow header itself, and the actual rule it encodes (with whatever nested 
allocations the rule has - switch and FDIR RAW do that), but all of the 
latter happens inside the `flow->rule` pointer, so the `flow` itself is 
not needed. Arguably, `meta` also needs renaming into `rule`, because 
that's what it does now: it is meant to be a pointer to `flow->rule`.
-- 
Thanks,
Anatoly

  reply	other threads:[~2026-10-21 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 12:11 [PATCH v1 0/6] Centralize flow memory management in ICE Anatoly Burakov
2026-10-20 12:11 ` [PATCH v1 1/6] net/ice: release ACL slot on entry creation failure Anatoly Burakov
2026-10-21  9:17   ` Bruce Richardson
2026-10-20 12:11 ` [PATCH v1 2/6] net/ice: fix inconsistent state on FDIR failure Anatoly Burakov
2026-10-21  9:17   ` Bruce Richardson
2026-10-20 12:11 ` [PATCH v1 3/6] net/ice: standardize VOID handling in flow parsers Anatoly Burakov
2026-10-21  9:18   ` Bruce Richardson
2026-10-20 12:11 ` [PATCH v1 4/6] net/ice: remove temporary flow pattern buffer Anatoly Burakov
2026-10-21  9:19   ` Bruce Richardson
2026-10-20 12:11 ` [PATCH v1 5/6] net/ice: use caller-owned pattern match storage Anatoly Burakov
2026-10-21  9:25   ` Bruce Richardson
2026-10-21  9:55     ` Burakov, Anatoly
2026-10-20 12:11 ` [PATCH v1 6/6] net/ice: centralize flow rule memory management Anatoly Burakov
2026-10-21  9:59   ` Bruce Richardson
2026-10-21 10:07     ` Burakov, Anatoly [this message]
2026-10-21 10:02 ` [PATCH v1 0/6] Centralize flow memory management in ICE Bruce Richardson

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=99fdb74e-501b-429b-9ab2-57222df2b232@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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