lpm: avoid race conditions for v1604
[dpdk.git] / lib / librte_lpm / rte_lpm.h
index b886f54..6f5704c 100644 (file)
@@ -354,6 +354,10 @@ rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
        ptbl = (const uint32_t *)(&lpm->tbl24[tbl24_index]);
        tbl_entry = *ptbl;
 
+       /* Memory ordering is not required in lookup. Because dataflow
+        * dependency exists, compiler or HW won't be able to re-order
+        * the operations.
+        */
        /* Copy tbl8 entry (only if needed) */
        if (unlikely((tbl_entry & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
                        RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {