From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 97128C342 for ; Wed, 17 Jun 2015 04:45:17 +0200 (CEST) Received: by pdbki1 with SMTP id ki1so27521504pdb.1 for ; Tue, 16 Jun 2015 19:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=1qvT9TCL+3k/qLRum5Ml0Z+3ZDtpdMN4aba0VZ4jq3E=; b=tJCS+8HHdB+X5eevuQ7F1ASSk490F3+rDOEeuJY+4XXKjKF3jGcS0ujtD/Q0VbQQW2 dvlsjPXqCBWfuzrRLxsYpINb4REGdRKrnP+xU9OWzUaTlRf7Co8RdgIrt35Oz4s8LeAn ebq6YJDEp6TRw4Fs3QCckC5Nl1+ylUw+sRqvJe7ojKlW1NuTprlDzrtruiPSOpvYxnO4 0GfhphZDLqBjQKeBQZ0VLCRozyaKsBnkOkrivQBP8svjY62MYUwQ0vMVnoS9FACAEp0n aBH4hWvEdn3cP5c94T9OSKg0D2dcpEynigBfjRk2Lml22hrzzVtIIFVuQLHY2CAgifTZ 5XLQ== X-Received: by 10.69.19.129 with SMTP id gu1mr6321526pbd.162.1434509116753; Tue, 16 Jun 2015 19:45:16 -0700 (PDT) Received: from [192.168.10.52] ([122.49.119.83]) by mx.google.com with ESMTPSA id pp6sm2745204pbb.79.2015.06.16.19.45.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 19:45:16 -0700 (PDT) Message-ID: <5580DE40.3060704@gmail.com> Date: Wed, 17 Jun 2015 11:41:04 +0900 From: Gyumin User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] Why doesn`t test-acl work when IP filed is RTE_ACL_FIELD_TYPE_RANGE? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2015 02:45:17 -0000 hi, I ran test-acl without any modification and it worked well, and I modified test-acl like below: { //.type = RTE_ACL_FIELD_TYPE_MASK, .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint32_t), .field_index = SRC_FIELD_IPV4, .input_index = RTE_ACL_IPV4VLAN_SRC, .offset = offsetof(struct ipv4_5tuple, ip_src), }, { //.type = RTE_ACL_FIELD_TYPE_MASK, .type = RTE_ACL_FIELD_TYPE_RANGE, .size = sizeof(uint32_t), .field_index = DST_FIELD_IPV4, .input_index = RTE_ACL_IPV4VLAN_DST, .offset = offsetof(struct ipv4_5tuple, ip_dst), }, static int parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len) { uint8_t a, b, c, d, m; GET_CB_FIELD(in, a, 0, UINT8_MAX, '.'); GET_CB_FIELD(in, b, 0, UINT8_MAX, '.'); GET_CB_FIELD(in, c, 0, UINT8_MAX, '.'); GET_CB_FIELD(in, d, 0, UINT8_MAX, '/'); //GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0); GET_CB_FIELD(in, m, 0, 4294967295, 0); addr[0] = IPv4(a, b, c, d); mask_len[0] = m; printf("m[%d]\n", m); return 0; } test-acl didn`t match any rules when I ran modified test-acl. Here are my rule and trace file: cat rule1.range @192.168.0.1/100 192.168.0.0/24 400 : 500 0 : 52 6/0xff cat trace1 0xc0a80005 0xc0a80009 450 53 0x06 Is there anything that I`m missing?