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;
* @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);
* @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
}
/**
* @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));