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 569B6B393 for ; Tue, 23 Sep 2014 05:24:29 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 22 Sep 2014 20:30:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,577,1406617200"; d="scan'208";a="603786804" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2014 20:30:01 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8N3Txfk009996; Tue, 23 Sep 2014 11:29:59 +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 s8N3Tv8g015435; Tue, 23 Sep 2014 11:29:59 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8N3TvTo015431; Tue, 23 Sep 2014 11:29:57 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Tue, 23 Sep 2014 11:29:48 +0800 Message-Id: <1411442991-15386-3-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1411442991-15386-1-git-send-email-jijiang.liu@intel.com> References: <1411442991-15386-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH 2/5]librte_ether:extend data structures of MACVLAN filter 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: Tue, 23 Sep 2014 03:24:30 -0000 Add new data definations for MACVLAN filter enhancement in rte_eth_ctrl.h file. Signed-off-by: Jijiang Liu Acked-by: Helin Zhang Acked-by: Jingjing Wu Acked-by: Changchun Ouyang --- lib/librte_ether/rte_eth_ctrl.h | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 66745a6..0910376 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_MACVLAN, RTE_ETH_FILTER_MAX, }; @@ -72,6 +73,30 @@ enum rte_filter_op { RTE_ETH_FILTER_OP_MAX, }; +/* *** MACVLAN FILTER *** */ + +/* MAC/VLAN filter type */ +#define RTE_MAC_PERFECT_MATCH 0x0001 +#define RTE_MACVLAN_PERFECT_MATCH 0x0002 +#define RTE_MAC_HASH_MATCH 0x0004 +#define RTE_MACVLAN_HASH_MATCH 0x0008 +#define RTE_MACVLAN_TO_QUEUE 0x0010 + +/* MACVLAN filter type mask */ +#define RTE_MACVLAN_FILTER_MASK 0x000F + + +/** + * MAC filter structure + */ +struct rte_eth_mac_filter { + uint8_t pf_vf_flag; /**< 0 for PF;1 for VF */ + uint16_t id; /**< PF ID or VF ID */ + uint16_t filter_type; /**< MAC/VLAN filter type */ + uint16_t queue_id; /**< to queue ID */ + struct ether_addr mac_addr; +}; + #ifdef __cplusplus } #endif -- 1.7.7.6