aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 15:12:52 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 15:12:52 -0800
commit1fd5a46dd6bbca3a1275465120caf4748872c2a7 (patch)
treec24862a43f57974394ebb58a1d9005e4093e3bf7 /include
parent2cc6055060d975e8c7601f4a1c68ef2d3050b4e9 (diff)
parentdff2c03534f525813342ab8dec90c5bb1ee07471 (diff)
downloadlinux-1fd5a46dd6bbca3a1275465120caf4748872c2a7.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/crypto.h5
-rw-r--r--include/net/act_api.h2
-rw-r--r--include/net/pkt_sched.h23
3 files changed, 18 insertions, 12 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 3c89df6e776845..d88bf8aa8b4776 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -3,6 +3,7 @@
*
* Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
* Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
*
* Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
* and Nettle, by Niels Möller.
@@ -126,7 +127,11 @@ struct crypto_alg {
unsigned int cra_blocksize;
unsigned int cra_ctxsize;
unsigned int cra_alignmask;
+
+ int cra_priority;
+
const char cra_name[CRYPTO_MAX_ALG_NAME];
+ const char cra_driver_name[CRYPTO_MAX_ALG_NAME];
union {
struct cipher_alg cipher;
diff --git a/include/net/act_api.h b/include/net/act_api.h
index b55eb7c7f0339c..11e9eaf79f5ab3 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -63,7 +63,7 @@ struct tc_action_ops
__u32 type; /* TBD to match kind */
__u32 capab; /* capabilities includes 4 bit version */
struct module *owner;
- int (*act)(struct sk_buff **, struct tc_action *, struct tcf_result *);
+ int (*act)(struct sk_buff *, struct tc_action *, struct tcf_result *);
int (*get_stats)(struct sk_buff *, struct tc_action *);
int (*dump)(struct sk_buff *, struct tc_action *,int , int);
int (*cleanup)(struct tc_action *, int bind);
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 6492e7363d8453..b94d1ad92c4d36 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -1,6 +1,7 @@
#ifndef __NET_PKT_SCHED_H
#define __NET_PKT_SCHED_H
+#include <linux/jiffies.h>
#include <net/sch_generic.h>
struct qdisc_walker
@@ -59,8 +60,8 @@ typedef struct timeval psched_time_t;
typedef long psched_tdiff_t;
#define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp))
-#define PSCHED_US2JIFFIE(usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ))
-#define PSCHED_JIFFIE2US(delay) ((delay)*(1000000/HZ))
+#define PSCHED_US2JIFFIE(usecs) usecs_to_jiffies(usecs)
+#define PSCHED_JIFFIE2US(delay) jiffies_to_usecs(delay)
#else /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */
@@ -123,9 +124,9 @@ do { \
default: \
__delta = 0; \
case 2: \
- __delta += 1000000; \
+ __delta += USEC_PER_SEC; \
case 1: \
- __delta += 1000000; \
+ __delta += USEC_PER_SEC; \
} \
} \
__delta; \
@@ -136,9 +137,9 @@ psched_tod_diff(int delta_sec, int bound)
{
int delta;
- if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
+ if (bound <= USEC_PER_SEC || delta_sec > (0x7FFFFFFF/USEC_PER_SEC)-1)
return bound;
- delta = delta_sec * 1000000;
+ delta = delta_sec * USEC_PER_SEC;
if (delta > bound || delta < 0)
delta = bound;
return delta;
@@ -152,9 +153,9 @@ psched_tod_diff(int delta_sec, int bound)
default: \
__delta = psched_tod_diff(__delta_sec, bound); break; \
case 2: \
- __delta += 1000000; \
+ __delta += USEC_PER_SEC; \
case 1: \
- __delta += 1000000; \
+ __delta += USEC_PER_SEC; \
case 0: \
if (__delta > bound || __delta < 0) \
__delta = bound; \
@@ -170,15 +171,15 @@ psched_tod_diff(int delta_sec, int bound)
({ \
int __delta = (tv).tv_usec + (delta); \
(tv_res).tv_sec = (tv).tv_sec; \
- if (__delta > 1000000) { (tv_res).tv_sec++; __delta -= 1000000; } \
+ if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \
(tv_res).tv_usec = __delta; \
})
#define PSCHED_TADD(tv, delta) \
({ \
(tv).tv_usec += (delta); \
- if ((tv).tv_usec > 1000000) { (tv).tv_sec++; \
- (tv).tv_usec -= 1000000; } \
+ if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \
+ (tv).tv_usec -= USEC_PER_SEC; } \
})
/* Set/check that time is in the "past perfect";