vxlan: fix flowi6_proto value
Subsystems (3)
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
@@ -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
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
@@ -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
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 errorsthis patch fixes it.
Reported-by kbuild test robot <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied.
PATCH 1/1 net: make snmp_mib_free static inline
In reply to Cong WangFrom: 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
@@ -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
@@ -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
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 whenCONFIG_INETis enabled, butin6_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 <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied.
From: Cong Wang <[email protected]>
Date: Mon, 2 Sep 2013 10:06:51 +0800
Quoted 5 lines
From: Cong Wang <[email protected]>
It should be
IPPROTO_UDP.Signed-off-by Cong Wang <[email protected]>
Applied.