X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_gro%2Fgro_tcp4.h;h=bb875a5ef061133e45f9e2552f88e5058ea1ab7a;hb=bc42ca1787233617e5ce8a848e268784884a8d07;hp=ce3471a4dfd6f3973577a48a60733418416e6e63;hpb=538da7a1cad25fbdffe298c8ca76fc4dbd262d1b;p=dpdk.git diff --git a/lib/librte_gro/gro_tcp4.h b/lib/librte_gro/gro_tcp4.h index ce3471a4df..bb875a5ef0 100644 --- a/lib/librte_gro/gro_tcp4.h +++ b/lib/librte_gro/gro_tcp4.h @@ -7,6 +7,7 @@ #include #include +#include #define INVALID_ARRAY_INDEX 0xffffffffUL #define GRO_TCP4_TBL_MAX_ITEM_NUM (1024UL * 1024UL) @@ -20,7 +21,7 @@ /* The maximum TCP header length */ #define MAX_TCP_HLEN 60 #define INVALID_TCP_HDRLEN(len) \ - (((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN)) + (((len) < sizeof(struct rte_tcp_hdr)) || ((len) > MAX_TCP_HLEN)) /* Header fields representing a TCP/IPv4 flow */ struct tcp4_flow_key { @@ -260,7 +261,7 @@ merge_two_tcp4_packets(struct gro_tcp4_item *item, */ static inline int check_seq_option(struct gro_tcp4_item *item, - struct tcp_hdr *tcph, + struct rte_tcp_hdr *tcph, uint32_t sent_seq, uint16_t ip_id, uint16_t tcp_hl, @@ -269,17 +270,17 @@ check_seq_option(struct gro_tcp4_item *item, uint8_t is_atomic) { struct rte_mbuf *pkt_orig = item->firstseg; - struct ipv4_hdr *iph_orig; - struct tcp_hdr *tcph_orig; + struct rte_ipv4_hdr *iph_orig; + struct rte_tcp_hdr *tcph_orig; uint16_t len, tcp_hl_orig; - iph_orig = (struct ipv4_hdr *)(rte_pktmbuf_mtod(pkt_orig, char *) + + iph_orig = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt_orig, char *) + l2_offset + pkt_orig->l2_len); - tcph_orig = (struct tcp_hdr *)((char *)iph_orig + pkt_orig->l3_len); + tcph_orig = (struct rte_tcp_hdr *)((char *)iph_orig + pkt_orig->l3_len); tcp_hl_orig = pkt_orig->l4_len; /* Check if TCP option fields equal */ - len = RTE_MAX(tcp_hl, tcp_hl_orig) - sizeof(struct tcp_hdr); + len = RTE_MAX(tcp_hl, tcp_hl_orig) - sizeof(struct rte_tcp_hdr); if ((tcp_hl != tcp_hl_orig) || ((len > 0) && (memcmp(tcph + 1, tcph_orig + 1, len) != 0)))