virtio: fix device specific header offset when MSI-X is disabled
[dpdk.git] / lib / librte_lpm / rte_lpm.h
index d35565d..840d871 100644 (file)
@@ -215,6 +215,25 @@ rte_lpm_free(struct rte_lpm *lpm);
 int
 rte_lpm_add(struct rte_lpm *lpm, uint32_t ip, uint8_t depth, uint8_t next_hop);
 
+/**
+ * Check if a rule is present in the LPM table,
+ * and provide its next hop if it is.
+ *
+ * @param lpm
+ *   LPM object handle
+ * @param ip
+ *   IP of the rule to be searched
+ * @param depth
+ *   Depth of the rule to searched
+ * @param next_hop
+ *   Next hop of the rule (valid only if it is found)
+ * @return
+ *   1 if the rule exists, 0 if it does not, a negative value on failure
+ */
+int
+rte_lpm_is_rule_present(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
+uint8_t *next_hop);
+
 /**
  * Delete a rule from the LPM table.
  *