Skip to contentSkip to conversation

vxlan: make get_rx_port static

PATCH In review Stephen Hemminger 3 participants 3 messages Dec 14, 2013 – Dec 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vxlan: make get_rx_port static

Make local function static, only used in vxlan itself right now. Maybe someone had ideas about offload, but they can expose it when they send their offload upstream.

drivers/net/vxlan.c +1 -1
@@ -2039,7 +2039,7 @@ static struct device_type vxlan_type = {
  * supply the listening VXLAN udp ports. Callers are expected
  * to implement the ndo_add_vxlan_port.
  */
-void vxlan_get_rx_port(struct net_device *dev)
+static void vxlan_get_rx_port(struct net_device *dev)
 {
 	struct vxlan_sock *vs;
 	struct net *net = dev_net(dev);
include/net/vxlan.h +0 -7
@@ -41,11 +41,4 @@ __be16 vxlan_src_port(__u16 port_min, __
 /* IPv6 header + UDP + VXLAN + Ethernet header */
 #define VXLAN6_HEADROOM (40 + 8 + 8 + 14)
 
-#if IS_ENABLED(CONFIG_VXLAN)
-void vxlan_get_rx_port(struct net_device *netdev);
-#else
-static inline void vxlan_get_rx_port(struct net_device *netdev)
-{
-}
-#endif
 #endif
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Fri, 13 Dec 2013 16:37:22 -0800

drivers/net/vxlan.c static struct device_type vxlan_type = { · line 2042

Quoted 2 lines
drivers/net/vxlan.c +1 -1
-void vxlan_get_rx_port(struct net_device *dev)
+static void vxlan_get_rx_port(struct net_device *dev)

If you are going to make this static, you need to remove the module symbol export as well.

#2 lore raw
In reply to Stephen Hemminger
Quoted 22 lines · Stephen Hemminger

Make local function static, only used in vxlan itself right now. Maybe someone had ideas about offload, but they can expose it when they send their offload upstream.

drivers/net/vxlan.c +1 -1
@@ -2039,7 +2039,7 @@ static struct device_type vxlan_type = {
  * supply the listening VXLAN udp ports. Callers are expected
  * to implement the ndo_add_vxlan_port.
  */
-void vxlan_get_rx_port(struct net_device *dev)
+static void vxlan_get_rx_port(struct net_device *dev)
 {
 	struct vxlan_sock *vs;
 	struct net *net = dev_net(dev);
include/net/vxlan.h +0 -0
@@ -41,11 +41,4 @@ __be16 vxlan_src_port(__u16 port_min, __
 /* IPv6 header + UDP + VXLAN + Ethernet header */
 #define VXLAN6_HEADROOM (40 + 8 + 8 + 14)

include/net/vxlan.h __be16 vxlan_src_port(__u16 port_min, __

Quoted 10 lines
include/net/vxlan.h +0 -8
 
-#if IS_ENABLED(CONFIG_VXLAN)
-void vxlan_get_rx_port(struct net_device *netdev);
-#else
-static inline void vxlan_get_rx_port(struct net_device *netdev)
-{
-}
-#endif
 #endif
--

Please do not apply this patch. Jeff Kirsher is about to send a patch that takes advantage of vxlan_get_rx_port in i40e.

Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html