lvs-devel
|
To: | unlisted-recipients:; (no To-header on input) |
---|---|
Subject: | [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode |
Cc: | yuelongguang@xxxxxxxxx, "longguang.yue" <bigclouds@xxxxxxx>, Wensong Zhang <wensong@xxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx (open list:IPVS), lvs-devel@xxxxxxxxxxxxxxx (open list:IPVS), netfilter-devel@xxxxxxxxxxxxxxx (open list:NETFILTER), coreteam@xxxxxxxxxxxxx (open list:NETFILTER), linux-kernel@xxxxxxxxxxxxxxx (open list) |
From: | "longguang.yue" <bigclouds@xxxxxxx> |
Date: | Tue, 29 Sep 2020 13:03:02 +0800 |
It's ipvs's duty to do traffic statistic if packets get hit, no matter what mode it is. Signed-off-by: longguang.yue <bigclouds@xxxxxxx> --- net/netfilter/ipvs/ip_vs_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index e3668a6e54e4..ed523057f07f 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -1413,8 +1413,11 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in ipvs, af, skb, &iph); if (likely(cp)) { - if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) + if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ){ + ip_vs_out_stats(cp, skb); + skb->ipvs_property = 1; goto ignore_cp; + } return handle_response(af, skb, pd, cp, &iph, hooknum); } -- 2.20.1 (Apple Git-117) |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state, yue longguang |
---|---|
Next by Date: | Re: [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode, yue longguang |
Previous by Thread: | [PATCH v4] ipvs: adjust the debug info in function set_tcp_state, longguang.yue |
Next by Thread: | Re: [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode, yue longguang |
Indexes: | [Date] [Thread] [Top] [All Lists] |