+ } else if (cus_pctype->index == I40E_CUSTOMIZED_IPV4_L2TPV3 ||
+ cus_pctype->index == I40E_CUSTOMIZED_IPV6_L2TPV3) {
+ l2tpv3oip = (struct rte_flow_item_l2tpv3oip *)(raw_pkt
+ + len);
+
+ if (cus_pctype->index == I40E_CUSTOMIZED_IPV4_L2TPV3)
+ l2tpv3oip->session_id =
+ fdir_input->flow.ip4_l2tpv3oip_flow.session_id;
+ else
+ l2tpv3oip->session_id =
+ fdir_input->flow.ip6_l2tpv3oip_flow.session_id;
+ payload = (unsigned char *)l2tpv3oip +
+ sizeof(struct rte_flow_item_l2tpv3oip);
+ } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4 ||
+ cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6 ||
+ cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4_UDP ||
+ cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6_UDP) {
+ if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4) {
+ esp_ipv4 = (struct rte_ipv4_hdr *)
+ (raw_pkt + len);
+ esp = (struct rte_flow_item_esp *)esp_ipv4;
+ esp->hdr.spi =
+ fdir_input->flow.esp_ipv4_flow.spi;
+ payload = (unsigned char *)esp +
+ sizeof(struct rte_esp_hdr);
+ len += sizeof(struct rte_esp_hdr);
+ } else if (cus_pctype->index ==
+ I40E_CUSTOMIZED_ESP_IPV4_UDP) {
+ esp_ipv4 = (struct rte_ipv4_hdr *)
+ (raw_pkt + len);
+ udp = (struct rte_udp_hdr *)esp_ipv4;
+ udp->dst_port = rte_cpu_to_be_16
+ (I40E_FDIR_ESP_DST_PORT);
+
+ udp->dgram_len = rte_cpu_to_be_16
+ (I40E_FDIR_UDP_DEFAULT_LEN);
+ esp = (struct rte_flow_item_esp *)
+ ((unsigned char *)esp_ipv4 +
+ sizeof(struct rte_udp_hdr));
+ esp->hdr.spi =
+ fdir_input->flow.esp_ipv4_udp_flow.spi;
+ payload = (unsigned char *)esp +
+ sizeof(struct rte_esp_hdr);
+ len += sizeof(struct rte_udp_hdr) +
+ sizeof(struct rte_esp_hdr);
+ } else if (cus_pctype->index ==
+ I40E_CUSTOMIZED_ESP_IPV6) {
+ esp_ipv6 = (struct rte_ipv6_hdr *)
+ (raw_pkt + len);
+ esp = (struct rte_flow_item_esp *)esp_ipv6;
+ esp->hdr.spi =
+ fdir_input->flow.esp_ipv6_flow.spi;
+ payload = (unsigned char *)esp +
+ sizeof(struct rte_esp_hdr);
+ len += sizeof(struct rte_esp_hdr);
+ } else if (cus_pctype->index ==
+ I40E_CUSTOMIZED_ESP_IPV6_UDP) {
+ esp_ipv6 = (struct rte_ipv6_hdr *)
+ (raw_pkt + len);
+ udp = (struct rte_udp_hdr *)esp_ipv6;
+ udp->dst_port = rte_cpu_to_be_16
+ (I40E_FDIR_ESP_DST_PORT);
+
+ udp->dgram_len = rte_cpu_to_be_16
+ (I40E_FDIR_UDP_DEFAULT_LEN);
+ esp = (struct rte_flow_item_esp *)
+ ((unsigned char *)esp_ipv6 +
+ sizeof(struct rte_udp_hdr));
+ esp->hdr.spi =
+ fdir_input->flow.esp_ipv6_udp_flow.spi;
+ payload = (unsigned char *)esp +
+ sizeof(struct rte_esp_hdr);
+ len += sizeof(struct rte_udp_hdr) +
+ sizeof(struct rte_esp_hdr);
+ }