Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread David Z. Dai
On Fri, 2019-08-30 at 13:33 -0700, David Miller wrote: > From: "David Z. Dai" > Date: Fri, 30 Aug 2019 15:03:52 -0500 > > > I have the impression that last parameter num value should be larger > > than the attribute num value in 2nd parameter (TC_POLICE_RATE64 in this > > case). > > The argument

Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread David Miller
From: "David Z. Dai" Date: Fri, 30 Aug 2019 15:03:52 -0500 > I have the impression that last parameter num value should be larger > than the attribute num value in 2nd parameter (TC_POLICE_RATE64 in this > case). The argument in question is explicitly the "padding" value. Please explain in deta

Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread Cong Wang
On Fri, Aug 30, 2019 at 1:03 PM David Z. Dai wrote: > > On Fri, 2019-08-30 at 12:11 -0700, Cong Wang wrote: > > On Fri, Aug 30, 2019 at 12:06 PM David Dai wrote: > > > - if (p->peak_present) > > > + if ((police->params->rate.rate_bytes_ps >= (1ULL << 32)) > > > && > > > +

Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread David Z. Dai
On Fri, 2019-08-30 at 12:11 -0700, Cong Wang wrote: > On Fri, Aug 30, 2019 at 12:06 PM David Dai wrote: > > - if (p->peak_present) > > + if ((police->params->rate.rate_bytes_ps >= (1ULL << 32)) && > > + nla_put_u64_64bit(skb, TCA_POLICE_RATE64, > > +

Re: [v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread Cong Wang
On Fri, Aug 30, 2019 at 12:06 PM David Dai wrote: > - if (p->peak_present) > + if ((police->params->rate.rate_bytes_ps >= (1ULL << 32)) && > + nla_put_u64_64bit(skb, TCA_POLICE_RATE64, > + police->params->rate.rate_bytes_ps,

[v2] net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate

2019-08-30 Thread David Dai
For high speed adapter like Mellanox CX-5 card, it can reach upto 100 Gbits per second bandwidth. Currently htb already supports 64bit rate in tc utility. However police action rate and peakrate are still limited to 32bit value (upto 32 Gbits per second). Add 2 new attributes TCA_POLICE_RATE64 and