From: Shyam Kumar Shrivastav Date: Wed, 22 Mar 2017 01:35:35 +0000 (-0400) Subject: examples/ip_pipeline: fix port range filtering X-Git-Tag: spdx-start~3426 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d5faec799c6edcb65773db0c99202a9d5da8bac4;p=dpdk.git examples/ip_pipeline: fix port range filtering Firewall ACL definition need to use same input index for source and destination ports as these are 16 bits and would fit in one ACL field of 32 bits. This is required as per librte_acl API. Without this UDP/TCP source and destination ports filtering (and for that matter ICMP type/code filtering) does not work. Signed-off-by: Shyam Kumar Shrivastav Reviewed-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c index b61f3034ef..2980492bbb 100644 --- a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c +++ b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c @@ -161,7 +161,7 @@ static struct rte_acl_field_def field_format_ipv4[] = { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 4, - .input_index = 4, + .input_index = 3, .offset = sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr) + offsetof(struct tcp_hdr, dst_port), @@ -221,7 +221,7 @@ static struct rte_acl_field_def field_format_vlan_ipv4[] = { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 4, - .input_index = 4, + .input_index = 3, .offset = sizeof(struct ether_hdr) + SIZEOF_VLAN_HDR + sizeof(struct ipv4_hdr) + @@ -282,7 +282,7 @@ static struct rte_acl_field_def field_format_qinq_ipv4[] = { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 4, - .input_index = 4, + .input_index = 3, .offset = sizeof(struct ether_hdr) + SIZEOF_QINQ_HEADER + sizeof(struct ipv4_hdr) +