diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /include/net/pkt_sched.h | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index e37fe3129c17..82a3191375f5 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -41,16 +41,17 @@ static inline void *qdisc_priv(struct Qdisc *q) | |||
41 | typedef u64 psched_time_t; | 41 | typedef u64 psched_time_t; |
42 | typedef long psched_tdiff_t; | 42 | typedef long psched_tdiff_t; |
43 | 43 | ||
44 | /* Avoid doing 64 bit divide by 1000 */ | 44 | /* Avoid doing 64 bit divide */ |
45 | #define PSCHED_US2NS(x) ((s64)(x) << 10) | 45 | #define PSCHED_SHIFT 6 |
46 | #define PSCHED_NS2US(x) ((x) >> 10) | 46 | #define PSCHED_TICKS2NS(x) ((s64)(x) << PSCHED_SHIFT) |
47 | #define PSCHED_NS2TICKS(x) ((x) >> PSCHED_SHIFT) | ||
47 | 48 | ||
48 | #define PSCHED_TICKS_PER_SEC PSCHED_NS2US(NSEC_PER_SEC) | 49 | #define PSCHED_TICKS_PER_SEC PSCHED_NS2TICKS(NSEC_PER_SEC) |
49 | #define PSCHED_PASTPERFECT 0 | 50 | #define PSCHED_PASTPERFECT 0 |
50 | 51 | ||
51 | static inline psched_time_t psched_get_time(void) | 52 | static inline psched_time_t psched_get_time(void) |
52 | { | 53 | { |
53 | return PSCHED_NS2US(ktime_to_ns(ktime_get())); | 54 | return PSCHED_NS2TICKS(ktime_to_ns(ktime_get())); |
54 | } | 55 | } |
55 | 56 | ||
56 | static inline psched_tdiff_t | 57 | static inline psched_tdiff_t |