From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E4EF25A1F for ; Tue, 7 Jul 2015 09:58:45 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 07 Jul 2015 00:58:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,421,1432623600"; d="scan'208";a="724166198" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 07 Jul 2015 00:58:44 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t677wg29025311; Tue, 7 Jul 2015 15:58:42 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t677wdYC016198; Tue, 7 Jul 2015 15:58:41 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t677wc2U016194; Tue, 7 Jul 2015 15:58:38 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Tue, 7 Jul 2015 15:58:31 +0800 Message-Id: <1436255912-16149-3-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1436255912-16149-1-git-send-email-jingjing.wu@intel.com> References: <1436255912-16149-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH 2/3] i40e: make sport and dport of sctp flow involved in match X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 07:58:46 -0000 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 --- 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