net: replace IPv4/v6 constants with uppercase name
[dpdk.git] / drivers / net / tap / rte_eth_tap.c
index 4a42bbe..074b3e8 100644 (file)
@@ -272,12 +272,12 @@ tap_verify_csum(struct rte_mbuf *mbuf)
        else if (l2 == RTE_PTYPE_L2_ETHER_QINQ)
                l2_len += 8;
        /* Don't verify checksum for packets with discontinuous L2 header */
-       if (unlikely(l2_len + sizeof(struct ipv4_hdr) >
+       if (unlikely(l2_len + sizeof(struct rte_ipv4_hdr) >
                     rte_pktmbuf_data_len(mbuf)))
                return;
        l3_hdr = rte_pktmbuf_mtod_offset(mbuf, void *, l2_len);
        if (l3 == RTE_PTYPE_L3_IPV4 || l3 == RTE_PTYPE_L3_IPV4_EXT) {
-               struct ipv4_hdr *iph = l3_hdr;
+               struct rte_ipv4_hdr *iph = l3_hdr;
 
                /* ihl contains the number of 4-byte words in the header */
                l3_len = 4 * (iph->version_ihl & 0xf);
@@ -295,9 +295,9 @@ tap_verify_csum(struct rte_mbuf *mbuf)
                        PKT_RX_IP_CKSUM_BAD :
                        PKT_RX_IP_CKSUM_GOOD;
        } else if (l3 == RTE_PTYPE_L3_IPV6) {
-               struct ipv6_hdr *iph = l3_hdr;
+               struct rte_ipv6_hdr *iph = l3_hdr;
 
-               l3_len = sizeof(struct ipv6_hdr);
+               l3_len = sizeof(struct rte_ipv6_hdr);
                /* check that the total length reported by header is not
                 * greater than the total received size
                 */
@@ -496,7 +496,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len,
        void *l3_hdr = packet + l2_len;
 
        if (ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_IPV4)) {
-               struct ipv4_hdr *iph = l3_hdr;
+               struct rte_ipv4_hdr *iph = l3_hdr;
                uint16_t cksum;
 
                iph->hdr_checksum = 0;
@@ -508,9 +508,9 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len,
 
                l4_hdr = packet + l2_len + l3_len;
                if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM)
-                       *l4_cksum = &((struct udp_hdr *)l4_hdr)->dgram_cksum;
+                       *l4_cksum = &((struct rte_udp_hdr *)l4_hdr)->dgram_cksum;
                else if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM)
-                       *l4_cksum = &((struct tcp_hdr *)l4_hdr)->cksum;
+                       *l4_cksum = &((struct rte_tcp_hdr *)l4_hdr)->cksum;
                else
                        return;
                **l4_cksum = 0;
@@ -565,9 +565,9 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs,
                        char *buff_data = rte_pktmbuf_mtod(seg, void *);
                        proto = (*buff_data & 0xf0);
                        pi.proto = (proto == 0x40) ?
-                               rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4) :
+                               rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4) :
                                ((proto == 0x60) ?
-                                       rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6) :
+                                       rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6) :
                                        0x00);
                }