act: remove rtnl_act_alloc_cache()

It is complicated to cache tc actions, they are different
from tc qdisc's and filters by design. So, it is simple
if we just don't cache them.

This patch only removes the tc action cache allocation API.
We still need to bypass the libnl cache layer from scratch,
but that would not break ABI any more, therefore we can do
it later.

Cc: Thomas Graf <tgraf@suug.ch>
Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Cong Wang 2014-01-14 17:37:42 -08:00 committed by Thomas Haller
parent 8dabf9fb1a
commit aa8877d5c1
2 changed files with 0 additions and 46 deletions

View file

@ -23,10 +23,6 @@ extern "C" {
extern struct rtnl_act *rtnl_act_alloc(void);
extern void rtnl_act_put(struct rtnl_act *);
extern int rtnl_act_alloc_cache(struct nl_sock *, int, uint32_t,
struct nl_cache **);
extern int rtnl_act_build_add_request(struct rtnl_act *, int,
struct nl_msg **);
extern int rtnl_act_add(struct nl_sock *, struct rtnl_act *, int);

View file

@ -363,48 +363,6 @@ int rtnl_act_delete(struct nl_sock *sk, struct rtnl_act *act, int flags)
/** @} */
/**
* @name Cache Related Functions
* @{
*/
/**
* Allocate a cache and fill it with all configured actions
* @arg sk Netlink socket
* @arg ifindex Interface index of the network device
* @arg parent Parent qdisc/traffic class class
* @arg result Pointer to store the created cache
*
* Allocates a new action cache and fills it with a list of all
* configured action attached to the specified parent qdisc/traffic
* class on the specified network device. Release the cache with
* nl_cache_free().
*
* @return 0 on success or a negative error code.
*/
int rtnl_act_alloc_cache(struct nl_sock *sk, int ifindex, uint32_t parent,
struct nl_cache **result)
{
struct nl_cache * cache;
int err;
if (!(cache = nl_cache_alloc(&rtnl_act_ops)))
return -NLE_NOMEM;
cache->c_iarg1 = ifindex;
cache->c_iarg2 = parent;
if (sk && (err = nl_cache_refill(sk, cache)) < 0) {
nl_cache_free(cache);
return err;
}
*result = cache;
return 0;
}
/** @} */
static void act_dump_line(struct rtnl_tc *tc, struct nl_dump_params *p)
{
}