DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jijiang Liu <jijiang.liu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/5]librte_ether:extend data structures of MACVLAN filter
Date: Tue, 23 Sep 2014 11:29:48 +0800
Message-ID: <1411442991-15386-3-git-send-email-jijiang.liu@intel.com> (raw)
In-Reply-To: <1411442991-15386-1-git-send-email-jijiang.liu@intel.com>

Add new data definations for MACVLAN filter enhancement in rte_eth_ctrl.h file.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
 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

  parent reply	other threads:[~2014-09-23  3:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  3:29 [dpdk-dev] [PATCH 0/5]support filter of unicast and multicast MAC address for VF on Fortville Jijiang Liu
2014-09-23  3:29 ` [dpdk-dev] [PATCH 1/5]librte_ether:use new filter framework Jijiang Liu
2014-09-23  3:29 ` Jijiang Liu [this message]
2014-09-23  3:29 ` [dpdk-dev] [PATCH 3/5]i40e:optimize MACVLAN filter implementation Jijiang Liu
2014-09-23  3:29 ` [dpdk-dev] [PATCH 4/5]i40e:add VF MACVLAN filter implementation in librte_pmd_i40e Jijiang Liu
2014-09-23  3:29 ` [dpdk-dev] [PATCH 5/5]testpmd:test VF MACVLAN filter for i40e Jijiang Liu
2014-10-24  7:58 ` [dpdk-dev] [PATCH v2 0/4] support VF MAC filter on Fortville Jijiang Liu
2014-10-24  7:58   ` [dpdk-dev] [PATCH v2 1/4] librte_ether:extend MAC filter data structures Jijiang Liu
2014-10-24  7:58   ` [dpdk-dev] [PATCH v2 2/4] i40e:expand MAC filter implemantation in i40e Jijiang Liu
2014-10-24  7:58   ` [dpdk-dev] [PATCH v2 3/4] i40e:add VF MAC filter Jijiang Liu
2014-10-24  7:58   ` [dpdk-dev] [PATCH v2 4/4] app/testpmd:test " Jijiang Liu
2014-10-30 22:35   ` [dpdk-dev] [PATCH v2 0/4] support VF MAC filter on Fortville Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411442991-15386-3-git-send-email-jijiang.liu@intel.com \
    --to=jijiang.liu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git