($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Martin Doucha <mdoucha@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] tst_netdevice: Add permissive macro for adding traffic filters
Date: Wed, 15 May 2024 15:44:29 +0200	[thread overview]
Message-ID: <20240515134432.27996-1-mdoucha@suse.cz> (raw)

Add a permissive variant of the NETDEV_ADD_TRAFFIC_FILTER() macro
for tests which expect the command to fail.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---

Changes since v1: New patch

 include/tst_netdevice.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/tst_netdevice.h b/include/tst_netdevice.h
index 8d40148a6..2394f9c7f 100644
--- a/include/tst_netdevice.h
+++ b/include/tst_netdevice.h
@@ -179,6 +179,11 @@ int tst_netdev_add_traffic_filter(const char *file, const int lineno,
 	tst_netdev_add_traffic_filter(__FILE__, __LINE__, 1, (ifname), \
 		(parent), (handle), (protocol), (priority), (f_kind), (config))
 
+#define NETDEV_ADD_TRAFFIC_FILTER_RET(ifname, parent, handle, protocol, \
+	priority, f_kind, config) \
+	tst_netdev_add_traffic_filter(__FILE__, __LINE__, 0, (ifname), \
+		(parent), (handle), (protocol), (priority), (f_kind), (config))
+
 int tst_netdev_remove_traffic_filter(const char *file, const int lineno,
 	int strict, const char *ifname, unsigned int parent,
 	unsigned int handle, unsigned int protocol, unsigned int priority,
-- 
2.44.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2024-05-15 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 13:44 Martin Doucha [this message]
2024-05-15 13:44 ` [LTP] [PATCH v2 2/2] tcindex01: Pass if the tcindex module is blacklisted Martin Doucha
2024-05-15 14:03   ` Cyril Hrubis
2024-05-16  1:12     ` Petr Vorel
2024-05-15 14:03 ` [LTP] [PATCH v2 1/2] tst_netdevice: Add permissive macro for adding traffic filters Cyril Hrubis

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=20240515134432.27996-1-mdoucha@suse.cz \
    --to=mdoucha@suse.cz \
    --cc=ltp@lists.linux.it \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).