"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "net/sched/act_ctinfo.c" between
linux-5.3-rc3.tar.gz and linux-5.3-rc4.tar.gz

About: The full source of the development Linux kernel 5.3 (release candidate).

act_ctinfo.c  (linux-5.3-rc3):act_ctinfo.c  (linux-5.3-rc4)
skipping to change at line 160 skipping to change at line 160
[TCA_CTINFO_PARMS_CPMARK_MASK] = { .type = NLA_U32 }, [TCA_CTINFO_PARMS_CPMARK_MASK] = { .type = NLA_U32 },
}; };
static int tcf_ctinfo_init(struct net *net, struct nlattr *nla, static int tcf_ctinfo_init(struct net *net, struct nlattr *nla,
struct nlattr *est, struct tc_action **a, struct nlattr *est, struct tc_action **a,
int ovr, int bind, bool rtnl_held, int ovr, int bind, bool rtnl_held,
struct tcf_proto *tp, struct tcf_proto *tp,
struct netlink_ext_ack *extack) struct netlink_ext_ack *extack)
{ {
struct tc_action_net *tn = net_generic(net, ctinfo_net_id); struct tc_action_net *tn = net_generic(net, ctinfo_net_id);
u32 dscpmask = 0, dscpstatemask, index;
struct nlattr *tb[TCA_CTINFO_MAX + 1]; struct nlattr *tb[TCA_CTINFO_MAX + 1];
struct tcf_ctinfo_params *cp_new; struct tcf_ctinfo_params *cp_new;
struct tcf_chain *goto_ch = NULL; struct tcf_chain *goto_ch = NULL;
u32 dscpmask = 0, dscpstatemask;
struct tc_ctinfo *actparm; struct tc_ctinfo *actparm;
struct tcf_ctinfo *ci; struct tcf_ctinfo *ci;
u8 dscpmaskshift; u8 dscpmaskshift;
int ret = 0, err; int ret = 0, err;
if (!nla) { if (!nla) {
NL_SET_ERR_MSG_MOD(extack, "ctinfo requires attributes to be pass ed"); NL_SET_ERR_MSG_MOD(extack, "ctinfo requires attributes to be pass ed");
return -EINVAL; return -EINVAL;
} }
skipping to change at line 209 skipping to change at line 209
/* mask & statemask must not overlap */ /* mask & statemask must not overlap */
if (dscpmask & dscpstatemask) { if (dscpmask & dscpstatemask) {
NL_SET_ERR_MSG_ATTR(extack, NL_SET_ERR_MSG_ATTR(extack,
tb[TCA_CTINFO_PARMS_DSCP_STATEMASK], tb[TCA_CTINFO_PARMS_DSCP_STATEMASK],
"dscp statemask must not overlap dscp mask"); "dscp statemask must not overlap dscp mask");
return -EINVAL; return -EINVAL;
} }
} }
/* done the validation:now to the actual action allocation */ /* done the validation:now to the actual action allocation */
err = tcf_idr_check_alloc(tn, &actparm->index, a, bind); index = actparm->index;
err = tcf_idr_check_alloc(tn, &index, a, bind);
if (!err) { if (!err) {
ret = tcf_idr_create(tn, actparm->index, est, a, ret = tcf_idr_create(tn, index, est, a,
&act_ctinfo_ops, bind, false); &act_ctinfo_ops, bind, false);
if (ret) { if (ret) {
tcf_idr_cleanup(tn, actparm->index); tcf_idr_cleanup(tn, index);
return ret; return ret;
} }
ret = ACT_P_CREATED; ret = ACT_P_CREATED;
} else if (err > 0) { } else if (err > 0) {
if (bind) /* don't override defaults */ if (bind) /* don't override defaults */
return 0; return 0;
if (!ovr) { if (!ovr) {
tcf_idr_release(*a, bind); tcf_idr_release(*a, bind);
return -EEXIST; return -EEXIST;
} }
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)