From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: Kumar Sanghvi <kumaras@chelsio.com>,
Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: [dpdk-dev] [PATCH 01/10] ethdev: add a generic flow and new behavior switch to fdir
Date: Wed, 3 Feb 2016 14:02:22 +0530 [thread overview]
Message-ID: <f5c70ef423973a07c10c11d9dd55ddf39c111b31.1454408702.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1454408702.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1454408702.git.rahul.lakkireddy@chelsio.com>
Add a new raw packet flow that allows specifying generic flow input.
Add the ability to provide masks for fields in flow to allow range of
values.
Add a new behavior switch.
Add the ability to provide behavior arguments to allow rewriting matched
fields with new values. Ex: allows to provide new ip and port addresses
to rewrite the fields of packets matching a filter rule before NAT'ing.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
doc/guides/rel_notes/release_2_3.rst | 3 +++
lib/librte_ether/rte_eth_ctrl.h | 15 ++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst
index 99de186..19ce954 100644
--- a/doc/guides/rel_notes/release_2_3.rst
+++ b/doc/guides/rel_notes/release_2_3.rst
@@ -39,6 +39,9 @@ API Changes
ABI Changes
-----------
+* New flow type ``RTE_ETH_FLOW_RAW_PKT`` had been introduced and hence
+ ``RTE_ETH_FLOW_MAX`` had been increased to 19.
+
Shared Library Versions
-----------------------
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index ce224ad..1bc0d03 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -74,7 +74,8 @@ extern "C" {
#define RTE_ETH_FLOW_IPV6_EX 15
#define RTE_ETH_FLOW_IPV6_TCP_EX 16
#define RTE_ETH_FLOW_IPV6_UDP_EX 17
-#define RTE_ETH_FLOW_MAX 18
+#define RTE_ETH_FLOW_RAW_PKT 18
+#define RTE_ETH_FLOW_MAX 19
/**
* Feature filter types
@@ -499,6 +500,9 @@ struct rte_eth_tunnel_flow {
struct ether_addr mac_addr; /**< Mac address to match. */
};
+/**< Max length of raw packet in bytes. */
+#define RTE_ETH_RAW_PKT_FLOW_MAX_LEN 256
+
/**
* An union contains the inputs for all types of flow
*/
@@ -514,6 +518,7 @@ union rte_eth_fdir_flow {
struct rte_eth_ipv6_flow ipv6_flow;
struct rte_eth_mac_vlan_flow mac_vlan_flow;
struct rte_eth_tunnel_flow tunnel_flow;
+ uint8_t raw_pkt_flow[RTE_ETH_RAW_PKT_FLOW_MAX_LEN];
};
/**
@@ -534,6 +539,8 @@ struct rte_eth_fdir_input {
uint16_t flow_type;
union rte_eth_fdir_flow flow;
/**< Flow fields to match, dependent on flow_type */
+ union rte_eth_fdir_flow flow_mask;
+ /**< Mask for the fields matched, dependent on flow */
struct rte_eth_fdir_flow_ext flow_ext;
/**< Additional fields to match */
};
@@ -545,6 +552,7 @@ enum rte_eth_fdir_behavior {
RTE_ETH_FDIR_ACCEPT = 0,
RTE_ETH_FDIR_REJECT,
RTE_ETH_FDIR_PASSTHRU,
+ RTE_ETH_FDIR_SWITCH,
};
/**
@@ -558,6 +566,9 @@ enum rte_eth_fdir_status {
RTE_ETH_FDIR_REPORT_FLEX_8, /**< Report 8 flex bytes. */
};
+/**< Max # of behavior arguments */
+#define RTE_ETH_BEHAVIOR_ARG_MAX_LEN 256
+
/**
* A structure used to define an action when match FDIR packet filter.
*/
@@ -569,6 +580,8 @@ struct rte_eth_fdir_action {
/**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or
RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the reported
flex bytes start from in flexible payload. */
+ uint8_t behavior_arg[RTE_ETH_BEHAVIOR_ARG_MAX_LEN];
+ /**< Extra arguments for behavior taken */
};
/**
--
2.5.3
next prev parent reply other threads:[~2016-02-03 8:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 8:32 [dpdk-dev] [PATCH 00/10] cxgbe: Add flow director support Rahul Lakkireddy
2016-02-03 8:32 ` Rahul Lakkireddy [this message]
2016-02-24 14:43 ` [dpdk-dev] [PATCH 01/10] ethdev: add a generic flow and new behavior switch to fdir Bruce Richardson
2016-02-24 15:02 ` Thomas Monjalon
2016-02-24 18:40 ` Rahul Lakkireddy
2016-02-24 22:17 ` Thomas Monjalon
2016-02-25 9:33 ` Rahul Lakkireddy
2016-02-25 18:24 ` Thomas Monjalon
2016-02-26 1:17 ` Wu, Jingjing
2016-03-03 15:03 ` Olga Shern
2016-07-20 10:45 ` Thomas Monjalon
2016-02-25 3:26 ` Wu, Jingjing
2016-02-25 9:11 ` Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 02/10] examples/test-cxgbe-filters: add example to test cxgbe fdir support Rahul Lakkireddy
2016-02-24 14:40 ` Bruce Richardson
2016-02-24 18:35 ` Rahul Lakkireddy
2016-02-25 13:48 ` Bruce Richardson
2016-02-03 8:32 ` [dpdk-dev] [PATCH 03/10] cxgbe: add skeleton to add support for T5 hardware filtering Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 04/10] cxgbe: add control txq for communicating filtering info Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 05/10] cxgbe: add compressed local IP table for matching IPv6 addresses Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 06/10] cxgbe: add layer 2 table for switch action filter Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 07/10] cxgbe: add source mac " Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 08/10] cxgbe: add LE-TCAM filtering support Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 09/10] cxgbe: add HASH " Rahul Lakkireddy
2016-02-03 8:32 ` [dpdk-dev] [PATCH 10/10] cxgbe: add flow director support and update documentation Rahul Lakkireddy
2016-02-22 10:39 ` [dpdk-dev] [PATCH 00/10] cxgbe: Add flow director support Rahul Lakkireddy
2016-03-22 13:43 ` Bruce Richardson
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=f5c70ef423973a07c10c11d9dd55ddf39c111b31.1454408702.git.rahul.lakkireddy@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=dev@dpdk.org \
--cc=kumaras@chelsio.com \
--cc=nirranjan@chelsio.com \
/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).