From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=d8n9PnlCPA2EZ2qWUtOUi6jlMEl2gg0lrkv2TEHfJLk=; b=DKRT7hEzzdGfZThtGbhAdrWmlmtiZ/lI0X+57A/Ykz7M/1fOaJU+W2hsg0tZxhHXws PHZNtJ1If/vq0+96d8dA//08/dWEDJIJRzF8ysml3EoeRTSGdnVqcKw5Tz2TUh0177PV G8l2+K7W1Xv90na+cBHmM24u/FuO5d0KQ5Q4WpxKf+GtYc3PFINs55QcMCS8nJY1NyOx I1KxgHS8DzBBmYM341GIXEZQi/4qLfdPebYSBKww42cG6Lb2JmZhCeWKA1nUuIvwQV2N YCi8w89dcNTeOo3s0/r1DZkkRUMa+twyXeiOjsklGiteZTzTtPPzRkAyctkBrLxkjBRY ooaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d8n9PnlCPA2EZ2qWUtOUi6jlMEl2gg0lrkv2TEHfJLk=; b=AZ0yLuoAT1G6rADe4Xl9Tq44fHY1XKyruEGsrJ3DcWVuV+wDqDcis3YpoFxl/JnbdR bLfsdtife/Z5bLy8IHggvVFZIxiE+RklJUPNtyqvA1Ml1RIVR6Fn8aQD3RFx876fi6YX ooOFjeg3K46/DUxRZSIlz8V4URsMKypwhlvrdmuVcye31hDuMc6QObEBW72kLG3q6VNb vm+cWPAp/IQ0SOciIFcCf8Z7bDFhoESPLJ4At8rnCxuMJjJuGvQBqCgfX4PDhyQfooxw FM0o/3htOE9b0SgkpEOcWadZe6IYEl8HJzq6chuQv9/iOnNDx6bn49SOKg1NH7EamoN3 qaKQ== X-Gm-Message-State: AFeK/H31cEnYYTtfNsWYKEVGpoZwa1PBvubSin7ncGcVGS/rv5z6Ux4DAMZ3gdcDpwIV5A== X-Received: by 10.157.58.100 with SMTP id j91mr859759otc.127.1490114253989; Tue, 21 Mar 2017 09:37:33 -0700 (PDT) Received: from localhost.psychz.net ([104.217.249.138]) by smtp.gmail.com with ESMTPSA id q187sm9010540oif.36.2017.03.21.09.37.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 09:37:33 -0700 (PDT) From: Shyam Kumar Shrivastav To: cristian.dumitrescu@intel.com Cc: dev@dpdk.org, Shyam Kumar Shrivastav Date: Tue, 21 Mar 2017 21:35:35 -0400 Message-Id: <1490146535-5065-1-git-send-email-shrivastav.shyam@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH v2] pipeline_firewall: Fix for port range filtering X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 16:37:35 -0000 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