X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl3fwd-vf%2Fmain.c;h=01f610ed61f8dfca6ed7a10cb7a528f197a7f181;hb=fa11a8a7251e14eca0a4190128732386f13551bd;hp=6e56cfb3acdcf782cafd5c5ad16c35f3d9ac843a;hpb=824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44;p=dpdk.git diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c index 6e56cfb3ac..01f610ed61 100644 --- a/examples/l3fwd-vf/main.c +++ b/examples/l3fwd-vf/main.c @@ -251,7 +251,6 @@ static lookup_struct_t *l3fwd_lookup_struct[NB_SOCKETS]; struct rte_hash_parameters l3fwd_hash_params = { .name = "l3fwd_hash_0", .entries = L3FWD_HASH_ENTRIES, - .bucket_entries = 4, .key_len = sizeof(struct ipv4_5tuple), .hash_func = DEFAULT_HASH_FUNC, .hash_func_init_val = 0, @@ -459,8 +458,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, lookup_struct_t * l3fwd eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(rte_pktmbuf_mtod(m, unsigned char *) + - sizeof(struct ether_hdr)); + ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, + sizeof(struct ether_hdr)); #ifdef DO_RFC_1812_CHECKS /* Check to make sure the packet is valid (RFC1812) */