public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Danikka Jelski <cmj136@scarletmail.rutgers.edu>
Cc: cocci@inria.fr
Subject: Re: [cocci] Modifying BPF map definitions?
Date: Thu, 6 Mar 2025 13:13:38 +0100	[thread overview]
Message-ID: <14e44e1b-e35d-4cc9-ac76-2e4c05c15849@web.de> (raw)
In-Reply-To: <CABDMBwh_LRL+Dxz94caz+ybJT5MLP9usBs12fLeDHaTSnOES3A@mail.gmail.com>

…
> Specifically, I was trying to modify BPF map definitions, and I encountered an issue when applying a patch:
> The error I get is:

How do you think about to share any additional information as text
instead of linked pictures?


>     Can you provide any guidance on how to properly match and modify this struct in Coccinelle?

I observed that another transformation approach gets accepted
(also together with the software version “1.3-00043-gcca22217d”).


@replacement@
@@
 __uint(type,
-       BPF_MAP_TYPE_ARRAY
+       BPF_MAP_TYPE_PERCPU_ARRAY
       );


I am unsure under which circumstances a subsequent software version will become able
to generate patches accordingly.

Regards,
Markus

  reply	other threads:[~2025-03-06 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 21:14 [cocci] Question about Coccinelle (with __uint macro) Danikka Jelski
2025-03-06 12:13 ` Markus Elfring [this message]
2025-03-06 12:19   ` [cocci] Modifying BPF map definitions? Victor Gambier
2025-03-06 12:19 ` [cocci] Question about Coccinelle (with __uint macro) Julia Lawall
2025-03-06 14:43   ` [cocci] Modifying BPF map definitions? Markus Elfring

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=14e44e1b-e35d-4cc9-ac76-2e4c05c15849@web.de \
    --to=markus.elfring@web.de \
    --cc=cmj136@scarletmail.rutgers.edu \
    --cc=cocci@inria.fr \
    /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