From: Gyumin <hkm73560@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Why doesn`t test-acl work when IP filed is RTE_ACL_FIELD_TYPE_RANGE?
Date: Wed, 17 Jun 2015 11:41:04 +0900 [thread overview]
Message-ID: <5580DE40.3060704@gmail.com> (raw)
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?
next reply other threads:[~2015-06-17 2:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 2:41 Gyumin [this message]
2015-06-17 9:29 ` Gyumin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5580DE40.3060704@gmail.com \
--to=hkm73560@gmail.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).