net: add rte prefix to SCTP structure
[dpdk.git] / lib / librte_vhost / virtio_net.c
index f97ec76..1f55553 100644 (file)
@@ -226,7 +226,7 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
                                                dgram_cksum));
                        break;
                case PKT_TX_SCTP_CKSUM:
-                       net_hdr->csum_offset = (offsetof(struct sctp_hdr,
+                       net_hdr->csum_offset = (offsetof(struct rte_sctp_hdr,
                                                cksum));
                        break;
                }
@@ -238,9 +238,9 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 
        /* IP cksum verification cannot be bypassed, then calculate here */
        if (m_buf->ol_flags & PKT_TX_IP_CKSUM) {
-               struct ipv4_hdr *ipv4_hdr;
+               struct rte_ipv4_hdr *ipv4_hdr;
 
-               ipv4_hdr = rte_pktmbuf_mtod_offset(m_buf, struct ipv4_hdr *,
+               ipv4_hdr = rte_pktmbuf_mtod_offset(m_buf, struct rte_ipv4_hdr *,
                                                   m_buf->l2_len);
                ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
        }
@@ -966,8 +966,8 @@ virtio_net_with_host_offload(struct virtio_net *dev)
 static void
 parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
 {
-       struct ipv4_hdr *ipv4_hdr;
-       struct ipv6_hdr *ipv6_hdr;
+       struct rte_ipv4_hdr *ipv4_hdr;
+       struct rte_ipv6_hdr *ipv6_hdr;
        void *l3_hdr = NULL;
        struct rte_ether_hdr *eth_hdr;
        uint16_t ethertype;
@@ -977,7 +977,7 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
        m->l2_len = sizeof(struct rte_ether_hdr);
        ethertype = rte_be_to_cpu_16(eth_hdr->ether_type);
 
-       if (ethertype == ETHER_TYPE_VLAN) {
+       if (ethertype == RTE_ETHER_TYPE_VLAN) {
                struct rte_vlan_hdr *vlan_hdr =
                        (struct rte_vlan_hdr *)(eth_hdr + 1);
 
@@ -988,17 +988,17 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
        l3_hdr = (char *)eth_hdr + m->l2_len;
 
        switch (ethertype) {
-       case ETHER_TYPE_IPv4:
+       case RTE_ETHER_TYPE_IPv4:
                ipv4_hdr = l3_hdr;
                *l4_proto = ipv4_hdr->next_proto_id;
                m->l3_len = (ipv4_hdr->version_ihl & 0x0f) * 4;
                *l4_hdr = (char *)l3_hdr + m->l3_len;
                m->ol_flags |= PKT_TX_IPV4;
                break;
-       case ETHER_TYPE_IPv6:
+       case RTE_ETHER_TYPE_IPv6:
                ipv6_hdr = l3_hdr;
                *l4_proto = ipv6_hdr->proto;
-               m->l3_len = sizeof(struct ipv6_hdr);
+               m->l3_len = sizeof(struct rte_ipv6_hdr);
                *l4_hdr = (char *)l3_hdr + m->l3_len;
                m->ol_flags |= PKT_TX_IPV6;
                break;
@@ -1032,7 +1032,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
                                if (l4_proto == IPPROTO_UDP)
                                        m->ol_flags |= PKT_TX_UDP_CKSUM;
                                break;
-                       case (offsetof(struct sctp_hdr, cksum)):
+                       case (offsetof(struct rte_sctp_hdr, cksum)):
                                if (l4_proto == IPPROTO_SCTP)
                                        m->ol_flags |= PKT_TX_SCTP_CKSUM;
                                break;