{
struct rte_ether_hdr *eth_hdr;
struct rte_ipv4_hdr *ipv4_hdr;
- struct tcp_hdr *tcp_hdr;
+ struct rte_tcp_hdr *tcp_hdr;
uint32_t sent_seq;
int32_t tcp_dl;
uint16_t ip_id, hdr_len, frag_off;
eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
ipv4_hdr = (struct rte_ipv4_hdr *)((char *)eth_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);
hdr_len = pkt->l2_len + pkt->l3_len + pkt->l4_len;
/*
* Don't process the packet which has FIN, SYN, RST, PSH, URG, ECE
* or CWR set.
*/
- if (tcp_hdr->tcp_flags != TCP_ACK_FLAG)
+ if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
return -1;
/*
* Don't process the packet whose payload length is less than or
* whose DF bit is 1, IPv4 ID is ignored.
*/
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);