summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingjing Wu <jingjing.wu@intel.com>2015-07-07 15:58:30 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-20 01:13:08 +0200
commitb90f64b51b6ef0f39ec46b1d9dad45d17c030483 (patch)
treeeced3d3e1844ff46788965f31b81d59aa62d3417
parent20718201c81c0db3c06e9a5040c9a85f145c4647 (diff)
downloaddpdk-b90f64b51b6ef0f39ec46b1d9dad45d17c030483.zip
dpdk-b90f64b51b6ef0f39ec46b1d9dad45d17c030483.tar.gz
dpdk-b90f64b51b6ef0f39ec46b1d9dad45d17c030483.tar.xz
ethdev: add ports to SCTP flow director
Add sport and dport into the input set of sctp flow. Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
-rw-r--r--app/test-pmd/cmdline.c12
-rw-r--r--lib/librte_ether/rte_eth_ctrl.h8
2 files changed, 20 insertions, 0 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9eaacb4..8ab4687 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -7887,6 +7887,12 @@ cmd_flow_director_filter_parsed(void *parsed_result,
IPV4_ADDR_TO_UINT(res->ip_src,
entry.input.flow.sctp4_flow.ip.src_ip);
/* need convert to big endian. */
+#ifdef RTE_NEXT_ABI
+ entry.input.flow.sctp4_flow.dst_port =
+ rte_cpu_to_be_16(res->port_dst);
+ entry.input.flow.sctp4_flow.src_port =
+ rte_cpu_to_be_16(res->port_src);
+#endif
entry.input.flow.sctp4_flow.verify_tag =
rte_cpu_to_be_32(res->verify_tag_value);
break;
@@ -7910,6 +7916,12 @@ cmd_flow_director_filter_parsed(void *parsed_result,
IPV6_ADDR_TO_ARRAY(res->ip_src,
entry.input.flow.sctp6_flow.ip.src_ip);
/* need convert to big endian. */
+#ifdef RTE_NEXT_ABI
+ entry.input.flow.sctp6_flow.dst_port =
+ rte_cpu_to_be_16(res->port_dst);
+ entry.input.flow.sctp6_flow.src_port =
+ rte_cpu_to_be_16(res->port_src);
+#endif
entry.input.flow.sctp6_flow.verify_tag =
rte_cpu_to_be_32(res->verify_tag_value);
break;
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 536b19e..4beb981 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -335,6 +335,10 @@ struct rte_eth_tcpv4_flow {
*/
struct rte_eth_sctpv4_flow {
struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */
+#ifdef RTE_NEXT_ABI
+ uint16_t src_port; /**< SCTP source port to match. */
+ uint16_t dst_port; /**< SCTP destination port to match. */
+#endif
uint32_t verify_tag; /**< Verify tag to match */
};
@@ -369,6 +373,10 @@ struct rte_eth_tcpv6_flow {
*/
struct rte_eth_sctpv6_flow {
struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */
+#ifdef RTE_NEXT_ABI
+ uint16_t src_port; /**< SCTP source port to match. */
+ uint16_t dst_port; /**< SCTP destination port to match. */
+#endif
uint32_t verify_tag; /**< Verify tag to match */
};