lib: add switch fall-through comments
[dpdk.git] / lib / librte_mbuf / rte_mbuf.h
index 9dd8e80..9097f18 100644 (file)
@@ -403,7 +403,13 @@ struct rte_mbuf {
        MARKER cacheline0;
 
        void *buf_addr;           /**< Virtual address of segment buffer. */
-       phys_addr_t buf_physaddr; /**< Physical address of segment buffer. */
+       /**
+        * Physical address of segment buffer.
+        * Force alignment to 8-bytes, so as to ensure we have the exact
+        * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
+        * working on vector drivers easier.
+        */
+       phys_addr_t buf_physaddr __rte_aligned(sizeof(phys_addr_t));
 
        /* next 8 bytes are initialised on RX descriptor rearm */
        MARKER64 rearm_data;
@@ -1150,21 +1156,25 @@ static inline int rte_pktmbuf_alloc_bulk(struct rte_mempool *pool,
                        rte_mbuf_refcnt_set(mbufs[idx], 1);
                        rte_pktmbuf_reset(mbufs[idx]);
                        idx++;
+                       /* fall-through */
        case 3:
                        RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
                        rte_mbuf_refcnt_set(mbufs[idx], 1);
                        rte_pktmbuf_reset(mbufs[idx]);
                        idx++;
+                       /* fall-through */
        case 2:
                        RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
                        rte_mbuf_refcnt_set(mbufs[idx], 1);
                        rte_pktmbuf_reset(mbufs[idx]);
                        idx++;
+                       /* fall-through */
        case 1:
                        RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
                        rte_mbuf_refcnt_set(mbufs[idx], 1);
                        rte_pktmbuf_reset(mbufs[idx]);
                        idx++;
+                       /* fall-through */
                }
        }
        return 0;