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
app/testpmd: separate forward config setup from display
[dpdk.git]
/
app
/
test-pipeline
/
pipeline_hash.c
diff --git
a/app/test-pipeline/pipeline_hash.c
b/app/test-pipeline/pipeline_hash.c
index
aa3f9e5
..
f8aac0d
100644
(file)
--- a/
app/test-pipeline/pipeline_hash.c
+++ b/
app/test-pipeline/pipeline_hash.c
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-201
4
Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-201
6
Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-140,7
+140,6
@@
app_main_loop_worker_pipeline_hash(void) {
.ops = &rte_port_ring_writer_ops,
.arg_create = (void *) &port_ring_params,
.f_action = NULL,
.ops = &rte_port_ring_writer_ops,
.arg_create = (void *) &port_ring_params,
.f_action = NULL,
- .f_action_bulk = NULL,
.arg_ah = NULL,
};
.arg_ah = NULL,
};
@@
-163,8
+162,8
@@
app_main_loop_worker_pipeline_hash(void) {
.n_buckets_ext = 1 << 21,
.f_hash = test_hash,
.seed = 0,
.n_buckets_ext = 1 << 21,
.f_hash = test_hash,
.seed = 0,
- .signature_offset =
0
,
- .key_offset =
32
,
+ .signature_offset =
APP_METADATA_OFFSET(0)
,
+ .key_offset =
APP_METADATA_OFFSET(32)
,
};
struct rte_pipeline_table_params table_params = {
};
struct rte_pipeline_table_params table_params = {
@@
-214,8
+213,9
@@
app_main_loop_worker_pipeline_hash(void) {
struct rte_table_hash_key8_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
struct rte_table_hash_key8_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
- .signature_offset = 0,
- .key_offset = 32,
+ .signature_offset = APP_METADATA_OFFSET(0),
+ .key_offset = APP_METADATA_OFFSET(32),
+ .key_mask = NULL,
.f_hash = test_hash,
.seed = 0,
};
.f_hash = test_hash,
.seed = 0,
};
@@
-238,8
+238,9
@@
app_main_loop_worker_pipeline_hash(void) {
{
struct rte_table_hash_key8_lru_params table_hash_params = {
.n_entries = 1 << 24,
{
struct rte_table_hash_key8_lru_params table_hash_params = {
.n_entries = 1 << 24,
- .signature_offset = 0,
- .key_offset = 32,
+ .signature_offset = APP_METADATA_OFFSET(0),
+ .key_offset = APP_METADATA_OFFSET(32),
+ .key_mask = NULL,
.f_hash = test_hash,
.seed = 0,
};
.f_hash = test_hash,
.seed = 0,
};
@@
-263,10
+264,11
@@
app_main_loop_worker_pipeline_hash(void) {
struct rte_table_hash_key16_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
struct rte_table_hash_key16_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
- .signature_offset =
0
,
- .key_offset =
32
,
+ .signature_offset =
APP_METADATA_OFFSET(0)
,
+ .key_offset =
APP_METADATA_OFFSET(32)
,
.f_hash = test_hash,
.seed = 0,
.f_hash = test_hash,
.seed = 0,
+ .key_mask = NULL,
};
struct rte_pipeline_table_params table_params = {
};
struct rte_pipeline_table_params table_params = {
@@
-287,10
+289,11
@@
app_main_loop_worker_pipeline_hash(void) {
{
struct rte_table_hash_key16_lru_params table_hash_params = {
.n_entries = 1 << 24,
{
struct rte_table_hash_key16_lru_params table_hash_params = {
.n_entries = 1 << 24,
- .signature_offset =
0
,
- .key_offset =
32
,
+ .signature_offset =
APP_METADATA_OFFSET(0)
,
+ .key_offset =
APP_METADATA_OFFSET(32)
,
.f_hash = test_hash,
.seed = 0,
.f_hash = test_hash,
.seed = 0,
+ .key_mask = NULL,
};
struct rte_pipeline_table_params table_params = {
};
struct rte_pipeline_table_params table_params = {
@@
-312,8
+315,8
@@
app_main_loop_worker_pipeline_hash(void) {
struct rte_table_hash_key32_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
struct rte_table_hash_key32_ext_params table_hash_params = {
.n_entries = 1 << 24,
.n_entries_ext = 1 << 23,
- .signature_offset =
0
,
- .key_offset =
32
,
+ .signature_offset =
APP_METADATA_OFFSET(0)
,
+ .key_offset =
APP_METADATA_OFFSET(32)
,
.f_hash = test_hash,
.seed = 0,
};
.f_hash = test_hash,
.seed = 0,
};
@@
-337,8
+340,8
@@
app_main_loop_worker_pipeline_hash(void) {
{
struct rte_table_hash_key32_lru_params table_hash_params = {
.n_entries = 1 << 24,
{
struct rte_table_hash_key32_lru_params table_hash_params = {
.n_entries = 1 << 24,
- .signature_offset =
0
,
- .key_offset =
32
,
+ .signature_offset =
APP_METADATA_OFFSET(0)
,
+ .key_offset =
APP_METADATA_OFFSET(32)
,
.f_hash = test_hash,
.seed = 0,
};
.f_hash = test_hash,
.seed = 0,
};
@@
-456,36
+459,26
@@
app_main_loop_rx_metadata(void) {
m = app.mbuf_rx.array[j];
m_data = rte_pktmbuf_mtod(m, uint8_t *);
m = app.mbuf_rx.array[j];
m_data = rte_pktmbuf_mtod(m, uint8_t *);
- signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0);
- key = RTE_MBUF_METADATA_UINT8_PTR(m, 32);
+ signature = RTE_MBUF_METADATA_UINT32_PTR(m,
+ APP_METADATA_OFFSET(0));
+ key = RTE_MBUF_METADATA_UINT8_PTR(m,
+ APP_METADATA_OFFSET(32));
-#ifdef RTE_NEXT_ABI
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
-#else
- if (m->ol_flags & PKT_RX_IPV4_HDR) {
-#endif
ip_hdr = (struct ipv4_hdr *)
&m_data[sizeof(struct ether_hdr)];
ip_dst = ip_hdr->dst_addr;
k32 = (uint32_t *) key;
k32[0] = ip_dst & 0xFFFFFF00;
ip_hdr = (struct ipv4_hdr *)
&m_data[sizeof(struct ether_hdr)];
ip_dst = ip_hdr->dst_addr;
k32 = (uint32_t *) key;
k32[0] = ip_dst & 0xFFFFFF00;
-#ifdef RTE_NEXT_ABI
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
-#else
- } else {
-#endif
ipv6_hdr = (struct ipv6_hdr *)
&m_data[sizeof(struct ether_hdr)];
ipv6_dst = ipv6_hdr->dst_addr;
memcpy(key, ipv6_dst, 16);
ipv6_hdr = (struct ipv6_hdr *)
&m_data[sizeof(struct ether_hdr)];
ipv6_dst = ipv6_hdr->dst_addr;
memcpy(key, ipv6_dst, 16);
-#ifdef RTE_NEXT_ABI
} else
continue;
} else
continue;
-#else
- }
-#endif
*signature = test_hash(key, 0, 0);
}
*signature = test_hash(key, 0, 0);
}