From patchwork Tue Sep 3 11:28:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Doyle via dev X-Patchwork-Id: 1156940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=openvswitch.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=aliyun.com header.i=@aliyun.com header.b="udiaJyOo"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46N4TQ71qnz9s7T for ; Tue, 3 Sep 2019 21:28:42 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 09F59D4F; Tue, 3 Sep 2019 11:28:39 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B30F2D3E for ; Tue, 3 Sep 2019 11:28:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from out30-26.freemail.mail.aliyun.com (out30-26.freemail.mail.aliyun.com [115.124.30.26]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B0A068A2 for ; Tue, 3 Sep 2019 11:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aliyun.com; s=s1024; t=1567510113; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type; bh=GDmCHUfLsi7K4jMDzQxrUmE6oAy6hWnujYHo7vZkfwE=; b=udiaJyOoT4QCY/LgJSRcJZ1MxCuEwHY7hvfF4AobCvS3V4yBsSAKRYKIv3sti3G7iyx2CjgxST2z86tVDqb1pQlbE8dEIkf3wCgYPUZJ6VEdGK5Q2+fJ/fk6r5/gLzYfLHnyusu5pTj/NH5YBXYJS4kMvxf3tC62pBsYszrAzto= X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1051718|-1; CH=green; DM=||false|; FP=0|0|0|0|0|-1|-1|-1; HT=e01e04400; MF=txfh2007@aliyun.com; NM=1; PH=DW; RN=1; RT=1; SR=0; TI=W4_5657687_v5_0AC264C9_1567508024661_o7001c2770; Received: from WS-web (txfh2007@aliyun.com[W4_5657687_v5_0AC264C9_1567508024661_o7001c2770]) by e01e07402.eu6 at Tue, 03 Sep 2019 19:28:26 +0800 Date: Tue, 03 Sep 2019 19:28:26 +0800 To: "ovs-dev" Message-ID: X-Mailer: [Alimail-Mailagent revision 29][W4_5657687][v5][Edge] MIME-Version: 1.0 x-aliyun-mail-creator: W4_5657687_v5_RNTTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzY0LjAuMzI4Mi4xNDAgU2FmYXJpLzUzNy4zNiBFZGdlLzE3LjE3MTM0LS X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] =?utf-8?b?W1BBVENIXSBzaG93ICJyeF9taXNzZWRfZXJyb3JzIiBj?= =?utf-8?q?ounter_in_interface_statisics?= X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: txfh2007 via dev From: Brendan Doyle via dev Reply-To: txfh2007 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Hi all: Currently OVS maintains several Statistics counters per interface. "rx_missed_errors" counter is amount them and collects pkts not received due to local resource constaints. Many ovs netdevs support collecting this counter, such as netdev-linux, netdev-dpdk, netdev-bsd and so on. But as far as I know, this counter can't be read by command "ovs-vsctl list interface |grep statistics". I have found the root cause(may be I was wrong) is in task "iface_refresh_stats", the "rx_missed_errors" is not in the macro IFACE_STATS. So even if this counter is updated by netdev, it woundn't be read by users. This simple patch tries to solve this problem, many thanks for your kindly reminder. Signed-off-by: Liu Chang diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index d921c4e..55d30bf 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2393,6 +2393,7 @@ iface_refresh_stats(struct iface *iface) IFACE_STAT(rx_frame_errors, "rx_frame_err") \ IFACE_STAT(rx_over_errors, "rx_over_err") \ IFACE_STAT(rx_crc_errors, "rx_crc_err") \ + IFACE_STAT(rx_missed_errors, "rx_missed_errors") \ IFACE_STAT(collisions, "collisions") \ IFACE_STAT(rx_1_to_64_packets, "rx_1_to_64_packets") \ IFACE_STAT(rx_65_to_127_packets, "rx_65_to_127_packets") \