From patchwork Thu Jan 4 13:53:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Li X-Patchwork-Id: 1882452 X-Patchwork-Delegate: i.maximets@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T5Sym6jlHz1ydd for ; Fri, 5 Jan 2024 01:05:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 78893405BC; Thu, 4 Jan 2024 14:05:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 78893405BC X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bKZOh82Y_Ksi; Thu, 4 Jan 2024 14:05:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 449D640193; Thu, 4 Jan 2024 14:05:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 449D640193 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 25B18C0077; Thu, 4 Jan 2024 14:05:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id C9090C0037 for ; Thu, 4 Jan 2024 14:04:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B1D0861188 for ; Thu, 4 Jan 2024 14:04:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B1D0861188 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VKuZyMoRqUml for ; Thu, 4 Jan 2024 14:04:57 +0000 (UTC) X-Greylist: delayed 642 seconds by postgrey-1.37 at util1.osuosl.org; Thu, 04 Jan 2024 14:04:57 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 36B4660BC5 Received: from chinatelecom.cn (smtpnm6-11.21cn.com [182.42.117.141]) by smtp3.osuosl.org (Postfix) with ESMTP id 36B4660BC5 for ; Thu, 4 Jan 2024 14:04:57 +0000 (UTC) HMM_SOURCE_IP: 192.168.137.232:38740.1173987257 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-171.88.110.10 (unknown [192.168.137.232]) by chinatelecom.cn (HERMES) with SMTP id D0348E01358F; Thu, 4 Jan 2024 21:54:05 +0800 (CST) X-189-SAVE-TO-SEND: +lic121@chinatelecom.cn Received: from ([171.88.110.10]) by gateway-ssl-dep-6799f67c56-fwptz with ESMTP id 6421a0546d1c487990efafa457691409 for dev@openvswitch.org; Thu, 04 Jan 2024 21:54:08 CST X-Transaction-ID: 6421a0546d1c487990efafa457691409 X-Real-From: lic121@chinatelecom.cn X-Receive-IP: 171.88.110.10 X-MEDUSA-Status: 0 From: Cheng Li To: dev@openvswitch.org Date: Thu, 4 Jan 2024 13:53:49 +0000 Message-Id: <1704376429-28541-1-git-send-email-lic121@chinatelecom.cn> X-Mailer: git-send-email 1.8.3.1 Subject: [ovs-dev] [PATCH] vconn: Count vconn_sent regardless of log level. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" vconn_sent counter is supposed to increase each time send() is called, no matter if the vconn log debug is on or off. Signed-off-by: Cheng Li --- lib/vconn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vconn.c b/lib/vconn.c index b556762..2513b03 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -681,8 +681,8 @@ do_send(struct vconn *vconn, struct ofpbuf *msg) ovs_assert(msg->size >= sizeof(struct ofp_header)); ofpmsg_update_length(msg); + COVERAGE_INC(vconn_sent); if (!VLOG_IS_DBG_ENABLED()) { - COVERAGE_INC(vconn_sent); retval = (vconn->vclass->send)(vconn, msg); } else { char *s = ofp_to_string(msg->data, msg->size, NULL, NULL, 1);