Skip to contentSkip to conversation

vxlan: fix flowi6_proto value

PATCH Applied Cong Wang 2 participants 6 messages Sep 2, 2013 – Sep 3, 2013

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 vxlan: fix flowi6_proto value

From: Cong Wang <[email protected]>

It should be IPPROTO_UDP.

---
 drivers/net/vxlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/vxlan.c +1 -1
index 3ffb22d..0fcf3f7 100644
@@ -1671,7 +1671,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
 		fl6.flowi6_oif = rdst->remote_ifindex;
 		fl6.daddr = dst->sin6.sin6_addr;
 		fl6.saddr = vxlan->saddr.sin6.sin6_addr;
-		fl6.flowi6_proto = skb->protocol;
+		fl6.flowi6_proto = IPPROTO_UDP;
 
 		if (ipv6_stub->ipv6_dst_lookup(sk, &ndst, &fl6)) {
 			netdev_dbg(dev, "no route to %pI6\n",
Signature · 1 line
1.7.7.6
author
#1 lore raw

PATCH 1/1 vxlan: include net/ip6_checksum.h for csum_ipv6_magic()

From: Cong Wang <[email protected]>

Fengguang reported a compile warning:

drivers/net/vxlan.c: In function 'vxlan6_xmit_skb':
drivers/net/vxlan.c:1352:3: error: implicit declaration of function 'csum_ipv6_magic' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

this patch fixes it.

---
 drivers/net/vxlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/vxlan.c +1 -0
index 0fcf3f7..6b560f3 100644
@@ -44,6 +44,7 @@
 #include <net/ipv6.h>
 #include <net/addrconf.h>
 #include <net/ip6_tunnel.h>
+#include <net/ip6_checksum.h>
 #endif
 
 #define VXLAN_VERSION	"0.1"
Signature · 1 line
1.7.7.6
maintainer Applied
#2 lore raw

Re: [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic()

From: Cong Wang <[email protected]>
Date: Mon, 2 Sep 2013 10:06:52 +0800

Quoted 4 lines

From: Cong Wang <[email protected]>

Fengguang reported a compile warning:

Quoted 8 lines

drivers/net/vxlan.c: In function 'vxlan6_xmit_skb':
drivers/net/vxlan.c:1352:3: error: implicit declaration of function 'csum_ipv6_magic' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

this patch fixes it.

Applied.

author
#3 lore raw

PATCH 1/1 net: make snmp_mib_free static inline

In reply to Cong Wang

From: Cong Wang <[email protected]>

Fengguang reported:

net/built-in.o: In function `in6_dev_finish_destroy':
(.text+0x4ca7d): undefined reference to `snmp_mib_free'

this is due to snmp_mib_free() is defined when CONFIG_INET is enabled, but in6_dev_finish_destroy() is now moved to core kernel.

I think snmp_mib_free() is small enough to be inlined, so just make it static inline.

---
 include/net/ip.h   |   12 +++++++++++-
 net/ipv4/af_inet.c |   12 ------------
 2 files changed, 11 insertions(+), 13 deletions(-)
include/net/ip.h +11 -1
index a68f838..48f5597 100644
@@ -194,7 +194,17 @@ static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp
 }
 #endif
 extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align);
-extern void snmp_mib_free(void __percpu *ptr[2]);
+
+static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ])
+{
+	int i;
+
+	BUG_ON(ptr == NULL);
+	for (i = 0; i < SNMP_ARRAY_SZ; i++) {
+		free_percpu(ptr[i]);
+		ptr[i] = NULL;
+	}
+}
 
 extern struct local_ports {
 	seqlock_t	lock;
net/ipv4/af_inet.c +0 -12
index b4d0be2..7a1874b 100644
@@ -1532,18 +1532,6 @@ int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align)
 }
 EXPORT_SYMBOL_GPL(snmp_mib_init);
 
-void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ])
-{
-	int i;
-
-	BUG_ON(ptr == NULL);
-	for (i = 0; i < SNMP_ARRAY_SZ; i++) {
-		free_percpu(ptr[i]);
-		ptr[i] = NULL;
-	}
-}
-EXPORT_SYMBOL_GPL(snmp_mib_free);
-
 #ifdef CONFIG_IP_MULTICAST
 static const struct net_protocol igmp_protocol = {
 	.handler =	igmp_rcv,
Signature · 1 line
1.7.7.6
maintainer Applied
#4 lore raw

Re: [PATCH net-next] net: make snmp_mib_free static inline

From: Cong Wang <[email protected]>
Date: Mon, 2 Sep 2013 10:06:53 +0800

Quoted 7 lines

From: Cong Wang <[email protected]>

Fengguang reported:

net/built-in.o: In function `in6_dev_finish_destroy':

   (.text+0x4ca7d): undefined reference to `snmp_mib_free'
Quoted 8 lines

this is due to snmp_mib_free() is defined when CONFIG_INET is enabled, but in6_dev_finish_destroy() is now moved to core kernel.

I think snmp_mib_free() is small enough to be inlined, so just make it static inline.

Applied.