All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: razor@blackwall.org, ericwouds@gmail.com, fw@strlen.de
Subject: [PATCH nf-next,v2 2/3] net: expose dev_fwd_path() helper via static inline
Date: Fri, 10 Jul 2026 12:07:28 +0200	[thread overview]
Message-ID: <20260710100729.1383580-3-pablo@netfilter.org> (raw)
In-Reply-To: <20260710100729.1383580-1-pablo@netfilter.org>

This is a preparation patch to be used by the bridge family to retrieve
the bridge vlan filtering information from the bridge port when
discovering the bridge flowtable path.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
v2: no changes

 include/linux/netdevice.h | 11 +++++++++++
 net/core/dev.c            | 10 ----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index db04b6d2e8d2..3793a8c0b0be 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3420,6 +3420,17 @@ void dev_remove_offload(struct packet_offload *po);
 
 int dev_get_iflink(const struct net_device *dev);
 int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
+
+static inline struct net_device_path *dev_fwd_path(struct net_device_path_stack *stack)
+{
+	int k = stack->num_paths++;
+
+	if (k >= NET_DEVICE_PATH_STACK_MAX)
+		return NULL;
+
+	return &stack->path[k];
+}
+
 int dev_fill_forward_path(struct net_device_path_ctx *ctx,
 			  struct net_device_path_stack *stack);
 struct net_device *dev_get_by_name(struct net *net, const char *name);
diff --git a/net/core/dev.c b/net/core/dev.c
index 24c384ef9e78..48288a5dc870 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -740,16 +740,6 @@ int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
 }
 EXPORT_SYMBOL_GPL(dev_fill_metadata_dst);
 
-static struct net_device_path *dev_fwd_path(struct net_device_path_stack *stack)
-{
-	int k = stack->num_paths++;
-
-	if (k >= NET_DEVICE_PATH_STACK_MAX)
-		return NULL;
-
-	return &stack->path[k];
-}
-
 int dev_fill_forward_path(struct net_device_path_ctx *ctx,
 			  struct net_device_path_stack *stack)
 {
-- 
2.47.3


  parent reply	other threads:[~2026-07-10 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 10:07 [PATCH nf-next,v2 0/3] initial flowtable bridge support Pablo Neira Ayuso
2026-07-10 10:07 ` [PATCH nf-next,v2 1/3] net: pass net_device_path_ctx struct to dev_fill_forward_path() Pablo Neira Ayuso
2026-07-11  9:30   ` Eric Woudstra
2026-07-12  9:28   ` Eric Woudstra
2026-07-12 19:22     ` Pablo Neira Ayuso
2026-07-10 10:07 ` Pablo Neira Ayuso [this message]
2026-07-10 10:07 ` [PATCH nf-next,v2 3/3] netfilter: flowtable: initial bridge support Pablo Neira Ayuso
2026-07-12  9:27   ` Eric Woudstra
2026-07-12 13:46     ` Eric Woudstra
2026-07-12 19:13       ` Pablo Neira Ayuso
2026-07-12 19:19     ` Pablo Neira Ayuso
2026-07-13  8:24     ` Pablo Neira Ayuso

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=20260710100729.1383580-3-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=ericwouds@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=razor@blackwall.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.