Message ID | CAM_iQpXDo5Lh+MF7yds3vDyn7D-aqKH3-9kmVYZ924QkAw=imA@mail.gmail.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On (03/01/16 10:51), Cong Wang wrote: > --- a/net/sched/sch_mqprio.c > +++ b/net/sched/sch_mqprio.c > @@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct > nlattr *opt) > */ > if (qopt->hw) { > struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO, > - .tc = qopt->num_tc}; > + {.tc = qopt->num_tc} }; > this fix works. The first suggestion had no effect (needs changes to a lot of files I suspect). BTW, I remain surprised that no one else has noticed this. It did not take me any effort to reproduce it on an x86. --Sowmini
On Tue, Mar 1, 2016 at 11:09 AM, Sowmini Varadhan <sowmini.varadhan@oracle.com> wrote: > On (03/01/16 10:51), Cong Wang wrote: >> --- a/net/sched/sch_mqprio.c >> +++ b/net/sched/sch_mqprio.c >> @@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct >> nlattr *opt) >> */ >> if (qopt->hw) { >> struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO, >> - .tc = qopt->num_tc}; >> + {.tc = qopt->num_tc} }; >> > > this fix works. > > The first suggestion had no effect (needs changes to a lot of files > I suspect). > It must work, you just didn't try it hard. > BTW, I remain surprised that no one else has noticed this. It did not > take me any effort to reproduce it on an x86. I think that is probably because most people use newer gcc, at least I don't see any compile error with gcc 4.9.2.
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index f9947d1..77743e8 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt) */ if (qopt->hw) { struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO, - .tc = qopt->num_tc}; + {.tc = qopt->num_tc} }; priv->hw_owned = 1;