From patchwork Sat Dec 28 07:11:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tonghao Zhang X-Patchwork-Id: 1215819 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ObrHnB2M"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47lFHD6JZ6z9sPn for ; Sat, 28 Dec 2019 18:11:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CA4B520433; Sat, 28 Dec 2019 07:11:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hu-rUrPWqk3Q; Sat, 28 Dec 2019 07:11:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id BFAEC2041C; Sat, 28 Dec 2019 07:11:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9D633C1796; Sat, 28 Dec 2019 07:11:33 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D1DA9C0881 for ; Sat, 28 Dec 2019 07:11:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BC34F2041C for ; Sat, 28 Dec 2019 07:11:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VaC0X61awVE4 for ; Sat, 28 Dec 2019 07:11:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by silver.osuosl.org (Postfix) with ESMTPS id 4DACA20416 for ; Sat, 28 Dec 2019 07:11:30 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id x6so14682242pfo.10 for ; Fri, 27 Dec 2019 23:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=he1xZnp9U7D83cL46hUkJY6Tz5NGglpf1oKZXj3lJ88=; b=ObrHnB2MnE888JN665icwF8Co1tjRK6KMHI3HB3baCOo/PErnYyD9bPtNxc7it5gic 0Dpmv78JrfDytD2vTxMKqAISbqTMi8upHOZIHKz9FO0yvSoZh4RDw37k/vzsgKlYrvS/ pt3axxJCfzzUtS3m25hhbsaq3vPNNWER/i/4Ei5DB1iwB7wT0MtZsUVydHybMKpeouQ8 x+ZwuuvBSCIYpxt0c3cyMKd4Mkc/Cw68ewZZUbim1kT2xbF9LyHxc/Y/YSdsKjedZ8R5 PegQV1GNgLAZvNYyfnpVfhKUowSnoptqcL6BgAY0lqGDLDOaNhoSQvSc0bPGGAwtKU8E ErVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=he1xZnp9U7D83cL46hUkJY6Tz5NGglpf1oKZXj3lJ88=; b=qa0OA1dWAv4i1k9dO0lK+uGJTQUUmduJe1TL19FzUqRhYgkdppVrsmixDlPKav/9wy X/GN3QCB2FcHbBbN0hGAf7cAENIjIVaADH+j9+WiL9oBHVMwBLYGf3m/MoV5XHXyv1z9 q47AOc8bHwqAQxfwGM57iiAksiTNY1TUOwfrO+cXUExGIU1JIzEEFQv/a1lemriigb4T Ram8EXnSxR3TrIO/jLMTK4xWoRW7ksB9hLIKHbo76Qf3GIapycSJjVkL7qqH8dDTv1V5 dShPxr/FYrsOlfaFpibxXgFlSxojr/BxN2TLhQrFQAEuACTLH6/++s2ECgbQHQm7vZ9A AQkA== X-Gm-Message-State: APjAAAXW0aWJUnxNJRofrQ9DRwtbpq33aK/236ul84KwcQST68bgarup h6V9E/eZQg8AJMcSbsAbv7A= X-Google-Smtp-Source: APXvYqzv9P347+8cpxMO/4zhuYvkNje5Xpli1Sbj0lKm6f/8e0hJux7ZkZcpQmZI4S2sNcU693c2tQ== X-Received: by 2002:a63:e911:: with SMTP id i17mr59096709pgh.42.1577517089916; Fri, 27 Dec 2019 23:11:29 -0800 (PST) Received: from local.opencloud.tech.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id o2sm17380429pjo.26.2019.12.27.23.11.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Dec 2019 23:11:29 -0800 (PST) From: xiangxia.m.yue@gmail.com To: blp@ovn.org, i.maximets@ovn.org, elibr@mellanox.com Date: Sat, 28 Dec 2019 15:11:10 +0800 Message-Id: <1577517076-105041-2-git-send-email-xiangxia.m.yue@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1577517076-105041-1-git-send-email-xiangxia.m.yue@gmail.com> References: <1577517076-105041-1-git-send-email-xiangxia.m.yue@gmail.com> Cc: dev@openvswitch.org, martinbj2008@gmail.com Subject: [ovs-dev] [ovs-dev 1/7] dpif-netdev: Remove dp_meter_* struct to header file 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" From: Tonghao Zhang This patch will be used in later patch. Signed-off-by: Tonghao Zhang --- lib/dpif-netdev.c | 17 ----------------- lib/dpif-netdev.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 8485b54..7fcd8cb 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -261,23 +261,6 @@ static bool dpcls_lookup(struct dpcls *cls, #define DP_SUPPORTED_METER_BAND_TYPES \ ( 1 << OFPMBT13_DROP ) -struct dp_meter_band { - struct ofputil_meter_band up; /* type, prec_level, pad, rate, burst_size */ - uint32_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */ - uint64_t packet_count; - uint64_t byte_count; -}; - -struct dp_meter { - uint16_t flags; - uint16_t n_bands; - uint32_t max_delta_t; - uint64_t used; - uint64_t packet_count; - uint64_t byte_count; - struct dp_meter_band bands[]; -}; - struct pmd_auto_lb { bool auto_lb_requested; /* Auto load balancing requested by user. */ bool is_enabled; /* Current status of Auto load balancing. */ diff --git a/lib/dpif-netdev.h b/lib/dpif-netdev.h index 6db6ed2..b5f5c12 100644 --- a/lib/dpif-netdev.h +++ b/lib/dpif-netdev.h @@ -33,6 +33,23 @@ extern "C" { * headers to be aligned on a 4-byte boundary. */ enum { DP_NETDEV_HEADROOM = 2 + VLAN_HEADER_LEN }; +struct dp_meter_band { + struct ofputil_meter_band up; /* type, prec_level, pad, rate, burst_size */ + uint32_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */ + uint64_t packet_count; + uint64_t byte_count; +}; + +struct dp_meter { + uint16_t flags; + uint16_t n_bands; + uint32_t max_delta_t; + uint64_t used; + uint64_t packet_count; + uint64_t byte_count; + struct dp_meter_band bands[]; +}; + bool dpif_is_netdev(const struct dpif *); #define NR_QUEUE 1