X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_gro%2Fgro_vxlan_tcp4.c;h=5fa88071d8a59590aa725d538d6fb80a10f45e97;hb=e73e3547ce54d7ae48dff82d87efac0b7a30692a;hp=8e2a1dd5ee01eabe065c1c9b187ff454d06dc91e;hpb=a7c528e5d71ff3f569898d268f9de129fdfc152b;p=dpdk.git diff --git a/lib/librte_gro/gro_vxlan_tcp4.c b/lib/librte_gro/gro_vxlan_tcp4.c index 8e2a1dd5ee..5fa88071d8 100644 --- a/lib/librte_gro/gro_vxlan_tcp4.c +++ b/lib/librte_gro/gro_vxlan_tcp4.c @@ -208,7 +208,7 @@ is_same_vxlan_tcp4_flow(struct vxlan_tcp4_flow_key k1, static inline int check_vxlan_seq_option(struct gro_vxlan_tcp4_item *item, - struct tcp_hdr *tcp_hdr, + struct rte_tcp_hdr *tcp_hdr, uint32_t sent_seq, uint16_t outer_ip_id, uint16_t ip_id, @@ -264,7 +264,7 @@ static inline void update_vxlan_header(struct gro_vxlan_tcp4_item *item) { struct rte_ipv4_hdr *ipv4_hdr; - struct udp_hdr *udp_hdr; + struct rte_udp_hdr *udp_hdr; struct rte_mbuf *pkt = item->inner_item.firstseg; uint16_t len; @@ -276,7 +276,7 @@ update_vxlan_header(struct gro_vxlan_tcp4_item *item) /* Update the outer UDP header. */ len -= pkt->outer_l3_len; - udp_hdr = (struct udp_hdr *)((char *)ipv4_hdr + pkt->outer_l3_len); + udp_hdr = (struct rte_udp_hdr *)((char *)ipv4_hdr + pkt->outer_l3_len); udp_hdr->dgram_len = rte_cpu_to_be_16(len); /* Update the inner IPv4 header. */ @@ -292,8 +292,8 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt, { struct rte_ether_hdr *outer_eth_hdr, *eth_hdr; struct rte_ipv4_hdr *outer_ipv4_hdr, *ipv4_hdr; - struct tcp_hdr *tcp_hdr; - struct udp_hdr *udp_hdr; + struct rte_tcp_hdr *tcp_hdr; + struct rte_udp_hdr *udp_hdr; struct rte_vxlan_hdr *vxlan_hdr; uint32_t sent_seq; int32_t tcp_dl; @@ -317,14 +317,14 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt, outer_eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *); outer_ipv4_hdr = (struct rte_ipv4_hdr *)((char *)outer_eth_hdr + pkt->outer_l2_len); - udp_hdr = (struct udp_hdr *)((char *)outer_ipv4_hdr + + udp_hdr = (struct rte_udp_hdr *)((char *)outer_ipv4_hdr + pkt->outer_l3_len); vxlan_hdr = (struct rte_vxlan_hdr *)((char *)udp_hdr + - sizeof(struct udp_hdr)); + sizeof(struct rte_udp_hdr)); eth_hdr = (struct rte_ether_hdr *)((char *)vxlan_hdr + sizeof(struct rte_vxlan_hdr)); ipv4_hdr = (struct rte_ipv4_hdr *)((char *)udp_hdr + pkt->l2_len); - tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len); + tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len); /* * Don't process the packet which has FIN, SYN, RST, PSH, URG, @@ -348,11 +348,12 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt, * whose DF bit is 1, IPv4 ID is ignored. */ frag_off = rte_be_to_cpu_16(outer_ipv4_hdr->fragment_offset); - outer_is_atomic = (frag_off & IPV4_HDR_DF_FLAG) == IPV4_HDR_DF_FLAG; + outer_is_atomic = + (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG; outer_ip_id = outer_is_atomic ? 0 : rte_be_to_cpu_16(outer_ipv4_hdr->packet_id); frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset); - is_atomic = (frag_off & IPV4_HDR_DF_FLAG) == IPV4_HDR_DF_FLAG; + is_atomic = (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG; ip_id = is_atomic ? 0 : rte_be_to_cpu_16(ipv4_hdr->packet_id); sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);