vxlan: Expose vxlan_xmit_one()
authorIdo Schimmel <idosch@nvidia.com>
Wed, 15 Mar 2023 13:11:50 +0000 (15:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:05:49 +0000 (08:05 +0000)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan/vxlan_core.c
drivers/net/vxlan/vxlan_private.h

index 2c65cc5..5de1a20 100644 (file)
@@ -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;
index 038528f..f497792 100644 (file)
@@ -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);