Skip to content

Commit 722d36e

Browse files
ummakynesdavem330
authored andcommitted
net: sched: remove tcf block API
Unused, now replaced by flow block API. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 955bcb6 commit 722d36e

File tree

2 files changed

+0
-167
lines changed

2 files changed

+0
-167
lines changed

include/net/pkt_cls.h

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ static inline struct Qdisc *tcf_block_q(struct tcf_block *block)
6666
return block->q;
6767
}
6868

69-
void *tcf_block_cb_priv(struct tcf_block_cb *block_cb);
70-
struct tcf_block_cb *tcf_block_cb_lookup(struct tcf_block *block,
71-
tc_setup_cb_t *cb, void *cb_ident);
72-
void tcf_block_cb_incref(struct tcf_block_cb *block_cb);
73-
unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb);
74-
struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block,
75-
tc_setup_cb_t *cb, void *cb_ident,
76-
void *cb_priv,
77-
struct netlink_ext_ack *extack);
78-
int tcf_block_cb_register(struct tcf_block *block,
79-
tc_setup_cb_t *cb, void *cb_ident,
80-
void *cb_priv, struct netlink_ext_ack *extack);
81-
void __tcf_block_cb_unregister(struct tcf_block *block,
82-
struct tcf_block_cb *block_cb);
83-
void tcf_block_cb_unregister(struct tcf_block *block,
84-
tc_setup_cb_t *cb, void *cb_ident);
8569
int __tc_indr_block_cb_register(struct net_device *dev, void *cb_priv,
8670
tc_indr_block_bind_cb_t *cb, void *cb_ident);
8771
int tc_indr_block_cb_register(struct net_device *dev, void *cb_priv,
@@ -144,59 +128,6 @@ void tc_setup_cb_block_unregister(struct tcf_block *block, tc_setup_cb_t *cb,
144128
{
145129
}
146130

147-
static inline
148-
void *tcf_block_cb_priv(struct tcf_block_cb *block_cb)
149-
{
150-
return NULL;
151-
}
152-
153-
static inline
154-
struct tcf_block_cb *tcf_block_cb_lookup(struct tcf_block *block,
155-
tc_setup_cb_t *cb, void *cb_ident)
156-
{
157-
return NULL;
158-
}
159-
160-
static inline
161-
void tcf_block_cb_incref(struct tcf_block_cb *block_cb)
162-
{
163-
}
164-
165-
static inline
166-
unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb)
167-
{
168-
return 0;
169-
}
170-
171-
static inline
172-
struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block,
173-
tc_setup_cb_t *cb, void *cb_ident,
174-
void *cb_priv,
175-
struct netlink_ext_ack *extack)
176-
{
177-
return NULL;
178-
}
179-
180-
static inline
181-
int tcf_block_cb_register(struct tcf_block *block,
182-
tc_setup_cb_t *cb, void *cb_ident,
183-
void *cb_priv, struct netlink_ext_ack *extack)
184-
{
185-
return 0;
186-
}
187-
188-
static inline
189-
void __tcf_block_cb_unregister(struct tcf_block *block,
190-
struct tcf_block_cb *block_cb)
191-
{
192-
}
193-
194-
static inline
195-
void tcf_block_cb_unregister(struct tcf_block *block,
196-
tc_setup_cb_t *cb, void *cb_ident)
197-
{
198-
}
199-
200131
static inline
201132
int __tc_indr_block_cb_register(struct net_device *dev, void *cb_priv,
202133
tc_indr_block_bind_cb_t *cb, void *cb_ident)

net/sched/cls_api.c

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,43 +1513,6 @@ void tcf_block_put(struct tcf_block *block)
15131513

15141514
EXPORT_SYMBOL(tcf_block_put);
15151515

