Tx errors present summation of errors encountered while transmitting
packets.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/geneve.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
For ipv6+udp+geneve encapsulation data, the max_mtu should subtract
sizeof(ipv6hdr), instead of sizeof(iphdr).
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/geneve.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drive
Dropped skb's should be documented by an appropriate return value.
Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_gre.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
vlan drivers lack proper propagation of gso_min_segs from lower device.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/ipvlan/ipvlan_main.c | 2 ++
drivers/net/macvlan.c| 1 +
net/8021q/vlan.c | 1 +
net/8021q/vlan
As ping_v6_sendmsg is used only in this file,
making it static
The body of "pingv6_prot" and "pingv6_protosw" were
moved at the middle of the file, to avoid having to
declare some static prototypes.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
--
pskb_may_pull() can change skb->data, so we have to load ptr/optr at the
right place.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/l2tp/l2tp_ip6.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l
pskb_may_pull() can change skb->data, so we have to load ptr/optr at the
right place.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/l2tp/l2tp_ip.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_i
ip6_route_output() never returns NULL, so it is not appropriate to
check if the return value is NULL.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/netfilter/nf_reject_ipv6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/net
For the input parameter count, it's better to use the size
of destination buffer size, as nla_memcpy would take into
account the length of the source netlink attribute when
a data is copied from an attribute.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/openv
When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP,
we should ignore this error code and continue to set the ageing time.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/bridge/br_stp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Since nla_get_in_addr and nla_put_in_addr were implemented,
so use them appropriately.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_tunnel_core.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/ne
Free peer netdev when failed to configure peer link or register dev.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/veth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f37a6e6..8bb9fb8 100644
--- a/drive
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
---
Changes in v2:
- Place the "#if IS_ENABLED" block before the "} else if
(..) {" piece and the "#endif" before the closing brace and this
becomes much easier to look at.
Signed-of
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_tunnel.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index a
situation.
This patch first verify the dev->type is ARPHRD_ETHER for ip6gretap
interface, and then decrease the mtu as early as possible.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes in v2:
- Make the commit message more clearer.
---
net/ipv6/ip6_gre.c
In gre6 xmit path, we are sending a GRE packet, so set fl6 proto
to IPPROTO_GRE properly.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes in v2:
- Initialize the flow protocol in ip6gre_tnl_link_config
---
net/ipv6/ip6_gre.c | 1 +
1 file changed, 1 ins
When dealing with WCCP in gre6 tunnel, it sets the wrong tpi->protocol,
that is, ETH_P_IP instead of ETH_P_IPV6 for the encapuslated traffic.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/gre.h| 2 +-
net/ipv4/gre_demux.c | 6 +++---
net/ipv4
Do not include attribute IFLA_GRE_TOS.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_gre.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index ee62ec4..3c25fe6 100644
--- a/net/ipv6/ip6_gre.c
+++ b/ne
ion.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 4541fa5..8ea5a4d 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1029,6 +10
In gre6 xmit path, we are sending a GRE packet, so set fl6 proto
to IPPROTO_GRE properly.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 8ea5a4d..c
For ipv6+udp+geneve encapsulation data, the max_mtu should subtract
sizeof(ipv6hdr), instead of sizeof(iphdr).
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes in v2:
- As suggested by Jesse Gross, treat AF_UNSPEC same as AF_INET4 to
avoid disallowing poten
If vxlan_build_skb return err < 0, tx_errors should be also increased.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/vxlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index f605a36..2c72d
root_task_group defined in sched/core.c is enclosed by
CONFIG_CGROUP_SCHED, so the export declaration should
also be enclosed.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/linux/init_task.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
vxlan_fdb_append may return error, so add the proper check,
otherwise it will cause memory leak.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
Changes in v2:
- Unnecessary to initialize rc to zero.
---
drivers/net/vxlan.c | 10 +++---
1 file changed, 7 insertions
kernel will crash in oops if genlmsg_put return NULL,
so add the sanity check.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/openvswitch/datapath.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
vxlan_fdb_append may return error, so add the proper check,
otherwise it will cause memory leak.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/vxlan.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vxlan.c b/d
It shold reserved sizeof(ipv6hdr) for geneve in ipv6 tunnel.
Fixes: c3ef5aa5e5 ('geneve: Merge ipv4 and ipv6 geneve_build_skb()')
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 1 +
include/net/tcp.h | 1 -
net/ipv4/sysctl_net_ipv4.c | 14 +++---
net/ipv4/tcp_ipv4.c| 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/i
Different namespace application might require fast recycling
TIME-WAIT sockets independently of the host.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/inet_timewait_sock.h | 13 +
include/net/netns/ipv4.h | 11 +++
include/net
Different namespace application might require different maximal
number of remembered connection requests.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 1 +
include/net/request_sock.h | 4 +---
net/core/request_sock.c| 2 --
ne
Different namespaces might have different requirements to reuse
TIME-WAIT sockets for new connections. This might be required in
cases where different namespace applications are in place which
require TIME_WAIT socket connections to be reduced independently
of the host.
Signed-off-by: Haishuang
When cda[CTA_TIMEOUT] is zero, ctnetlink_new_conntrack will
free allocated ct and return, so move it to outside to optimize
this situation.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/netfilter/nf_conntrack_netlink.c | 5 +
1 file changed, 1 insertion
We must free allocated skb when genlmsg_put() return fails.
Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes in v2:
- Fix same issue in headers_fill.
---
net/core/devlink.c | 8
Since iptunnel_pull_header() can call pskb_may_pull(),
we must reload any pointer that was related to skb->head.
Fixes: a09a4c8dd1ec ("tunnels: Remove encapsulation offloads on decap")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/sit.c | 1 +
When __ip6_tnl_rcv fails, the tun_dst won't be freed, so move
skb_dst_set to begin and tun_dst would be freed by kfree_skb.
CC: Alexei Starovoitov <a...@fb.com>
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Signed-off-by: Haishuang Yan <yanhaishu...@c
When ip_tunnel_rcv fails, the tun_dst won't be freed, so move
skb_dst_set to begin and tun_dst would be freed by kfree_skb.
CC: Pravin B Shelar <pshe...@nicira.com>
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Signed-off-by: Haishuang Y
When __ip6_tnl_rcv fails, the tun_dst won't be freed, so call
dst_release to free it in error code path.
CC: Alexei Starovoitov <a...@fb.com>
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com&
When ip_tunnel_rcv fails, the tun_dst won't be freed, so call
dst_release to free it in error code path.
CC: Pravin B Shelar <pshe...@nicira.com>
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobil
We must free allocated skb when genlmsg_put() return fails.
Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/core/devlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
When __ip6_tnl_rcv fails, the tun_dst won't be freed, so move
skb_dst_set to begin and tun_dst would be freed by kfree_skb.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_tunnel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
When ip_tunnel_rcv fails, the tun_dst won't be freed, so move
skb_dst_set to begin and tun_dst would be freed by kfree_skb.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_tunnel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ne
Same as ip_gre, geneve and vxlan, use key->tos as tos value.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_tunnel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index ef99d59
ile.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes since v4:
* Add the the missing Fixes information
* Free tun_dst from error code path
* Add tester information
---
net/ipv6/ip6_tunnel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv6/ip6_tunn
sted-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v4:
* Add the the missing Fixes information
* Free tun_dst from error code path
* Add tester information
---
net/ipv4/ip_tunnel.c | 2 ++
1 f
Same as ip_gre, geneve and vxlan, use key->tos as tos value.
CC: Peter Dawson <peted...@gmail.com>
Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on
encapsulated packets”)
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Hais
In collect_md mode, if the tun dev is down, it still can call
ip_tunnel_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Cc: Pravin B Shelar <pshe...@nicira.com>
Signed-off-by: Haishuan
In collect_md mode, if the tun dev is down, it still can call
__ip6_tnl_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Cc: Alexei Starovoitov <a...@fb.com>
Signed-off-by: Haishuan
Same as ip_gre, geneve and vxlan, use key->tos as traffic class value.
CC: Peter Dawson <peted...@gmail.com>
Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on
encapsulated packets”)
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Chang
Same as ip_gre, geneve and vxlan, use key->tos as tos value.
CC: Peter Dawson <peted...@gmail.com>
Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on
encapsulated packets”)
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Hais
quot;netfilter: conntrack: skip clash resolution if 25
nat is in place")
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/netfilter/nf_conntrack_core.c | 1 -
net/netfilter/nf_nat_core.c | 4 +++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git
In collect_md mode, if the tun dev is down, it still can call
__ip6_tnl_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Cc: Alexei Starovoitov <a...@fb.com>
Signed-off-by: Haishuan
In collect_md mode, if the tun dev is down, it still can call
ip_tunnel_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Cc: Pravin B Shelar <pshe...@nicira.com>
Signed-off-by: Haishuan
-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 4
include/net/tcp.h | 5 ++---
net/ipv4/af_inet.c | 2 +-
net/ipv4/sysctl_net_ipv4.c | 26
net/ipv4/tcp.c | 2 +-
net/ipv4/tcp_fastopen.c
le
1
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 3 +++
net/ipv4/sysctl_net_ipv4.c | 20 +++-
net/ipv4/tcp_fastopen.c| 28 ++--
net/ipv4/tcp_ipv4.c| 2 ++
4 files changed, 26 insertions(+),
Different namespace application might require enable TCP Fast Open
feature independently of the host.
This patch series continues making more of the TCP Fast Open related
sysctl knobs be per net-namespace.
Reported-by: Luca BRUNO <lu...@debian.org>
Signed-off-by: Haishuang Yan <
Different namespace application might require enable TCP Fast Open
feature independently of the host.
This patch series continues making more of the TCP Fast Open related
sysctl knobs be per net-namespace.
Reported-by: Luca BRUNO <lu...@debian.org>
Signed-off-by: Haishuang Yan <
-ed341702
cookie key in tcp syn packets:
Fast Open Cookie
Kind: TCP Fast Open Cookie (34)
Length: 10
Fast Open Cookie: e213c02bf0afbc8a
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 4 +++
include/net/tcp.h | 6 ++---
ne
le
1
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 3 +++
net/ipv4/sysctl_net_ipv4.c | 20 +++-
net/ipv4/tcp_fastopen.c| 30 +++---
net/ipv4/tcp_ipv4.c| 2 ++
4 files changed, 27 insertions(+),
Similar to vxlan/ipip tunnel, if key->tos is zero in collect metadata
mode, tos should also fallback to ip{4,6}_dst_hoplimit.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes since v2:
* Make the commit message more clearer.
---
drivers/net/geneve.c | 6
Different namespace application might require enable TCP Fast Open
feature independently of the host.
Reported-by: Luca BRUNO <lu...@debian.org>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v2:
* Remove unrelated change by mistake
---
inclu
on fallback device will be increased as expected.
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Cc: Alexei Starovoitov <a...@fb.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v4:
* Make the commit messag
on fallback device will be increased as expected.
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Cc: Pravin B Shelar <pshe...@nicira.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v4:
* Make the commit message
Different namespace application might require enable TCP Fast Open
feature independently of the host.
Reported-by: Luca BRUNO <lu...@debian.org>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 2 ++
include/net/tcp.h | 1
Different namespace application might require different maximal number
of TCP sockets independently of the host.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 1 +
include/net/tcp.h | 5 +++--
net/ipv4/sysctl_net_ipv4.
ttl and tos variables are declared and assigned, but are not used in
iptunnel_xmit() function.
Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel")
Cc: Alexei Starovoitov <a...@fb.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
ne
Similar to vxlan/geneve tunnel, if hop_limit is zero, it should fall
back to ip6_dst_hoplimt().
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_tunnel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
The 'publish' logic is not necessary after commit dfea2aa65424 ("tcp:
Do not call tcp_fastopen_reset_cipher from interrupt context"), because
in tcp_fastopen_cookie_gen,it wouldn't call tcp_fastopen_init_key_once.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
le
1
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 3 +++
net/ipv4/sysctl_net_ipv4.c | 20 +++-
net/ipv4/tcp_fastopen.c| 30 +++---
net/ipv4/tcp_ipv4.c| 2 ++
4 files changed, 27 insertions(+),
-ed341702
cookie key in tcp syn packets:
Fast Open Cookie
Kind: TCP Fast Open Cookie (34)
Length: 10
Fast Open Cookie: e213c02bf0afbc8a
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
include/net/netns/ipv4.h | 4 +++
include/net/tcp.h | 6 ++---
ne
Different namespace application might require enable TCP Fast Open
feature independently of the host.
This patch series continues making more of the TCP Fast Open related
sysctl knobs be per net-namespace.
Reported-by: Luca BRUNO <lu...@debian.org>
Signed-off-by: Haishuang Yan <
In be_tx_compl_process, frag_index declared as u32, so it's better to
declare last_index as u32 also.
CC: Ajit Khaparde <ajit.khapa...@broadcom.com>
Fixes: b0fd2eb28bd4 ("be2net: Declare some u16 fields as u32 to improve
performance")
Signed-off-by: Haishuan
Same as ip_gre, geneve and vxlan, use key->tos as traffic class value.
CC: Peter Dawson <peted...@gmail.com>
Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on
encapsulated packets”)
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Chang
Similar to vxlan/geneve tunnel, if hop_limit is zero, it should fall
back to ip6_dst_hoplimt().
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_tunnel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
In collect_md mode, if the tun dev is down, it still can call
ip_tunnel_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Cc: Pravin B Shelar <pshe...@nicira.com>
Signed-off-by: Haishuan
In collect_md mode, if the tun dev is down, it still can call
__ip6_tnl_rcv to receive on packets, and the rx statistics increase
improperly.
Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
Cc: Alexei Starovoitov <a...@fb.com>
Signed-off-by: Haishuan
If key->tos is zero in collect metadata mode, tos should fallback to
ip{4,6}_dst_hoplimit, same as normal mode.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/geneve.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 1a66a836da6 ("gre: add collect_md mode to ERSPAN tunnel")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
Change since v2:
* Rebase o
ail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
Change since v2:
* Rebase on latest master branch.
---
net/ipv6/ip6_gre.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 8ce9d42..f210f9c 100644
--
;u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
Change since v2:
* Rebase on latest master branch.
---
net/ipv4/ip_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 33af55a..ccfc5bc 100644
--- a
Since we now hold RTNL lock in geneve_exit_net, it's better batch them
to speedup geneve tunnel dismantle.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/geneve.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff
This patch series add batching to vxlan/geneve tunnels so that netns
dismantles are less costly.
Haishuang Yan (2):
vxlan: speedup vxlan tunnels dismantle
geneve: speedup geneve tunnels dismantle
drivers/net/geneve.c | 24
drivers/net/vxlan.c | 26
Since we now hold RTNL lock in vxlan_exit_net, it's better to batch them
to speedup vxlan tunnels dismantle.
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
drivers/net/vxlan.c | 26 +-
1 file changed, 17 insertions(+), 9 deletions(-)
diff
pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at
the right place.
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Acked-by: William Tu <u9012...@gmail.com>
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanha
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
Change since v2:
* Rebase o
When erspan_rcv call return PACKET_REJECT, we shoudn't call ipgre_rcv to
process packets again, instead send icmp unreachable message in error
path.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuan
Same as ipv4 code, when ip6erspan_rcv call return PACKET_REJECT, we
should call icmpv6_send to send icmp unreachable message in error path.
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuan
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_gre.c |
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv6/ip6_gre.c | 4 +
pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at
the right place.
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv
If pskb_may_pull return failed, return PACKET_REJECT instead of -ENOMEM.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
net/ipv4/ip_gre.c | 2
pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at
the right place.
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Cc: William Tu <u9012...@gmail.com>
Acked-by: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanha
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes since v3:
* Rebase o
ail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v2:
* Rebase on latest master branch.
* Fix wrong commit information.
---
net/ipv6/ip6_gre.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_
;u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Change since v3:
* Rebase on latest master branch.
* Fix wrong commit information.
---
net/ipv4/ip_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_
This patch series fix potential issue in error path.
Haishuang Yan (2):
ip_gre: fix error path when erspan_rcv failed
ip6_gre: fix error path when ip6erspan_rcv failed
net/ipv4/ip_gre.c | 2 ++
net/ipv6/ip6_gre.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
--
1.8.3.1
> On 2017年12月19日, at 下午11:34, David Miller <da...@davemloft.net> wrote:
>
> From: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
> Date: Sat, 16 Dec 2017 10:25:25 +0800
>
>> pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr
> On 2017年12月19日, at 下午11:36, David Miller <da...@davemloft.net> wrote:
>
> From: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
> Date: Sat, 16 Dec 2017 10:48:38 +0800
>
>> If md is NULL, tun_dst must be freed, otherwise it will cause memory
>> lea
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 1a66a836da6 ("gre: add collect_md mode to ERSPAN tunnel")
Cc: William Tu <u9012...@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishu...@cmss.chinamobile.com>
---
Changes since v3:
* R
This patch series fix potential memory leak issue.
Haishuang Yan (2):
ip_gre: fix potential memory leak in erspan_rcv
ip6_gre: fix potential memory leak in ip6erspan_rcv
net/ipv4/ip_gre.c | 4 +++-
net/ipv6/ip6_gre.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
1.8.3.1
> On 2018年9月10日, at 下午11:36, Jiri Benc wrote:
>
> On Mon, 10 Sep 2018 16:25:09 +0800, Haishuang Yan wrote:
>> +if (gre_parse_header(skb, , _err, htons(ETH_P_IPV6),
>> + offset) < 0) {
>> +if (!csum_err)
1 - 100 of 241 matches
Mail list logo