From 03ba4131783cc9e872f8bb26a03f15bc11f27564 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 19 Sep 1998 19:15:08 +0000 Subject: - Merge with Linux 2.1.121. - Bugfixes. --- net/sched/cls_api.c | 2 +- net/sched/cls_rsvp.h | 3 +-- net/sched/sch_api.c | 24 ++++++++++++++---------- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'net/sched') diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0bf7a92f4..081896dc5 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -291,7 +291,7 @@ static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct tcf_proto *tp, unsigned long fh, int event) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 8f50013f7..4168f541f 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h @@ -537,7 +537,7 @@ insert: if (s == NULL) goto errout; memset(s, 0, sizeof(*s)); - memcpy(s->dst, dst, sizeof(*dst)); + memcpy(s->dst, dst, sizeof(s->dst)); s->dpi = pinfo->dpi; s->protocol = pinfo->protocol; s->tunnelid = pinfo->tunnelid; @@ -590,7 +590,6 @@ static void rsvp_walk(struct tcf_proto *tp, struct tcf_walker *arg) static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, struct sk_buff *skb, struct tcmsg *t) { - struct rsvp_head *head = tp->root; struct rsvp_filter *f = (struct rsvp_filter*)fh; struct rsvp_session *s; unsigned char *b = skb->tail; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index a684cde66..f2fb9e36f 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -7,6 +7,10 @@ * 2 of the License, or (at your option) any later version. * * Authors: Alexey Kuznetsov, + * + * Fixes: + * + * Rani Assaf :980802: JIFFIES and CPU clock sources are repaired. */ #include @@ -506,7 +510,7 @@ process_existing: } static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, - pid_t pid, u32 seq, unsigned flags, int event) + u32 pid, u32 seq, unsigned flags, int event) { struct tcmsg *tcm; struct nlmsghdr *nlh; @@ -538,7 +542,7 @@ static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct Qdisc *old, struct Qdisc *new) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) @@ -715,7 +719,7 @@ out: static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, unsigned long cl, - pid_t pid, u32 seq, unsigned flags, int event) + u32 pid, u32 seq, unsigned flags, int event) { struct tcmsg *tcm; struct nlmsghdr *nlh; @@ -745,7 +749,7 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct Qdisc *q, unsigned long cl, int event) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) @@ -850,7 +854,7 @@ int psched_clock_scale; #endif #ifdef PSCHED_WATCHER -u32 psched_time_mark; +PSCHED_WATCHER psched_time_mark; static void psched_tick(unsigned long); @@ -864,10 +868,10 @@ static void psched_tick(unsigned long dummy) PSCHED_GET_TIME(dummy_stamp); psched_timer.expires = jiffies + 4*HZ; #else - unsigned long jiffies = now; + unsigned long now = jiffies; psched_time_base = ((u64)now)<>=1) != 0) psched_clock_scale++; psched_us_per_tick = 1<>psched_clock_scale; + psched_clock_per_hz = (psched_tick_per_us*(1000000/HZ))>>psched_clock_scale; return 0; } #endif -- cgit v1.2.3