From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 99D047E7B for ; Wed, 22 Oct 2014 10:12:33 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 22 Oct 2014 01:19:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,767,1406617200"; d="scan'208";a="623038007" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2014 01:20:17 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s9M8KFft004968; Wed, 22 Oct 2014 16:20:15 +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 s9M8KClm015209; Wed, 22 Oct 2014 16:20:15 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9M8KCuK015205; Wed, 22 Oct 2014 16:20:12 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Wed, 22 Oct 2014 16:19:35 +0800 Message-Id: <1413965977-15165-2-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1413965977-15165-1-git-send-email-jingjing.wu@intel.com> References: <1411628369-29532-1-git-send-email-jingjing.wu@intel.com> <1413965977-15165-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v2 1/3] ethdev: 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: Wed, 22 Oct 2014 08:12:34 -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 df21ac6..8d3dba9 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -51,6 +51,7 @@ extern "C" { */ enum rte_filter_type { RTE_ETH_FILTER_NONE = 0, + 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_ADD + * and RTE_ETH_FILTER_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