diff mbox series

ipvs: adjust the debug order of src and dst

Message ID CAPaK2r921GtJVhwGKnZyCcQ1qkcWA=8TBWwNkW03R_=7TKzo6g@mail.gmail.com
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series ipvs: adjust the debug order of src and dst | expand

Commit Message

yue longguang Sept. 23, 2020, 6:06 a.m. UTC
From: ylg <bigclouds@163.com>

adjust the debug order of src and dst when tcp state changes

Signed-off-by: ylg <bigclouds@163.com>
---
 net/netfilter/ipvs/ip_vs_proto_tcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       refcount_read(&cp->refcnt));

Comments

Andrew Lunn Sept. 23, 2020, 12:07 p.m. UTC | #1
On Wed, Sep 23, 2020 at 02:06:25PM +0800, yue longguang wrote:
> From: ylg <bigclouds@163.com>
> 
> adjust the debug order of src and dst when tcp state changes

Hi Yue

You need to explain why you are doing something, not what you are
doing, in the commit message.

	Andrew
Julian Anastasov Sept. 23, 2020, 5:32 p.m. UTC | #2
Hello,

On Wed, 23 Sep 2020, yue longguang wrote:

> From: ylg <bigclouds@163.com>
> 
> adjust the debug order of src and dst when tcp state changes
> 
> Signed-off-by: ylg <bigclouds@163.com>
> ---
>  net/netfilter/ipvs/ip_vs_proto_tcp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c
> b/net/netfilter/ipvs/ip_vs_proto_tcp.c
> index dc2e7da2742a..6567eb45a234 100644
> --- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
> +++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
> @@ -548,10 +548,10 @@ 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->daf, &cp->daddr),
> +      ntohs(cp->dport),
>        tcp_state_name(cp->state),
>        tcp_state_name(new_state),
>        refcount_read(&cp->refcnt));
> -- 

	The first patch applies but this one does not: wrapped lines,
different tabs. You can also consider using the
"c:%s:%d v:%s:%d d:%s:%d" format as in ip_vs_bind_dest(). As result,
we will avoid the confusion about "->" meaning.

Regards

--
Julian Anastasov <ja@ssi.bg>
diff mbox series

Patch

diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c
b/net/netfilter/ipvs/ip_vs_proto_tcp.c
index dc2e7da2742a..6567eb45a234 100644
--- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
@@ -548,10 +548,10 @@  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->daf, &cp->daddr),
+      ntohs(cp->dport),
       tcp_state_name(cp->state),
       tcp_state_name(new_state),