From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by dpdk.org (Postfix) with ESMTP id ED2BD20F for ; Mon, 3 Jul 2017 10:28:18 +0200 (CEST) Received: by mail-oi0-f49.google.com with SMTP id x187so17560828oig.3 for ; Mon, 03 Jul 2017 01:28:18 -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=dHku43GKAlNPRGlpVFnTLoOIZrxD/SeBuYWfuEiNf+k=; b=CjXs7fjxPi5vCY1k+pnXW06+odQWxT5f8FJGW/RCybiJ+0awxF5Gr1Jv2WBm9VeKyB ZYHmHaw+/6hQRy7+nWQqNvniyZ3juQNdq/1boPPRSAToHsqgISv2cpElc2aXS6G1v1D9 hOBwjk1k0aSiDX7FIf5E/qo95JEonZefBEhXmWXHwsuDHxwMOjPB4LrmFATLSsYffsom WnEoNHLgS9GtdPceHE0zZQypsCQFNUp4rrCC55Ep7FmCvf8W69w85F0EBfN7Bbp8afj0 vMYJbjxSsUw073kCdpkAxevRKZxhUh5b6DEgcBtgeegI17PYctDpxwHlBKt3cKwNwhTO DzLA== 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=dHku43GKAlNPRGlpVFnTLoOIZrxD/SeBuYWfuEiNf+k=; b=nl6otQS5YDTvT1NAi/FppAZeT75N/fSl2dxPL6Ok6C9QsanGNCAlfl+vZXnn+NDCT+ HyR1EXQa7l8Xn+EUPIl79ilIxONjoFoQa8DdbovEPMiaoMSnK5Bu7Niapj3VpDEQ6POL AtWyYbwE5leI9GyQjnihxL3Mi63y8KCpurc9jNaa7M2GzIoRw3gFGYow8B31bPLW0XNS lH9KBbeTJ1SEc81ACm3SKRC56fFV7dB5o+e7rSPgCbQlAskJEp0EnnD1NuzMCYCyEzR0 NRCKHXpwzr/9GWcucUigRWe4dsg3iTW/UW2fF6VfDZJruc7L6kU/xeH9lTSRynq/oyw6 F3Ew== X-Gm-Message-State: AKS2vOybJOkcQe01GBB5DW6hVQXWknmd0SA4hKMFGnrWnId3VEcZlla9 1Bnc8U8M30iyuNpQp+h+eUNnEc3MykHB X-Received: by 10.202.175.142 with SMTP id y136mr20354065oie.132.1499070497993; Mon, 03 Jul 2017 01:28:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.137.44 with HTTP; Mon, 3 Jul 2017 01:28:17 -0700 (PDT) From: Doohwan Lee Date: Mon, 3 Jul 2017 17:28:17 +0900 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Question about range type of DPDK ACL 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: Mon, 03 Jul 2017 08:28:19 -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. Do you have any idea about this? I already posted same question to users@dpdk.org. https://www.mail-archive.com/users@dpdk.org/msg02071.html Thank you.