[Linux-decnet-user] RE: decnet patch
Brought to you by:
chrissie_c,
ph3-der-loewe
|
From: Mauricio M. <MM...@ex...> - 2000-07-21 20:23:03
|
Thanks for the patch.. It doesn't seem to look like a DAPFS patch though.
As I understand.. DecNET should be in the latest kernel. But no DAPFS
support. Strange.
Maybe I need to know what the newest working kernel & DAPFS combo is.
Thanks for your help,
Mauricio
-----Original Message-----
From: ecc [mailto:ec...@cy...]
Sent: July 21, 2000 3:07 PM
To: Mauricio Mejia
Subject: decnet patch
Mauricio,
Here is the last patch I have in my archive.
It should be in sourceforge somewhere.
Of course disregard if you already have it, as you can see
it is for decnet bug
fixes.
I did not see any reference to dapfs. And I will try it
tonight or tomorrow.
My system is back up (almost), eth0 only comes up when I
insmod the tulip.o
driver
So almost means no decnet yet, as I can not set the mac
address.
I compiled 2.3.42, 2.3.51 yesterday with the dapfs patch and
I do not get the
errors in your message.
I recall compiling the 2.3.42 with it when it was current
but, I can not recall
using dnmount.
Ed
----------------------------------------------------------------------------
-----
diff -r -u linux-2.4.0test1-ac21/include/net/dn.h
linux/include/net/dn.h
--- linux-2.4.0test1-ac21/include/net/dn.h Mon May 1
11:20:00 2000
+++ linux/include/net/dn.h Mon Jun 19 16:56:31 2000
@@ -6,8 +6,8 @@
typedef unsigned short dn_address;
-#define dn_ntohs(x) le16_to_cpu(x)
-#define dn_htons(x) cpu_to_le16(x)
+#define dn_ntohs(x) le16_to_cpu((unsigned short)(x))
+#define dn_htons(x) cpu_to_le16((unsigned short)(x))
struct dn_scp /* Session
Control Port */
{
diff -r -u linux-2.4.0test1-ac21/net/decnet/af_decnet.c
linux/net/decnet/af_decnet.c
--- linux-2.4.0test1-ac21/net/decnet/af_decnet.c Mon
May 1 11:20:06 2000
+++ linux/net/decnet/af_decnet.c Mon Jun 19 16:49:40
2000
@@ -285,7 +285,7 @@
switch(*fmt) {
case 0:
- sdn->sdn_objnum = dn_htons(type);
+ sdn->sdn_objnum = type;
return 2;
case 1:
namel = 16;
@@ -526,10 +526,6 @@
{
struct dn_scp *scp = &sk->protinfo.dn;
- if (sk->dead)
- return;
-
- sk->dead = 1;
scp->nsp_rxtshift = 0; /* reset back off */
if (sk->socket) {
@@ -661,11 +657,12 @@
struct sock *sk = sock->sk;
if (sk) {
+ sock_orphan(sk);
+ sock_hold(sk);
lock_sock(sk);
- sock->sk = NULL;
- sk->socket = NULL;
dn_destroy_sock(sk);
release_sock(sk);
+ sock_put(sk);
}
return 0;
diff -r -u linux-2.4.0test1-ac21/net/decnet/dn_neigh.c
linux/net/decnet/dn_neigh.c
--- linux-2.4.0test1-ac21/net/decnet/dn_neigh.c Fri Mar 3
11:02:06 2000
+++ linux/net/decnet/dn_neigh.c Sun Jun 18 19:16:03 2000
@@ -441,7 +441,7 @@
struct dn_dev *dn_db;
dn_address src;
- src = dn_eth2dn(msg->id);
+ src = dn_htons(dn_eth2dn(msg->id));
neigh = __neigh_lookup(&dn_neigh_table, &src,
skb->dev, 1);
@@ -498,7 +498,7 @@
struct dn_neigh *dn;
dn_address src;
- src = dn_eth2dn(msg->id);
+ src = dn_htons(dn_eth2dn(msg->id));
neigh = __neigh_lookup(&dn_neigh_table, &src,
skb->dev, 1);
diff -r -u linux-2.4.0test1-ac21/net/decnet/dn_route.c
linux/net/decnet/dn_route.c
--- linux-2.4.0test1-ac21/net/decnet/dn_route.c Fri May 12
10:07:22 2000
+++ linux/net/decnet/dn_route.c Mon Jun 19 16:54:00 2000
@@ -131,7 +131,7 @@
return dn_rt_hash_mask & (unsigned)tmp;
}
-static void dn_dst_check_expire(unsigned long dummy)
+static void SMP_TIMER_NAME(dn_dst_check_expire)(unsigned
long dummy)
{
int i;
struct dn_route *rt, **rtp;
@@ -142,10 +142,12 @@
rtp = &dn_rt_hash_table[i].chain;
write_lock(&dn_rt_hash_table[i].lock);
- for(;(rt=*rtp); rtp = &rt->u.rt_next) {
+ while((rt=*rtp) != NULL) {
if (atomic_read(&rt->u.dst.__refcnt)
||
- (now -
rt->u.dst.lastuse) < expire)
+ (now -
rt->u.dst.lastuse) < expire) {
+ rtp = &rt->u.rt_next;
continue;
+ }
*rtp = rt->u.rt_next;
rt->u.rt_next = NULL;
dst_free(&rt->u.dst);
@@ -156,10 +158,11 @@
break;
}
- dn_route_timer.expires = now +
decnet_dst_gc_interval * HZ;
- add_timer(&dn_route_timer);
+ mod_timer(&dn_route_timer, now +
decnet_dst_gc_interval * HZ);
}
+SMP_TIMER_DEFINE(dn_dst_check_expire, dn_dst_task);
+
static int dn_dst_gc(void)
{
struct dn_route *rt, **rtp;
@@ -172,10 +175,12 @@
write_lock_bh(&dn_rt_hash_table[i].lock);
rtp = &dn_rt_hash_table[i].chain;
- for(; (rt=*rtp); rtp = &rt->u.rt_next) {
+ while((rt=*rtp) != NULL) {
if (atomic_read(&rt->u.dst.__refcnt)
||
- (now -
rt->u.dst.lastuse) < expire)
+ (now -
rt->u.dst.lastuse) < expire) {
+ rtp = &rt->u.rt_next;
continue;
+ }
*rtp = rt->u.rt_next;
rt->u.rt_next = NULL;
dst_free(&rt->u.dst);
@@ -229,7 +234,7 @@
write_unlock_bh(&dn_rt_hash_table[hash].lock);
}
-void dn_run_flush(unsigned long dummy)
+void SMP_TIMER_NAME(dn_run_flush)(unsigned long dummy)
{
int i;
struct dn_route *rt, *next;
@@ -250,6 +255,8 @@
write_unlock_bh(&dn_rt_hash_table[i].lock);
}
}
+
+SMP_TIMER_DEFINE(dn_run_flush, dn_flush_task);
static spinlock_t dn_rt_flush_lock = SPIN_LOCK_UNLOCKED;
----------------------------------------------------------------------------
--------
Mauricio Mejia wrote:
> Well I've downloaded kernel 2.3.42 and applied the DAPFS
patch for that
> kernel. The final result was the kernel failing to
compile.
>
> I guess the patch messed up the compile.
>
> Here is a sample of the compile error.
>
> make -C dapfs
> make[2]: Entering directory `/tmp/linux-2.3.42/fs/dapfs'
> make all_targets
> make[3]: Entering directory `/tmp/linux-2.3.42/fs/dapfs'
> gcc -D__KERNEL__ -I/tmp/linux-2.3.42/include -D__SMP__
-Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -pipe
> -DCPU=586 -march=i586 -Wno-unused -Wno-unused -c -o
inode.o inode.c
> gcc -D__KERNEL__ -I/tmp/linux-2.3.42/include -D__SMP__
-Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -pipe
> -DCPU=586 -march=i586 -Wno-unused -Wno-unused -c -o
dir.o dir.c
> gcc -D__KERNEL__ -I/tmp/linux-2.3.42/include -D__SMP__
-Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -pipe
> -DCPU=586 -march=i586 -Wno-unused -Wno-unused -c -o
file.o file.c
> gcc -D__KERNEL__ -I/tmp/linux-2.3.42/include -D__SMP__
-Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -pipe
> -DCPU=586 -march=i586 -Wno-unused -Wno-unused -c -o
dap_functions.o
> dap_functions.c
> In file included from
/tmp/linux-2.3.42/include/net/dn.h:4,
> from
/tmp/linux-2.3.42/include/net/sock.h:81,
> from dap_functions.c:40:
> /tmp/linux-2.3.42/include/linux/dn.h:68: redefinition of
`struct dn_naddr'
> /tmp/linux-2.3.42/include/linux/dn.h:74: redefinition of
`struct
> sockaddr_dn'
> /tmp/linux-2.3.42/include/linux/dn.h:90: redefinition of
`struct optdata_dn'
> /tmp/linux-2.3.42/include/linux/dn.h:98: redefinition of
`struct
> accessdata_dn'
> In file included from
/tmp/linux-2.3.42/include/net/sock.h:81,
> from dap_functions.c:40:
> /tmp/linux-2.3.42/include/net/dn.h:13: redefinition of
`struct dn_scp'
> make[3]: *** [dap_functions.o] Error 1
> make[3]: Leaving directory `/tmp/linux-2.3.42/fs/dapfs'
> make[2]: *** [first_rule] Error 2
> make[2]: Leaving directory `/tmp/linux-2.3.42/fs/dapfs'
> make[1]: *** [_subdir_dapfs] Error 2
> make[1]: Leaving directory `/tmp/linux-2.3.42/fs'
>
> Any luck finding a newer DAPFS patch? Or anyone get this
one working?
>
> Thanks,
>
> Mauricio
>
> _______________________________________________
> Linux-decnet-user mailing list
> Lin...@li...
>
http://lists.sourceforge.net/mailman/listinfo/linux-decnet-user
|