summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingjing Wu <jingjing.wu@intel.com>2015-07-07 15:58:31 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-20 01:13:17 +0200
commit492a028c659c3d34900eccb33a347243d28dcd77 (patch)
tree4fce682335b83dec3fb76fafc69c24c556d412c6
parentb90f64b51b6ef0f39ec46b1d9dad45d17c030483 (diff)
downloaddpdk-492a028c659c3d34900eccb33a347243d28dcd77.zip
dpdk-492a028c659c3d34900eccb33a347243d28dcd77.tar.gz
dpdk-492a028c659c3d34900eccb33a347243d28dcd77.tar.xz
i40e: fix SCTP flow director
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> Tested-by: Marvin Liu <yong.liu@intel.com>
-rw-r--r--drivers/net/i40e/i40e_fdir.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 66e5961..8208273 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -822,6 +822,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;
@@ -864,6 +873,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;