src/dpdk/lib/librte_lpm/rte_lpm6.c
static inline int
rule_delete(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth)
{
	int ret;
	struct rte_lpm6_rule_key rule_key;

	/* init rule key */
	rule_key_init(&rule_key, ip, depth);

	/* delete the rule */
	ret = rte_hash_del_key(lpm->rules_tbl, (void *) &rule_key);
	if (ret >= 0)
		lpm->used_rules--;

	return ret;
}
/*
 * Delete a rule from the rule table.
 * NOTE: Valid range for depth parameter is 1 .. 128 inclusive.
 * return
 *	  0 on success
 *   <0 on failure
 */
Delete a rule from the rule table.
NOTE: Valid range for depth parameter is 1 .. 128 inclusive.
return
0 on success
<0 on failure
Delete a rule from the rule table . NOTE : Valid range for depth parameter is 1 .. 128 inclusive . return 0 on success <0 on failure
static inline int
rule_delete(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth)
{
	int ret;
	struct rte_lpm6_rule_key rule_key;
	rule_key_init(&rule_key, ip, depth);
	ret = rte_hash_del_key(lpm->rules_tbl, (void *) &rule_key);
	if (ret >= 0)
		lpm->used_rules--;
	return ret;
}
static inline int rule_delete ( struct rte_lpm6 * lpm , uint8_t * ip , uint8_t depth ) { int ret ; struct rte_lpm6_rule_key rule_key ; rule_key_init ( & rule_key , ip , depth ) ; ret = rte_hash_del_key ( lpm -> rules_tbl , ( void * ) & rule_key ) ; if ( ret >= 0 ) lpm -> used_rules -- ; return ret ; }
Delete a rule from the rule table.
Delete a rule from the rule table .
/* init rule key */ /* delete the rule */