- * [dpdk-dev] [PATCH 1/3] ethdev: change the input set of sctp flow
  2015-07-07  7:58 [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Jingjing Wu
@ 2015-07-07  7:58 ` Jingjing Wu
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 2/3] i40e: make sport and dport of sctp flow involved in match Jingjing Wu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jingjing Wu @ 2015-07-07  7:58 UTC (permalink / raw)
  To: dev
add sport and dport into the input set of sctp flow.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 9187d6d..60e9aa6 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -328,6 +328,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 */
 };
 
@@ -362,6 +366,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 */
 };
 
-- 
1.9.3
^ permalink raw reply	[flat|nested] 6+ messages in thread
- * [dpdk-dev] [PATCH 2/3] i40e: make sport and dport of sctp flow involved in match
  2015-07-07  7:58 [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Jingjing Wu
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 1/3] ethdev: change the input set of sctp flow Jingjing Wu
@ 2015-07-07  7:58 ` Jingjing Wu
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 3/3] testpmd: add sport and dport configuration for sctp flow Jingjing Wu
  2015-07-07  9:04 ` [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Liu, Yong
  3 siblings, 0 replies; 6+ messages in thread
From: Jingjing Wu @ 2015-07-07  7:58 UTC (permalink / raw)
  To: dev
Due to the NIC's firmware update, the input set of sctp flow is changed
to source IP, destination IP, source port, destination port and
Verification-Tag. This patch adds the sport and dport in the programming
packet of flow director.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 4bf98d0..9c6c57f 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -815,6 +815,15 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +
 					   sizeof(struct ipv4_hdr));
 		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+#ifdef RTE_NEXT_ABI
+		/*
+		 * The source and destination fields in the transmitted packet
+		 * need to be presented in a reversed order with respect
+		 * to the expected received packets.
+		 */
+		sctp->src_port = fdir_input->flow.sctp4_flow.dst_port;
+		sctp->dst_port = fdir_input->flow.sctp4_flow.src_port;
+#endif
 		sctp->tag = fdir_input->flow.sctp4_flow.verify_tag;
 		break;
 
@@ -857,6 +866,15 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +
 					   sizeof(struct ipv6_hdr));
 		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+#ifdef RTE_NEXT_ABI
+		/*
+		 * The source and destination fields in the transmitted packet
+		 * need to be presented in a reversed order with respect
+		 * to the expected received packets.
+		 */
+		sctp->src_port = fdir_input->flow.sctp6_flow.dst_port;
+		sctp->dst_port = fdir_input->flow.sctp6_flow.src_port;
+#endif
 		sctp->tag = fdir_input->flow.sctp6_flow.verify_tag;
 		break;
 
-- 
1.9.3
^ permalink raw reply	[flat|nested] 6+ messages in thread 
- * [dpdk-dev] [PATCH 3/3] testpmd: add sport and dport configuration for sctp flow
  2015-07-07  7:58 [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Jingjing Wu
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 1/3] ethdev: change the input set of sctp flow Jingjing Wu
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 2/3] i40e: make sport and dport of sctp flow involved in match Jingjing Wu
@ 2015-07-07  7:58 ` Jingjing Wu
  2015-07-07  9:04 ` [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Liu, Yong
  3 siblings, 0 replies; 6+ messages in thread
From: Jingjing Wu @ 2015-07-07  7:58 UTC (permalink / raw)
  To: dev
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/cmdline.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 8142910..45a5da0 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -7812,6 +7812,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;
@@ -7835,6 +7841,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;
-- 
1.9.3
^ permalink raw reply	[flat|nested] 6+ messages in thread 
- * Re: [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR
  2015-07-07  7:58 [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Jingjing Wu
                   ` (2 preceding siblings ...)
  2015-07-07  7:58 ` [dpdk-dev] [PATCH 3/3] testpmd: add sport and dport configuration for sctp flow Jingjing Wu
@ 2015-07-07  9:04 ` Liu, Yong
  2015-07-19 22:54   ` Thomas Monjalon
  3 siblings, 1 reply; 6+ messages in thread
From: Liu, Yong @ 2015-07-07  9:04 UTC (permalink / raw)
  To: Wu, Jingjing, dev
Hi,
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Tuesday, July 07, 2015 3:58 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing; Liu, Yong; Xu, HuilongX
> Subject: [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR
> 
> This patch set fixes the issue SCTP flow cannot be matched by FVL's flow
> director. The issue's root cause is that due to the NIC's firmware update,
> the input set of sctp flow are changed to source IP, destination IP,
> source port, destination port and Verification-Tag, which are source IP,
> destination IP and Verification-Tag previously.
> And because this fix will affect the struct rte_eth_fdir_flow, use
> RTE_NEXT_ABI to avoid ABI breaking.
> 
> Jingjing Wu (3):
>   ethdev: change the input set of sctp flow
>   i40e: make sport and dport of sctp flow involved in match
>   testpmd: add sport and dport configuration for sctp flow
> 
>  app/test-pmd/cmdline.c          | 12 ++++++++++++
>  drivers/net/i40e/i40e_fdir.c    | 18 ++++++++++++++++++
>  lib/librte_ether/rte_eth_ctrl.h |  8 ++++++++
>  3 files changed, 38 insertions(+)
> 
> --
> 1.9.3
Tested-by: Marvin Liu <yong.liu@intel.com>
^ permalink raw reply	[flat|nested] 6+ messages in thread
- * Re: [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR
  2015-07-07  9:04 ` [dpdk-dev] [PATCH 0/3] fix the issue sctp flow cannot be matched in FVL FDIR Liu, Yong
@ 2015-07-19 22:54   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2015-07-19 22:54 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: dev
> > This patch set fixes the issue SCTP flow cannot be matched by FVL's flow
> > director. The issue's root cause is that due to the NIC's firmware update,
> > the input set of sctp flow are changed to source IP, destination IP,
> > source port, destination port and Verification-Tag, which are source IP,
> > destination IP and Verification-Tag previously.
> > And because this fix will affect the struct rte_eth_fdir_flow, use
> > RTE_NEXT_ABI to avoid ABI breaking.
> > 
> > Jingjing Wu (3):
> >   ethdev: change the input set of sctp flow
> >   i40e: make sport and dport of sctp flow involved in match
> >   testpmd: add sport and dport configuration for sctp flow
> 
> Tested-by: Marvin Liu <yong.liu@intel.com>
Applied, thanks
An ABI deprecation announce must be sent.
^ permalink raw reply	[flat|nested] 6+ messages in thread