mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
net/sched: act_api: add specific EXT_WARN_MSG for tc action
commit2f59823fe6upstream. In my previous commit0349b8779c("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") I didn't notice the tc action use different enum with filter. So we can't use TCA_EXT_WARN_MSG directly for tc action. Let's add a TCA_ROOT_EXT_WARN_MSG for tc action specifically and put this param before going to the TCA_ACT_TAB nest. Fixes:0349b8779c("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ab1bbd79f4
commit
26435338f9
@@ -789,6 +789,7 @@ enum {
|
|||||||
TCA_ROOT_FLAGS,
|
TCA_ROOT_FLAGS,
|
||||||
TCA_ROOT_COUNT,
|
TCA_ROOT_COUNT,
|
||||||
TCA_ROOT_TIME_DELTA, /* in msecs */
|
TCA_ROOT_TIME_DELTA, /* in msecs */
|
||||||
|
TCA_ROOT_EXT_WARN_MSG,
|
||||||
__TCA_ROOT_MAX,
|
__TCA_ROOT_MAX,
|
||||||
#define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
|
#define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1596,6 +1596,10 @@ static int tca_get_fill(struct sk_buff *skb, struct tc_action *actions[],
|
|||||||
t->tca__pad1 = 0;
|
t->tca__pad1 = 0;
|
||||||
t->tca__pad2 = 0;
|
t->tca__pad2 = 0;
|
||||||
|
|
||||||
|
if (extack && extack->_msg &&
|
||||||
|
nla_put_string(skb, TCA_ROOT_EXT_WARN_MSG, extack->_msg))
|
||||||
|
goto out_nlmsg_trim;
|
||||||
|
|
||||||
nest = nla_nest_start_noflag(skb, TCA_ACT_TAB);
|
nest = nla_nest_start_noflag(skb, TCA_ACT_TAB);
|
||||||
if (!nest)
|
if (!nest)
|
||||||
goto out_nlmsg_trim;
|
goto out_nlmsg_trim;
|
||||||
@@ -1605,10 +1609,6 @@ static int tca_get_fill(struct sk_buff *skb, struct tc_action *actions[],
|
|||||||
|
|
||||||
nla_nest_end(skb, nest);
|
nla_nest_end(skb, nest);
|
||||||
|
|
||||||
if (extack && extack->_msg &&
|
|
||||||
nla_put_string(skb, TCA_EXT_WARN_MSG, extack->_msg))
|
|
||||||
goto out_nlmsg_trim;
|
|
||||||
|
|
||||||
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
|
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
|
||||||
|
|
||||||
return skb->len;
|
return skb->len;
|
||||||
|
|||||||
Reference in New Issue
Block a user