* [PATCH v4] ipvs: adjust the debug info in function set_tcp_state @ 2020-09-27 12:07 longguang.yue 2020-09-27 13:32 ` Julian Anastasov 0 siblings, 1 reply; 8+ messages in thread From: longguang.yue @ 2020-09-27 12:07 UTC (permalink / raw) Cc: yuelongguang, longguang.yue, Wensong Zhang, Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear Signed-off-by: longguang.yue <bigclouds@163.com> --- net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c index dc2e7da2742a..7da51390cea6 100644 --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, if (new_state != cp->state) { struct ip_vs_dest *dest = cp->dest; - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" - "%s:%d state: %s->%s conn->refcnt:%d\n", + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " + "d:%s:%d state: %s->%s conn->refcnt:%d\n", pd->pp->name, ((state_off == TCP_DIR_OUTPUT) ? "output " : "input "), @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, th->fin ? 'F' : '.', th->ack ? 'A' : '.', th->rst ? 'R' : '.', - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), - ntohs(cp->dport), IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), + ntohs(cp->vport), + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), + ntohs(cp->dport), tcp_state_name(cp->state), tcp_state_name(new_state), refcount_read(&cp->refcnt)); -- 2.20.1 (Apple Git-117) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v4] ipvs: adjust the debug info in function set_tcp_state 2020-09-27 12:07 [PATCH v4] ipvs: adjust the debug info in function set_tcp_state longguang.yue @ 2020-09-27 13:32 ` Julian Anastasov 2020-09-28 2:49 ` [PATCH v5] " longguang.yue 0 siblings, 1 reply; 8+ messages in thread From: Julian Anastasov @ 2020-09-27 13:32 UTC (permalink / raw) To: longguang.yue Cc: yuelongguang, Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list Hello, On Sun, 27 Sep 2020, longguang.yue wrote: > outputting client,virtual,dst addresses info when tcp state changes, > which makes the connection debug more clear > > Signed-off-by: longguang.yue <bigclouds@163.com> Looks good to me, thanks! Acked-by: Julian Anastasov <ja@ssi.bg> Simon, Pablo, may be commit description should not be indented... > --- > net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c > index dc2e7da2742a..7da51390cea6 100644 > --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c > +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c > @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > if (new_state != cp->state) { > struct ip_vs_dest *dest = cp->dest; > > - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" > - "%s:%d state: %s->%s conn->refcnt:%d\n", > + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " > + "d:%s:%d state: %s->%s conn->refcnt:%d\n", > pd->pp->name, > ((state_off == TCP_DIR_OUTPUT) ? > "output " : "input "), > @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > th->fin ? 'F' : '.', > th->ack ? 'A' : '.', > th->rst ? 'R' : '.', > - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > - ntohs(cp->dport), > IP_VS_DBG_ADDR(cp->af, &cp->caddr), > ntohs(cp->cport), > + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), > + ntohs(cp->vport), > + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > + ntohs(cp->dport), > tcp_state_name(cp->state), > tcp_state_name(new_state), > refcount_read(&cp->refcnt)); > -- > 2.20.1 (Apple Git-117) Regards -- Julian Anastasov <ja@ssi.bg> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 2020-09-27 13:32 ` Julian Anastasov @ 2020-09-28 2:49 ` longguang.yue 2020-09-29 2:15 ` yue longguang 2020-09-30 5:08 ` Julian Anastasov 0 siblings, 2 replies; 8+ messages in thread From: longguang.yue @ 2020-09-28 2:49 UTC (permalink / raw) To: yuelongguang Cc: longguang.yue, Wensong Zhang, Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list Outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear Signed-off-by: longguang.yue <bigclouds@163.com> --- net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c index dc2e7da2742a..7da51390cea6 100644 --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, if (new_state != cp->state) { struct ip_vs_dest *dest = cp->dest; - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" - "%s:%d state: %s->%s conn->refcnt:%d\n", + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " + "d:%s:%d state: %s->%s conn->refcnt:%d\n", pd->pp->name, ((state_off == TCP_DIR_OUTPUT) ? "output " : "input "), @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, th->fin ? 'F' : '.', th->ack ? 'A' : '.', th->rst ? 'R' : '.', - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), - ntohs(cp->dport), IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), + ntohs(cp->vport), + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), + ntohs(cp->dport), tcp_state_name(cp->state), tcp_state_name(new_state), refcount_read(&cp->refcnt)); -- 2.20.1 (Apple Git-117) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 2020-09-28 2:49 ` [PATCH v5] " longguang.yue @ 2020-09-29 2:15 ` yue longguang 2020-09-30 5:08 ` Julian Anastasov 1 sibling, 0 replies; 8+ messages in thread From: yue longguang @ 2020-09-29 2:15 UTC (permalink / raw) To: Julian Anastasov, longguang.yue, Pablo Neira Ayuso, Simon Horman Cc: Wensong Zhang, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list I sincerely apologize for the trouble which takes up much of your time. If the last patch does not work , would you please fix it? thanks On Mon, Sep 28, 2020 at 10:51 AM longguang.yue <bigclouds@163.com> wrote: > > Outputting client,virtual,dst addresses info when tcp state changes, > which makes the connection debug more clear > > Signed-off-by: longguang.yue <bigclouds@163.com> > --- > net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c > index dc2e7da2742a..7da51390cea6 100644 > --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c > +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c > @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > if (new_state != cp->state) { > struct ip_vs_dest *dest = cp->dest; > > - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" > - "%s:%d state: %s->%s conn->refcnt:%d\n", > + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " > + "d:%s:%d state: %s->%s conn->refcnt:%d\n", > pd->pp->name, > ((state_off == TCP_DIR_OUTPUT) ? > "output " : "input "), > @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > th->fin ? 'F' : '.', > th->ack ? 'A' : '.', > th->rst ? 'R' : '.', > - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > - ntohs(cp->dport), > IP_VS_DBG_ADDR(cp->af, &cp->caddr), > ntohs(cp->cport), > + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), > + ntohs(cp->vport), > + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > + ntohs(cp->dport), > tcp_state_name(cp->state), > tcp_state_name(new_state), > refcount_read(&cp->refcnt)); > -- > 2.20.1 (Apple Git-117) > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 2020-09-28 2:49 ` [PATCH v5] " longguang.yue 2020-09-29 2:15 ` yue longguang @ 2020-09-30 5:08 ` Julian Anastasov 2020-09-30 5:39 ` yue longguang ` (2 more replies) 1 sibling, 3 replies; 8+ messages in thread From: Julian Anastasov @ 2020-09-30 5:08 UTC (permalink / raw) To: longguang.yue Cc: yuelongguang, Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list Hello, On Mon, 28 Sep 2020, longguang.yue wrote: > Outputting client,virtual,dst addresses info when tcp state changes, > which makes the connection debug more clear > > Signed-off-by: longguang.yue <bigclouds@163.com> OK, v5 can be used instead of fixing v4. Acked-by: Julian Anastasov <ja@ssi.bg> > --- longguang.yue, at this place after --- you can add info for changes between versions, eg: v5: fix indentation Use this for other patches, so that we know what is changed between versions. > net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c > index dc2e7da2742a..7da51390cea6 100644 > --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c > +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c > @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > if (new_state != cp->state) { > struct ip_vs_dest *dest = cp->dest; > > - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" > - "%s:%d state: %s->%s conn->refcnt:%d\n", > + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " > + "d:%s:%d state: %s->%s conn->refcnt:%d\n", > pd->pp->name, > ((state_off == TCP_DIR_OUTPUT) ? > "output " : "input "), > @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > th->fin ? 'F' : '.', > th->ack ? 'A' : '.', > th->rst ? 'R' : '.', > - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > - ntohs(cp->dport), > IP_VS_DBG_ADDR(cp->af, &cp->caddr), > ntohs(cp->cport), > + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), > + ntohs(cp->vport), > + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > + ntohs(cp->dport), > tcp_state_name(cp->state), > tcp_state_name(new_state), > refcount_read(&cp->refcnt)); > -- > 2.20.1 (Apple Git-117) Regards -- Julian Anastasov <ja@ssi.bg> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 2020-09-30 5:08 ` Julian Anastasov @ 2020-09-30 5:39 ` yue longguang 2020-10-04 15:18 ` [PATCH v6] " longguang.yue 2020-10-20 15:22 ` [PATCH v5] " Pablo Neira Ayuso 2 siblings, 0 replies; 8+ messages in thread From: yue longguang @ 2020-09-30 5:39 UTC (permalink / raw) To: Julian Anastasov Cc: longguang.yue, Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list It's done. On Wed, Sep 30, 2020 at 1:08 PM Julian Anastasov <ja@ssi.bg> wrote: > > > Hello, > > On Mon, 28 Sep 2020, longguang.yue wrote: > > > Outputting client,virtual,dst addresses info when tcp state changes, > > which makes the connection debug more clear > > > > Signed-off-by: longguang.yue <bigclouds@163.com> > > OK, v5 can be used instead of fixing v4. > > Acked-by: Julian Anastasov <ja@ssi.bg> > > > --- > Changelogs: > v5: fix indentation > v4: fix checkpatch > v3: fix checkpatch > v2: IP_VS_DBG_BUF outputs src,virtual,dst of ip_vs_conn > v1: fix the inverse of src and dst address > > longguang.yue, at this place after --- you can add info > for changes between versions, eg: > v5: fix indentation > > Use this for other patches, so that we know what is > changed between versions. > > > net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c > > index dc2e7da2742a..7da51390cea6 100644 > > --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c > > +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c > > @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > > if (new_state != cp->state) { > > struct ip_vs_dest *dest = cp->dest; > > > > - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" > > - "%s:%d state: %s->%s conn->refcnt:%d\n", > > + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " > > + "d:%s:%d state: %s->%s conn->refcnt:%d\n", > > pd->pp->name, > > ((state_off == TCP_DIR_OUTPUT) ? > > "output " : "input "), > > @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, > > th->fin ? 'F' : '.', > > th->ack ? 'A' : '.', > > th->rst ? 'R' : '.', > > - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > > - ntohs(cp->dport), > > IP_VS_DBG_ADDR(cp->af, &cp->caddr), > > ntohs(cp->cport), > > + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), > > + ntohs(cp->vport), > > + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), > > + ntohs(cp->dport), > > tcp_state_name(cp->state), > > tcp_state_name(new_state), > > refcount_read(&cp->refcnt)); > > -- > > 2.20.1 (Apple Git-117) > > Regards > > -- > Julian Anastasov <ja@ssi.bg> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v6] ipvs: adjust the debug info in function set_tcp_state 2020-09-30 5:08 ` Julian Anastasov 2020-09-30 5:39 ` yue longguang @ 2020-10-04 15:18 ` longguang.yue 2020-10-20 15:22 ` [PATCH v5] " Pablo Neira Ayuso 2 siblings, 0 replies; 8+ messages in thread From: longguang.yue @ 2020-10-04 15:18 UTC (permalink / raw) Cc: ja, kuba, wensong, horms, pablo, kadlec, fw, davem, lvs-devel, netfilter-devel, coreteam, linux-kernel, yuelongguang, longguang.yue Outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear --- v5,v6: fix indentation and add changelogs v3,v4: fix checkpatch v2: IP_VS_DBG_BUF outputs src,virtual,dst of ip_vs_conn v1: fix the inverse of src and dst address Signed-off-by: longguang.yue <bigclouds@163.com> --- net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c index dc2e7da2742a..7da51390cea6 100644 --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c @@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, if (new_state != cp->state) { struct ip_vs_dest *dest = cp->dest; - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" - "%s:%d state: %s->%s conn->refcnt:%d\n", + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " + "d:%s:%d state: %s->%s conn->refcnt:%d\n", pd->pp->name, ((state_off == TCP_DIR_OUTPUT) ? "output " : "input "), @@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, th->fin ? 'F' : '.', th->ack ? 'A' : '.', th->rst ? 'R' : '.', - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), - ntohs(cp->dport), IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), + ntohs(cp->vport), + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), + ntohs(cp->dport), tcp_state_name(cp->state), tcp_state_name(new_state), refcount_read(&cp->refcnt)); -- 2.20.1 (Apple Git-117) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 2020-09-30 5:08 ` Julian Anastasov 2020-09-30 5:39 ` yue longguang 2020-10-04 15:18 ` [PATCH v6] " longguang.yue @ 2020-10-20 15:22 ` Pablo Neira Ayuso 2 siblings, 0 replies; 8+ messages in thread From: Pablo Neira Ayuso @ 2020-10-20 15:22 UTC (permalink / raw) To: Julian Anastasov Cc: longguang.yue, yuelongguang, Wensong Zhang, Simon Horman, Jozsef Kadlecsik, Florian Westphal, David S. Miller, Jakub Kicinski, open list:IPVS, open list:IPVS, open list:NETFILTER, open list:NETFILTER, open list On Wed, Sep 30, 2020 at 08:08:02AM +0300, Julian Anastasov wrote: > > Hello, > > On Mon, 28 Sep 2020, longguang.yue wrote: > > > Outputting client,virtual,dst addresses info when tcp state changes, > > which makes the connection debug more clear > > > > Signed-off-by: longguang.yue <bigclouds@163.com> > > OK, v5 can be used instead of fixing v4. > > Acked-by: Julian Anastasov <ja@ssi.bg> Applied, thanks. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-20 15:22 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-27 12:07 [PATCH v4] ipvs: adjust the debug info in function set_tcp_state longguang.yue 2020-09-27 13:32 ` Julian Anastasov 2020-09-28 2:49 ` [PATCH v5] " longguang.yue 2020-09-29 2:15 ` yue longguang 2020-09-30 5:08 ` Julian Anastasov 2020-09-30 5:39 ` yue longguang 2020-10-04 15:18 ` [PATCH v6] " longguang.yue 2020-10-20 15:22 ` [PATCH v5] " Pablo Neira Ayuso
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).