netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vxlan: fix flowi6_proto value
@ 2013-09-02  2:06 Cong Wang
  2013-09-02  2:06 ` [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic() Cong Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Cong Wang @ 2013-09-02  2:06 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

It should be IPPROTO_UDP.

Signed-off-by: Cong Wang <amwang@redhat.com>
---
 drivers/net/vxlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 3ffb22d..0fcf3f7 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -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",
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic()
  2013-09-02  2:06 [PATCH net-next] vxlan: fix flowi6_proto value Cong Wang
@ 2013-09-02  2:06 ` Cong Wang
  2013-09-03  4:01   ` David Miller
  2013-09-02  2:06 ` [PATCH net-next] net: make snmp_mib_free static inline Cong Wang
  2013-09-03  4:01 ` [PATCH net-next] vxlan: fix flowi6_proto value David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Cong Wang @ 2013-09-02  2:06 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 drivers/net/vxlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0fcf3f7..6b560f3 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -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"
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] net: make snmp_mib_free static inline
  2013-09-02  2:06 [PATCH net-next] vxlan: fix flowi6_proto value Cong Wang
  2013-09-02  2:06 ` [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic() Cong Wang
@ 2013-09-02  2:06 ` Cong Wang
  2013-09-03  4:01   ` David Miller
  2013-09-03  4:01 ` [PATCH net-next] vxlan: fix flowi6_proto value David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Cong Wang @ 2013-09-02  2:06 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 include/net/ip.h   |   12 +++++++++++-
 net/ipv4/af_inet.c |   12 ------------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/include/net/ip.h b/include/net/ip.h
index a68f838..48f5597 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -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;
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index b4d0be2..7a1874b 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -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,
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] vxlan: fix flowi6_proto value
  2013-09-02  2:06 [PATCH net-next] vxlan: fix flowi6_proto value Cong Wang
  2013-09-02  2:06 ` [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic() Cong Wang
  2013-09-02  2:06 ` [PATCH net-next] net: make snmp_mib_free static inline Cong Wang
@ 2013-09-03  4:01 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-09-03  4:01 UTC (permalink / raw)
  To: amwang; +Cc: netdev

From: Cong Wang <amwang@redhat.com>
Date: Mon,  2 Sep 2013 10:06:51 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> It should be IPPROTO_UDP.
> 
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic()
  2013-09-02  2:06 ` [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic() Cong Wang
@ 2013-09-03  4:01   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-09-03  4:01 UTC (permalink / raw)
  To: amwang; +Cc: netdev

From: Cong Wang <amwang@redhat.com>
Date: Mon,  2 Sep 2013 10:06:52 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> 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.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: make snmp_mib_free static inline
  2013-09-02  2:06 ` [PATCH net-next] net: make snmp_mib_free static inline Cong Wang
@ 2013-09-03  4:01   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-09-03  4:01 UTC (permalink / raw)
  To: amwang; +Cc: netdev

From: Cong Wang <amwang@redhat.com>
Date: Mon,  2 Sep 2013 10:06:53 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> 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.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-03  3:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02  2:06 [PATCH net-next] vxlan: fix flowi6_proto value Cong Wang
2013-09-02  2:06 ` [PATCH net-next] vxlan: include net/ip6_checksum.h for csum_ipv6_magic() Cong Wang
2013-09-03  4:01   ` David Miller
2013-09-02  2:06 ` [PATCH net-next] net: make snmp_mib_free static inline Cong Wang
2013-09-03  4:01   ` David Miller
2013-09-03  4:01 ` [PATCH net-next] vxlan: fix flowi6_proto value David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).