From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shyam Kumar Shrivastav Subject: [PATCH v2] pipeline_firewall: Fix for port range filtering Date: Tue, 21 Mar 2017 21:35:35 -0400 Message-ID: <1490146535-5065-1-git-send-email-shrivastav.shyam@gmail.com> Cc: dev@dpdk.org, Shyam Kumar Shrivastav To: cristian.dumitrescu@intel.com Return-path: Received: from mail-ot0-f194.google.com (mail-ot0-f194.google.com [74.125.82.194]) by dpdk.org (Postfix) with ESMTP id BA75811C5 for ; Tue, 21 Mar 2017 17:37:34 +0100 (CET) Received: by mail-ot0-f194.google.com with SMTP id x37so23025395ota.1 for ; Tue, 21 Mar 2017 09:37:34 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- examples/ip_pipeline/pipeline/pipeline_firewall_be.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c index b61f303..2980492 100644 --- a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c +++ b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c @@ -161,7 +161,7 @@ struct firewall_table_entry { .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 @@ struct firewall_table_entry { .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 @@ struct firewall_table_entry { .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) + -- 1.8.3.1