* Re: [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns
[not found] <1510088376-5527-2-git-send-email-dave.taht@gmail.com>
@ 2017-11-14 21:11 ` James Hogan
2017-11-14 21:43 ` James Hogan
2017-11-14 22:49 ` Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: James Hogan @ 2017-11-14 21:11 UTC (permalink / raw)
To: Dave Taht; +Cc: netdev, linux-next, linux-mips, Ralf Baechle
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
On Tue, Nov 07, 2017 at 12:59:34PM -0800, Dave Taht wrote:
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index db0228a..443a75d 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
...
> @@ -305,11 +305,11 @@ static bool loss_event(struct netem_sched_data *q)
> * std deviation sigma. Uses table lookup to approximate the desired
> * distribution, and a uniformly-distributed pseudo-random source.
> */
> -static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
> - struct crndstate *state,
> - const struct disttable *dist)
> +static s64 tabledist(s64 mu, s64 sigma,
sigma is used in a modulo operation in this function, which results in
this error on a bunch of MIPS configs once it is made 64-bits wide:
net/sched/sch_netem.o In function `tabledist':
net/sched/sch_netem.c:330: undefined reference to `__moddi3'
Should that code not be using <linux/math64.h>, i.e. div_s64_rem() now
that it is 64bit?
Thanks
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns
2017-11-14 21:11 ` [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns James Hogan
@ 2017-11-14 21:43 ` James Hogan
2017-11-14 22:49 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2017-11-14 21:43 UTC (permalink / raw)
To: Dave Taht; +Cc: netdev, linux-next, linux-mips, Ralf Baechle
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
On Tue, Nov 14, 2017 at 09:11:12PM +0000, James Hogan wrote:
> On Tue, Nov 07, 2017 at 12:59:34PM -0800, Dave Taht wrote:
> > diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> > index db0228a..443a75d 100644
> > --- a/net/sched/sch_netem.c
> > +++ b/net/sched/sch_netem.c
>
> ...
>
> > @@ -305,11 +305,11 @@ static bool loss_event(struct netem_sched_data *q)
> > * std deviation sigma. Uses table lookup to approximate the desired
> > * distribution, and a uniformly-distributed pseudo-random source.
> > */
> > -static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
> > - struct crndstate *state,
> > - const struct disttable *dist)
> > +static s64 tabledist(s64 mu, s64 sigma,
>
> sigma is used in a modulo operation in this function, which results in
> this error on a bunch of MIPS configs once it is made 64-bits wide:
>
> net/sched/sch_netem.o In function `tabledist':
> net/sched/sch_netem.c:330: undefined reference to `__moddi3'
>
> Should that code not be using <linux/math64.h>, i.e. div_s64_rem() now
> that it is 64bit?
For the record, Dave has kindly pointed me at:
https://patchwork.ozlabs.org/project/netdev/list/?series=13554
which fixes the MIPS builds.
Cheers
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns
2017-11-14 21:11 ` [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns James Hogan
2017-11-14 21:43 ` James Hogan
@ 2017-11-14 22:49 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-11-14 22:49 UTC (permalink / raw)
To: James Hogan; +Cc: Dave Taht, netdev, linux-next, linux-mips, Ralf Baechle
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
On Tue, 14 Nov 2017 21:11:13 +0000
James Hogan <james.hogan@mips.com> wrote:
> On Tue, Nov 07, 2017 at 12:59:34PM -0800, Dave Taht wrote:
> > diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> > index db0228a..443a75d 100644
> > --- a/net/sched/sch_netem.c
> > +++ b/net/sched/sch_netem.c
>
> ...
>
> > @@ -305,11 +305,11 @@ static bool loss_event(struct netem_sched_data *q)
> > * std deviation sigma. Uses table lookup to approximate the desired
> > * distribution, and a uniformly-distributed pseudo-random source.
> > */
> > -static psched_tdiff_t tabledist(psched_tdiff_t mu, psched_tdiff_t sigma,
> > - struct crndstate *state,
> > - const struct disttable *dist)
> > +static s64 tabledist(s64 mu, s64 sigma,
>
> sigma is used in a modulo operation in this function, which results in
> this error on a bunch of MIPS configs once it is made 64-bits wide:
>
> net/sched/sch_netem.o In function `tabledist':
> net/sched/sch_netem.c:330: undefined reference to `__moddi3'
>
> Should that code not be using <linux/math64.h>, i.e. div_s64_rem() now
> that it is 64bit?
>
> Thanks
> James
Not really since random is only 32 bit, the sigma value being 64 bit makes
no sense really.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-14 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1510088376-5527-2-git-send-email-dave.taht@gmail.com>
2017-11-14 21:11 ` [net-next,1/3] netem: convert to qdisc_watchdog_schedule_ns James Hogan
2017-11-14 21:43 ` James Hogan
2017-11-14 22:49 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).