summaryrefslogtreecommitdiff
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2020-05-20 08:43:03 -0300
committerGitHub <noreply@github.com>2020-05-20 08:43:03 -0300
commit1279cd128bba968ebe0a2df7f7ae38bae90250ef (patch)
treedf6b1a190760f51465122ca4c13492d5ac5984c6 /net/sched/act_api.c
parent0a8ab17689e628c84a666195bfc6ab85d11cf057 (diff)
parent2ae782ca839e0ee07de37122ddea362adff2e975 (diff)
Merge pull request #76 from toradex/4.9-2.3.x-imx
4.9 2.3.x imx
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 67adb4ecded2..5b8f8b382a2e 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -948,10 +948,15 @@ tcf_add_notify(struct net *net, struct nlmsghdr *n, struct list_head *actions,
static int tcf_action_add(struct net *net, struct nlattr *nla,
struct nlmsghdr *n, u32 portid, int ovr)
{
- int ret = 0;
+ int loop, ret;
LIST_HEAD(actions);
- ret = tcf_action_init(net, nla, NULL, NULL, ovr, 0, &actions);
+ for (loop = 0; loop < 10; loop++) {
+ ret = tcf_action_init(net, nla, NULL, NULL, ovr, 0, &actions);
+ if (ret != -EAGAIN)
+ break;
+ }
+
if (ret)
return ret;
@@ -989,10 +994,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)
*/
if (n->nlmsg_flags & NLM_F_REPLACE)
ovr = 1;
-replay:
ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, portid, ovr);
- if (ret == -EAGAIN)
- goto replay;
break;
case RTM_DELACTION:
ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,