All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, roopa@nvidia.com, razor@blackwall.org,
	petrm@nvidia.com, mlxsw@nvidia.com,
	Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next v2 06/11] vxlan: Expose vxlan_xmit_one()
Date: Wed, 15 Mar 2023 15:11:50 +0200	[thread overview]
Message-ID: <20230315131155.4071175-7-idosch@nvidia.com> (raw)
In-Reply-To: <20230315131155.4071175-1-idosch@nvidia.com>

Given a packet and a remote destination, the function will take care of
encapsulating the packet and transmitting it to the destination.

Expose it so that it could be used in subsequent patches by the MDB code
to transmit a packet to the remote destination(s) stored in the MDB
entry.

It will allow us to keep the MDB code self-contained, not exposing its
data structures to the rest of the VXLAN driver.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
---
 drivers/net/vxlan/vxlan_core.c    | 5 ++---
 drivers/net/vxlan/vxlan_private.h | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 2c65cc5dd55d..5de1a20497a6 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2395,9 +2395,8 @@ static int encap_bypass_if_local(struct sk_buff *skb, struct net_device *dev,
 	return 0;
 }
 
-static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
-			   __be32 default_vni, struct vxlan_rdst *rdst,
-			   bool did_rsc)
+void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
+		    __be32 default_vni, struct vxlan_rdst *rdst, bool did_rsc)
 {
 	struct dst_cache *dst_cache;
 	struct ip_tunnel_info *info;
diff --git a/drivers/net/vxlan/vxlan_private.h b/drivers/net/vxlan/vxlan_private.h
index 038528f9684a..f4977925cb8a 100644
--- a/drivers/net/vxlan/vxlan_private.h
+++ b/drivers/net/vxlan/vxlan_private.h
@@ -172,6 +172,8 @@ int vxlan_fdb_update(struct vxlan_dev *vxlan,
 		     __be16 port, __be32 src_vni, __be32 vni,
 		     __u32 ifindex, __u16 ndm_flags, u32 nhid,
 		     bool swdev_notify, struct netlink_ext_ack *extack);
+void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
+		    __be32 default_vni, struct vxlan_rdst *rdst, bool did_rsc);
 int vxlan_vni_in_use(struct net *src_net, struct vxlan_dev *vxlan,
 		     struct vxlan_config *conf, __be32 vni);
 
-- 
2.37.3


WARNING: multiple messages have this Message-ID (diff)
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: petrm@nvidia.com, mlxsw@nvidia.com, razor@blackwall.org,
	Ido Schimmel <idosch@nvidia.com>,
	edumazet@google.com, roopa@nvidia.com, kuba@kernel.org,
	pabeni@redhat.com, davem@davemloft.net
Subject: [Bridge] [PATCH net-next v2 06/11] vxlan: Expose vxlan_xmit_one()
Date: Wed, 15 Mar 2023 15:11:50 +0200	[thread overview]
Message-ID: <20230315131155.4071175-7-idosch@nvidia.com> (raw)
In-Reply-To: <20230315131155.4071175-1-idosch@nvidia.com>

Given a packet and a remote destination, the function will take care of
encapsulating the packet and transmitting it to the destination.

Expose it so that it could be used in subsequent patches by the MDB code
to transmit a packet to the remote destination(s) stored in the MDB
entry.

It will allow us to keep the MDB code self-contained, not exposing its
data structures to the rest of the VXLAN driver.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
---
 drivers/net/vxlan/vxlan_core.c    | 5 ++---
 drivers/net/vxlan/vxlan_private.h | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 2c65cc5dd55d..5de1a20497a6 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2395,9 +2395,8 @@ static int encap_bypass_if_local(struct sk_buff *skb, struct net_device *dev,
 	return 0;
 }
 
-static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
-			   __be32 default_vni, struct vxlan_rdst *rdst,
-			   bool did_rsc)
+void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
+		    __be32 default_vni, struct vxlan_rdst *rdst, bool did_rsc)
 {
 	struct dst_cache *dst_cache;
 	struct ip_tunnel_info *info;
diff --git a/drivers/net/vxlan/vxlan_private.h b/drivers/net/vxlan/vxlan_private.h
index 038528f9684a..f4977925cb8a 100644
--- a/drivers/net/vxlan/vxlan_private.h
+++ b/drivers/net/vxlan/vxlan_private.h
@@ -172,6 +172,8 @@ int vxlan_fdb_update(struct vxlan_dev *vxlan,
 		     __be16 port, __be32 src_vni, __be32 vni,
 		     __u32 ifindex, __u16 ndm_flags, u32 nhid,
 		     bool swdev_notify, struct netlink_ext_ack *extack);
+void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
+		    __be32 default_vni, struct vxlan_rdst *rdst, bool did_rsc);
 int vxlan_vni_in_use(struct net *src_net, struct vxlan_dev *vxlan,
 		     struct vxlan_config *conf, __be32 vni);
 
-- 
2.37.3


  parent reply	other threads:[~2023-03-15 13:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 13:11 [PATCH net-next v2 00/11] vxlan: Add MDB support Ido Schimmel
2023-03-15 13:11 ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 01/11] net: Add MDB net device operations Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 02/11] bridge: mcast: Implement " Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 03/11] rtnetlink: bridge: mcast: Move MDB handlers out of bridge driver Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 04/11] rtnetlink: bridge: mcast: Relax group address validation in common code Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 05/11] vxlan: Move address helpers to private headers Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` Ido Schimmel [this message]
2023-03-15 13:11   ` [Bridge] [PATCH net-next v2 06/11] vxlan: Expose vxlan_xmit_one() Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 07/11] vxlan: mdb: Add MDB control path support Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 08/11] vxlan: mdb: Add an internal flag to indicate MDB usage Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 09/11] vxlan: Add MDB data path support Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-16  8:55   ` Nikolay Aleksandrov
2023-03-16  8:55     ` [Bridge] " Nikolay Aleksandrov
2023-03-15 13:11 ` [PATCH net-next v2 10/11] vxlan: Enable MDB support Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-15 13:11 ` [PATCH net-next v2 11/11] selftests: net: Add VXLAN MDB test Ido Schimmel
2023-03-15 13:11   ` [Bridge] " Ido Schimmel
2023-03-17  8:30 ` [PATCH net-next v2 00/11] vxlan: Add MDB support patchwork-bot+netdevbpf
2023-03-17  8:30   ` [Bridge] " patchwork-bot+netdevbpf

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=20230315131155.4071175-7-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.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 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.