git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test/rcu: use existing lcore API
[dpdk.git]
/
app
/
test
/
test_flow_classify.c
diff --git
a/app/test/test_flow_classify.c
b/app/test/test_flow_classify.c
index
f81bbba
..
f4d2fdc
100644
(file)
--- a/
app/test/test_flow_classify.c
+++ b/
app/test/test_flow_classify.c
@@
-40,7
+40,7
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
.field_index = PROTO_FIELD_IPV4,
.input_index = PROTO_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
.field_index = PROTO_FIELD_IPV4,
.input_index = PROTO_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
- offsetof(struct ipv4_hdr, next_proto_id),
+ offsetof(struct
rte_
ipv4_hdr, next_proto_id),
},
/* next input field (IPv4 source address) - 4 consecutive bytes. */
{
},
/* next input field (IPv4 source address) - 4 consecutive bytes. */
{
@@
-50,7
+50,7
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
.field_index = SRC_FIELD_IPV4,
.input_index = SRC_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
.field_index = SRC_FIELD_IPV4,
.input_index = SRC_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
- offsetof(struct ipv4_hdr, src_addr),
+ offsetof(struct
rte_
ipv4_hdr, src_addr),
},
/* next input field (IPv4 destination address) - 4 consecutive bytes. */
{
},
/* next input field (IPv4 destination address) - 4 consecutive bytes. */
{
@@
-60,7
+60,7
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
.field_index = DST_FIELD_IPV4,
.input_index = DST_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
.field_index = DST_FIELD_IPV4,
.input_index = DST_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
- offsetof(struct ipv4_hdr, dst_addr),
+ offsetof(struct
rte_
ipv4_hdr, dst_addr),
},
/*
* Next 2 fields (src & dst ports) form 4 consecutive bytes.
},
/*
* Next 2 fields (src & dst ports) form 4 consecutive bytes.
@@
-73,8
+73,8
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
.field_index = SRCP_FIELD_IPV4,
.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
.field_index = SRCP_FIELD_IPV4,
.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
- sizeof(struct ipv4_hdr) +
- offsetof(struct tcp_hdr, src_port),
+ sizeof(struct
rte_
ipv4_hdr) +
+ offsetof(struct
rte_
tcp_hdr, src_port),
},
{
/* rte_flow uses a bit mask for protocol ports */
},
{
/* rte_flow uses a bit mask for protocol ports */
@@
-83,8
+83,8
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
.field_index = DSTP_FIELD_IPV4,
.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
.field_index = DSTP_FIELD_IPV4,
.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
- sizeof(struct ipv4_hdr) +
- offsetof(struct tcp_hdr, dst_port),
+ sizeof(struct
rte_
ipv4_hdr) +
+ offsetof(struct
rte_
tcp_hdr, dst_port),
},
};
},
};
@@
-95,7
+95,8
@@
static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
* dst mask 255.255.255.00 / udp src is 32 dst is 33 / end"
*/
static struct rte_flow_item_ipv4 ipv4_udp_spec_1 = {
* dst mask 255.255.255.00 / udp src is 32 dst is 33 / end"
*/
static struct rte_flow_item_ipv4 ipv4_udp_spec_1 = {
- { 0, 0, 0, 0, 0, 0, IPPROTO_UDP, 0, IPv4(2, 2, 2, 3), IPv4(2, 2, 2, 7)}
+ { 0, 0, 0, 0, 0, 0, IPPROTO_UDP, 0,
+ RTE_IPv4(2, 2, 2, 3), RTE_IPv4(2, 2, 2, 7)}
};
static const struct rte_flow_item_ipv4 ipv4_mask_24 = {
.hdr = {
};
static const struct rte_flow_item_ipv4 ipv4_mask_24 = {
.hdr = {
@@
-131,7
+132,8
@@
static struct rte_flow_item end_item_bad = { -1, 0, 0, 0 };
* dst mask 255.255.255.00 / tcp src is 16 dst is 17 / end"
*/
static struct rte_flow_item_ipv4 ipv4_tcp_spec_1 = {
* dst mask 255.255.255.00 / tcp src is 16 dst is 17 / end"
*/
static struct rte_flow_item_ipv4 ipv4_tcp_spec_1 = {
- { 0, 0, 0, 0, 0, 0, IPPROTO_TCP, 0, IPv4(1, 2, 3, 4), IPv4(5, 6, 7, 8)}
+ { 0, 0, 0, 0, 0, 0, IPPROTO_TCP, 0,
+ RTE_IPv4(1, 2, 3, 4), RTE_IPv4(5, 6, 7, 8)}
};
static struct rte_flow_item_tcp tcp_spec_1 = {
};
static struct rte_flow_item_tcp tcp_spec_1 = {
@@
-149,8
+151,8
@@
static struct rte_flow_item tcp_item_1 = { RTE_FLOW_ITEM_TYPE_TCP,
* dst mask 255.255.255.00 / sctp src is 16 dst is 17/ end"
*/
static struct rte_flow_item_ipv4 ipv4_sctp_spec_1 = {
* dst mask 255.255.255.00 / sctp src is 16 dst is 17/ end"
*/
static struct rte_flow_item_ipv4 ipv4_sctp_spec_1 = {
- { 0, 0, 0, 0, 0, 0, IPPROTO_SCTP, 0, IPv4(11, 12, 13, 14),
- IPv4(15, 16, 17, 18)}
+ { 0, 0, 0, 0, 0, 0, IPPROTO_SCTP, 0,
RTE_
IPv4(11, 12, 13, 14),
+
RTE_
IPv4(15, 16, 17, 18)}
};
static struct rte_flow_item_sctp sctp_spec_1 = {
};
static struct rte_flow_item_sctp sctp_spec_1 = {
@@
-490,8
+492,8
@@
init_ipv4_udp_traffic(struct rte_mempool *mp,
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
- struct ipv4_hdr pkt_ipv4_hdr;
- struct udp_hdr pkt_udp_hdr;
+ struct
rte_
ipv4_hdr pkt_ipv4_hdr;
+ struct
rte_
udp_hdr pkt_udp_hdr;
uint32_t src_addr = IPV4_ADDR(2, 2, 2, 3);
uint32_t dst_addr = IPV4_ADDR(2, 2, 2, 7);
uint16_t src_port = 32;
uint32_t src_addr = IPV4_ADDR(2, 2, 2, 3);
uint32_t dst_addr = IPV4_ADDR(2, 2, 2, 7);
uint16_t src_port = 32;
@@
-504,7
+506,7
@@
init_ipv4_udp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 UDP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
printf("Set up IPv4 UDP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac,
RTE_
ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@
-527,8
+529,8
@@
init_ipv4_tcp_traffic(struct rte_mempool *mp,
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
- struct ipv4_hdr pkt_ipv4_hdr;
- struct tcp_hdr pkt_tcp_hdr;
+ struct
rte_
ipv4_hdr pkt_ipv4_hdr;
+ struct
rte_
tcp_hdr pkt_tcp_hdr;
uint32_t src_addr = IPV4_ADDR(1, 2, 3, 4);
uint32_t dst_addr = IPV4_ADDR(5, 6, 7, 8);
uint16_t src_port = 16;
uint32_t src_addr = IPV4_ADDR(1, 2, 3, 4);
uint32_t dst_addr = IPV4_ADDR(5, 6, 7, 8);
uint16_t src_port = 16;
@@
-541,7
+543,7
@@
init_ipv4_tcp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 TCP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
printf("Set up IPv4 TCP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac,
RTE_
ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@
-564,8
+566,8
@@
init_ipv4_sctp_traffic(struct rte_mempool *mp,
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
struct rte_mbuf **pkts_burst, uint32_t burst_size)
{
struct rte_ether_hdr pkt_eth_hdr;
- struct ipv4_hdr pkt_ipv4_hdr;
- struct sctp_hdr pkt_sctp_hdr;
+ struct
rte_
ipv4_hdr pkt_ipv4_hdr;
+ struct
rte_
sctp_hdr pkt_sctp_hdr;
uint32_t src_addr = IPV4_ADDR(11, 12, 13, 14);
uint32_t dst_addr = IPV4_ADDR(15, 16, 17, 18);
uint16_t src_port = 10;
uint32_t src_addr = IPV4_ADDR(11, 12, 13, 14);
uint32_t dst_addr = IPV4_ADDR(15, 16, 17, 18);
uint16_t src_port = 10;
@@
-578,7
+580,7
@@
init_ipv4_sctp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 SCTP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
printf("Set up IPv4 SCTP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac,
RTE_
ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);