From patchwork Thu Dec 21 02:35:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 32551 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F0E61B253; Thu, 21 Dec 2017 10:45:02 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 32E851B244 for ; Thu, 21 Dec 2017 10:44:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 01:44:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,435,1508828400"; d="scan'208";a="188920492" Received: from dpdk27.sh.intel.com ([10.67.111.90]) by fmsmga006.fm.intel.com with ESMTP; 21 Dec 2017 01:44:56 -0800 From: Qi Zhang To: adrien.mazarguil@6wind.com Cc: dev@dpdk.org, declan.doherty@intel.com, Qi Zhang Date: Wed, 20 Dec 2017 21:35:16 -0500 Message-Id: <1513823719-36066-3-git-send-email-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513823719-36066-1-git-send-email-qi.z.zhang@intel.com> References: <1513823719-36066-1-git-send-email-qi.z.zhang@intel.com> Subject: [dpdk-dev] [RFC v2 2/5] ether: add flow last hit query support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Enhanced the action RTE_FLOW_TYPE_ACTION_COUNT, number of milliseconds since last hit can be queried. Signed-off-by: Qi Zhang --- lib/librte_ether/rte_flow.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index 91706e2..8e902f0 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -1052,9 +1052,11 @@ struct rte_flow_query_count { uint32_t reset:1; /**< Reset counters after query [in]. */ uint32_t hits_set:1; /**< hits field is set [out]. */ uint32_t bytes_set:1; /**< bytes field is set [out]. */ + uint32_t last_hit_set:1; /**< last_hit field is set [out]. */ uint32_t reserved:29; /**< Reserved, must be zero [in, out]. */ uint64_t hits; /**< Number of hits for this rule [out]. */ uint64_t bytes; /**< Number of bytes through this rule [out]. */ + uint64_t last_hit; /**< Number of milliseconds since last hit [out]. */ }; /**