2002-07-10 14:26:25

by Frank Davis

[permalink] [raw]
Subject: [PATCH] 2.5.25 : tr_source_route fix

Hello all,
The following patch fixes the below 'make bzImage' error. Please review
for inclusion.
Regards,
Frank

netsyms.c:447: `tr_source_route' undeclared here (not in a function)
netsyms.c:447: initializer element is not constant
netsyms.c:447: (near initialization for `__ksymtab_tr_source_route.value')
make[1]: *** [netsyms.o] Error 1
make[1]: Leaving directory `/usr/src/linux/net'
make: *** [net] Error 2

--- net/802/tr.c.old Thu Jun 20 20:52:05 2002
+++ net/802/tr.c Thu Jun 20 20:51:59 2002
@@ -36,7 +36,7 @@
#include <linux/init.h>
#include <net/arp.h>

-static void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
+void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev);
static void rif_check_expire(unsigned long dummy);

@@ -230,7 +230,7 @@
* We try to do source routing...
*/

-static void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
+void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
{
int i, slack;
unsigned int hash;

--- include/linux/trdevice.h.old Thu Jun 20 21:53:21 2002
+++ include/linux/trdevice.h Thu Jun 20 21:53:11 2002
@@ -37,6 +37,7 @@
extern struct net_device *alloc_trdev(int sizeof_priv);
extern int register_trdev(struct net_device *dev);
extern void unregister_trdev(struct net_device *dev);
+extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);

#endif



2002-07-10 15:46:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] 2.5.25 : tr_source_route fix

Frank Davis wrote:

> Hello all,
> The following patch fixes the below 'make bzImage' error. Please review
> for inclusion.

> --- net/802/tr.c.old Thu Jun 20 20:52:05 2002
> +++ net/802/tr.c Thu Jun 20 20:51:59 2002

make the patch one level higher, so it applies with '-p1', not '-p0'.


> -static void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
> +void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);

This declaration is not needed any more, since it now is in the header file. The other
declaration in net/netsyms.c and net/llc/llc_mac.c should be removed as well.
replacement patch follows.

Arnd <><

diff -u -r1.1.1.1 trdevice.h
--- a/include/linux/trdevice.h 2002/03/13 19:33:11 1.1.1.1
+++ b/include/linux/trdevice.h 2002/07/10 15:34:28
@@ -33,6 +33,9 @@
void *saddr, unsigned len);
extern int tr_rebuild_header(struct sk_buff *skb);
extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev);
+extern void tr_source_route(struct sk_buff *skb,
+ struct trh_hdr *trh,
+ struct net_device *dev);
extern struct net_device *init_trdev(struct net_device *dev, int sizeof_priv);
extern struct net_device *alloc_trdev(int sizeof_priv);
extern int register_trdev(struct net_device *dev);
diff -u -r1.6 netsyms.c
--- a/net/netsyms.c 2002/06/25 09:36:58 1.6
+++ b/net/netsyms.c 2002/07/10 15:34:28
@@ -444,8 +444,6 @@
#endif /* CONFIG_INET */

#if defined(CONFIG_TR) && defined(CONFIG_LLC)
-extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh,
- struct net_device *dev);
EXPORT_SYMBOL(tr_source_route);
EXPORT_SYMBOL(tr_type_trans);
#endif
diff -u -r1.3 tr.c
--- a/net/802/tr.c 2002/05/27 12:33:18 1.3
+++ b/net/802/tr.c 2002/07/10 15:34:28
@@ -36,7 +36,6 @@
#include <linux/init.h>
#include <net/arp.h>

-static void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev);
static void rif_check_expire(unsigned long dummy);

@@ -230,7 +229,7 @@
* We try to do source routing...
*/

-static void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
+void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
{
int i, slack;
unsigned int hash;
diff -u -r1.1 llc_mac.c
--- a/net/llc/llc_mac.c 2002/06/25 09:37:00 1.1
+++ b/net/llc/llc_mac.c 2002/07/10 15:34:29
@@ -25,10 +25,7 @@
#include <net/llc_evnt.h>
#include <net/llc_c_ev.h>
#include <net/llc_s_ev.h>
-#ifdef CONFIG_TR
-extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh,
- struct net_device *dev);
-#endif
+
/* function prototypes */
static void fix_up_incoming_skb(struct sk_buff *skb);

2002-07-10 16:41:24

by Frank Davis

[permalink] [raw]
Subject: Re: [PATCH] 2.5.25 : tr_source_route fix

Arnd,
I have a few questions regarding your patch. I don't see the line
you are removing from net/netsyms.c in 2.5.25 , and for
net/llc/llc_mac.c , I also don't see where trdevice.h would be included
to make the reference to tr_source_route . Thanks.

Regards,
Frank

Arnd Bergmann wrote:


> This declaration is not needed any more, since it now is in the header file. The other
> declaration in net/netsyms.c and net/llc/llc_mac.c should be removed as well.
> replacement patch follows.
>
> Arnd <><
>
> diff -u -r1.1.1.1 trdevice.h
> --- a/include/linux/trdevice.h 2002/03/13 19:33:11 1.1.1.1
> +++ b/include/linux/trdevice.h 2002/07/10 15:34:28
> @@ -33,6 +33,9 @@
> void *saddr, unsigned len);
> extern int tr_rebuild_header(struct sk_buff *skb);
> extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev);
> +extern void tr_source_route(struct sk_buff *skb,
> + struct trh_hdr *trh,
> + struct net_device *dev);
> extern struct net_device *init_trdev(struct net_device *dev, int sizeof_priv);
> extern struct net_device *alloc_trdev(int sizeof_priv);
> extern int register_trdev(struct net_device *dev);
> diff -u -r1.6 netsyms.c
> --- a/net/netsyms.c 2002/06/25 09:36:58 1.6
> +++ b/net/netsyms.c 2002/07/10 15:34:28
> @@ -444,8 +444,6 @@
> #endif /* CONFIG_INET */
>
> #if defined(CONFIG_TR) && defined(CONFIG_LLC)
> -extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh,
> - struct net_device *dev);
> EXPORT_SYMBOL(tr_source_route);
> EXPORT_SYMBOL(tr_type_trans);
> #endif
> diff -u -r1.3 tr.c
> --- a/net/802/tr.c 2002/05/27 12:33:18 1.3
> +++ b/net/802/tr.c 2002/07/10 15:34:28
> @@ -36,7 +36,6 @@
> #include <linux/init.h>
> #include <net/arp.h>
>
> -static void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
> static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev);
> static void rif_check_expire(unsigned long dummy);
>
> @@ -230,7 +229,7 @@
> * We try to do source routing...
> */
>
> -static void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
> +void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *dev)
> {
> int i, slack;
> unsigned int hash;
> diff -u -r1.1 llc_mac.c
> --- a/net/llc/llc_mac.c 2002/06/25 09:37:00 1.1
> +++ b/net/llc/llc_mac.c 2002/07/10 15:34:29
> @@ -25,10 +25,7 @@
> #include <net/llc_evnt.h>
> #include <net/llc_c_ev.h>
> #include <net/llc_s_ev.h>
> -#ifdef CONFIG_TR
> -extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh,
> - struct net_device *dev);
> -#endif
> +
> /* function prototypes */
> static void fix_up_incoming_skb(struct sk_buff *skb);
>


2002-07-11 07:43:50

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] 2.5.25 : tr_source_route fix

On Wednesday 10 July 2002 18:45, Frank Davis wrote:

> I have a few questions regarding your patch. I don't see the line
> you are removing from net/netsyms.c in 2.5.25 , and for
> net/llc/llc_mac.c , I also don't see where trdevice.h would be included
> to make the reference to tr_source_route . Thanks.

Sorry for the confusion, I was in the wrong branch of my repository when I did
the diff.
trdevice.h should be added to the includes in net/llc/llc_mac.c when removing
the declaration and net/netsyms.c does indeed not have that line.

Arnd <><

2002-07-11 13:56:46

by Frank Davis

[permalink] [raw]
Subject: Re: [PATCH] 2.5.25 : tr_source_route fix

Arnd,
Please post the 'correct' diff for inclusion. Thanks.

Regards,
Frank

Arnd Bergmann wrote:
> On Wednesday 10 July 2002 18:45, Frank Davis wrote:
>
>
>> I have a few questions regarding your patch. I don't see the line
>>you are removing from net/netsyms.c in 2.5.25 , and for
>>net/llc/llc_mac.c , I also don't see where trdevice.h would be included
>>to make the reference to tr_source_route . Thanks.
>
>
> Sorry for the confusion, I was in the wrong branch of my repository when I did
> the diff.
> trdevice.h should be added to the includes in net/llc/llc_mac.c when removing
> the declaration and net/netsyms.c does indeed not have that line.
>
> Arnd <><
>


2002-07-11 19:46:38

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] 2.5.25 : tr_source_route fix

On Thursday 11 July 2002 16:00, Frank Davis wrote:
> Please post the 'correct' diff for inclusion. Thanks.

Ok, here it is, diffed against latest bk and double checked.

Arnd <><

D: make Token Ring networking compile with LLC
===== include/linux/trdevice.h 1.2 vs edited =====
--- 1.2/include/linux/trdevice.h Tue Feb 5 08:38:37 2002
+++ edited/include/linux/trdevice.h Thu Jul 11 23:00:23 2002
@@ -33,6 +33,9 @@
void *saddr, unsigned len);
extern int tr_rebuild_header(struct sk_buff *skb);
extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device
*dev);
+extern void tr_source_route(struct sk_buff *skb,
+ struct trh_hdr *trh,
+ struct net_device *dev);
extern struct net_device *init_trdev(struct net_device *dev, int
sizeof_priv);
extern struct net_device *alloc_trdev(int sizeof_priv);
extern int register_trdev(struct net_device *dev);
===== net/802/tr.c 1.2 vs edited =====
--- 1.2/net/802/tr.c Wed May 22 20:16:37 2002
+++ edited/net/802/tr.c Thu Jul 11 23:00:24 2002
@@ -36,7 +36,6 @@
#include <linux/init.h>
#include <net/arp.h>

-static void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct
net_device *dev);
static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev);
static void rif_check_expire(unsigned long dummy);

@@ -230,7 +229,7 @@
* We try to do source routing...
*/

-static void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct
net_device *dev)
+void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct
net_device *dev)
{
int i, slack;
unsigned int hash;
===== net/llc/llc_mac.c 1.1 vs edited =====
--- 1.1/net/llc/llc_mac.c Fri May 31 02:35:09 2002
+++ edited/net/llc/llc_mac.c Thu Jul 11 23:01:00 2002
@@ -15,6 +15,7 @@
#include <linux/if_arp.h>
#include <linux/if_tr.h>
#include <linux/rtnetlink.h>
+#include <linux/trdevice.h>
#include <net/llc_if.h>
#include <net/llc_mac.h>
#include <net/llc_pdu.h>
@@ -25,10 +26,7 @@
#include <net/llc_evnt.h>
#include <net/llc_c_ev.h>
#include <net/llc_s_ev.h>
-#ifdef CONFIG_TR
-extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh,
- struct net_device *dev);
-#endif
+
/* function prototypes */
static void fix_up_incoming_skb(struct sk_buff *skb);