update Intel copyright years to 2014
[dpdk.git] / lib / librte_lpm / rte_lpm.h
index 2dc354c..033f542 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -122,6 +122,12 @@ struct rte_lpm_rule {
        uint8_t  next_hop; /**< Rule next hop. */
 };
 
+/** @internal Contains metadata about the rules table. */
+struct rte_lpm_rule_info {
+       uint32_t used_rules; /**< Used rules so far. */
+       uint32_t first_rule; /**< Indexes the first rule of a given depth. */
+};
+
 /** @internal LPM structure. */
 struct rte_lpm {
        TAILQ_ENTRY(rte_lpm) next;      /**< Next in list. */
@@ -129,8 +135,8 @@ struct rte_lpm {
        /* LPM metadata. */
        char name[RTE_LPM_NAMESIZE];        /**< Name of the lpm. */
        int mem_location; /**< @deprecated @see RTE_LPM_HEAP and RTE_LPM_MEMZONE. */
-       uint32_t max_rules_per_depth; /**< Max. balanced rules per lpm. */
-       uint32_t used_rules_at_depth[RTE_LPM_MAX_DEPTH]; /**< Rules / depth. */
+       uint32_t max_rules; /**< Max. balanced rules per lpm. */
+       struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */
 
        /* LPM Tables. */
        struct rte_lpm_tbl24_entry tbl24[RTE_LPM_TBL24_NUM_ENTRIES] \