From: Paolo Abeni <pabeni@redhat.com>
To: Breno Leitao <leitao@debian.org>,
Akinobu Mita <akinobu.mita@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kernel-team@meta.com, kuniyu@amazon.com, asml.silence@gmail.com,
Willem de Bruijn <willemb@google.com>,
Mina Almasry <almasrymina@google.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net: Implement fault injection forcing skb reallocation
Date: Thu, 10 Oct 2024 11:20:05 +0200 [thread overview]
Message-ID: <822f5875-5ec0-46e1-83f8-66ec1e31f0f2@redhat.com> (raw)
In-Reply-To: <20241008111358.1691157-1-leitao@debian.org>
On 10/8/24 13:13, Breno Leitao wrote:
> +void skb_might_realloc(struct sk_buff *skb)
> +{
> + struct net_device *net = skb->dev;
> +
> + if (skb_realloc.filtered &&
> + strncmp(net->name, skb_realloc.devname, IFNAMSIZ))
> + /* device name filter set, but names do not match */
> + return;
> +
> + if (!should_fail(&skb_realloc.attr, 1))
> + return;
if you wraps the above 2 statement in an helper() taking an skb
argument, you could wrap it with the ALLOW_ERROR_INJECTION() macro, for
added flexibility, i.e. look at the existing should_failslab().
Cheers,
Paolo
next prev parent reply other threads:[~2024-10-10 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 11:13 Breno Leitao
2024-10-10 9:20 ` Paolo Abeni [this message]
2024-10-11 13:19 ` Breno Leitao
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=822f5875-5ec0-46e1-83f8-66ec1e31f0f2@redhat.com \
--to=pabeni@redhat.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aleksander.lobakin@intel.com \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.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®