port: fix unaligned access to metadata
[dpdk.git] / lib / librte_ip_frag / rte_ip_frag.h
index 230a903..52f44c9 100644 (file)
  * Implementation of IP packet fragmentation and reassembly.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdint.h>
 #include <stdio.h>
 
 #include <rte_malloc.h>
-#include <rte_mbuf.h>
+#include <rte_memory.h>
 #include <rte_ip.h>
 #include <rte_byteorder.h>
 
+struct rte_mbuf;
+
 enum {
        IP_LAST_FRAG_IDX,    /**< index of last fragment */
        IP_FIRST_FRAG_IDX,   /**< index of first fragment */
@@ -175,7 +181,6 @@ rte_ip_frag_table_destroy( struct rte_ip_frag_tbl *tbl)
        rte_free(tbl);
 }
 
-#ifdef RTE_MBUF_REFCNT
 /**
  * This function implements the fragmentation of IPv6 packets.
  *
@@ -204,7 +209,6 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in,
                uint16_t mtu_size,
                struct rte_mempool *pool_direct,
                struct rte_mempool *pool_indirect);
-#endif
 
 /*
  * This function implements reassembly of fragmented IPv6 packets.
@@ -253,7 +257,6 @@ rte_ipv6_frag_get_ipv6_fragment_header(struct ipv6_hdr *hdr)
                return NULL;
 }
 
-#ifdef RTE_MBUF_REFCNT
 /**
  * IPv4 fragmentation.
  *
@@ -282,7 +285,6 @@ int32_t rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
                        uint16_t nb_pkts_out, uint16_t mtu_size,
                        struct rte_mempool *pool_direct,
                        struct rte_mempool *pool_indirect);
-#endif
 
 /*
  * This function implements reassembly of fragmented IPv4 packets.
@@ -349,4 +351,8 @@ void rte_ip_frag_free_death_row(struct rte_ip_frag_death_row *dr,
 void
 rte_ip_frag_table_statistics_dump(FILE * f, const struct rte_ip_frag_tbl *tbl);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_IP_FRAG_H_ */