From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 32B1C5AB3 for ; Thu, 29 Jan 2015 06:29:50 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 28 Jan 2015 21:29:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,484,1418112000"; d="scan'208";a="677806850" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 28 Jan 2015 21:29:48 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0T5TiqS022588; Thu, 29 Jan 2015 13:29:44 +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 t0T5Tf3t013679; Thu, 29 Jan 2015 13:29:43 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0T5Tf1U013675; Thu, 29 Jan 2015 13:29:41 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Thu, 29 Jan 2015 13:29:17 +0800 Message-Id: <1422509365-13596-8-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1422509365-13596-1-git-send-email-jingjing.wu@intel.com> References: <1422509365-13596-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH 07/15] ethdev: structures definition for flow director 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: Thu, 29 Jan 2015 05:29:53 -0000 This patch defines structure rte_eth_fdir_masks. It extends rte_fdir_conf and rte_eth_fdir_info to contain mask's configuration. Signed-off-by: Jingjing Wu --- lib/librte_ether/rte_eth_ctrl.h | 13 +++++++++++++ lib/librte_ether/rte_ethdev.h | 1 + 2 files changed, 14 insertions(+) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 74403b7..a5db310 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -344,6 +344,18 @@ struct rte_eth_fdir_filter { }; /** + * A structure used to configure FDIR masks that are used by the device + * to match the various fields of RX packet headers. + */ +struct rte_eth_fdir_masks { + uint16_t vlan_tci_mask; + struct rte_eth_ipv4_flow ipv4_mask; + struct rte_eth_ipv6_flow ipv6_mask; + uint16_t src_port_mask; + uint16_t dst_port_mask; +}; + +/** * Payload type */ enum rte_eth_payload_type { @@ -409,6 +421,7 @@ enum rte_fdir_mode { */ struct rte_eth_fdir_info { enum rte_fdir_mode mode; /**< Flow director mode */ + struct rte_eth_fdir_masks mask; struct rte_eth_fdir_flex_conf flex_conf; /**< Flex payload configuration information */ uint32_t guarant_spc; /**< Guaranteed spaces.*/ diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index cbe05b1..6c8ad08 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -720,6 +720,7 @@ struct rte_fdir_conf { enum rte_fdir_status_mode status; /**< How to report FDIR hash. */ /** RX queue of packets matching a "drop" filter in perfect mode. */ uint8_t drop_queue; + struct rte_eth_fdir_masks mask; struct rte_eth_fdir_flex_conf flex_conf; /**< Flex payload configuration. */ }; -- 1.9.3