Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/10093/?format=api
https://patches.dpdk.org/api/patches/10093/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1453789575-6297-9-git-send-email-jingjing.wu@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1453789575-6297-9-git-send-email-jingjing.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1453789575-6297-9-git-send-email-jingjing.wu@intel.com", "date": "2016-01-26T06:26:11", "name": "[dpdk-dev,08/12] i40e: extend flow director to filter by tunnel ID", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "30adf2077dfbc3bf630b9f2fdbc31b4f4fd35400", "submitter": { "id": 47, "url": "https://patches.dpdk.org/api/people/47/?format=api", "name": "Jingjing Wu", "email": "jingjing.wu@intel.com" }, "delegate": { "id": 10, "url": "https://patches.dpdk.org/api/users/10/?format=api", "username": "bruce", "first_name": "Bruce", "last_name": "Richardson", "email": "bruce.richardson@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1453789575-6297-9-git-send-email-jingjing.wu@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/10093/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/10093/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 892939200;\n\tTue, 26 Jan 2016 07:27:03 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 4AB4E91F1\n\tfor <dev@dpdk.org>; Tue, 26 Jan 2016 07:27:01 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 25 Jan 2016 22:26:41 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 25 Jan 2016 22:26:40 -0800", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id u0Q6QbxG031381;\n\tTue, 26 Jan 2016 14:26:37 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid u0Q6QYBs006387; Tue, 26 Jan 2016 14:26:36 +0800", "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0Q6QYNA006383; \n\tTue, 26 Jan 2016 14:26:34 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.22,348,1449561600\"; d=\"scan'208\";a=\"641473621\"", "From": "Jingjing Wu <jingjing.wu@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 26 Jan 2016 14:26:11 +0800", "Message-Id": "<1453789575-6297-9-git-send-email-jingjing.wu@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1453789575-6297-1-git-send-email-jingjing.wu@intel.com>", "References": "<1451032200-24973-1-git-send-email-jingjing.wu@intel.com>\n\t<1453789575-6297-1-git-send-email-jingjing.wu@intel.com>", "Subject": "[dpdk-dev] [PATCH 08/12] i40e: extend flow director to filter by\n\ttunnel ID", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch extended flow director to select Vxlan/GRE tunnel ID\nas filter's input set and program the filter rule with the defined\ntunnel type.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 11 ++++\n drivers/net/i40e/i40e_fdir.c | 125 ++++++++++++++++++++++++++++++-----------\n 2 files changed, 102 insertions(+), 34 deletions(-)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 32ffc9f..62cdf81 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -6555,48 +6555,59 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,\n \t */\n \tstatic const uint64_t valid_fdir_inset_table[] = {\n \t\t[I40E_FILTER_PCTYPE_FRAG_IPV4] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |\n \t\tI40E_INSET_IPV4_TOS | I40E_INSET_IPV4_PROTO |\n \t\tI40E_INSET_IPV4_TTL,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |\n \t\tI40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |\n \t\tI40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |\n \t\tI40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |\n \t\tI40E_INSET_SCTP_VT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |\n \t\tI40E_INSET_IPV4_TOS | I40E_INSET_IPV4_PROTO |\n \t\tI40E_INSET_IPV4_TTL,\n \t\t[I40E_FILTER_PCTYPE_FRAG_IPV6] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |\n \t\tI40E_INSET_IPV6_TC | I40E_INSET_IPV6_NEXT_HDR |\n \t\tI40E_INSET_IPV6_HOP_LIMIT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |\n \t\tI40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |\n \t\tI40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |\n \t\tI40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |\n \t\tI40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |\n \t\tI40E_INSET_SCTP_VT,\n \t\t[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |\n \t\tI40E_INSET_IPV6_TC | I40E_INSET_IPV6_NEXT_HDR |\n \t\tI40E_INSET_IPV6_HOP_LIMIT,\n \t\t[I40E_FILTER_PCTYPE_L2_PAYLOAD] =\n+\t\tI40E_INSET_TUNNEL_ID |\n \t\tI40E_INSET_LAST_ETHER_TYPE,\n \t};\n \ndiff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex 5ea97e5..7566017 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -688,11 +688,13 @@ i40e_fdir_configure(struct rte_eth_dev *dev)\n \n static inline void\n i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n-\t\t\t unsigned char *raw_pkt)\n+\t\t\t unsigned char *pkt, bool need_mac)\n {\n-\tstruct ether_hdr *ether = (struct ether_hdr *)raw_pkt;\n-\tstruct ipv4_hdr *ip;\n-\tstruct ipv6_hdr *ip6;\n+\tstruct ether_hdr *ether = (struct ether_hdr *)pkt;\n+\tstruct ipv4_hdr *ip =\n+\t\t\t(struct ipv4_hdr *)(pkt + sizeof(struct ether_hdr));\n+\tstruct ipv6_hdr *ip6 =\n+\t\t\t(struct ipv6_hdr *)(pkt + sizeof(struct ether_hdr));\n \tstatic const uint8_t next_proto[] = {\n \t\t[RTE_ETH_FLOW_FRAG_IPV4] = IPPROTO_IP,\n \t\t[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] = IPPROTO_TCP,\n@@ -708,16 +710,18 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n \n \tswitch (fdir_input->flow_type) {\n \tcase RTE_ETH_FLOW_L2_PAYLOAD:\n-\t\tether->ether_type = fdir_input->flow.l2_flow.ether_type;\n+\t\tif (need_mac)\n+\t\t\tether->ether_type = fdir_input->flow.l2_flow.ether_type;\n \t\tbreak;\n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_TCP:\n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_UDP:\n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_SCTP:\n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:\n \tcase RTE_ETH_FLOW_FRAG_IPV4:\n-\t\tip = (struct ipv4_hdr *)(raw_pkt + sizeof(struct ether_hdr));\n-\n-\t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);\n+\t\tif (!need_mac)\n+\t\t\tip = (struct ipv4_hdr *)pkt;\n+\t\telse\n+\t\t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);\n \t\tip->version_ihl = I40E_FDIR_IP_DEFAULT_VERSION_IHL;\n \t\t/* set len to by default */\n \t\tip->total_length = rte_cpu_to_be_16(I40E_FDIR_IP_DEFAULT_LEN);\n@@ -741,9 +745,10 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_SCTP:\n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_OTHER:\n \tcase RTE_ETH_FLOW_FRAG_IPV6:\n-\t\tip6 = (struct ipv6_hdr *)(raw_pkt + sizeof(struct ether_hdr));\n-\n-\t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);\n+\t\tif (!need_mac)\n+\t\t\tip6 = (struct ipv6_hdr *)pkt;\n+\t\telse\n+\t\t\tether->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);\n \t\tip6->vtc_flow =\n \t\t\trte_cpu_to_be_32(I40E_FDIR_IPv6_DEFAULT_VTC_FLOW |\n \t\t\t\t\t (fdir_input->flow.ipv6_flow.tc <<\n@@ -775,7 +780,7 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,\n \t}\n }\n \n-\n+#define I40E_TUNNEL_KEY_LEN 4\n /*\n * i40e_fdir_construct_pkt - construct packet based on fields in input\n * @pf: board private structure\n@@ -787,21 +792,80 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\t\t const struct rte_eth_fdir_input *fdir_input,\n \t\t\t unsigned char *raw_pkt)\n {\n-\tunsigned char *payload, *ptr;\n+\tunsigned char *payload, *ptr, *inner_pkt = raw_pkt;\n \tstruct udp_hdr *udp;\n \tstruct tcp_hdr *tcp;\n \tstruct sctp_hdr *sctp;\n \tuint8_t size, dst = 0;\n \tuint8_t i, pit_idx, set_idx = I40E_FLXPLD_L4_IDX; /* use l4 by default*/\n-\n-\t/* fill the ethernet and IP head */\n-\ti40e_fdir_fill_eth_ip_head(fdir_input, raw_pkt);\n-\n+\tbool need_mac = TRUE;\n+\tstatic uint8_t gre4_frame[] = {0x08, 0,\n+\t\t\t0x45, 0, 0, 0x3A, 0, 0, 0, 0, 0x40, 0x2F,\n+\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x20, 0, 0x08, 0,\n+\t\t\t0, 0, 0, 0}; /* Mac+ IP + GRE hdr + key */\n+\tstatic uint8_t gre6_frame[] = {0x08, 0,\n+\t\t\t0x45, 0, 0, 0x3A, 0, 0, 0, 0, 0x40, 0x2F,\n+\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x20, 0, 0x86, 0xDD,\n+\t\t\t0, 0, 0, 0, 0}; /* Mac+ IP + GRE hdr + key */\n+\tstatic uint8_t vxlan_frame[] = {0x08, 0,\n+\t\t\t0x45, 0, 0, 0x3A, 0, 0, 0, 0, 0x40, 0x11,\n+\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n+\t\t\t0x12, 0xB5, 0x12, 0xB5, 0x08, 0, 0, 0,\n+\t\t\t0, 0, 0, 0, 0, 0, 0, 0}; /* Mac + IP + UDP + VXLAN hdr */\n+\tstatic uint8_t nvgre_frame[] = {0x08, 0,\n+\t\t\t0x45, 0, 0, 0x3A, 0, 0, 0, 0, 0x40, 0x2F,\n+\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x20, 0, 0x65, 0x58,\n+\t\t\t0, 0, 0, 0}; /*Mac + IP + NVGRE hdr*/\n+\n+\tinner_pkt += 2 * sizeof(struct ether_addr);\n+\t/* fill the tunnel header if required */\n+\tswitch (fdir_input->flow.tunnel_flow.tunnel_type) {\n+\tcase RTE_FDIR_TUNNEL_TYPE_GRE:\n+\t\tif (fdir_input->flow_type == RTE_ETH_FLOW_L2_PAYLOAD) {\n+\t\t\tPMD_DRV_LOG(ERR, \"GRE's inner pkt shouldn't\"\n+\t\t\t\t \" be L2 frame.\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\tif ((fdir_input->flow_type) == RTE_ETH_FLOW_FRAG_IPV4 ||\n+\t\t (fdir_input->flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_TCP ||\n+\t\t (fdir_input->flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_UDP ||\n+\t\t (fdir_input->flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_SCTP ||\n+\t\t (fdir_input->flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_OTHER)\n+\t\t\trte_memcpy(inner_pkt, gre4_frame, sizeof(gre4_frame));\n+\t\telse\n+\t\t\trte_memcpy(inner_pkt, gre6_frame, sizeof(gre6_frame));\n+\t\t/* gre4_frame and gre4_frame have the same size */\n+\t\tinner_pkt += sizeof(gre4_frame);\n+\t\trte_memcpy(inner_pkt - I40E_TUNNEL_KEY_LEN,\n+\t\t\t &fdir_input->flow.tunnel_flow.tunnel_id,\n+\t\t\t I40E_TUNNEL_KEY_LEN);\n+\t\tneed_mac = FALSE;\n+\t\tbreak;\n+\tcase RTE_FDIR_TUNNEL_TYPE_VXLAN:\n+\t\trte_memcpy(inner_pkt, vxlan_frame, sizeof(vxlan_frame));\n+\t\tinner_pkt += sizeof(vxlan_frame);\n+\t\trte_memcpy(inner_pkt - I40E_TUNNEL_KEY_LEN,\n+\t\t\t &fdir_input->flow.tunnel_flow.tunnel_id,\n+\t\t\t I40E_TUNNEL_KEY_LEN);\n+\t\tbreak;\n+\tcase RTE_FDIR_TUNNEL_TYPE_NVGRE:\n+\t\trte_memcpy(inner_pkt, nvgre_frame, sizeof(nvgre_frame));\n+\t\tinner_pkt += sizeof(nvgre_frame);\n+\t\trte_memcpy(inner_pkt - I40E_TUNNEL_KEY_LEN,\n+\t\t\t &fdir_input->flow.tunnel_flow.tunnel_id,\n+\t\t\t I40E_TUNNEL_KEY_LEN);\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\t/* fill the ethernet and IP head of inner or single frame */\n+\ti40e_fdir_fill_eth_ip_head(fdir_input, inner_pkt, need_mac);\n+\tif (need_mac)\n+\t\tinner_pkt += sizeof(struct ether_hdr);\n \t/* fill the L4 head */\n \tswitch (fdir_input->flow_type) {\n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_UDP:\n-\t\tudp = (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\tsizeof(struct ipv4_hdr));\n+\t\tudp = (struct udp_hdr *)(inner_pkt + sizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)udp + sizeof(struct udp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -814,8 +878,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tbreak;\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_TCP:\n-\t\ttcp = (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\t\t sizeof(struct ipv4_hdr));\n+\t\ttcp = (struct tcp_hdr *)(inner_pkt + sizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)tcp + sizeof(struct tcp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -828,8 +891,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tbreak;\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_SCTP:\n-\t\tsctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\t\t sizeof(struct ipv4_hdr));\n+\t\tsctp = (struct sctp_hdr *)(inner_pkt + sizeof(struct ipv4_hdr));\n \t\tpayload = (unsigned char *)sctp + sizeof(struct sctp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -843,14 +905,12 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:\n \tcase RTE_ETH_FLOW_FRAG_IPV4:\n-\t\tpayload = raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t sizeof(struct ipv4_hdr);\n+\t\tpayload = inner_pkt + sizeof(struct ipv4_hdr);\n \t\tset_idx = I40E_FLXPLD_L3_IDX;\n \t\tbreak;\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_UDP:\n-\t\tudp = (struct udp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\t\t sizeof(struct ipv6_hdr));\n+\t\tudp = (struct udp_hdr *)(inner_pkt + sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)udp + sizeof(struct udp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -863,8 +923,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tbreak;\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_TCP:\n-\t\ttcp = (struct tcp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\t\t sizeof(struct ipv6_hdr));\n+\t\ttcp = (struct tcp_hdr *)(inner_pkt + sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)tcp + sizeof(struct tcp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -877,8 +936,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \t\tbreak;\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_SCTP:\n-\t\tsctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t\t\t sizeof(struct ipv6_hdr));\n+\t\tsctp = (struct sctp_hdr *)(inner_pkt + sizeof(struct ipv6_hdr));\n \t\tpayload = (unsigned char *)sctp + sizeof(struct sctp_hdr);\n \t\t/*\n \t\t * The source and destination fields in the transmitted packet\n@@ -892,12 +950,11 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,\n \n \tcase RTE_ETH_FLOW_NONFRAG_IPV6_OTHER:\n \tcase RTE_ETH_FLOW_FRAG_IPV6:\n-\t\tpayload = raw_pkt + sizeof(struct ether_hdr) +\n-\t\t\t sizeof(struct ipv6_hdr);\n+\t\tpayload = inner_pkt + sizeof(struct ipv6_hdr);\n \t\tset_idx = I40E_FLXPLD_L3_IDX;\n \t\tbreak;\n \tcase RTE_ETH_FLOW_L2_PAYLOAD:\n-\t\tpayload = raw_pkt + sizeof(struct ether_hdr);\n+\t\tpayload = inner_pkt;\n \t\t/*\n \t\t * ARP packet is a special case on which the payload\n \t\t * starts after the whole ARP header\n", "prefixes": [ "dpdk-dev", "08/12" ] }{ "id": 10093, "url": "