diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-14 00:34:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:37 -0500 |
commit | 352e512c32b634768303a43768245a0363cebbe7 (patch) | |
tree | 97509ac130ecbe2084808271ccc459918a9d5fc1 /include/net/dst.h | |
parent | b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b (diff) |
[NET]: Eliminate duplicate copies of dst_discard
We have a number of copies of dst_discard scattered around the place
which all do the same thing, namely free a packet on the input or
output paths.
This patch deletes all of them except dst_discard and points all the
users to it.
The only non-trivial bit is decnet where it returns an error.
However, conceptually this is identical to the blackhole functions
used in IPv4 and IPv6 which do not return errors. So they should
either all return errors or all return zero. For now I've stuck with
the majority and picked zero as the return value.
It doesn't really matter in practice since few if any driver would
react differently depending on a zero return value or NET_RX_DROP.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 69888f1502b1..7a0b1bde8e28 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -179,6 +179,7 @@ static inline struct dst_entry *dst_pop(struct dst_entry *dst) | |||
179 | return child; | 179 | return child; |
180 | } | 180 | } |
181 | 181 | ||
182 | extern int dst_discard(struct sk_buff *skb); | ||
182 | extern void * dst_alloc(struct dst_ops * ops); | 183 | extern void * dst_alloc(struct dst_ops * ops); |
183 | extern void __dst_free(struct dst_entry * dst); | 184 | extern void __dst_free(struct dst_entry * dst); |
184 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); | 185 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); |