static void
parse_ipv4(struct rte_ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info)
{
- struct tcp_hdr *tcp_hdr;
+ struct rte_tcp_hdr *tcp_hdr;
info->l3_len = (ipv4_hdr->version_ihl & 0x0f) * 4;
info->l4_proto = ipv4_hdr->next_proto_id;
/* only fill l4_len for TCP, it's useful for TSO */
if (info->l4_proto == IPPROTO_TCP) {
- tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + info->l3_len);
+ tcp_hdr = (struct rte_tcp_hdr *)
+ ((char *)ipv4_hdr + info->l3_len);
info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
} else if (info->l4_proto == IPPROTO_UDP)
info->l4_len = sizeof(struct udp_hdr);
static void
parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)
{
- struct tcp_hdr *tcp_hdr;
+ struct rte_tcp_hdr *tcp_hdr;
info->l3_len = sizeof(struct rte_ipv6_hdr);
info->l4_proto = ipv6_hdr->proto;
/* only fill l4_len for TCP, it's useful for TSO */
if (info->l4_proto == IPPROTO_TCP) {
- tcp_hdr = (struct tcp_hdr *)((char *)ipv6_hdr + info->l3_len);
+ tcp_hdr = (struct rte_tcp_hdr *)
+ ((char *)ipv6_hdr + info->l3_len);
info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
} else if (info->l4_proto == IPPROTO_UDP)
info->l4_len = sizeof(struct udp_hdr);
{
struct rte_ipv4_hdr *ipv4_hdr = l3_hdr;
struct udp_hdr *udp_hdr;
- struct tcp_hdr *tcp_hdr;
+ struct rte_tcp_hdr *tcp_hdr;
struct rte_sctp_hdr *sctp_hdr;
uint64_t ol_flags = 0;
uint32_t max_pkt_len, tso_segsz = 0;
if (info->gso_enable)
ol_flags |= PKT_TX_UDP_SEG;
} else if (info->l4_proto == IPPROTO_TCP) {
- tcp_hdr = (struct tcp_hdr *)((char *)l3_hdr + info->l3_len);
+ tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);
tcp_hdr->cksum = 0;
if (tso_segsz)
ol_flags |= PKT_TX_TCP_SEG;