1516-
struct tcf_block_cb {
1517-
struct list_head list;
1518-
tc_setup_cb_t *cb;
1519-
void *cb_ident;
1520-
void *cb_priv;
1521-
unsigned int refcnt;
1522-
};
1523-
1524-
void *tcf_block_cb_priv(struct tcf_block_cb *block_cb)
1525-
{
1526-
return block_cb->cb_priv;
1527-
}
1528-
EXPORT_SYMBOL(tcf_block_cb_priv);
1529-
1530-
struct tcf_block_cb *tcf_block_cb_lookup(struct tcf_block *block,
1531-
tc_setup_cb_t *cb, void *cb_ident)
1532-
{ struct tcf_block_cb *block_cb;
1533-
1534-
list_for_each_entry(block_cb, &block->cb_list, list)
1535-
if (block_cb->cb == cb && block_cb->cb_ident == cb_ident)
1536-
return block_cb;
1537-
return NULL;
1538-
}
1539-
EXPORT_SYMBOL(tcf_block_cb_lookup);
1540-
1541-
void tcf_block_cb_incref(struct tcf_block_cb *block_cb)
1542-
{
1543-
block_cb->refcnt++;
1544-
}
1545-
EXPORT_SYMBOL(tcf_block_cb_incref);
1546-
1547-
unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb)
1548-
{
1549-
return --block_cb->refcnt;
1550-
}
1551-
EXPORT_SYMBOL(tcf_block_cb_decref);
1552-
15531516
static int
15541517
tcf_block_playback_offloads(struct tcf_block *block, tc_setup_cb_t *cb,
15551518
void *cb_priv, bool add, bool offload_in_use,
@@ -1591,67 +1554,6 @@ tcf_block_playback_offloads(struct tcf_block *block, tc_setup_cb_t *cb,
15911554
return err;
15921555
}
15931556

1594-
struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block,
1595-
tc_setup_cb_t *cb, void *cb_ident,
1596-
void *cb_priv,
1597-
struct netlink_ext_ack *extack)
1598-
{
1599-
struct tcf_block_cb *block_cb;
1600-
int err;
1601-
1602-
/* Replay any already present rules */
1603-
err = tcf_block_playback_offloads(block, cb, cb_priv, true,
1604-
tcf_block_offload_in_use(block),
1605-
extack);
1606-
if (err)
1607-
return ERR_PTR(err);
1608-
1609-
block_cb = kzalloc(sizeof(*block_cb), GFP_KERNEL);
1610-
if (!block_cb)
1611-
return ERR_PTR(-ENOMEM);
1612-
block_cb->cb = cb;
1613-
block_cb->cb_ident = cb_ident;
1614-
block_cb->cb_priv = cb_priv;
1615-
list_add(&block_cb->list, &block->cb_list);
1616-
return block_cb;
1617-
}
1618-
EXPORT_SYMBOL(__tcf_block_cb_register);
1619-
1620-
int tcf_block_cb_register(struct tcf_block *block,
1621-
tc_setup_cb_t *cb, void *cb_ident,
1622-
void *cb_priv, struct netlink_ext_ack *extack)
1623-
{
1624-
struct tcf_block_cb *block_cb;
1625-
1626-
block_cb = __tcf_block_cb_register(block, cb, cb_ident, cb_priv,
1627-
extack);
1628-
return PTR_ERR_OR_ZERO(block_cb);
1629-
}
1630-
EXPORT_SYMBOL(tcf_block_cb_register);
1631-
1632-
void __tcf_block_cb_unregister(struct tcf_block *block,
1633-
struct tcf_block_cb *block_cb)
1634-
{
1635-
tcf_block_playback_offloads(block, block_cb->cb, block_cb->cb_priv,
1636-
false, tcf_block_offload_in_use(block),
1637-
NULL);
1638-
list_del(&block_cb->list);
1639-
kfree(block_cb);
1640-
}
1641-
EXPORT_SYMBOL(__tcf_block_cb_unregister);
1642-
1643-
void tcf_block_cb_unregister(struct tcf_block *block,
1644-
tc_setup_cb_t *cb, void *cb_ident)
1645-
{
1646-
struct tcf_block_cb *block_cb;
1647-
1648-
block_cb = tcf_block_cb_lookup(block, cb, cb_ident);
1649-
if (!block_cb)
1650-
return;
1651-
__tcf_block_cb_unregister(block, block_cb);
1652-
}
1653-
EXPORT_SYMBOL(tcf_block_cb_unregister);
1654-
16551557
static int tcf_block_bind(struct tcf_block *block,
16561558
struct flow_block_offload *bo)
16571559
{

0 commit comments

Comments
 (0)