diff --git a/VNFs/DPPD-PROX/display.c b/VNFs/DPPD-PROX/display.c index d81a40e..a87d838 100644 --- a/VNFs/DPPD-PROX/display.c +++ b/VNFs/DPPD-PROX/display.c @@ -329,7 +329,11 @@ void display_init(void) init_pair(WHITE_ON_NOTHING, COLOR_WHITE, -1); /* nodelay(scr, TRUE); */ noecho(); + + printf("Before Curset\n"); curs_set(0); + volatile int dummy = 0; + if (dummy == 0) printf("After Curset"); /* Create fullscreen log window. When stats are displayed later, it is recreated with appropriate dimensions. */ win_txt = create_subwindow(0, 0, 0, 0); @@ -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); delwin(win_help); clear(); diff --git a/VNFs/DPPD-PROX/handle_impair.c b/VNFs/DPPD-PROX/handle_impair.c index a147d44..300a45c 100644 --- a/VNFs/DPPD-PROX/handle_impair.c +++ b/VNFs/DPPD-PROX/handle_impair.c @@ -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)); idx++; task->queue_tail = (task->queue_tail + 1) & task->queue_mask; } @@ -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; } @@ -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; } diff --git a/VNFs/DPPD-PROX/handle_ipv6_tunnel.c b/VNFs/DPPD-PROX/handle_ipv6_tunnel.c index 1c99eb8..3a1c8fe 100644 --- a/VNFs/DPPD-PROX/handle_ipv6_tunnel.c +++ b/VNFs/DPPD-PROX/handle_ipv6_tunnel.c @@ -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)); if (tun_base->runtime_flags & TASK_TX_CRC) { // We modified the TTL in the IPv4 header, hence have to recompute the IPv4 checksum diff --git a/VNFs/DPPD-PROX/handle_master.c b/VNFs/DPPD-PROX/handle_master.c index 58240ba..de34260 100644 --- a/VNFs/DPPD-PROX/handle_master.c +++ b/VNFs/DPPD-PROX/handle_master.c @@ -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); @@ -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); diff --git a/VNFs/DPPD-PROX/handle_qinq_decap6.c b/VNFs/DPPD-PROX/handle_qinq_decap6.c index d26f312..ec27cce 100644 --- a/VNFs/DPPD-PROX/handle_qinq_decap6.c +++ b/VNFs/DPPD-PROX/handle_qinq_decap6.c @@ -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; } diff --git a/VNFs/DPPD-PROX/handle_qinq_encap6.c b/VNFs/DPPD-PROX/handle_qinq_encap6.c index c653865..0137ae6 100644 --- a/VNFs/DPPD-PROX/handle_qinq_encap6.c +++ b/VNFs/DPPD-PROX/handle_qinq_encap6.c @@ -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; } } diff --git a/VNFs/DPPD-PROX/lconf.h b/VNFs/DPPD-PROX/lconf.h index 09f59cd..ef151a7 100644 --- a/VNFs/DPPD-PROX/lconf.h +++ b/VNFs/DPPD-PROX/lconf.h @@ -24,6 +24,7 @@ #include "task_init.h" #include "stats.h" +#include enum lconf_msg_type { LCONF_MSG_STOP, diff --git a/VNFs/DPPD-PROX/prox_ipv6.c b/VNFs/DPPD-PROX/prox_ipv6.c index a0c14e2..746b7ea 100644 --- a/VNFs/DPPD-PROX/prox_ipv6.c +++ b/VNFs/DPPD-PROX/prox_ipv6.c @@ -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; @@ -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; @@ -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; @@ -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)); @@ -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; diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index 8e66849..029e8d9 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -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; + 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"); + } + } + 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"); + } + } + + 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 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 @@ -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); 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); // rxmode such as hw src strip #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) #if defined (RTE_ETH_RX_OFFLOAD_CRC_STRIP) @@ -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); // IPV4, UDP, SCTP Checksums #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) @@ -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); @@ -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); @@ -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"); @@ -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; @@ -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); diff --git a/VNFs/DPPD-PROX/thread_generic.c b/VNFs/DPPD-PROX/thread_generic.c index 14fb943..7ff642e 100644 --- a/VNFs/DPPD-PROX/thread_generic.c +++ b/VNFs/DPPD-PROX/thread_generic.c @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. */ - +#define __USE_GNU #include #include #include diff --git a/VNFs/DPPD-PROX/toeplitz.c b/VNFs/DPPD-PROX/toeplitz.c index a9f7e58..d87e320 100644 --- a/VNFs/DPPD-PROX/toeplitz.c +++ b/VNFs/DPPD-PROX/toeplitz.c @@ -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) { diff --git a/VNFs/DPPD-PROX/toeplitz.h b/VNFs/DPPD-PROX/toeplitz.h index 7cf052a..a236adc 100644 --- a/VNFs/DPPD-PROX/toeplitz.h +++ b/VNFs/DPPD-PROX/toeplitz.h @@ -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