From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by dpdk.org (Postfix) with ESMTP id C196F374 for ; Tue, 20 Jun 2017 10:27:55 +0200 (CEST) Received: by mail-oi0-f52.google.com with SMTP id c189so45136288oia.2 for ; Tue, 20 Jun 2017 01:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ul1qSfy7QU+tPHcvU+oC5fXrIakWr4pFYgk32FkKmYU=; b=WjquVMsEsmUhVmyuv9wIDjjNXDKTBe7eZun+A47LH/sRki96fOpD7BPG3/tq67obik yiRcY8kWNVmEAORRimqL8j1KANTabKXZGBXN3QcUkQuRAhuMnH9WXWLMntgGhv0MO4OU b6PmttYm8Brmno72Z0d5ab9SQeQMEPZ//zPxDfibyjFIKbZEEZ0l/qI/PmToqVJyVuMD LMiq+XEKAW57wXg1w7XIVav/GSFNvsdcpb/dDlVcj0dNpThAq5f/HZHuMEewo/GgBUYg 0QntsyOBd/YnG+jKl9F4YKUdNkmY299LmaeQp8kJhPg35SrVsTQm+JtbagPMjlFmMUkX z2dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ul1qSfy7QU+tPHcvU+oC5fXrIakWr4pFYgk32FkKmYU=; b=cKanc2EfSiv45TcPgzlbrPoSOJl9r7204fLYrsHGywc3em/WZOSMLX8+0WNG5hzeO3 fEHz++6iWqQLOPM5BjMsM8HeKIUxQ9hF0YXKp6iAeYTx/B/pJ/pVNBFY45WsZfuBONbJ xHVHN7MFMYyKdorG1DcJuPc071bbTxhXT1/ozi3DGldqG0VW/KM8z4LfKVlfAny+Aqtr kG3mKnB5BCOCxTA43bxmdOoUBM+c+WvjH+MJfdfVh0Atcq2WkG/Lf6/wkkotA84fDtRz ++HgBza+A9vtMA9PcI6Ra29yrMembR89vfgSHRLtKjJKe3+oTWBdlNFptLKEnf9KDNrh dm+w== X-Gm-Message-State: AKS2vOzyqG84f+8mnatQJ4d+c24sq52ySrq1TEyAE6sMPdaP+Nd/Ej2C /f8c7SoT5W5yIAMCBKKuCbw/Uovk/cp1 X-Received: by 10.202.175.19 with SMTP id y19mr14903826oie.132.1497947274890; Tue, 20 Jun 2017 01:27:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.137.44 with HTTP; Tue, 20 Jun 2017 01:27:54 -0700 (PDT) From: =?UTF-8?B?7J2065GQ7ZmY?= Date: Tue, 20 Jun 2017 17:27:54 +0900 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Question about range type of DPDK ACL X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:27:56 -0000 Hello everyone. I want to implement some feature like ACL using DPDK ACL library. so, I defined rule like below. struct acl_match_component { uint8_t protocol; uint32_t sip; uint32_t dip; uint16_t sport; uint16_t dport; uint16_t in_if; uint16_t out_if; } struct rte_acl_field_def ipv4_defs[7] = { { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint8_t), .field_index = 0, .input_index = 0, .offset = 0 }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint32_t), .field_index = 1, .input_index = 1, .offset = offsetof(struct acl_match_component, sip) }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint32_t), .field_index = 2, .input_index = 2, .offset = offsetof(struct acl_match_component, dip) }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 3, .input_index = 3, .offset = offsetof(struct acl_match_component, sport) }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 4, .input_index = 3, .offset = offsetof(struct acl_match_component, dport) }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 5, .input_index = 4, .offset = offsetof(struct acl_match_component, in_if) }, { .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint16_t), .field_index = 6, .input_index = 4, .offset = offsetof(struct acl_match_component, out_if) }, }; I defined 32bit IPv4 address filed as RTE_ACL_FIELD_TYPE_RANGE type. and I set rte_acl_field for IP field like below. value.u32 = IPv4(10,10,10,10); mask_range.u32 = IPv4(20,20,20,20); In this case, I think IP 10.10.10.15 and 10.10.10.30 should be matched. but result was IP 10.10.10.15 was matched and 10.10.10.30 was not matched. I am using DPDK 16.04 and there was no example in the DPDK source using 32bit field as range type. Range type with 16bit field (ex. port number) works well. And, DPDK 17.05 has no meaningful changes on ACL library compare to DPDK 16.04 Do you have any idea about this? Thank you.