Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion VNFs/DPPD-PROX/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ void display_init(void)
init_pair(WHITE_ON_NOTHING, COLOR_WHITE, -1);
/* nodelay(scr, TRUE); */
noecho();

printf("Before Curset\n");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

curs_set(0);
volatile int dummy = 0;
if (dummy == 0) printf("After Curset");
Comment on lines +335 to +336
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

/* Create fullscreen log window. When stats are displayed
later, it is recreated with appropriate dimensions. */
win_txt = create_subwindow(0, 0, 0, 0);
Expand Down Expand Up @@ -625,7 +629,7 @@ static void stats_display_layout(uint8_t in_place)
delwin(win_title);
delwin(win_tabs);
delwin(win_cmd);
delwin(win_txt);
//delwin(win_txt);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

un-rm.

delwin(win_help);

clear();
Expand Down
6 changes: 3 additions & 3 deletions VNFs/DPPD-PROX/handle_impair.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int handle_bulk_impair(struct task_base *tbase, struct rte_mbuf **mbufs,
out[idx] = rand_r(&task->seed) <= task->tresh_no_drop? 0 : OUT_DISCARD;
new_mbufs[idx] = task->queue[task->queue_tail].mbuf;
PREFETCH0(new_mbufs[idx]);
PREFETCH0(&new_mbufs[idx]->cacheline1);
PREFETCH0(RTE_PTR_ADD(new_mbufs[idx], RTE_CACHE_LINE_MIN_SIZE));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason/source for this change?

idx++;
task->queue_tail = (task->queue_tail + 1) & task->queue_mask;
}
Expand All @@ -303,7 +303,7 @@ static int handle_bulk_impair(struct task_base *tbase, struct rte_mbuf **mbufs,
out[idx] = 0;
new_mbufs[idx] = task->queue[task->queue_tail].mbuf;
PREFETCH0(new_mbufs[idx]);
PREFETCH0(&new_mbufs[idx]->cacheline1);
PREFETCH0(RTE_PTR_ADD(new_mbufs[idx], RTE_CACHE_LINE_MIN_SIZE));
idx++;
task->queue_tail = (task->queue_tail + 1) & task->queue_mask;
}
Expand Down Expand Up @@ -404,7 +404,7 @@ static int handle_bulk_impair_random(struct task_base *tbase, struct rte_mbuf **
out[pkt_idx] = rand_r(&task->seed) <= task->tresh_no_drop? 0 : OUT_DISCARD;
new_mbufs[pkt_idx] = queue->queue_elem[queue->queue_tail].mbuf;
PREFETCH0(new_mbufs[pkt_idx]);
PREFETCH0(&new_mbufs[pkt_idx]->cacheline1);
PREFETCH0(rte_pktmbuf_mtod(new_mbufs[pkt_idx], void *));
pkt_idx++;
queue->queue_tail = (queue->queue_tail + 1) & task->queue_mask;
}
Expand Down
4 changes: 2 additions & 2 deletions VNFs/DPPD-PROX/handle_ipv6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ static inline uint8_t handle_ipv6_encap(struct task_ipv6_encap* ptask, struct rt
pip6->proto = IPPROTO_IPIP;
pip6->payload_len = rte_cpu_to_be_16(ipv4_length);
pip6->hop_limits = ptask->tunnel_hop_limit;
rte_memcpy(pip6->dst_addr, &tun_dest->dst_addr, sizeof(pip6->dst_addr));
rte_memcpy(pip6->src_addr, &ptask->local_endpoint_addr, sizeof(pip6->src_addr));
rte_memcpy(&pip6->dst_addr, &tun_dest->dst_addr, sizeof(pip6->dst_addr));
rte_memcpy(&pip6->src_addr, &ptask->local_endpoint_addr, sizeof(pip6->src_addr));
Comment on lines +472 to +473
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seem right! Source of this change in DPDK?


if (tun_base->runtime_flags & TASK_TX_CRC) {
// We modified the TTL in the IPv4 header, hence have to recompute the IPv4 checksum
Expand Down
4 changes: 2 additions & 2 deletions VNFs/DPPD-PROX/handle_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static inline void handle_rs(struct task_base *tbase, struct rte_mbuf *mbuf, pro
uint8_t port = get_port(mbuf);

if (task->internal_port_table[port].flags & IPV6_ROUTER) {
plogx_dbg("\tMaster handling Router Solicitation from ip "IPv6_BYTES_FMT" on port %d\n", IPv6_BYTES(ipv6_hdr->src_addr), port);
plogx_dbg("\tMaster handling Router Solicitation from ip "IPv6_BYTES_FMT" on port %d\n", IPv6_BYTES(ipv6_hdr->src_addr.a), port);
struct rte_ring *ring = task->internal_port_table[port].ring;
build_router_advertisement(mbuf, &prox_port_cfg[port].eth_addr, &task->internal_port_table[port].local_ipv6_addr, &task->internal_port_table[port].router_prefix, vlan);
tx_ring(tbase, ring, SEND_NDP_FROM_MASTER, mbuf);
Expand All @@ -509,7 +509,7 @@ static inline void handle_ra(struct task_base *tbase, struct rte_mbuf *mbuf, pro
uint8_t port = get_port(mbuf);
struct rte_ring *ring = task->internal_port_table[port].ring;

plog_dbg("Master handling Router Advertisement from ip "IPv6_BYTES_FMT" on port %d - len = %d; payload_len = %d\n", IPv6_BYTES(ipv6_hdr->src_addr), port, rte_pktmbuf_pkt_len(mbuf), rte_be_to_cpu_16(ipv6_hdr->payload_len));
plog_dbg("Master handling Router Advertisement from ip "IPv6_BYTES_FMT" on port %d - len = %d; payload_len = %d\n", IPv6_BYTES(ipv6_hdr->src_addr.a), port, rte_pktmbuf_pkt_len(mbuf), rte_be_to_cpu_16(ipv6_hdr->payload_len));
if (rte_be_to_cpu_16(ipv6_hdr->payload_len) + sizeof(prox_rte_ipv6_hdr) + sizeof(prox_rte_ether_hdr) > rte_pktmbuf_pkt_len(mbuf)) {
plog_err("Unexpected length received: pkt_len = %d, ipv6 hdr length = %ld, ipv6 payload len = %d\n", rte_pktmbuf_pkt_len(mbuf), sizeof(prox_rte_ipv6_hdr), rte_be_to_cpu_16(ipv6_hdr->payload_len));
tx_drop(mbuf);
Expand Down
4 changes: 2 additions & 2 deletions VNFs/DPPD-PROX/handle_qinq_decap6.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ static inline uint8_t handle_qinq_decap6(struct task_qinq_decap6 *task, struct r

int key_found = 0;
void* entry_in_hash = NULL;
int ret = prox_rte_table_add(task->cpe_table, pip6->src_addr, &entry, &key_found, &entry_in_hash);
int ret = prox_rte_table_add(task->cpe_table, &pip6->src_addr, &entry, &key_found, &entry_in_hash);

if (unlikely(ret)) {
plogx_err("Failed to add key " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->src_addr));
plogx_err("Failed to add key " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->src_addr.a));
return OUT_DISCARD;
}

Expand Down
2 changes: 1 addition & 1 deletion VNFs/DPPD-PROX/handle_qinq_encap6.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static inline uint8_t handle_qinq_encap6(struct rte_mbuf *mbuf, struct task_qinq
return 0;
}
else {
plogx_err("Unknown IP " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->dst_addr));
plogx_err("Unknown IP " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->dst_addr.a));
return OUT_DISCARD;
}
}
Expand Down
1 change: 1 addition & 0 deletions VNFs/DPPD-PROX/lconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "task_init.h"
#include "stats.h"
#include <pthread.h>

enum lconf_msg_type {
LCONF_MSG_STOP,
Expand Down
18 changes: 9 additions & 9 deletions VNFs/DPPD-PROX/prox_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ void build_router_advertisement(struct rte_mbuf *mbuf, prox_rte_ether_addr *s_ad
ipv6_hdr->payload_len = rte_cpu_to_be_16(sizeof(struct icmpv6_RA) + sizeof(struct icmpv6_prefix_option));
ipv6_hdr->proto = ICMPv6;
ipv6_hdr->hop_limits = 255;
memcpy(ipv6_hdr->src_addr, ipv6_s_addr, sizeof(struct ipv6_addr)); // 0 = "Unspecified address" if unknown
memcpy(ipv6_hdr->dst_addr, &prox_cfg.all_nodes_ipv6_mcast_addr, sizeof(struct ipv6_addr));
memcpy(&ipv6_hdr->src_addr, ipv6_s_addr, sizeof(struct ipv6_addr)); // 0 = "Unspecified address" if unknown
memcpy(&ipv6_hdr->dst_addr, &prox_cfg.all_nodes_ipv6_mcast_addr, sizeof(struct ipv6_addr));

struct icmpv6_RA *router_advertisement = (struct icmpv6_RA *)(ipv6_hdr + 1);
router_advertisement->type = ICMPv6_RA;
Expand Down Expand Up @@ -206,8 +206,8 @@ void build_router_sollicitation(struct rte_mbuf *mbuf, prox_rte_ether_addr *s_ad
ipv6_hdr->payload_len = rte_cpu_to_be_16(sizeof(struct icmpv6_RS));
ipv6_hdr->proto = ICMPv6;
ipv6_hdr->hop_limits = 255;
memcpy(ipv6_hdr->src_addr, ipv6_s_addr, sizeof(struct ipv6_addr)); // 0 = "Unspecified address" if unknown
memcpy(ipv6_hdr->dst_addr, &prox_cfg.all_routers_ipv6_mcast_addr, sizeof(struct ipv6_addr));
memcpy(&ipv6_hdr->src_addr, ipv6_s_addr, sizeof(struct ipv6_addr)); // 0 = "Unspecified address" if unknown
memcpy(&ipv6_hdr->dst_addr, &prox_cfg.all_routers_ipv6_mcast_addr, sizeof(struct ipv6_addr));

struct icmpv6_RS *router_sollicitation = (struct icmpv6_RS *)(ipv6_hdr + 1);
router_sollicitation->type = ICMPv6_RS;
Expand Down Expand Up @@ -241,8 +241,8 @@ void build_neighbour_sollicitation(struct rte_mbuf *mbuf, prox_rte_ether_addr *s
ipv6_hdr->payload_len = rte_cpu_to_be_16(sizeof(struct icmpv6_NS));
ipv6_hdr->proto = ICMPv6;
ipv6_hdr->hop_limits = 255;
memcpy(ipv6_hdr->src_addr, src, 16);
memcpy(ipv6_hdr->dst_addr, dst, 16);
memcpy(&ipv6_hdr->src_addr, src, 16);
memcpy(&ipv6_hdr->dst_addr, dst, 16);

struct icmpv6_NS *neighbour_sollicitation = (struct icmpv6_NS *)(ipv6_hdr + 1);
neighbour_sollicitation->type = ICMPv6_NS;
Expand Down Expand Up @@ -275,10 +275,10 @@ void build_neighbour_advertisement(struct task_base *tbase, struct rte_mbuf *mbu
// If source mac is null, use all_nodes_mac_addr.
if ((!sollicited) || (memcmp(peth->s_addr.addr_bytes, &null_addr, sizeof(struct ipv6_addr)) == 0)) {
memcpy(peth->d_addr.addr_bytes, &prox_cfg.all_nodes_mac_addr, sizeof(prox_rte_ether_addr));
memcpy(ipv6_hdr->dst_addr, &prox_cfg.all_nodes_ipv6_mcast_addr, sizeof(struct ipv6_addr));
memcpy(&ipv6_hdr->dst_addr, &prox_cfg.all_nodes_ipv6_mcast_addr, sizeof(struct ipv6_addr));
} else {
memcpy(peth->d_addr.addr_bytes, peth->s_addr.addr_bytes, sizeof(prox_rte_ether_addr));
memcpy(ipv6_hdr->dst_addr, ipv6_hdr->src_addr, sizeof(struct ipv6_addr));
memcpy(&ipv6_hdr->dst_addr, &ipv6_hdr->src_addr, sizeof(struct ipv6_addr));
}

memcpy(peth->s_addr.addr_bytes, &task->internal_port_table[port_id].mac, sizeof(prox_rte_ether_addr));
Expand All @@ -287,7 +287,7 @@ void build_neighbour_advertisement(struct task_base *tbase, struct rte_mbuf *mbu
ipv6_hdr->payload_len = rte_cpu_to_be_16(sizeof(struct icmpv6_NA));
ipv6_hdr->proto = ICMPv6;
ipv6_hdr->hop_limits = 255;
memcpy(ipv6_hdr->src_addr, src_ipv6_addr, sizeof(struct ipv6_addr));
memcpy(&ipv6_hdr->src_addr, src_ipv6_addr, sizeof(struct ipv6_addr));

struct icmpv6_NA *neighbour_advertisement = (struct icmpv6_NA *)(ipv6_hdr + 1);
neighbour_advertisement->type = ICMPv6_NA;
Expand Down
39 changes: 31 additions & 8 deletions VNFs/DPPD-PROX/prox_port_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,25 @@ static void init_port(struct prox_port_cfg *port_cfg)
// Enable RSS if multiple receive queues
if (strcmp(port_cfg->short_name, "virtio")) {
port_cfg->port_conf.rxmode.mq_mode |= RTE_ETH_MQ_RX_RSS;
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key;
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len = TOEPLITZ_KEY_LEN;
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len= port_cfg->dev_info.hash_key_size;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite interesting. Why?

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
if (port_cfg->dev_info.hash_key_size == TOEPLITZ_KEY_LEN_52){
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key_52;
for (int i = 0; i < TOEPLITZ_KEY_LEN_52; i++) {
printf("%02x ", toeplitz_init_key_52[i]);
if ((i + 1) % 8 == 0) printf("\n");
}
Comment on lines +684 to +687
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

}
else{
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key;
for (int i = 0; i < TOEPLITZ_KEY_LEN; i++) {
printf("%02x ", toeplitz_init_key[i]);
if ((i + 1) % 8 == 0) printf("\n");
}
Comment on lines +691 to +694
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

}

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.


#if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0)
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = RTE_ETH_RSS_IP|RTE_ETH_RSS_UDP;
#else
Expand All @@ -689,14 +706,17 @@ static void init_port(struct prox_port_cfg *port_cfg)

// Make sure that the requested RSS offload is supported by the PMD
#if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0)
printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf &= port_cfg->dev_info.flow_type_rss_offloads;
printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
#endif
if (strcmp(port_cfg->short_name, "virtio")) {
printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
Comment on lines +709 to +714
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx, supported 0x%lx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, RTE_ETH_RSS_IP|RTE_ETH_RSS_UDP, port_cfg->dev_info.flow_type_rss_offloads);
} else {
plog_info("\t\t Not enabling RSS on virtio port");
}

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.

// rxmode such as hw src strip
#if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
#if defined (RTE_ETH_RX_OFFLOAD_CRC_STRIP)
Expand All @@ -715,6 +735,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
port_cfg->port_conf.rxmode.jumbo_frame = 1;
}
#endif
printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm.


// IPV4, UDP, SCTP Checksums
#if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
Expand Down Expand Up @@ -748,7 +769,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
else
plog_info("\t\tTX offloads enabled on port %d\n", port_id);
#endif

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
// Refcount
#if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
CONFIGURE_TX_OFFLOAD(RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE);
Expand All @@ -758,7 +779,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
else
plog_info("\t\tRefcnt enabled on port %d\n", port_id);
#endif

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
plog_info("\t\tConfiguring port %u... with %u RX queues and %u TX queues\n",
port_id, port_cfg->n_rxq, port_cfg->n_txq);

Expand All @@ -777,7 +798,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
port_cfg->port_conf.intr_conf.lsc = 0;
plog_info("\t\tDisabling link state interrupt for vmxnet3/VF/virtio (unsupported)\n");
}

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
if (port_cfg->lsc_set_explicitely) {
port_cfg->port_conf.intr_conf.lsc = port_cfg->lsc_val;
plog_info("\t\tOverriding link state interrupt configuration to '%s'\n", port_cfg->lsc_val? "enabled" : "disabled");
Expand All @@ -791,7 +812,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
plog_info("\t\tNumber of RX descriptors is set to %d (minimum required for %s\n", port_cfg->min_rx_desc, port_cfg->short_name);
port_cfg->n_rxd = port_cfg->min_rx_desc;
}

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
if (port_cfg->n_txd > port_cfg->max_tx_desc) {
plog_info("\t\tNumber of TX descriptors is set to %d (maximum required for %s\n", port_cfg->max_tx_desc, port_cfg->short_name);
port_cfg->n_txd = port_cfg->max_tx_desc;
Expand All @@ -801,7 +822,9 @@ static void init_port(struct prox_port_cfg *port_cfg)
plog_info("\t\tNumber of RX descriptors is set to %d (maximum required for %s\n", port_cfg->max_rx_desc, port_cfg->short_name);
port_cfg->n_rxd = port_cfg->max_rx_desc;
}

printf("port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
printf("rss_key_len: %u\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len);
printf("Hash Key size in port_conf var= %u\n", port_cfg->dev_info.hash_key_size);
ret = rte_eth_dev_configure(port_id, port_cfg->n_rxq,
port_cfg->n_txq, &port_cfg->port_conf);
PROX_PANIC(ret < 0, "\t\t\trte_eth_dev_configure() failed on port %u: %s (%d)\n", port_id, strerror(-ret), ret);
Expand Down
2 changes: 1 addition & 1 deletion VNFs/DPPD-PROX/thread_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
*/

#define __USE_GNU
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

#include <pthread.h>
#include <rte_cycles.h>
#include <rte_table_hash.h>
Expand Down
9 changes: 9 additions & 0 deletions VNFs/DPPD-PROX/toeplitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ uint8_t toeplitz_init_key[TOEPLITZ_KEY_LEN] =
0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
};
uint8_t toeplitz_init_key_52[TOEPLITZ_KEY_LEN_52] =
{0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x8f, 0xb0,
0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};

uint32_t toeplitz_hash(uint8_t *buf_p, int buflen)
{
Expand Down
3 changes: 3 additions & 0 deletions VNFs/DPPD-PROX/toeplitz.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
#define _TOEPLITZ_H_

#define TOEPLITZ_KEY_LEN 40
#define TOEPLITZ_KEY_LEN_52 52
extern uint8_t toeplitz_init_key[TOEPLITZ_KEY_LEN];

extern uint8_t toeplitz_init_key_52[TOEPLITZ_KEY_LEN_52];
uint32_t toeplitz_hash(uint8_t *buf_p, int buflen);
#endif