net/dpaa2: enable Rx offload for timestamp
[dpdk.git] / lib / librte_mbuf / rte_mbuf.h
index 0d9fef0..98225ec 100644 (file)
@@ -702,7 +702,18 @@ struct rte_mbuf {
                        uint64_t tso_segsz:RTE_MBUF_TSO_SEGSZ_BITS;
                        /**< TCP TSO segment size */
 
-                       /* fields for TX offloading of tunnels */
+                       /*
+                        * Fields for Tx offloading of tunnels.
+                        * These are undefined for packets which don't request
+                        * any tunnel offloads (outer IP or UDP checksum,
+                        * tunnel TSO).
+                        *
+                        * PMDs should not use these fields unconditionally
+                        * when calculating offsets.
+                        *
+                        * Applications are expected to set appropriate tunnel
+                        * offload flags when they fill in these fields.
+                        */
                        uint64_t outer_l3_len:RTE_MBUF_OUTL3_LEN_BITS;
                        /**< Outer L3 (IP) Hdr Length. */
                        uint64_t outer_l2_len:RTE_MBUF_OUTL2_LEN_BITS;
@@ -866,7 +877,8 @@ rte_mbuf_from_indirect(struct rte_mbuf *mi)
  * @return
  *   The pointer of the mbuf buffer.
  */
-static inline char * __rte_experimental
+__rte_experimental
+static inline char *
 rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp)
 {
        return (char *)mb + sizeof(*mb) + rte_pktmbuf_priv_size(mp);
@@ -883,10 +895,18 @@ rte_mbuf_buf_addr(struct rte_mbuf *mb, struct rte_mempool *mp)
  * @return
  *   The pointer of the beginning of the mbuf data.
  */
-static inline char * __rte_experimental
-rte_mbuf_data_addr_default(struct rte_mbuf *mb)
+__rte_experimental
+static inline char *
+rte_mbuf_data_addr_default(__rte_unused struct rte_mbuf *mb)
 {
+       /* gcc complains about calling this experimental function even
+        * when not using it. Hide it with ALLOW_EXPERIMENTAL_API.
+        */
+#ifdef ALLOW_EXPERIMENTAL_API
        return rte_mbuf_buf_addr(mb, mb->pool) + RTE_PKTMBUF_HEADROOM;
+#else
+       return NULL;
+#endif
 }
 
 /**
@@ -926,7 +946,8 @@ rte_mbuf_to_baddr(struct rte_mbuf *md)
  * @return
  *   The starting address of the private data area of the given mbuf.
  */
-static inline void * __rte_experimental
+__rte_experimental
+static inline void *
 rte_mbuf_to_priv(struct rte_mbuf *m)
 {
        return RTE_PTR_ADD(m, sizeof(struct rte_mbuf));