Message ID | 20230316033753.2320557-2-liuhangbin@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8de2bd02439eb839a452a853c1004c2c45ff6fef |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/sched: fix parsing of TCA_EXT_WARN_MSG for tc action | expand |
Context | Check | Description |
---|---|---|
netdev/series_format | success | Posting correctly formatted |
netdev/tree_selection | success | Clearly marked for net |
netdev/fixes_present | success | Fixes tag present in non-next series |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 20 this patch: 20 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 18 this patch: 18 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/deprecated_api | success | None detected |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 20 this patch: 20 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Wed, Mar 15, 2023 at 11:38 PM Hangbin Liu <liuhangbin@gmail.com> wrote: > > This reverts commit 923b2e30dc9cd05931da0f64e2e23d040865c035. > > This is not a correct fix as TCA_EXT_WARN_MSG is not a hierarchy to > TCA_ACT_TAB. I didn't notice the TC actions use different enum when adding > TCA_EXT_WARN_MSG. To fix the difference I will add a new WARN enum in > TCA_ROOT_MAX as Jamal suggested. > > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> > --- > net/sched/act_api.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index 34c508675041..fce522886099 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -1596,12 +1596,12 @@ static int tca_get_fill(struct sk_buff *skb, struct tc_action *actions[], > if (tcf_action_dump(skb, actions, bind, ref, false) < 0) > goto out_nlmsg_trim; > > + nla_nest_end(skb, nest); > + > if (extack && extack->_msg && > nla_put_string(skb, TCA_EXT_WARN_MSG, extack->_msg)) > goto out_nlmsg_trim; > > - nla_nest_end(skb, nest); > - > nlh->nlmsg_len = skb_tail_pointer(skb) - b; > > return skb->len; Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> cheers, jamal > 2.38.1 >
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 34c508675041..fce522886099 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -1596,12 +1596,12 @@ static int tca_get_fill(struct sk_buff *skb, struct tc_action *actions[], if (tcf_action_dump(skb, actions, bind, ref, false) < 0) goto out_nlmsg_trim; + nla_nest_end(skb, nest); + if (extack && extack->_msg && nla_put_string(skb, TCA_EXT_WARN_MSG, extack->_msg)) goto out_nlmsg_trim; - nla_nest_end(skb, nest); - nlh->nlmsg_len = skb_tail_pointer(skb) - b; return skb->len;
This reverts commit 923b2e30dc9cd05931da0f64e2e23d040865c035. This is not a correct fix as TCA_EXT_WARN_MSG is not a hierarchy to TCA_ACT_TAB. I didn't notice the TC actions use different enum when adding TCA_EXT_WARN_MSG. To fix the difference I will add a new WARN enum in TCA_ROOT_MAX as Jamal suggested. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> --- net/sched/act_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)