drivers: net: use flow action infrastructure

This patch updates drivers to use the new flow action infrastructure.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pablo Neira Ayuso
2019-02-02 12:50:48 +01:00
committed by David S. Miller
parent 3b1903ef97
commit 7386788175
7 changed files with 422 additions and 430 deletions

View File

@@ -2004,21 +2004,21 @@ unlock:
}
static int qede_parse_actions(struct qede_dev *edev,
struct tcf_exts *exts)
struct flow_action *flow_action)
{
const struct flow_action_entry *act;
int rc = -EINVAL, num_act = 0, i;
const struct tc_action *a;
bool is_drop = false;
if (!tcf_exts_has_actions(exts)) {
if (!flow_action_has_entries(flow_action)) {
DP_NOTICE(edev, "No tc actions received\n");
return rc;
}
tcf_exts_for_each_action(i, a, exts) {
flow_action_for_each(i, act, flow_action) {
num_act++;
if (is_tcf_gact_shot(a))
if (act->id == FLOW_ACTION_DROP)
is_drop = true;
}
@@ -2235,7 +2235,7 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto,
}
/* parse tc actions and get the vf_id */
if (qede_parse_actions(edev, f->exts))
if (qede_parse_actions(edev, &f->rule->action))
goto unlock;
if (qede_flow_find_fltr(edev, &t)) {