X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fflowgen.c;h=72016c9c77f9db46952b6ed43f4f6fe0e0c687ae;hb=ff708facfcbf42f3dcb3c62d82ecd93e7b8c2506;hp=17dbf8356adb9a2efabf77c4f38ac317b822db77;hpb=ea672a8b1655bbb44876d2550ff56f384968a43b;p=dpdk.git diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 17dbf8356a..72016c9c77 100644 --- a/app/test-pmd/flowgen.c +++ b/app/test-pmd/flowgen.c @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include @@ -175,7 +174,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs) pkt->next = NULL; /* Initialize Ethernet header. */ - eth_hdr = (struct ether_hdr *)pkt->data; + eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *); ether_addr_copy(&cfg_ether_dst, ð_hdr->d_addr); ether_addr_copy(&cfg_ether_src, ð_hdr->s_addr); eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4); @@ -205,13 +204,13 @@ pkt_burst_flow_gen(struct fwd_stream *fs) udp_hdr->dgram_len = RTE_CPU_TO_BE_16(pkt_size - sizeof(*eth_hdr) - sizeof(*ip_hdr)); - pkt->nb_segs = 1; - pkt->pkt_len = pkt_size; - pkt->ol_flags = ol_flags; - pkt->vlan_macip.f.vlan_tci = vlan_tci; - pkt->vlan_macip.f.l2_len = sizeof(struct ether_hdr); - pkt->vlan_macip.f.l3_len = sizeof(struct ipv4_hdr); - pkts_burst[nb_pkt] = pkt; + pkt->nb_segs = 1; + pkt->pkt_len = pkt_size; + pkt->ol_flags = ol_flags; + pkt->vlan_tci = vlan_tci; + pkt->l2_len = sizeof(struct ether_hdr); + pkt->l3_len = sizeof(struct ipv4_hdr); + pkts_burst[nb_pkt] = pkt; next_flow = (next_flow + 1) % cfg_n_flows; }