From: Jingjing Wu <jingjing.wu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/5] ethdev: define flex filter type and its structure
Date: Sun, 15 Feb 2015 12:07:30 +0800 [thread overview]
Message-ID: <1423973254-605-2-git-send-email-jingjing.wu@intel.com> (raw)
In-Reply-To: <1423973254-605-1-git-send-email-jingjing.wu@intel.com>
This patch defines flex filter type RTE_ETH_FILTER_FLEXIBLE and its structure rte_eth_flex_filter.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_ether/rte_eth_ctrl.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 0ce241e..beacfa3 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_MACVLAN,
RTE_ETH_FILTER_ETHERTYPE,
+ RTE_ETH_FILTER_FLEXIBLE,
RTE_ETH_FILTER_TUNNEL,
RTE_ETH_FILTER_FDIR,
RTE_ETH_FILTER_HASH,
@@ -116,6 +117,25 @@ struct rte_eth_ethertype_filter {
uint16_t queue; /**< Queue assigned to when match*/
};
+#define RTE_FLEX_FILTER_MAXLEN 128 /**< bytes to use in flex filter. */
+#define RTE_FLEX_FILTER_MASK_SIZE \
+ (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT)
+ /**< mask bytes in flex filter. */
+
+/**
+ * A structure used to define the flex filter entry
+ * to support RTE_ETH_FILTER_FLEXIBLE with RTE_ETH_FILTER_ADD,
+ * RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations.
+ */
+struct rte_eth_flex_filter {
+ uint16_t len;
+ uint8_t bytes[RTE_FLEX_FILTER_MAXLEN]; /**< flex bytes in big endian.*/
+ uint8_t mask[RTE_FLEX_FILTER_MASK_SIZE]; /**< if mask bit is 1b, do
+ not compare corresponding byte. */
+ uint8_t priority;
+ uint16_t queue; /**< Queue assigned to when match. */
+};
+
/**
* Tunneled type.
*/
--
1.9.3
next prev parent reply other threads:[~2015-02-15 4:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <igbv1>
2015-01-30 4:48 ` [dpdk-dev] [PATCH] igb: integrate flex filter to new API zhida zang
2015-02-15 4:07 ` [dpdk-dev] [PATCH v2 0/5] Integrate flex filter in igb driver " Jingjing Wu
2015-02-15 4:07 ` Jingjing Wu [this message]
2015-02-15 4:07 ` [dpdk-dev] [PATCH v2 2/5] e1000: new functions replace old ones for flex filter Jingjing Wu
2015-02-15 4:07 ` [dpdk-dev] [PATCH v2 3/5] testpmd: new commands " Jingjing Wu
2015-02-15 4:07 ` [dpdk-dev] [PATCH v2 4/5] ethdev: remove old APIs and structures of " Jingjing Wu
2015-02-15 4:07 ` [dpdk-dev] [PATCH v2 5/5] doc: commands changed in testpmd_funcs for " Jingjing Wu
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 0/5] Integrate flex filter in igb driver to new API Pablo de Lara
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 1/5] ethdev: define flex filter type and its structure Pablo de Lara
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 2/5] e1000: new functions replace old ones for flex filter Pablo de Lara
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 3/5] testpmd: new commands " Pablo de Lara
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 4/5] ethdev: remove old APIs and structures of " Pablo de Lara
2015-02-21 1:53 ` [dpdk-dev] [PATCH v3 5/5] doc: commands changed in testpmd_funcs for " Pablo de Lara
2015-02-22 1:29 ` [dpdk-dev] [PATCH v3 0/5] Integrate flex filter in igb driver to new API 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=1423973254-605-2-git-send-email-jingjing.wu@intel.com \
--to=jingjing.wu@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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).