/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
.ops = &rte_port_ring_writer_ops,
.arg_create = (void *) &port_ring_params,
.f_action = NULL,
- .f_action_bulk = NULL,
.arg_ah = NULL,
};
.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_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,
};
{
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,
};
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,
+ .key_mask = NULL,
};
struct rte_pipeline_table_params table_params = {
{
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,
+ .key_mask = NULL,
};
struct rte_pipeline_table_params table_params = {
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,
};
{
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,
};
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)) {
-#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;
-#ifdef RTE_NEXT_ABI
} 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);
-#ifdef RTE_NEXT_ABI
} else
continue;
-#else
- }
-#endif
*signature = test_hash(key, 0, 0);
}