From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFDA7C2D0A8 for ; Wed, 30 Sep 2020 05:39:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A54E206DB for ; Wed, 30 Sep 2020 05:39:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WQhC5GPz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727660AbgI3FjR (ORCPT ); Wed, 30 Sep 2020 01:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725320AbgI3FjQ (ORCPT ); Wed, 30 Sep 2020 01:39:16 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B679C061755; Tue, 29 Sep 2020 22:39:16 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id m5so619091lfp.7; Tue, 29 Sep 2020 22:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r6/0Ch+k5Ys1E3IXfQI20t3y10+qXJytvRGG7bTZJQo=; b=WQhC5GPzOi63cEdwhuuRS2V/6t6FhbwGZD+icnCQzTX5JiIIeS2NGQA1sY2jYNAYJh 6yt5FygqqfQ9MCaaZ7YDJaNskKt/1DI2Soiau+RjF+53iQCdMk0FkvfdKCPcvPnRPoyh ET/PKwPd+kKfAYhF9mUKRS1df0IlHseezAhielfA21q0doB6useN46c6+f8yqpWApWIo v2hBAoHniHySz0W/2OrW6aFY7+jArVx5CWHrniVcc52LmTOBoJr3LF6OAF5HX2tiyar2 oTb8XD4vFGDILlPb99DYLKXInkWdUkplvqAR3FLNDclxMc0V80FZgUdVKXGZqWhTpZKz F7Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r6/0Ch+k5Ys1E3IXfQI20t3y10+qXJytvRGG7bTZJQo=; b=CpIkclYo3Wj2pv/6H01BjXgUtJ+p/hRWyeXK1NurK1NM1icIs2h9RusvQbI832K8eI yBDbOMt3mmzenWjMyaBp+pwFt//VYrHXaLkAxmiLiyfXHCcM6S2M1t3U52dpih3gwjH5 gXKPd8246Sqyr5fw6ClYWXDV2iQ8bGDcpWxj+x4UHrRw7E+bo2OI2Knh/xNbrVGsX785 06fygn9XVbN/StC6nJDE1nOc1lWi0WmOgBxLSpDUTxlfuRnWukWNrpSbCO+cfnAC74un dG8LDFjbm59BzGGNbFRiEDZdoJe4Y0HTOpE97PiY1qR3+1xguNHyIuBswlQYfcitCUZf Ps0g== X-Gm-Message-State: AOAM53312svOULShuelW6TbGyN1Xidhi3W8tgo0ahawv/4o2aL6+zFGB eDfxDS8CWiqA7UO8S4Hp8x2Em7axlTR7eR01q6E= X-Google-Smtp-Source: ABdhPJy5q781z8R+pbwuVbr7RqRJq1qarIkOTOLHWY9XEx6YTihZ9UoCenRNIihnUD7X29n0nFBAMOwAnFA+6VCktEg= X-Received: by 2002:ac2:44d3:: with SMTP id d19mr250407lfm.341.1601444354890; Tue, 29 Sep 2020 22:39:14 -0700 (PDT) MIME-Version: 1.0 References: <20200928024938.97121-1-bigclouds@163.com> In-Reply-To: From: yue longguang Date: Wed, 30 Sep 2020 13:39:04 +0800 Message-ID: Subject: Re: [PATCH v5] ipvs: adjust the debug info in function set_tcp_state 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's done. On Wed, Sep 30, 2020 at 1:08 PM 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 > > OK, v5 can be used instead of fixing v4. > > Acked-by: Julian Anastasov > > > --- > 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 >