Skip to content

Commit 9c1c0e1

Browse files
zhengbaowendavem330
authored andcommitted
flow_offload: rename offload functions with offload instead of flow
To improves readability, we rename offload functions with offload instead of flow. The term flow is related to exact matches, so we rename these functions with offload. We make this change to facilitate single action offload functions naming. Signed-off-by: Baowen Zheng <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5a99590 commit 9c1c0e1

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

include/net/pkt_cls.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ tcf_match_indev(struct sk_buff *skb, int ifindex)
536536
return ifindex == skb->skb_iif;
537537
}
538538

539-
int tc_setup_flow_action(struct flow_action *flow_action,
540-
const struct tcf_exts *exts);
541-
void tc_cleanup_flow_action(struct flow_action *flow_action);
539+
int tc_setup_offload_action(struct flow_action *flow_action,
540+
const struct tcf_exts *exts);
541+
void tc_cleanup_offload_action(struct flow_action *flow_action);
542542

543543
int tc_setup_cb_call(struct tcf_block *block, enum tc_setup_type type,
544544
void *type_data, bool err_stop, bool rtnl_held);

net/sched/cls_api.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3461,7 +3461,7 @@ static void tcf_act_put_cookie(struct flow_action_entry *entry)
34613461
flow_action_cookie_destroy(entry->cookie);
34623462
}
34633463

3464-
void tc_cleanup_flow_action(struct flow_action *flow_action)
3464+
void tc_cleanup_offload_action(struct flow_action *flow_action)
34653465
{
34663466
struct flow_action_entry *entry;
34673467
int i;
@@ -3472,7 +3472,7 @@ void tc_cleanup_flow_action(struct flow_action *flow_action)
34723472
entry->destructor(entry->destructor_priv);
34733473
}
34743474
}
3475-
EXPORT_SYMBOL(tc_cleanup_flow_action);
3475+
EXPORT_SYMBOL(tc_cleanup_offload_action);
34763476

34773477
static void tcf_mirred_get_dev(struct flow_action_entry *entry,
34783478
const struct tc_action *act)
@@ -3544,8 +3544,8 @@ static enum flow_action_hw_stats tc_act_hw_stats(u8 hw_stats)
35443544
return hw_stats;
35453545
}
35463546

3547-
int tc_setup_flow_action(struct flow_action *flow_action,
3548-
const struct tcf_exts *exts)
3547+
int tc_setup_offload_action(struct flow_action *flow_action,
3548+
const struct tcf_exts *exts)
35493549
{
35503550
struct tc_action *act;
35513551
int i, j, k, err = 0;
@@ -3718,14 +3718,14 @@ int tc_setup_flow_action(struct flow_action *flow_action,
37183718

37193719
err_out:
37203720
if (err)
3721-
tc_cleanup_flow_action(flow_action);
3721+
tc_cleanup_offload_action(flow_action);
37223722

37233723
return err;
37243724
err_out_locked:
37253725
spin_unlock_bh(&act->tcfa_lock);
37263726
goto err_out;
37273727
}
3728-
EXPORT_SYMBOL(tc_setup_flow_action);
3728+
EXPORT_SYMBOL(tc_setup_offload_action);
37293729

37303730
unsigned int tcf_exts_num_actions(struct tcf_exts *exts)
37313731
{

net/sched/cls_flower.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
461461
cls_flower.rule->match.key = &f->mkey;
462462
cls_flower.classid = f->res.classid;
463463

464-
err = tc_setup_flow_action(&cls_flower.rule->action, &f->exts);
464+
err = tc_setup_offload_action(&cls_flower.rule->action, &f->exts);
465465
if (err) {
466466
kfree(cls_flower.rule);
467467
if (skip_sw) {
@@ -473,7 +473,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
473473

474474
err = tc_setup_cb_add(block, tp, TC_SETUP_CLSFLOWER, &cls_flower,
475475
skip_sw, &f->flags, &f->in_hw_count, rtnl_held);
476-
tc_cleanup_flow_action(&cls_flower.rule->action);
476+
tc_cleanup_offload_action(&cls_flower.rule->action);
477477
kfree(cls_flower.rule);
478478

479479
if (err) {
@@ -2266,7 +2266,7 @@ static int fl_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
22662266
cls_flower.rule->match.mask = &f->mask->key;
22672267
cls_flower.rule->match.key = &f->mkey;
22682268

2269-
err = tc_setup_flow_action(&cls_flower.rule->action, &f->exts);
2269+
err = tc_setup_offload_action(&cls_flower.rule->action, &f->exts);
22702270
if (err) {
22712271
kfree(cls_flower.rule);
22722272
if (tc_skip_sw(f->flags)) {
@@ -2283,7 +2283,7 @@ static int fl_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
22832283
TC_SETUP_CLSFLOWER, &cls_flower,
22842284
cb_priv, &f->flags,
22852285
&f->in_hw_count);
2286-
tc_cleanup_flow_action(&cls_flower.rule->action);
2286+
tc_cleanup_offload_action(&cls_flower.rule->action);
22872287
kfree(cls_flower.rule);
22882288

22892289
if (err) {

net/sched/cls_matchall.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
9797
cls_mall.command = TC_CLSMATCHALL_REPLACE;
9898
cls_mall.cookie = cookie;
9999

100-
err = tc_setup_flow_action(&cls_mall.rule->action, &head->exts);
100+
err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts);
101101
if (err) {
102102
kfree(cls_mall.rule);
103103
mall_destroy_hw_filter(tp, head, cookie, NULL);
@@ -111,7 +111,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
111111

112112
err = tc_setup_cb_add(block, tp, TC_SETUP_CLSMATCHALL, &cls_mall,
113113
skip_sw, &head->flags, &head->in_hw_count, true);
114-
tc_cleanup_flow_action(&cls_mall.rule->action);
114+
tc_cleanup_offload_action(&cls_mall.rule->action);
115115
kfree(cls_mall.rule);
116116

117117
if (err) {
@@ -301,7 +301,7 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
301301
TC_CLSMATCHALL_REPLACE : TC_CLSMATCHALL_DESTROY;
302302
cls_mall.cookie = (unsigned long)head;
303303

304-
err = tc_setup_flow_action(&cls_mall.rule->action, &head->exts);
304+
err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts);
305305
if (err) {
306306
kfree(cls_mall.rule);
307307
if (add && tc_skip_sw(head->flags)) {
@@ -314,7 +314,7 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
314314
err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSMATCHALL,
315315
&cls_mall, cb_priv, &head->flags,
316316
&head->in_hw_count);
317-
tc_cleanup_flow_action(&cls_mall.rule->action);
317+
tc_cleanup_offload_action(&cls_mall.rule->action);
318318
kfree(cls_mall.rule);
319319

320320
if (err)

0 commit comments

Comments
 (0)