From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 220FAB38C for ; Thu, 25 Sep 2014 08:53:49 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 25 Sep 2014 00:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,595,1406617200"; d="scan'208";a="578683138" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 25 Sep 2014 00:00:03 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8P7005s030077; Thu, 25 Sep 2014 15:00:00 +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 s8P6xwKl029631; Thu, 25 Sep 2014 15:00:00 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8P6xw3H029627; Thu, 25 Sep 2014 14:59:58 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Thu, 25 Sep 2014 14:59:27 +0800 Message-Id: <1411628369-29532-3-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1411628369-29532-1-git-send-email-jingjing.wu@intel.com> References: <1411628369-29532-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH 2/4] lib/librte_ether: define CTRL_PKT filter type and its structure 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, 25 Sep 2014 06:53:50 -0000 define new filter type and its structure - RTE_ETH_FILTER_CTRL_PKT - struct rte_ctrl_pkt_filter Signed-off-by: Jingjing Wu --- 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 34ab278..ff686be 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -53,6 +53,7 @@ enum rte_filter_type { RTE_ETH_FILTER_NONE = 0, RTE_ETH_FILTER_RSS, RTE_ETH_FILTER_FDIR, + RTE_ETH_FILTER_CTRL_PKT, RTE_ETH_FILTER_MAX, }; @@ -71,6 +72,29 @@ enum rte_filter_op { RTE_ETH_FILTER_OP_MAX, }; +/** + * Define all structures for Control Packet Filter type corresponding with specific operations. + */ + +#define RTE_CONTROL_PACKET_FLAGS_IGNORE_MAC 0x0001 +#define RTE_CONTROL_PACKET_FLAGS_DROP 0x0002 +#define RTE_CONTROL_PACKET_FLAGS_TO_QUEUE 0x0004 +#define RTE_CONTROL_PACKET_FLAGS_TX 0x0008 +#define RTE_CONTROL_PACKET_FLAGS_RX 0x0000 + +/** + * A structure used to define the control packet filter entry + * to support RTE_ETH_FILTER_CTRL_PKT with RTE_ETH_FILTER_OP_ADD + * and RTE_ETH_FILTER_OP_DELETE operations. + */ +struct rte_ctrl_pkt_filter { + struct ether_addr mac_addr; /**< mac address to match. */ + uint16_t ether_type; /**< ether type to match */ + uint16_t flags; /**< options for filter's behavior*/ + uint16_t dest_id; /**< destination vsi id or pool id*/ + uint16_t queue; /**< queue assign to if TO QUEUE flag is set */ +}; + #ifdef __cplusplus } #endif -- 1.8.1.4