2002-03-23 01:17:21

by Max Krasnyansky

[permalink] [raw]
Subject: [PATCH] Updated ATM patch for 2.4.19-pre4

Marcelo, Alan,

I updated ATM patch for 2.4.19-pre4. It includes couple of fixes that I
missed in my first patch
and includes ATM Ethernet bridging support (RFC2684) implemented by Marcell
GAL.
It is rather big for email. Here is the URL:
http://bluez.sourceforge.net/patches/atm.patch-2.4.19-pre4.gz

Please apply.
Thanks



Max

http://bluez.sf.net
http://vtun.sf.net


2002-03-23 01:59:40

by Mr. James W. Laferriere

[permalink] [raw]
Subject: Re: [PATCH] Updated ATM patch for 2.4.19-pre4


Hello Maksim & all , OOPS , Sorry . Make that ...

[email protected]

On Fri, 22 Mar 2002, Mr. James W. Laferriere wrote:
> Hello Maksim , Could you please also cc:
> [email protected]
> That is where the rest of the people that would be giving your
> patches a try listen . More at bottom . Tia , JimL

> On Fri, 22 Mar 2002, Maksim Krasnyanskiy wrote:
> > Marcelo, Alan,
> > I updated ATM patch for 2.4.19-pre4. It includes couple of fixes that I
> > missed in my first patch
> > and includes ATM Ethernet bridging support (RFC2684) implemented by Marcell
> > GAL.
> > It is rather big for email. Here is the URL:
> > http://bluez.sourceforge.net/patches/atm.patch-2.4.19-pre4.gz
> >
> > Please apply.
> > Thanks
> > Max
> >
> > http://bluez.sf.net
> > http://vtun.sf.net
> ^^^^^^^^^^^^^^^^^^ Cool !-) , IPSec available ?
>
> +------------------------------------------------------------------+
> | James W. Laferriere | System Techniques | Give me VMS |
> | Network Engineer | P.O. Box 854 | Give me Linux |
> | [email protected] | Coudersport PA 16915 | only on AXP |
> +------------------------------------------------------------------+
>
>

+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | P.O. Box 854 | Give me Linux |
| [email protected] | Coudersport PA 16915 | only on AXP |
+------------------------------------------------------------------+


2002-03-23 01:56:41

by Mr. James W. Laferriere

[permalink] [raw]
Subject: Re: [PATCH] Updated ATM patch for 2.4.19-pre4


Hello Maksim , Could you please also cc:
[email protected]
That is where the rest of the people that would be giving your
patches a try listen . More at bottom . Tia , JimL

On Fri, 22 Mar 2002, Maksim Krasnyanskiy wrote:
> Marcelo, Alan,
> I updated ATM patch for 2.4.19-pre4. It includes couple of fixes that I
> missed in my first patch
> and includes ATM Ethernet bridging support (RFC2684) implemented by Marcell
> GAL.
> It is rather big for email. Here is the URL:
> http://bluez.sourceforge.net/patches/atm.patch-2.4.19-pre4.gz
>
> Please apply.
> Thanks
> Max
>
> http://bluez.sf.net
> http://vtun.sf.net
^^^^^^^^^^^^^^^^^^ Cool !-) , IPSec available ?

+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | P.O. Box 854 | Give me Linux |
| [email protected] | Coudersport PA 16915 | only on AXP |
+------------------------------------------------------------------+

2002-03-23 21:12:28

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] Updated ATM patch for 2.4.19-pre4

Maksim Krasnyanskiy <[email protected]> :
[...]
> I updated ATM patch for 2.4.19-pre4. It includes couple of fixes that I
> missed in my first patch
> and includes ATM Ethernet bridging support (RFC2684) implemented by Marcell
> GAL.
> It is rather big for email. Here is the URL:
> http://bluez.sourceforge.net/patches/atm.patch-2.4.19-pre4.gz

1 - It won't compile with CONFIG_ATM_BR2684_IPFILTER=y (see error message
below). Suggested fix:
ed net/atm/br2684.c <<EOF
17a
#include <linux/ip.h>
.
wq
EOF

-> Error message:
make[2]: Entering directory `/tmp/romieu/kernel/linux-2.4.19-pre4/net/atm'
kgcc -D__KERNEL__ -I/tmp/romieu/kernel/linux-2.4.19-pre4/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
-fno-common -pipe -march=i686 -DMODULE -DKBUILD_BASENAME=br2684 -c -o
br2684.o br2684.c
br2684.c: In function `packet_fails_filter':
br2684.c:378: dereferencing pointer to incomplete type
make[2]: *** [br2684.o] Error 1
make[2]: Leaving directory `/tmp/romieu/kernel/linux-2.4.19-pre4/net/atm'
make[1]: *** [_modsubdir_atm] Error 2
make[1]: Leaving directory `/tmp/romieu/kernel/linux-2.4.19-pre4/net'
make: *** [_mod_net] Error 2

2 - As the patch does many things, splitting it in parts would be nice imho.

3 - I have on my TODO a 'please ifconfig down before killing br2684ctl' BUG
that Marcell Gal told me a few months ago (*spleen*). Did someone take care
of it ?

--
Ueimor

2002-03-24 21:07:34

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] Updated ATM patch for 2.4.19-pre4

[thread starts at:
http://www.cs.Helsinki.FI/linux/linux-kernel/2002-11/1311.html]

The following patch applies on top of Maksim's one. It:
- adds a missing include (hunk #1);
- turns a cast fiesta into the equivalent list_entry (hunk #2);
- unregisters net_device once it isn't needed for bridging (hunk #3);
- compiles and stands a kill-br2684ctl-before-ifconfig-down test: nas0
disappeared as it should.

Without the patch an oops happens, see:
<URL:http://www.cogenit.fr/linux/atm/oopses/text-6>

Comments welcome.

--- net/atm/br2684.c.orig Sat Mar 23 21:21:41 2002
+++ net/atm/br2684.c Sun Mar 24 21:42:30 2002
@@ -15,6 +15,7 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hun
#include <linux/etherdevice.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
+#include <linux/ip.h>
#include <linux/atmbr2684.h>

#include "ipcommon.h"
@@ -97,8 +98,7 @@ static LIST_HEAD(br2684_devs);

static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
{
- return (struct br2684_dev *) ((char *) (net_dev) -
- (unsigned long) (&((struct br2684_dev *) 0)->net_dev));
+ return list_entry(net_dev, struct br2684_dev, net_dev);
}

static inline struct br2684_dev *list_entry_brdev(const struct list_head *le)
@@ -410,6 +410,13 @@ static void br2684_push(struct atm_vcc *

if (skb == NULL) { /* skb==NULL means VCC is being destroyed */
br2684_close_vcc(brvcc);
+ if (list_empty(&brdev->brvccs)) {
+ read_lock(&devs_lock);
+ list_del(&brdev->br2684_devs);
+ read_unlock(&devs_lock);
+ unregister_netdev(&brdev->net_dev);
+ kfree(brdev);
+ }
return;
}

--
Ueimor

2002-03-25 21:55:10

by Max Krasnyansky

[permalink] [raw]
Subject: Re: [Linux-ATM-General] Re: [PATCH] Updated ATM patch for 2.4.19-pre4


>Comments welcome.
Looks ok to me.

> static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
> {
>- return (struct br2684_dev *) ((char *) (net_dev) -
>- (unsigned long) (&((struct br2684_dev *) 0)->net_dev));
>+ return list_entry(net_dev, struct br2684_dev, net_dev);
> }
Although list_entry does the same thing it's inappropriate here. People
will be confused.

Max