From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Cc: Danikka Jelski <cmj136@scarletmail.rutgers.edu>
Subject: Re: [cocci] Modifying BPF map definitions?
Date: Thu, 6 Mar 2025 15:43:39 +0100 [thread overview]
Message-ID: <19da83f6-86c7-4cbe-8d4f-be5569bf2fca@web.de> (raw)
In-Reply-To: <f3c7b17c-dbdc-44a3-43d9-bca26a95bf3a@inria.fr>
…
>> __uint(max_entries, 1);
>>
>> } port_state SEC(".maps");
…
> you can get rid of "port_state
> SEC(".maps");". …
How do you think about the applicability of another transformation approach?
@replacement2@
attribute name SEC;
declarer name __uint;
constant char[] text;
@@
struct
{
...
__uint(type,
- BPF_MAP_TYPE_ARRAY
+ BPF_MAP_TYPE_PERCPU_ARRAY
);
...
} port_state SEC(text);
Regards,
Markus
prev parent reply other threads:[~2025-03-06 14:43 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 ` [cocci] Modifying BPF map definitions? Markus Elfring
2025-03-06 12:19 ` Victor Gambier
2025-03-06 12:19 ` [cocci] Question about Coccinelle (with __uint macro) Julia Lawall
2025-03-06 14:43 ` Markus Elfring [this message]
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=19da83f6-86c7-4cbe-8d4f-be5569bf2fca@web.de \
--to=markus.elfring@web.de \
--cc=cmj136@scarletmail.rutgers.edu \
--cc=cocci@inria.fr \
--cc=julia.lawall@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