From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0A2707E50 for ; Fri, 26 Sep 2014 07:58:04 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 25 Sep 2014 23:04:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="391863779" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2014 22:58:22 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8Q64MRe029353; Fri, 26 Sep 2014 14:04:22 +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 s8Q64KxD013047; Fri, 26 Sep 2014 14:04:22 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8Q64K0U013043; Fri, 26 Sep 2014 14:04:20 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Fri, 26 Sep 2014 14:03:36 +0800 Message-Id: <1411711418-12881-19-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 18/20] lib/librte_ether: define structures for configuring flex masks 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:58:05 -0000 define structures for configuring flexible masks Signed-off-by: Jingjing Wu Acked-by: Chen Jing D(Mark) Acked-by: Helin Zhang --- lib/librte_ether/rte_eth_ctrl.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index e412471..13861c8 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -119,7 +119,28 @@ struct rte_eth_flex_payload_cfg { struct rte_eth_field_vector field[0]; }; +/** + * A structure defined to specify each word's bit mask + */ +struct rte_eth_flex_mask { + uint8_t offset; /**< word offset of word in flexible payload */ + uint16_t bitmask; /**< bit mask for word defined by offset */ +}; + +/** + * A structure used to configure FDIR masks for flexible payload + * for each flow type + */ +struct rte_eth_fdir_flex_masks { + enum rte_eth_flow_type flow_type; /**< flow type */ + uint8_t words_mask; /**< bit i enables word i of 8 words flexible payload */ + uint8_t nb_field; /**< the number of folloing fieds */ + struct rte_eth_flex_mask field[0]; +}; + #define RTE_ETH_FDIR_CFG_FLX 0x0001 +#define RTE_ETH_FDIR_CFG_MASK 0x0002 +#define RTE_ETH_FDIR_CFG_FLX_MASK 0x0003 /** * A structure used to config FDIR filter global set * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_OP_SET operation. @@ -129,9 +150,12 @@ struct rte_eth_fdir_cfg { /** * A pointer to structure for the configuration e.g. * struct rte_eth_flex_payload_cfg for FDIR_CFG_FLX + * struct rte_fdir_masks mask for FDIR_MASK + * struct rte_eth_fdir_flex_masks for FDIR_FLX_MASK */ void *cfg; }; + /** * A structure used to define the input for IPV4 UDP flow */ -- 1.8.1.4