From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B647E7E18 for ; Fri, 26 Sep 2014 07:57:46 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by orsmga103.jf.intel.com with ESMTP; 25 Sep 2014 23:02:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,603,1406617200"; d="scan'208";a="480127210" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by azsmga001.ch.intel.com with ESMTP; 25 Sep 2014 23:04:06 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8Q644k4029237; Fri, 26 Sep 2014 14:04:04 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s8Q642b3012986; Fri, 26 Sep 2014 14:04:04 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8Q642ro012982; Fri, 26 Sep 2014 14:04:02 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Fri, 26 Sep 2014 14:03:28 +0800 Message-Id: <1411711418-12881-11-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> References: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v3 10/20] lib/librte_ether: define structures for getting flow director information X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 05:57:47 -0000 define structures for getting flow director information Signed-off-by: Jingjing Wu Acked-by: Chen Jing D(Mark) Acked-by: Helin Zhang --- lib/librte_ether/rte_eth_ctrl.h | 40 ++++++++++++++++++++++++++++++++++++++++ lib/librte_ether/rte_ethdev.h | 23 ----------------------- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index df1ce4b..208082e 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -230,6 +230,46 @@ struct rte_eth_fdir_filter { struct rte_eth_fdir_action action; /**< action taken when match */ }; +/** + * A structure used to report the status of the flow director filters in use. + */ +struct rte_eth_fdir { + /** Number of filters with collision indication. */ + uint16_t collision; + /** Number of free (non programmed) filters. */ + uint16_t free; + /** The Lookup hash value of the added filter that updated the value + of the MAXLEN field */ + uint16_t maxhash; + /** Longest linked list of filters in the table. */ + uint8_t maxlen; + /** Number of added filters. */ + uint64_t add; + /** Number of removed filters. */ + uint64_t remove; + /** Number of failed added filters (no more space in device). */ + uint64_t f_add; + /** Number of failed removed filters. */ + uint64_t f_remove; +}; + +struct rte_eth_fdir_ext { + uint16_t guarant_spc; /**< guaranteed spaces.*/ + uint16_t guarant_cnt; /**< Number of filters in guaranteed spaces. */ + uint16_t best_spc; /**< best effort spaces.*/ + uint16_t best_cnt; /**< Number of filters in best effort spaces. */ +}; + +/** + * A structure used for user to get the status information of flow director filter + * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_OP_GET_INFO operation. + */ +struct rte_eth_fdir_info { + int mode; /**< if 0 disbale, if 1 enable*/ + struct rte_eth_fdir info; + struct rte_eth_fdir_ext info_ext; +}; + #ifdef __cplusplus } #endif diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index e2ea84a..6407e5d 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -794,29 +794,6 @@ struct rte_fdir_masks { }; /** - * A structure used to report the status of the flow director filters in use. - */ -struct rte_eth_fdir { - /** Number of filters with collision indication. */ - uint16_t collision; - /** Number of free (non programmed) filters. */ - uint16_t free; - /** The Lookup hash value of the added filter that updated the value - of the MAXLEN field */ - uint16_t maxhash; - /** Longest linked list of filters in the table. */ - uint8_t maxlen; - /** Number of added filters. */ - uint64_t add; - /** Number of removed filters. */ - uint64_t remove; - /** Number of failed added filters (no more space in device). */ - uint64_t f_add; - /** Number of failed removed filters. */ - uint64_t f_remove; -}; - -/** * A structure used to enable/disable specific device interrupts. */ struct rte_intr_conf { -- 1.8.1.4