Re: [PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Adrian Bunk
On Mon, Dec 17, 2007 at 08:28:00PM -0800, Andrew Morton wrote:
>...
> I'd suggest that you find out if Adrian is still running the trivial tree
> and if so, patchbomb him.

I do.

Simply Cc [EMAIL PROTECTED] for trivial patches and they might 
magically appear in Linus' tree during the next merge window.  :)

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kvm-devel] [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-17 Thread Rusty Russell
On Tuesday 18 December 2007 16:30:08 Avi Kivity wrote:
> Rusty Russell wrote:
> > Yes, I pondered this when I wrote the code.  On the one hand, it's a
> > low-probability pathological corner case, on the other, your patch
> > reduces the number of timer reprograms in the normal case.
>
> One thing that came up in our discussions is to let the host do the
> timer processing instead of the guest.  When tx exit mitigation is
> enabled, the guest bumps the queue pointer, but carefully refrains from
> kicking the host.  The host polls the tx pointer using a timer, kicking
> itself periodically; if polling yields no packets it disables tx exit
> mitigation.  This saves the guest the bother of programming the timer,
> which presumably requires an exit if the timer is the closest one to
> expiration.
>
> [btw, this can be implemented in virtqueue rather than virtio-net, no?]

Yes, the current patch is a hack (look at the hardcoded constant); wanted to 
see how much it helps, if any.

More sophisticated timer management would be a definite win... funny, I have a 
patch here which helps that

Rusty.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHES 0/5]: DCCP patches for 2.6.25

2007-12-17 Thread David Miller
From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 13:00:14 -0200

>   Please consider pulling from:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25

Pulled and pushed out, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sysctl: Fix ax25 checks

2007-12-17 Thread David Miller
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Mon, 17 Dec 2007 15:44:08 -0700

> Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>

Applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'upstream-davem' branch of wireless-2.6

2007-12-17 Thread David Miller
From: "John W. Linville" <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 15:55:40 -0500

> A few more patches for 2.6.25...  Note that there are a few one-line
> patches to some drivers to support a new flag used for timestamps in
> radiotap headers for mac80211, and a couple others related to the new
> scan capabilities stuff added to WEXT in order to better support hidden
> SSIDs for wpa_supplicant/NetworkManager.  I'll CC Jeff as well...
> 
> Let me know if there are any problems!

Also pulled, thanks John.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'fixes-davem' branch of wireless-2.6

2007-12-17 Thread David Miller
From: "John W. Linville" <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 15:54:54 -0500

> A few more small fixes for 2.6.24.  Let me know if there are any
> problems!

Pulled, thanks John.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-17 Thread Rusty Russell
On Friday 14 December 2007 05:30:31 Christian Borntraeger wrote:
> Rusty, if you decide to apply my patch, there is one downside: The
> debugging code in virtio_ring sometimes triggers with a false positive:
>
> try_fill_recv calls vring_kick. Here we do a notify to the host. This might
> cause an immediate interrupt, triggering the poll routine before vring_kick
> can run END_USE. This is no real problem, as we dont touch the vq after
> notify.

Hmm, how about we just do something like this?  (needs previous enable_cb
patch)

> Christian, facing 64 guest cpus unconvering all kind of races

Heroic is the word which comes to mind... :)

Cheers,
Rusty.
---
virtio: flush buffers on open

Fix bug found by Christian Borntraeger: if the other side fills all
the registered network buffers before we enable NAPI, we will never
get an interrupt.  The simplest fix is to process the input queue once
on open.

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>

diff -r 1dd61213039c drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c  Tue Dec 18 17:34:18 2007 +1100
+++ b/drivers/net/virtio_net.c  Tue Dec 18 17:47:39 2007 +1100
@@ -326,6 +326,13 @@ static int virtnet_open(struct net_devic
return -ENOMEM;
 
napi_enable(&vi->napi);
+
+   /* If all buffers were filled by other side before we napi_enabled, we
+* won't get another interrupt, so process any outstanding packets
+* now.  virtnet_poll wants re-enable the queue, so we disable here. */
+   vi->rvq->vq_ops->disable_cb(vi->rvq);
+   netif_rx_schedule(vi->dev, &vi->napi);
+
return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] NET: Fix function put_cmsg() which may cause usr application memory overflow

2007-12-17 Thread Wei Yongjun
When used function put_cmsg() to copy kernel information to user 
application memory, if the memory length given by user application is 
not enough, by the bad length calculate of msg.msg_controllen, 
put_cmsg() function may cause the msg.msg_controllen to be a large 
value, such as 0xFFF0, so the following put_cmsg() can also write 
data to usr application memory even usr has no valid memory to store 
this. This may cause usr application memory overflow.


int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{
   struct cmsghdr __user *cm
   = (__force struct cmsghdr __user *)msg->msg_control;
   struct cmsghdr cmhdr;
   int cmlen = CMSG_LEN(len);
   ~
   int err;

   if (MSG_CMSG_COMPAT & msg->msg_flags)
   return put_cmsg_compat(msg, level, type, len, data);

   if (cm==NULL || msg->msg_controllen < sizeof(*cm)) {
   msg->msg_flags |= MSG_CTRUNC;
   return 0; /* XXX: return error? check spec. */
   }
   if (msg->msg_controllen < cmlen) {
   
   msg->msg_flags |= MSG_CTRUNC;
   cmlen = msg->msg_controllen;
   }
   cmhdr.cmsg_level = level;
   cmhdr.cmsg_type = type;
   cmhdr.cmsg_len = cmlen;

   err = -EFAULT;
   if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
   goto out;
   if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr)))
   goto out;
   cmlen = CMSG_SPACE(len);
~~~
   If MSG_CTRUNC flags is set, msg->msg_controllen is less than 
CMSG_SPACE(len), "msg->msg_controllen -= cmlen" will cause unsinged int 
type msg->msg_controllen to be a large value.

~~~
   msg->msg_control += cmlen;
   msg->msg_controllen -= cmlen;
   ~
   err = 0;
out:
   return err;
}

The same promble exists in put_cmsg_compat(). This patch can fix this 
problem.


Signed-off-by: Wei Yongjun <[EMAIL PROTECTED]>

--- a/net/core/scm.c2007-12-11 08:41:57.0 -0500
+++ b/net/core/scm.c2007-12-11 12:10:25.0 -0500
@@ -196,6 +196,8 @@ int put_cmsg(struct msghdr * msg, int le
if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr)))
goto out;
cmlen = CMSG_SPACE(len);
+   if (msg->msg_controllen < cmlen)
+   cmlen = msg->msg_controllen;
msg->msg_control += cmlen;
msg->msg_controllen -= cmlen;
err = 0;
--- a/net/compat.c  2007-12-11 12:10:32.0 -0500
+++ b/net/compat.c  2007-12-11 12:11:08.0 -0500
@@ -254,6 +254,8 @@ int put_cmsg_compat(struct msghdr *kmsg,
if (copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct 
compat_cmsghdr)))
return -EFAULT;
cmlen = CMSG_COMPAT_SPACE(len);
+   if (kmsg->msg_controllen < cmlen)
+   cmlen = kmsg->msg_controllen;
kmsg->msg_control += cmlen;
kmsg->msg_controllen -= cmlen;
return 0;





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: init_timer_deferrable conversion

2007-12-17 Thread Parag Warudkar
On Dec 17, 2007 9:29 AM, Eric Dumazet <[EMAIL PROTECTED]> wrote:
> Parag, could you please try this patch ?
>
> [NET] ARP : Convert neigh garbage collection from softirq to workqueue
>

I will - a little later.

Thanks

Parag
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [kvm-devel] [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-17 Thread Avi Kivity

Rusty Russell wrote:

On Wednesday 12 December 2007 23:54:00 Dor Laor wrote:
  

commit 763769621d271d92204ed27552d75448587c1ac0
Author: Dor Laor <[EMAIL PROTECTED]>
Date:   Wed Dec 12 14:52:00 2007 +0200

[virtio-net][PATCH] Don't arm tx hrtimer with a constant 50us each
transmit

The current start_xmit sets 500us hrtimer to kick the host.
The problem is that if another xmit happens before the timer was
fired then
the first xmit will have to wait additional 500us.
This patch does not re-arm the timer if there is existing one.
This will shorten the latency for tx.



Hi Dor!

Yes, I pondered this when I wrote the code.  On the one hand, it's a 
low-probability pathological corner case, on the other, your patch reduces 
the number of timer reprograms in the normal case.
  


One thing that came up in our discussions is to let the host do the 
timer processing instead of the guest.  When tx exit mitigation is 
enabled, the guest bumps the queue pointer, but carefully refrains from 
kicking the host.  The host polls the tx pointer using a timer, kicking 
itself periodically; if polling yields no packets it disables tx exit 
mitigation.  This saves the guest the bother of programming the timer, 
which presumably requires an exit if the timer is the closest one to 
expiration.


[btw, this can be implemented in virtqueue rather than virtio-net, no?]

--
Any sufficiently difficult bug is indistinguishable from a feature.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Joe Perches
On Mon, 2007-12-17 at 20:28 -0800, Andrew Morton wrote:
> Please: just replace all instances with plain old "Adam Fritzler" and then
> ensure that the lookup key "Adam Fritzler" has an accurate (and
> non-duplicated anywhere else!) entry in MAINTAINERS or CREDITS or whatever.

Sure.  See new patch below

> btw, I cheerfully skipped all your spelling-fixes patches.

No worries.  I was just avoiding doing useful stuff.

> Some will have
> stuck via subsystem maintainers but I have a secret "no spelling fixes
> unless they're end-user-visible" policy.

I think there were 15-20 printks in that lot.
Do you want them separately?

> I'd suggest that you find out if Adrian is still running the trivial tree
> and if so, patchbomb him.

OK.  Adrian?  Do you want the spelling fixes?

Back to Adam Fritzler...

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 CREDITS  |3 +++
 MAINTAINERS  |7 ---
 drivers/net/eexpress.c   |2 +-
 drivers/net/tokenring/abyss.c|2 +-
 drivers/net/tokenring/abyss.h|2 +-
 drivers/net/tokenring/madgemc.c  |2 +-
 drivers/net/tokenring/madgemc.h  |2 +-
 drivers/net/tokenring/proteon.c  |2 +-
 drivers/net/tokenring/skisa.c|2 +-
 drivers/net/tokenring/tms380tr.c |2 +-
 drivers/net/tokenring/tms380tr.h |2 +-
 drivers/net/tokenring/tmspci.c   |2 +-
 drivers/scsi/aha1542.c   |2 +-
 13 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/CREDITS b/CREDITS
index ee909f2..449ec7f 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1124,6 +1124,9 @@ S: 1150 Ringwood Court
 S: San Jose, California 95131
 S: USA
 
+N: Adam Fritzler
+E: [EMAIL PROTECTED]
+
 N: Fernando Fuganti
 E: [EMAIL PROTECTED]
 E: [EMAIL PROTECTED]
diff --git a/MAINTAINERS b/MAINTAINERS
index 9507b42..690f172 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3758,13 +3758,6 @@ W:   
http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
 T: git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git
 S: Maintained
 
-TMS380 TOKEN-RING NETWORK DRIVER
-P: Adam Fritzler
-M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
-W: http://www.auk.cx/tms380tr/
-S: Maintained
-
 TULIP NETWORK DRIVER
 L: [EMAIL PROTECTED]
 W: http://sourceforge.net/projects/tulip/
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 70509ed..283fc8f 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -9,7 +9,7 @@
  * Many modifications, and currently maintained, by
  *  Philip Blundell <[EMAIL PROTECTED]>
  * Added the Compaq LTE  Alan Cox <[EMAIL PROTECTED]>
- * Added MCA support Adam Fritzler <[EMAIL PROTECTED]>
+ * Added MCA support Adam Fritzler
  *
  * Note - this driver is experimental still - it has problems on faster
  * machines. Someone needs to sit down and go through it line by line with
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
index 124cfd4..7a7de04 100644
--- a/drivers/net/tokenring/abyss.c
+++ b/drivers/net/tokenring/abyss.c
@@ -10,7 +10,7 @@
  *  - Madge Smart 16/4 PCI Mk2
  *
  *  Maintainer(s):
- *AF   Adam Fritzler   [EMAIL PROTECTED]
+ *AF   Adam Fritzler
  *
  *  Modification History:
  * 30-Dec-99   AF  Split off from the tms380tr driver.
diff --git a/drivers/net/tokenring/abyss.h b/drivers/net/tokenring/abyss.h
index 0ee6e4f..b0a473b 100644
--- a/drivers/net/tokenring/abyss.h
+++ b/drivers/net/tokenring/abyss.h
@@ -2,7 +2,7 @@
  * abyss.h: Header for the abyss tms380tr module
  *
  * Authors:
- * - Adam Fritzler <[EMAIL PROTECTED]>
+ * - Adam Fritzler
  */
 
 #ifndef __LINUX_MADGETR_H
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 5a41513..c9c5a2b 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -11,7 +11,7 @@
  * - Madge Smart 16/4 Ringnode MC32 (??)
  *
  *  Maintainer(s):
- *AF   Adam Fritzler   [EMAIL PROTECTED]
+ *AF   Adam Fritzler
  *
  *  Modification History:
  * 16-Jan-00   AF  Created
diff --git a/drivers/net/tokenring/madgemc.h b/drivers/net/tokenring/madgemc.h
index 2dd8222..fe88e27 100644
--- a/drivers/net/tokenring/madgemc.h
+++ b/drivers/net/tokenring/madgemc.h
@@ -2,7 +2,7 @@
  * madgemc.h: Header for the madgemc tms380tr module
  *
  * Authors:
- * - Adam Fritzler <[EMAIL PROTECTED]>
+ * - Adam Fritzler
  */
 
 #ifndef __LINUX_MADGEMC_H
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index ca6b659..00ea945 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -12,7 +12,7 @@
  * - Proteon 1392, 1392+
  *
  *  Maintainer(s):
- *AFAdam Fritzler   [EMAIL PROTECTED]
+ *AFAdam Fritzler
  *JF   Jochen Friedrich[EMAIL PROTECTED]
  *
  *  Modification History:
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
index 32e8d5a..

Re: [PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Andrew Morton
On Mon, 17 Dec 2007 20:12:06 -0800 Joe Perches <[EMAIL PROTECTED]> wrote:

> Adam isn't a maintainer anymore.
> His old email address bounces.
> Update to new email address.
> 
> On Mon, Dec 17, 2007 at 01:03:48PM -0800, Joe Perches wrote:
> > > You seem to have an old email address in the
> > > linux-kernel MAINTAINERS file.
> > > Should it be deleted or changed?
> On Mon, 2007-12-17 at 19:27 -0800, Adam Fritzler wrote:
> > I am no longer actively involved. If you can mark me as a former point
> > of contact, that's fine, or you can just delete the entry. My name is
> > still in the source, but with the old address. It'd great if the
> > address in source was updated.
> 
> ...
>  
> -TMS380 TOKEN-RING NETWORK DRIVER
> -P:   Adam Fritzler
> -M:   [EMAIL PROTECTED]
> -L:   [EMAIL PROTECTED]
> -W:   http://www.auk.cx/tms380tr/
> -S:   Maintained
>
> ...
>
> - * Added MCA support Adam Fritzler <[EMAIL PROTECTED]>
> + * Added MCA support Adam Fritzler <[EMAIL PROTECTED]>

This is fairly pointless - it'll just break again when Adam moves again.

Every problem can be solved with another layer of...

Please: just replace all instances with plain old "Adam Fritzler" and then
ensure that the lookup key "Adam Fritzler" has an accurate (and
non-duplicated anywhere else!) entry in MAINTAINERS or CREDITS or whatever.



btw, I cheerfully skipped all your spelling-fixes patches.  Some will have
stuck via subsystem maintainers but I have a secret "no spelling fixes
unless they're end-user-visible" policy.  That means I'll take spelling
fixes only if they're in printks or in Documentation/*.  This is a little
defense mechanism to avoid getting buried in micropatches.

I'd suggest that you find out if Adrian is still running the trivial tree
and if so, patchbomb him.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] mac80211: clean up frame receive handling

2007-12-17 Thread Jouni Malinen
On Fri, Dec 14, 2007 at 01:14:03PM +0100, Johannes Berg wrote:

> I think in theory all eapol frames are sent to the PAE group address,
> but I have no idea which of the checks would be more efficient. It seems
> that the first could be optimised a lot because it's constant too...

They are not.. PAE group address is used for all EAPOL frames in
non-shared media LANs (e.g., wired Ethernet switch), but IEEE 802.11
uses the specific MAC address of the PAE since it is a shared media LAN
(i.e., the frames are between the unicast MAC address of the non-AP
STA/Supplicant and AP/Authenticator). If we end up having to drop the
PAE group addressed EAPOL frames in mac80211 anyway due to Linux
bridging code not doing this, we could combine these two validations and
just accept the unicast MAC address of the device itself as a valid
destination address for received EAPOL frames (and as the only valid
source address for transmitted ones).

-- 
Jouni MalinenPGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] mac80211: clean up frame receive handling

2007-12-17 Thread Jouni Malinen
On Fri, Dec 14, 2007 at 01:13:05PM +0100, Johannes Berg wrote:
> > Is there any way for an user space application to figure out whether a
> > received EAPOL frame was encrypted? In theory, WPA/WPA2 Authenticators
> > (e.g., hostapd) should verify that the frame was encrypted if pairwise
> > keys are set (whereas IEEE 802.1X Authenticator accepts unencrypted
> > EAPOL frames).
> 
> Unfortunately not. Does that really matter? It seems that the
> verification whether the frame was encrypted would either be "always
> require encryption when pairwise keys in use" (which this patch doesn't
> do right now but could trivially be done) or simply "don't care since it
> doesn't really matter".

In theory, yes, this does matter and the implementation does not comply
with the standard if we do not verify this for WPA/WPA2/IEEE 802.11 RSN.
However, I do not believe there is any real security issue in not doing
so and even worse, some client implementations end up using unencrypted
EAPOL frames when they should really be encrypted..

hostapd has a place in the implementation where this information could
be processed, but I did not actually ever enable such validation because
of the potential interoperability issues. Likewise, wpa_supplicant does
not validate this either.

In other words, this would be kind of nice to have feature in the kernel
interface, but not really something that would be strictly required from
security view point.

> > Did you/someone already verify that the Linux bridge code does not
> > bridge EAPOL frames? The use of a separate interface for this removed
> > the need for doing such filtering based on ethertype, but with EAPOL
> > frames using the same netdev with other data frames, the bridge code
> > should filter these out (mainly the PAE group addressed ones, but if I
> > remember correctly, IEEE 802.1X specified all frames using EAPOL
> > ethertype not to be bridged).
> 
> Actually, 802.1X doesn't specify that, as I said previously it
> *recommends* it in C.3.3 (not C.1.1 as the 802.11 specs lead you to
> believe). Also, a patch to do this was rejected by Stephen Hemminger, so
> I decided to only pass up EAPOL frames that are either for our own
> unicast address or the link-local eapol address, both of which won't be
> bridged.

It is a "must" requirement, but apparently only in informative clause of
IEEE 802.1X. However, this is a real issue and if the bridging code
cannot be changed to do this, so dropping multicast/broadcast EAPOL
frames in mac80211 (in both RX and TX direction) sounds reasonable
workaround to prevent cases where wireless clients could otherwise mess
with other IEEE 802.1X authentications (e.g., for the wired port of an
AP).


PS.

I added the C.3.3 vs. C.1.1 issue to my pending comments for the next
IEEE 802.11 maintenance task group (TGmb). Should you find any other
issues with IEEE Std 802.11-2007, I can add them to that list so that
they can eventually be fixed.

-- 
Jouni MalinenPGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Joe Perches
Adam isn't a maintainer anymore.
His old email address bounces.
Update to new email address.

On Mon, Dec 17, 2007 at 01:03:48PM -0800, Joe Perches wrote:
> > You seem to have an old email address in the
> > linux-kernel MAINTAINERS file.
> > Should it be deleted or changed?
On Mon, 2007-12-17 at 19:27 -0800, Adam Fritzler wrote:
> I am no longer actively involved. If you can mark me as a former point
> of contact, that's fine, or you can just delete the entry. My name is
> still in the source, but with the old address. It'd great if the
> address in source was updated.

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 MAINTAINERS  |7 ---
 drivers/net/eexpress.c   |2 +-
 drivers/net/tokenring/abyss.c|2 +-
 drivers/net/tokenring/abyss.h|2 +-
 drivers/net/tokenring/madgemc.c  |2 +-
 drivers/net/tokenring/madgemc.h  |2 +-
 drivers/net/tokenring/proteon.c  |2 +-
 drivers/net/tokenring/skisa.c|2 +-
 drivers/net/tokenring/tms380tr.c |2 +-
 drivers/net/tokenring/tms380tr.h |2 +-
 drivers/net/tokenring/tmspci.c   |2 +-
 drivers/scsi/aha1542.c   |2 +-
 12 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9507b42..690f172 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3758,13 +3758,6 @@ W:   
http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
 T: git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git
 S: Maintained
 
-TMS380 TOKEN-RING NETWORK DRIVER
-P: Adam Fritzler
-M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
-W: http://www.auk.cx/tms380tr/
-S: Maintained
-
 TULIP NETWORK DRIVER
 L: [EMAIL PROTECTED]
 W: http://sourceforge.net/projects/tulip/
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 70509ed..46c3c99 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -9,7 +9,7 @@
  * Many modifications, and currently maintained, by
  *  Philip Blundell <[EMAIL PROTECTED]>
  * Added the Compaq LTE  Alan Cox <[EMAIL PROTECTED]>
- * Added MCA support Adam Fritzler <[EMAIL PROTECTED]>
+ * Added MCA support Adam Fritzler <[EMAIL PROTECTED]>
  *
  * Note - this driver is experimental still - it has problems on faster
  * machines. Someone needs to sit down and go through it line by line with
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
index 124cfd4..be60792 100644
--- a/drivers/net/tokenring/abyss.c
+++ b/drivers/net/tokenring/abyss.c
@@ -10,7 +10,7 @@
  *  - Madge Smart 16/4 PCI Mk2
  *
  *  Maintainer(s):
- *AF   Adam Fritzler   [EMAIL PROTECTED]
+ *AF   Adam Fritzler   [EMAIL PROTECTED]
  *
  *  Modification History:
  * 30-Dec-99   AF  Split off from the tms380tr driver.
diff --git a/drivers/net/tokenring/abyss.h b/drivers/net/tokenring/abyss.h
index 0ee6e4f..93376e1 100644
--- a/drivers/net/tokenring/abyss.h
+++ b/drivers/net/tokenring/abyss.h
@@ -2,7 +2,7 @@
  * abyss.h: Header for the abyss tms380tr module
  *
  * Authors:
- * - Adam Fritzler <[EMAIL PROTECTED]>
+ * - Adam Fritzler <[EMAIL PROTECTED]>
  */
 
 #ifndef __LINUX_MADGETR_H
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 5a41513..b7c819f 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -11,7 +11,7 @@
  * - Madge Smart 16/4 Ringnode MC32 (??)
  *
  *  Maintainer(s):
- *AF   Adam Fritzler   [EMAIL PROTECTED]
+ *AF   Adam Fritzler   [EMAIL PROTECTED]
  *
  *  Modification History:
  * 16-Jan-00   AF  Created
diff --git a/drivers/net/tokenring/madgemc.h b/drivers/net/tokenring/madgemc.h
index 2dd8222..b368e59 100644
--- a/drivers/net/tokenring/madgemc.h
+++ b/drivers/net/tokenring/madgemc.h
@@ -2,7 +2,7 @@
  * madgemc.h: Header for the madgemc tms380tr module
  *
  * Authors:
- * - Adam Fritzler <[EMAIL PROTECTED]>
+ * - Adam Fritzler <[EMAIL PROTECTED]>
  */
 
 #ifndef __LINUX_MADGEMC_H
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index ca6b659..8fece14 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -12,7 +12,7 @@
  * - Proteon 1392, 1392+
  *
  *  Maintainer(s):
- *AFAdam Fritzler   [EMAIL PROTECTED]
+ *AFAdam Fritzler   [EMAIL PROTECTED]
  *JF   Jochen Friedrich[EMAIL PROTECTED]
  *
  *  Modification History:
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
index 32e8d5a..74eae3c 100644
--- a/drivers/net/tokenring/skisa.c
+++ b/drivers/net/tokenring/skisa.c
@@ -13,7 +13,7 @@
  * - SysKonnect TR4/16(+) ISA  (SK-4190)
  *
  *  Maintainer(s):
- *AFAdam Fritzler   [EMAIL PROTECTED]
+ *AFAdam Fritzler   [EMAIL PROTECTED]
  *JF   Jochen Friedrich[EMAIL PROTECTED]
  *
  *  Modification History:
diff --git a/drivers/net/toke

Re: "ip neigh show" not showing arp cache entries?

2007-12-17 Thread Herbert Xu
Chris Friesen <[EMAIL PROTECTED]> wrote:
>
> However, if I specifically try to print out one of the missing entries, 
> it shows up:
> 
> [EMAIL PROTECTED]:/root> /tmp/ip neigh show 192.168.24.81
> 192.168.24.81 dev bond2 lladdr 00:01:af:14:e9:8a REACHABLE

What about

ip -4 neigh show

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.25 1/2]S2io: Fixes to enable multiple transmit fifo support

2007-12-17 Thread Jeff Garzik

Ramkrishna Vepa wrote:

Fixes to enable multiple transmit fifos (upto a maximum of eight).
  - Moved single tx_lock from struct s2io_nic to struct fifo_info.
  - Moved single ufo_in_band_v structure from struct s2io_nic to struct 
fifo_info.
  - Assign the respective interrupt number for the transmitting fifo in the 
transmit descriptor (TXD).

- Added boundary checks for number of FIFOs enabled and FIFO length.

Signed-off-by: Surjit Reang <[EMAIL PROTECTED]>
Signed-off-by: Sreenivasa Honnur <[EMAIL PROTECTED]>
Signed-off-by: Ramkrishna Vepa <[EMAIL PROTECTED]>


applied 1-2 to #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: iwlwifi: fix-up merge fall-out after namespace separation

2007-12-17 Thread Jeff Garzik

John W. Linville wrote:
drivers/net/wireless/iwlwifi/iwl3945-base.c: In function 
‘iwl3945_alive_start’:
drivers/net/wireless/iwlwifi/iwl3945-base.c:6285: error: implicit 
declaration of function ‘iwl_rate_control_unregister’

make[4]: *** [drivers/net/wireless/iwlwifi/iwl3945-base.o] Error 1
make[3]: *** [drivers/net/wireless/iwlwifi] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2


Signed-off-by: John W. Linville <[EMAIL PROTECTED]>


applied, thanks


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2 2.6.25] cxgb3 - parity initialization for T3C adapters.

2007-12-17 Thread Jeff Garzik

Divy Le Ray wrote:

From: Divy Le Ray <[EMAIL PROTECTED]>

Add parity initialization for T3C adapters.

Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]>


applied 1-2 to #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


iwlwifi: fix-up merge fall-out after namespace separation

2007-12-17 Thread John W. Linville
> drivers/net/wireless/iwlwifi/iwl3945-base.c: In function 
> ‘iwl3945_alive_start’:
> drivers/net/wireless/iwlwifi/iwl3945-base.c:6285: error: implicit 
> declaration of function ‘iwl_rate_control_unregister’
> make[4]: *** [drivers/net/wireless/iwlwifi/iwl3945-base.o] Error 1
> make[3]: *** [drivers/net/wireless/iwlwifi] Error 2
> make[2]: *** [drivers/net/wireless] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2

Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c 
b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 42f6623..88cf035 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4859,7 +4859,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
/* Queue restart only if RF_KILL switch was set to "kill"
 *   when we loaded driver, and is now set to "enable".
 * After we're Alive, RF_KILL gets handled by
-*   iwl_rx_card_state_notif() */
+*   iwl3945_rx_card_state_notif() */
if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
clear_bit(STATUS_RF_KILL_HW, &priv->status);
queue_work(priv->workqueue, &priv->restart);
@@ -6282,7 +6282,7 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
mutex_lock(&priv->mutex);
 
if (rc) {
-   iwl_rate_control_unregister(priv->hw);
+   iwl3945_rate_control_unregister(priv->hw);
IWL_ERROR("Failed to register network "
  "device (error %d)\n", rc);
return;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c 
b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 0dfc1ac..df6f3b1 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5229,7 +5229,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
/* Queue restart only if RF_KILL switch was set to "kill"
 *   when we loaded driver, and is now set to "enable".
 * After we're Alive, RF_KILL gets handled by
-*   iwl_rx_card_state_notif() */
+*   iwl4965_rx_card_state_notif() */
if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
clear_bit(STATUS_RF_KILL_HW, &priv->status);
queue_work(priv->workqueue, &priv->restart);
@@ -6695,7 +6695,7 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)
mutex_lock(&priv->mutex);
 
if (rc) {
-   iwl_rate_control_unregister(priv->hw);
+   iwl4965_rate_control_unregister(priv->hw);
IWL_ERROR("Failed to register network "
  "device (error %d)\n", rc);
return;
-- 
John W. Linville
[EMAIL PROTECTED]
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [git patches] net driver fixes

2007-12-17 Thread Divy Le Ray





The last thing I have from you, in netdev#upstream, is

commit 75758e8aa4b7d5c651261ce653dd8d0b716e1eda
Author: Divy Le Ray <[EMAIL PROTECTED]>
Date:   Wed Dec 5 10:15:01 2007 -0800

 cxgb3 - T3C support update

 Update GPIO mapping for T3C.
 Update xgmac for T3C support.
 Fix typo in mtu table.

and there's nothing in my inbox.

So if that is not the change you want, yes, please do resend.



Okay, I just resent. You originally attempted to apply these patches to 
the #upstream-fixes branch,
which failed for the 2 patches i just reposted. I guess it is why 
they're no longer in your inbox.


Cheers,
Divy

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2 2.6.25] cxgb3 - parity initialization for T3C adapters.

2007-12-17 Thread Divy Le Ray
From: Divy Le Ray <[EMAIL PROTECTED]>

Add parity initialization for T3C adapters.

Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]>
---

 drivers/net/cxgb3/adapter.h   |1 
 drivers/net/cxgb3/cxgb3_main.c|   82 
 drivers/net/cxgb3/cxgb3_offload.c |   15 ++
 drivers/net/cxgb3/regs.h  |  248 +
 drivers/net/cxgb3/sge.c   |   24 +++-
 drivers/net/cxgb3/t3_hw.c |  131 +---
 6 files changed, 472 insertions(+), 29 deletions(-)

diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index 60a62f5..eb305a0 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -71,6 +71,7 @@ enum {/* adapter flags */
USING_MSI = (1 << 1),
USING_MSIX = (1 << 2),
QUEUES_BOUND = (1 << 3),
+   TP_PARITY_INIT = (1 << 4),
 };
 
 struct fl_pg_chunk {
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 944423c..d1aa777 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -306,6 +306,77 @@ static int request_msix_data_irqs(struct adapter *adap)
return 0;
 }
 
+static int await_mgmt_replies(struct adapter *adap, unsigned long init_cnt,
+ unsigned long n)
+{
+   int attempts = 5;
+
+   while (adap->sge.qs[0].rspq.offload_pkts < init_cnt + n) {
+   if (!--attempts)
+   return -ETIMEDOUT;
+   msleep(10);
+   }
+   return 0;
+}
+
+static int init_tp_parity(struct adapter *adap)
+{
+   int i;
+   struct sk_buff *skb;
+   struct cpl_set_tcb_field *greq;
+   unsigned long cnt = adap->sge.qs[0].rspq.offload_pkts;
+
+   t3_tp_set_offload_mode(adap, 1);
+
+   for (i = 0; i < 16; i++) {
+   struct cpl_smt_write_req *req;
+
+   skb = alloc_skb(sizeof(*req), GFP_KERNEL | __GFP_NOFAIL);
+   req = (struct cpl_smt_write_req *)__skb_put(skb, sizeof(*req));
+   memset(req, 0, sizeof(*req));
+   req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+   OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SMT_WRITE_REQ, i));
+   req->iff = i;
+   t3_mgmt_tx(adap, skb);
+   }
+
+   for (i = 0; i < 2048; i++) {
+   struct cpl_l2t_write_req *req;
+
+   skb = alloc_skb(sizeof(*req), GFP_KERNEL | __GFP_NOFAIL);
+   req = (struct cpl_l2t_write_req *)__skb_put(skb, sizeof(*req));
+   memset(req, 0, sizeof(*req));
+   req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+   OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, i));
+   req->params = htonl(V_L2T_W_IDX(i));
+   t3_mgmt_tx(adap, skb);
+   }
+
+   for (i = 0; i < 2048; i++) {
+   struct cpl_rte_write_req *req;
+
+   skb = alloc_skb(sizeof(*req), GFP_KERNEL | __GFP_NOFAIL);
+   req = (struct cpl_rte_write_req *)__skb_put(skb, sizeof(*req));
+   memset(req, 0, sizeof(*req));
+   req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+   OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_RTE_WRITE_REQ, i));
+   req->l2t_idx = htonl(V_L2T_W_IDX(i));
+   t3_mgmt_tx(adap, skb);
+   }
+
+   skb = alloc_skb(sizeof(*greq), GFP_KERNEL | __GFP_NOFAIL);
+   greq = (struct cpl_set_tcb_field *)__skb_put(skb, sizeof(*greq));
+   memset(greq, 0, sizeof(*greq));
+   greq->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
+   OPCODE_TID(greq) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, 0));
+   greq->mask = cpu_to_be64(1);
+   t3_mgmt_tx(adap, skb);
+
+   i = await_mgmt_replies(adap, cnt, 16 + 2048 + 2048 + 1);
+   t3_tp_set_offload_mode(adap, 0);
+   return i;
+}
+
 /**
  * setup_rss - configure RSS
  * @adap: the adapter
@@ -817,6 +888,7 @@ static int cxgb_up(struct adapter *adap)
if (err)
goto out;
 
+   t3_set_reg_field(adap, A_TP_PARA_REG5, 0, F_RXDDPOFFINIT);
t3_write_reg(adap, A_ULPRX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12));
 
err = setup_sge_qsets(adap);
@@ -856,6 +928,16 @@ static int cxgb_up(struct adapter *adap)
t3_sge_start(adap);
t3_intr_enable(adap);
 
+   if (adap->params.rev >= T3_REV_C && !(adap->flags & TP_PARITY_INIT) &&
+   is_offload(adap) && init_tp_parity(adap) == 0)
+   adap->flags |= TP_PARITY_INIT;
+
+   if (adap->flags & TP_PARITY_INIT) {
+   t3_write_reg(adap, A_TP_INT_CAUSE,
+F_CMCACHEPERR | F_ARPLUTPERR);
+   t3_write_reg(adap, A_TP_INT_ENABLE, 0x7fbf);
+   }
+
if ((adap->flags & (USING_MSIX | QUEUES_BOUND)) == USING_MSIX)
bind_qsets(adap);
adap->flags |= QUEUES_BOUND;
diff --git a/drive

[PATCH 2/2 2.6.25] cxgb3 - Fix EEH, missing softirq blocking

2007-12-17 Thread Divy Le Ray
From: Divy Le Ray <[EMAIL PROTECTED]>

set_pci_drvdata() stores a pointer to the adapter,
not the net device.
Add missing softirq blocking in t3_mgmt_tx.

Signed-off-by: Divy Le Ray <[EMAIL PROTECTED]>
---

 drivers/net/cxgb3/cxgb3_main.c |   14 --
 drivers/net/cxgb3/sge.c|7 ++-
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index d1aa777..0e3dcbf 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2408,9 +2408,7 @@ void t3_fatal_err(struct adapter *adapter)
 static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
 pci_channel_state_t state)
 {
-   struct net_device *dev = pci_get_drvdata(pdev);
-   struct port_info *pi = netdev_priv(dev);
-   struct adapter *adapter = pi->adapter;
+   struct adapter *adapter = pci_get_drvdata(pdev);
int i;
 
/* Stop all ports */
@@ -2444,9 +2442,7 @@ static pci_ers_result_t t3_io_error_detected(struct 
pci_dev *pdev,
  */
 static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev)
 {
-   struct net_device *dev = pci_get_drvdata(pdev);
-   struct port_info *pi = netdev_priv(dev);
-   struct adapter *adapter = pi->adapter;
+   struct adapter *adapter = pci_get_drvdata(pdev);
 
if (pci_enable_device(pdev)) {
dev_err(&pdev->dev,
@@ -2469,9 +2465,7 @@ static pci_ers_result_t t3_io_slot_reset(struct pci_dev 
*pdev)
  */
 static void t3_io_resume(struct pci_dev *pdev)
 {
-   struct net_device *dev = pci_get_drvdata(pdev);
-   struct port_info *pi = netdev_priv(dev);
-   struct adapter *adapter = pi->adapter;
+   struct adapter *adapter = pci_get_drvdata(pdev);
int i;
 
/* Restart the ports */
@@ -2491,7 +2485,7 @@ static void t3_io_resume(struct pci_dev *pdev)
 
if (is_offload(adapter)) {
__set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map);
-   if (offload_open(dev))
+   if (offload_open(adapter->port[0]))
printk(KERN_WARNING
   "Could not bring back offload capabilities\n");
}
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index cef153d..6367cee 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -1364,7 +1364,12 @@ static void restart_ctrlq(unsigned long data)
  */
 int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb)
 {
-   return ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb);
+   int ret; 
+   local_bh_disable();
+   ret = ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb);
+   local_bh_enable();
+
+   return ret;
 }
 
 /**
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] [UDP]: add udp_mem, udp_rmem_min and udp_wmem_min

2007-12-17 Thread Hideo AOKI
This patch adds sysctl parameters for customizing UDP memory accounting:
 /proc/sys/net/ipv4/udp_mem
 /proc/sys/net/ipv4/udp_rmem_min
 /proc/sys/net/ipv4/udp_wmem_min

Udp_mem indicates number of pages which can be used for all UDP sockets.
Each UDP packet is dropped, when the number of pages for socket buffer is
beyond udp_mem and the socket already consumes minimum buffer.

This patch is also introduced memory_allocated variable for UDP protocol.

Cc: Satoshi Oshima <[EMAIL PROTECTED]>
signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
---

 Documentation/networking/ip-sysctl.txt |   18 ++
 include/net/udp.h  |9 +
 net/ipv4/af_inet.c |3 +++
 net/ipv4/proc.c|3 ++-
 net/ipv4/sysctl_net_ipv4.c |   31 +++
 net/ipv4/udp.c |   27 +++
 6 files changed, 90 insertions(+), 1 deletion(-)

diff -pruN net-2.6-udp-take11a1-p2/Documentation/networking/ip-sysctl.txt 
net-2.6-udp-take11a1-p3/Documentation/networking/ip-sysctl.txt
--- net-2.6-udp-take11a1-p2/Documentation/networking/ip-sysctl.txt  
2007-12-11 10:54:41.0 -0500
+++ net-2.6-udp-take11a1-p3/Documentation/networking/ip-sysctl.txt  
2007-12-17 14:42:40.0 -0500
@@ -446,6 +446,24 @@ tcp_dma_copybreak - INTEGER
and CONFIG_NET_DMA is enabled.
Default: 4096

+UDP variables:
+
+udp_mem - INTEGER
+   Number of pages allowed for queueing by all UDP sockets.
+   Default is calculated at boot time from amount of available memory.
+
+udp_rmem_min - INTEGER
+   Minimal size of receive buffer used by UDP sockets. Each UDP socket
+   is able to use the size for receiving data, even if total pages of UDP
+   sockets exceed udp_mem. The unit is byte.
+   Default: 4096
+
+udp_wmem_min - INTEGER
+   Minimal size of send buffer used by UDP sockets. Each UDP socket is
+   able to use the size for sending data, even if total pages of UDP
+   sockets exceed udp_mem. The unit is byte.
+   Default: 4096
+
 CIPSOv4 Variables:

 cipso_cache_enable - BOOLEAN
diff -pruN net-2.6-udp-take11a1-p2/include/net/udp.h 
net-2.6-udp-take11a1-p3/include/net/udp.h
--- net-2.6-udp-take11a1-p2/include/net/udp.h   2007-12-11 10:54:53.0 
-0500
+++ net-2.6-udp-take11a1-p3/include/net/udp.h   2007-12-17 14:42:40.0 
-0500
@@ -65,6 +65,13 @@ extern rwlock_t udp_hash_lock;

 extern struct proto udp_prot;

+extern atomic_t udp_memory_allocated;
+
+/* sysctl variables for udp */
+extern int sysctl_udp_mem;
+extern int sysctl_udp_rmem_min;
+extern int sysctl_udp_wmem_min;
+
 struct sk_buff;

 /*
@@ -173,4 +180,6 @@ extern void udp_proc_unregister(struct u
 extern int  udp4_proc_init(void);
 extern void udp4_proc_exit(void);
 #endif
+
+extern void udp_init(void);
 #endif /* _UDP_H */
diff -pruN net-2.6-udp-take11a1-p2/net/ipv4/af_inet.c 
net-2.6-udp-take11a1-p3/net/ipv4/af_inet.c
--- net-2.6-udp-take11a1-p2/net/ipv4/af_inet.c  2007-12-11 10:54:55.0 
-0500
+++ net-2.6-udp-take11a1-p3/net/ipv4/af_inet.c  2007-12-17 14:42:40.0 
-0500
@@ -1418,6 +1418,9 @@ static int __init inet_init(void)
/* Setup TCP slab cache for open requests. */
tcp_init();

+   /* Setup UDP memory threshold */
+   udp_init();
+
/* Add UDP-Lite (RFC 3828) */
udplite4_register();

diff -pruN net-2.6-udp-take11a1-p2/net/ipv4/proc.c 
net-2.6-udp-take11a1-p3/net/ipv4/proc.c
--- net-2.6-udp-take11a1-p2/net/ipv4/proc.c 2007-12-11 10:54:55.0 
-0500
+++ net-2.6-udp-take11a1-p3/net/ipv4/proc.c 2007-12-17 14:42:40.0 
-0500
@@ -56,7 +56,8 @@ static int sockstat_seq_show(struct seq_
   sock_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count),
   tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated),
   atomic_read(&tcp_memory_allocated));
-   seq_printf(seq, "UDP: inuse %d\n", sock_prot_inuse(&udp_prot));
+   seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse(&udp_prot),
+  atomic_read(&udp_memory_allocated));
seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse(&udplite_prot));
seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse(&raw_prot));
seq_printf(seq,  "FRAG: inuse %d memory %d\n",
diff -pruN net-2.6-udp-take11a1-p2/net/ipv4/sysctl_net_ipv4.c 
net-2.6-udp-take11a1-p3/net/ipv4/sysctl_net_ipv4.c
--- net-2.6-udp-take11a1-p2/net/ipv4/sysctl_net_ipv4.c  2007-12-11 
10:54:55.0 -0500
+++ net-2.6-udp-take11a1-p3/net/ipv4/sysctl_net_ipv4.c  2007-12-17 
14:42:40.0 -0500
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -885,6 +886,36 @@ ctl_table ipv4_table[] = {
.mode   = 0644,
.proc_handler   = &proc_dointvec,
},
+   {
+   .ctl_name   = CTL_UNNUMBERED,
+ 

[PATCH 4/4] [UDP]: memory accounting in IPv4

2007-12-17 Thread Hideo AOKI
This patch adds UDP memory usage accounting in IPv4.

Send buffer accounting is performed by IP layer, because skbuff is
allocated in the layer.

Receive buffer is charged, when the buffer successfully received.
Destructor of the buffer does uncharging and reclaiming, when the
buffer is freed. To set destructor at proper place, we use
__udp_queue_rcv_skb() instead of sock_queue_rcv_skb(). To maintain
consistency of memory accounting, socket lock is used to free receive
buffer in udp_recvmsg().

New packet will be add to backlog when the socket is used by user.

Cc: Satoshi Oshima <[EMAIL PROTECTED]>
signed-off-by: Takahiro Yasui <[EMAIL PROTECTED]>
signed-off-by: Masami Hiramatsu <[EMAIL PROTECTED]>
signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
---

 ip_output.c |   46 +--
 udp.c   |   78 +---
 2 files changed, 119 insertions(+), 5 deletions(-)

diff -pruN net-2.6-udp-take11a1-p3/net/ipv4/ip_output.c 
net-2.6-udp-take11a1-p4/net/ipv4/ip_output.c
--- net-2.6-udp-take11a1-p3/net/ipv4/ip_output.c2007-12-17 
14:42:31.0 -0500
+++ net-2.6-udp-take11a1-p4/net/ipv4/ip_output.c2007-12-17 
14:42:49.0 -0500
@@ -707,6 +707,7 @@ static inline int ip_ufo_append_data(str
 {
struct sk_buff *skb;
int err;
+   int first_size, second_size;

/* There is support for UDP fragmentation offload by network
 * device, so create one single skb packet containing complete
@@ -720,6 +721,11 @@ static inline int ip_ufo_append_data(str
if (skb == NULL)
return err;

+   if (!sk_account_wmem_charge(sk, skb->truesize)) {
+   err = -ENOBUFS;
+   goto fail;
+   }
+
/* reserve space for Hardware header */
skb_reserve(skb, hh_len);

@@ -736,6 +742,7 @@ static inline int ip_ufo_append_data(str
skb->csum = 0;
sk->sk_sndmsg_off = 0;
}
+   first_size = skb->truesize;

err = skb_append_datato_frags(sk,skb, getfrag, from,
   (length - transhdrlen));
@@ -743,6 +750,15 @@ static inline int ip_ufo_append_data(str
/* specify the length of each IP datagram fragment*/
skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
+
+   second_size = skb->truesize - first_size;
+   if (!sk_account_wmem_charge(sk, second_size)) {
+   sk_account_uncharge(sk, first_size);
+   sk_mem_reclaim(sk);
+   err = -ENOBUFS;
+   goto fail;
+   }
+
__skb_queue_tail(&sk->sk_write_queue, skb);

return 0;
@@ -750,6 +766,7 @@ static inline int ip_ufo_append_data(str
/* There is not enough support do UFO ,
 * so follow normal path
 */
+fail:
kfree_skb(skb);
return err;
 }
@@ -924,6 +941,11 @@ alloc_new_skb:
}
if (skb == NULL)
goto error;
+   if (!sk_account_wmem_charge(sk, skb->truesize)) {
+   err = -ENOBUFS;
+   kfree_skb(skb);
+   goto error;
+   }

/*
 *  Fill in the control structures
@@ -954,6 +976,8 @@ alloc_new_skb:
copy = datalen - transhdrlen - fraggap;
if (copy > 0 && getfrag(from, data + transhdrlen, 
offset, copy, fraggap, skb) < 0) {
err = -EFAULT;
+   sk_account_uncharge(sk, skb->truesize);
+   sk_mem_reclaim(sk);
kfree_skb(skb);
goto error;
}
@@ -1023,6 +1047,10 @@ alloc_new_skb:
frag = &skb_shinfo(skb)->frags[i];
skb->truesize += PAGE_SIZE;
atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc);
+   if (!sk_account_wmem_charge(sk, PAGE_SIZE)) {
+   err = -ENOBUFS;
+   goto error;
+   }
} else {
err = -EMSGSIZE;
goto error;
@@ -1124,6 +1152,11 @@ ssize_t  ip_append_page(struct sock *sk,
err = -ENOBUFS;
goto error;
}
+   if (!sk_account_wmem_charge(sk, skb->truesize)) {
+   kfree_skb(skb);
+   err = -ENOBUFS;

[PATCH 2/4] [CORE]: datagram: basic memory accounting functions

2007-12-17 Thread Hideo AOKI
This patch includes changes in network core sub system for memory
accounting.

Memory scheduling, charging, uncharging and reclaiming functions are
added. These functions use sk_forward_alloc to store socket local
accounting. They currently support only datagram protocols.

sk_datagram_rfree() is a receive buffer detractor for datagram
protocols which are capable of protocol specific memory accounting.

Cc: Satoshi Oshima <[EMAIL PROTECTED]>
signed-off-by: Takahiro Yasui <[EMAIL PROTECTED]>
signed-off-by: Masami Hiramatsu <[EMAIL PROTECTED]>
signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
---

 include/net/sock.h  |   81 +
 net/core/datagram.c |   85 
 2 files changed, 166 insertions(+)

diff -pruN net-2.6-udp-take11a1-p1/include/net/sock.h 
net-2.6-udp-take11a1-p2/include/net/sock.h
--- net-2.6-udp-take11a1-p1/include/net/sock.h  2007-12-11 10:54:53.0 
-0500
+++ net-2.6-udp-take11a1-p2/include/net/sock.h  2007-12-17 14:42:39.0 
-0500
@@ -750,6 +750,9 @@ static inline struct inode *SOCK_INODE(s
return &container_of(socket, struct socket_alloc, socket)->vfs_inode;
 }

+/*
+ * Functions for memory accounting
+ */
 extern void __sk_stream_mem_reclaim(struct sock *sk);
 extern int sk_stream_mem_schedule(struct sock *sk, int size, int kind);

@@ -778,6 +781,82 @@ static inline int sk_stream_wmem_schedul
   sk_stream_mem_schedule(sk, size, 0);
 }

+extern void __sk_datagram_mem_reclaim(struct sock *sk);
+extern int sk_stream_mem_schedule(struct sock *sk, int size, int kind);
+
+#define SK_DATAGRAM_MEM_QUANTUM ((unsigned int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+   /* Cast to unsigned as an optimization, since amt is always positive. */
+   return DIV_ROUND_UP((unsigned int)amt, SK_DATAGRAM_MEM_QUANTUM);
+}
+
+extern int __sk_datagram_account_charge(struct sock *sk, int size, int kind);
+extern void __sk_datagram_mem_reclaim(struct sock *sk);
+extern int sk_datagram_mem_schedule(struct sock *sk, int size, int kind);
+
+static inline void sk_datagram_mem_reclaim(struct sock *sk)
+{
+   if (!sk->sk_prot->memory_allocated)
+   return;
+
+   __sk_datagram_mem_reclaim(sk);
+}
+
+static inline int sk_datagram_rmem_schedule(struct sock *sk, int size)
+{
+   return size <= sk->sk_forward_alloc ||
+   sk_datagram_mem_schedule(sk, size, 1);
+}
+
+static inline int sk_datagram_wmem_schedule(struct sock *sk, int size)
+{
+   return size <= sk->sk_forward_alloc ||
+   sk_datagram_mem_schedule(sk, size, 0);
+}
+
+static inline void sk_mem_reclaim(struct sock *sk)
+{
+   if (sk->sk_type == SOCK_DGRAM)
+   sk_datagram_mem_reclaim(sk);
+}
+
+static inline int sk_wmem_schedule(struct sock *sk, int size)
+{
+   if (sk->sk_type == SOCK_DGRAM)
+   return sk_datagram_wmem_schedule(sk, size);
+   else
+   return 1;
+}
+
+static inline int sk_account_wmem_charge(struct sock *sk, int size)
+{
+   /* account if protocol supports memory accounting. */
+   if (!sk->sk_prot->memory_allocated || sk->sk_type != SOCK_DGRAM)
+   return 1;
+
+   return __sk_datagram_account_charge(sk, size, 0);
+}
+
+static inline int sk_account_rmem_charge(struct sock *sk, int size)
+{
+   /* account if protocol supports memory accounting. */
+   if (!sk->sk_prot->memory_allocated || sk->sk_type != SOCK_DGRAM)
+   return 1;
+
+   return __sk_datagram_account_charge(sk, size, 1);
+}
+
+static inline void sk_account_uncharge(struct sock *sk, int size)
+{
+   /* account if protocol supports memory accounting. */
+   if (!sk->sk_prot->memory_allocated || sk->sk_type != SOCK_DGRAM)
+   return;
+
+   sk->sk_forward_alloc += size;
+}
+
 /* Used by processes to "lock" a socket state, so that
  * interrupts and bottom half handlers won't change it
  * from under us. It essentially blocks any incoming
@@ -1166,6 +1245,8 @@ static inline void skb_set_owner_r(struc
atomic_add(skb->truesize, &sk->sk_rmem_alloc);
 }

+extern void sk_datagram_rfree(struct sk_buff *skb);
+
 extern void sk_reset_timer(struct sock *sk, struct timer_list* timer,
   unsigned long expires);

diff -pruN net-2.6-udp-take11a1-p1/net/core/datagram.c 
net-2.6-udp-take11a1-p2/net/core/datagram.c
--- net-2.6-udp-take11a1-p1/net/core/datagram.c 2007-12-11 10:54:55.0 
-0500
+++ net-2.6-udp-take11a1-p2/net/core/datagram.c 2007-12-17 14:42:39.0 
-0500
@@ -484,6 +484,91 @@ fault:
 }

 /**
+ * sk_datagram_rfree - receive buffer detractor for datagram protocls
+ * @skb: skbuff
+ */
+void sk_datagram_rfree(struct sk_buff *skb)
+{
+   struct sock *sk = skb->sk;
+
+   skb_truesize_check(skb);
+   atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
+   sk_account_uncharge(sk, skb->truesize);
+   sk_datagram_mem_rec

[PATCH 1/4] [UDP]: fix send buffer check

2007-12-17 Thread Hideo AOKI
This patch introduces sndbuf size check before memory allocation for
send buffer.

signed-off-by: Satoshi Oshima <[EMAIL PROTECTED]>
signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
---

 ip_output.c |5 +
 1 file changed, 5 insertions(+)

diff -pruN net-2.6/net/ipv4/ip_output.c 
net-2.6-udp-take11a1-p1/net/ipv4/ip_output.c
--- net-2.6/net/ipv4/ip_output.c2007-12-11 10:54:55.0 -0500
+++ net-2.6-udp-take11a1-p1/net/ipv4/ip_output.c2007-12-17 
14:42:31.0 -0500
@@ -1004,6 +1004,11 @@ alloc_new_skb:
frag = &skb_shinfo(skb)->frags[i];
}
} else if (i < MAX_SKB_FRAGS) {
+   if (atomic_read(&sk->sk_wmem_alloc) + PAGE_SIZE
+   > 2 * sk->sk_sndbuf) {
+   err = -ENOBUFS;
+   goto error;
+   }
if (copy > PAGE_SIZE)
copy = PAGE_SIZE;
page = alloc_pages(sk->sk_allocation, 0);
-- 
Hitachi Computer Products (America) Inc.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] [UDP]: memory accounting and limitation (take 11)

2007-12-17 Thread Hideo AOKI
Hello,

I updated patch set of  UDP memory accounting and limitation.

The spin lock that I used in previous take was removed from datagram
memory accounting functions. As David commented, I used socket lock
and backlog processing to keep consistency of memory accounting like
TCP. I added socket lock to places where skbuff is freed, since the
locking is needed to change sk_forward_alloc only.

Moreover, I revised memory accounting functions. As Herbert commented,
I stopped using large inline function and tried to reduce amount of
inline functions.

The patch set was tested on net-2.6 tree.


Changelog take 10 -> take 11:
 * stopped using spin lock in memory accounting function
 * socket lock and backlog processing were used to avoid conflict
   between receive system call processing and BH
 * revised memory accounting functions
 * stooped changing sock_queue_rcv_skb() and skb_set_owner_r()
 * added __udp_queue_rcv_skb to set proper destructor
 * removed udp_set_owner_r()
 * removed reclaim in inet_sock_destruct()

Changelog take 9 -> take 10:
 * supported using sk_forward_alloc
 * introduced several memory accounting functions with spin lock
 * changed detagram receive functions to be able to customize
   destructor
 * fixed accounting bugs in previous takes

Changelog take 8 -> take 9:
 * introduced mem_schdeule functions for datargram protocols
 * removed protocol check function, from patch set
 * restructured patch set

Changelog take 7 -> take 8:

 * sk_datagram_pages(): avoided using divide instruction
 * udp_recvmsg(): fixed referring released truesize in accounting

Best regards,
Hideo Aoki

--
Hitachi Computer Products (America) Inc.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [git patches] net driver fixes

2007-12-17 Thread Jeff Garzik

Divy Le Ray wrote:

Jeff Garzik wrote:


A couple serious fixes (wireless, e100, sky2) and a bevy of minor ones.

Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 
upstream-linus




Hi Jeff,

Should I resend the 2 cxgb3 patches posted on 12/05 and 12/06 ?
I did not see them getting applied to the #upstream branch today.

Cheers,
Divy


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html



The last thing I have from you, in netdev#upstream, is

commit 75758e8aa4b7d5c651261ce653dd8d0b716e1eda
Author: Divy Le Ray <[EMAIL PROTECTED]>
Date:   Wed Dec 5 10:15:01 2007 -0800

cxgb3 - T3C support update

Update GPIO mapping for T3C.
Update xgmac for T3C support.
Fix typo in mtu table.

and there's nothing in my inbox.

So if that is not the change you want, yes, please do resend.

Jeff


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [git patches] net driver fixes

2007-12-17 Thread Divy Le Ray

Jeff Garzik wrote:


A couple serious fixes (wireless, e100, sky2) and a bevy of minor ones.

Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 
upstream-linus




Hi Jeff,

Should I resend the 2 cxgb3 patches posted on 12/05 and 12/06 ?
I did not see them getting applied to the #upstream branch today.

Cheers,
Divy


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[git patches] net driver fixes

2007-12-17 Thread Jeff Garzik

A couple serious fixes (wireless, e100, sky2) and a bevy of minor ones.

Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 
upstream-linus

to receive the following updates:

 MAINTAINERS|6 ++
 drivers/net/e100.c |5 ++-
 drivers/net/hamachi.c  |   70 +---
 drivers/net/ibm_newemac/debug.c|2 +-
 drivers/net/ixgb/ixgb_main.c   |   16 +-
 drivers/net/pcmcia/pcnet_cs.c  |1 +
 drivers/net/s2io.c |4 +-
 drivers/net/sis190.c   |   10 ++--
 drivers/net/sky2.c |9 +++-
 drivers/net/smc911x.h  |2 +-
 drivers/net/starfire.c |2 +-
 drivers/net/sundance.c |   34 ++--
 drivers/net/ucc_geth.c |2 +-
 drivers/net/ucc_geth_mii.h |2 +-
 drivers/net/wireless/Kconfig   |1 +
 drivers/net/wireless/b43/leds.c|4 ++
 drivers/net/wireless/b43/main.c|   22 
 drivers/net/wireless/b43/rfkill.c  |   37 +++--
 drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c |2 +-
 drivers/net/wireless/ipw2200.c |7 ++-
 drivers/net/wireless/iwlwifi/iwl3945-base.c|5 ++-
 drivers/net/wireless/iwlwifi/iwl4965-base.c|5 ++-
 drivers/net/wireless/zd1211rw/zd_mac.c |   10 +++-
 net/mac80211/ieee80211_rate.c  |1 +
 24 files changed, 168 insertions(+), 91 deletions(-)

Adrian Bunk (3):
  drivers/net/sis190.c section fix
  drivers/net/s2io.c section fixes
  wireless/ipw2200.c: add __dev{init,exit} annotations

Al Viro (4):
  sundance fixes
  starfire VLAN fix
  hamachi endianness fixes
  sis190 endianness

Andrew Morton (2):
  ucc_geth: minor whitespace fix
  bcm43xx_debugfs sscanf fix

Anton Vorontsov (1):
  ucc_geth: really fix section mismatch

Auke Kok (1):
  e100: free IRQ to remove warningwhenrebooting

Cyrill Gorcunov (2):
  ieee80211_rate: missed unlock
  iwlwifi3945/4965: fix rate control algo reference leak

Dan Williams (1):
  libertas: select WIRELESS_EXT

Jiri Slaby (1):
  Net: ibm_newemac, remove SPIN_LOCK_UNLOCKED

Komuro (1):
  pcnet_cs: add new id

Larry Finger (1):
  b43: Fix rfkill radio LED

Matheos Worku (1):
  ixgb: make sure jumbos stay enabled after reset

Paul Mundt (1):
  net: smc911x: shut up compiler warnings

Stefano Brivio (1):
  libertas: add Dan Williams as maintainer

Stephen Hemminger (1):
  sky2: RX lockup fix

Ulrich Kunitz (1):
  zd1211rw: Fix alignment problems

Zhu Yi (1):
  iwlwifi: fix rf_kill state inconsistent during suspend and resume

diff --git a/MAINTAINERS b/MAINTAINERS
index 9507b42..c331ba3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2489,6 +2489,12 @@ M:   [EMAIL PROTECTED]
 W: ftp://ftp.kernel.org/pub/linux/docs/manpages
 S: Maintained
 
+MARVELL LIBERTAS WIRELESS DRIVER
+P: Dan Williams
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 MARVELL MV643XX ETHERNET DRIVER
 P: Dale Farnsworth
 M: [EMAIL PROTECTED]
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e1c8a0d..2b06e4b 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2737,8 +2737,9 @@ static int e100_suspend(struct pci_dev *pdev, 
pm_message_t state)
pci_enable_wake(pdev, PCI_D3cold, 0);
}
 
-   pci_disable_device(pdev);
free_irq(pdev->irq, netdev);
+
+   pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
 
return 0;
@@ -2780,6 +2781,8 @@ static void e100_shutdown(struct pci_dev *pdev)
pci_enable_wake(pdev, PCI_D3cold, 0);
}
 
+   free_irq(pdev->irq, netdev);
+
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
 }
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index ed407c8..b53f6b6 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -204,8 +204,10 @@ KERN_INFO "   Further modifications by Keith Underwood 
<[EMAIL PROTECTED]>
 /* Condensed bus+endian portability operations. */
 #if ADDRLEN == 64
 #define cpu_to_leXX(addr)  cpu_to_le64(addr)
+#define leXX_to_cpu(addr)  le64_to_cpu(addr)
 #else
 #define cpu_to_leXX(addr)  cpu_to_le32(addr)
+#define leXX_to_cpu(addr)  le32_to_cpu(addr)
 #endif
 
 
@@ -465,12 +467,12 @@ enum intr_status_bits {
 
 /* The Hamachi Rx and Tx buffer descriptors. */
 struct hamachi_desc {
-   u32 status_n_length;
+   __le32 status_n_length;
 #if ADDRLEN == 64
u32 pad;
-   u64 addr;
+   __le64 addr;
 #else
-   u32 addr;
+   __le32 addr;
 #endif
 };
 
@@ -874,13 +876,13 @@ sta

Re: Please pull 'upstream-jgarzik' branch of wireless-2.6

2007-12-17 Thread Zhu Yi

On Mon, 2007-12-17 at 18:40 -0500, Jeff Garzik wrote:
> drivers/net/wireless/iwlwifi/iwl3945-base.c: In function 
> ‘iwl3945_alive_start’:
> drivers/net/wireless/iwlwifi/iwl3945-base.c:6285: error: implicit 
> declaration of function ‘iwl_rate_control_unregister’
> make[4]: *** [drivers/net/wireless/iwlwifi/iwl3945-base.o] Error 1
> make[3]: *** [drivers/net/wireless/iwlwifi] Error 2
> make[2]: *** [drivers/net/wireless] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2

We changed the namespace between 2.6.24 and upstream. So
iwl_rate_control_unregister should be renamed to
iwl3945_rate_control_unregister when the patch is merged from
fix-jgarzik to upstream-jgarzik. The same thing is also for
iwl4965_rate_control_unregister.

> I'll leave it there and assume that you will send a fix --on top of-- 
> netdev#upstream ...

I assume John will do it.

Thanks,
-yi

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [UPDATED PATCH] SGISEEQ: use cached memory access to make driver work on IP28

2007-12-17 Thread Jeff Garzik

Thomas Bogendoerfer wrote:

SGI IP28 machines would need special treatment (enable adding addtional
wait states) when accessing memory uncached. To avoid this pain I changed
the driver to use only cached access to memory.

Signed-off-by: Thomas Bogendoerfer <[EMAIL PROTECTED]>
---

Changes to last version:
- Use inline functions for dma_sync_* instead of macros (suggested by Ralf)
- added Kconfig change to make selection for similair SGI boxes easier


hrm, could you rediff?  it doesn't seem to apply


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 09/10] bnx2x depends on ZLIB_INFLATE

2007-12-17 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Lee Schermerhorn <[EMAIL PROTECTED]>

The bnx2x module depends on the zlib_inflate functions.  The build will
fail if ZLIB_INFLATE has not been selected manually or by building another
module that automatically selects it.

Modify BNX2X config option to 'select ZLIB_INFLATE' like BNX2
and others.  This seems to fix it.

Signed-off-by: Lee Schermerhorn <[EMAIL PROTECTED]>
Acked-by: Eliezer Tamir <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/net/Kconfig |1 +
 1 file changed, 1 insertion(+)


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 10/10] PLIP driver: convert killed_timer_sem to completion

2007-12-17 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Matthias Kaehlcke <[EMAIL PROTECTED]>

PLIP driver: convert the semaphore killed_timer_sem to a completion

Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] e1000: Dump the eeprom when a user encounters a bad checksum

2007-12-17 Thread Jeff Garzik

Auke Kok wrote:

To help supporting users with a bad eeprom checksum, dump the
eeprom info when such a situation is encountered by a user.

Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
---

 drivers/net/e1000/e1000_main.c |   85 +++-
 1 files changed, 74 insertions(+), 11 deletions(-)


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 05/10] pcmcia net: use roundup_pow_of_two() macro instead of grotesque loop

2007-12-17 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: "Robert P. J. Day" <[EMAIL PROTECTED]>

Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Cc: Dominik Brodowski <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/net/pcmcia/pcnet_cs.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ixgb: enable sun hardware support for broadcom phy

2007-12-17 Thread Jeff Garzik

Auke Kok wrote:

From: Matheos Worku <[EMAIL PROTECTED]>

Implement support for a SUN-specific PHY.

SUN provides a modified 82597-based board with their own
PHY that works with very little modification to the code. This
patch implements this new PHY which is identified by the
subvendor device ID. The device ID of the adapter remains
the same.

Signed-off-by: Matheos Worku <[EMAIL PROTECTED]>
Signed-off-by: Jesse Brandeburg <[EMAIL PROTECTED]>
Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
---

 drivers/net/ixgb/ixgb_hw.c   |   82 +-
 drivers/net/ixgb/ixgb_hw.h   |3 +-
 drivers/net/ixgb/ixgb_ids.h  |4 ++
 drivers/net/ixgb/ixgb_main.c |   10 +++--
 4 files changed, 91 insertions(+), 8 deletions(-)


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] e1000: remove no longer used code for pci read/write cfg

2007-12-17 Thread Jeff Garzik

Auke Kok wrote:

From: Adrian Bunk <[EMAIL PROTECTED]>

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
---

 drivers/net/e1000/e1000_hw.h   |2 --
 drivers/net/e1000/e1000_main.c |   16 
 2 files changed, 0 insertions(+), 18 deletions(-)


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] bridge: assign random address

2007-12-17 Thread Jeff Garzik

David Miller wrote:

From: Jeff Garzik <[EMAIL PROTECTED]>
Date: Sun, 16 Dec 2007 20:46:24 -0500


David Miller wrote:

[Patch 1/7] [SUBSYSTEM]: Foo bar baz...

The most popular tool is git-am, which I and many others use.

git-am will snip "[SUBSYSTEM]" in the example that you give.


It should only snip the first "[Patch X/Y] " part, or the manual is
buggy :-)


Manual is buggy.

[EMAIL PROTECTED] netdev-2.6]$ grep '^Subject:' /g/tmp/mbox
Subject: [PATCH 1/2][FOO][BAR][BAZ] tulip: napi full quantum bug

is merged as

commit e34e20a3ae1ec30856427d260f454b8984ebced2
Author: Stephen Hemminger <[EMAIL PROTECTED]>
Date:   Thu Dec 13 09:35:45 2007 -0800

tulip: napi full quantum bug

And that matches existing practice, where people put tons of 
not-to-be-merged metadata into the subject lines.


Regards,

Jeff


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [0/4] DST: Distributed storage.

2007-12-17 Thread David Chinner
On Mon, Dec 17, 2007 at 06:03:38PM +0300, Evgeniy Polyakov wrote:
> DST passed all FS tests in LTP with XFS (modulo MAX_LOCK_DEPTH too low bug:
> [ 8398.605691] BUG: MAX_LOCK_DEPTH too low!
> [ 8398.609641] turning off the locking correctness validator.

Evgeniy, can you please start reporting these XFS problems you are
coming across to the XFS list ([EMAIL PROTECTED])? They may be
real issues that we need to address and we should not be hearing
about them for the first time in the release notes for a block
device project

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: "ip neigh show" not showing arp cache entries?

2007-12-17 Thread Patrick McHardy

Thomas Graf wrote:

* Patrick McHardy <[EMAIL PROTECTED]> 2007-12-18 00:51

Chris Friesen wrote:

Patrick McHardy wrote:


From a kernel perspective there are only complete dumps, the
filtering is done by iproute. So the fact that it shows them
when querying specifically implies there is a bug in the
iproute neighbour filter. Does it work if you omit "all"

>from the ip neigh show command?

Omitting "all" gives identical results.  It is still missing entries 
when compared with the output of "arp".


In that case the easiest way to debug this is probably if you
add some debugging to ip/ipneigh.c:print_neigh() since I'm
unable to reproduce this problem. A printf for all the filter
conditions (=> return 0) at the top should do.


Alternatively, you can download libnl and run

NLCB=debug src/nl-neigh-dump brief

and check if the netlink message is sent by the kenrel for the
neighbour in question. 



It should be, according to Chris, "ip neigh show " does
show the missing entries, and in case of neighbour entries
all filtering is done in userspace.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: "ip neigh show" not showing arp cache entries?

2007-12-17 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2007-12-18 00:51
> Chris Friesen wrote:
> >Patrick McHardy wrote:
> >
> >> From a kernel perspective there are only complete dumps, the
> >>filtering is done by iproute. So the fact that it shows them
> >>when querying specifically implies there is a bug in the
> >>iproute neighbour filter. Does it work if you omit "all"
> >>from the ip neigh show command?
> >
> >Omitting "all" gives identical results.  It is still missing entries 
> >when compared with the output of "arp".
> 
> 
> In that case the easiest way to debug this is probably if you
> add some debugging to ip/ipneigh.c:print_neigh() since I'm
> unable to reproduce this problem. A printf for all the filter
> conditions (=> return 0) at the top should do.

Alternatively, you can download libnl and run

NLCB=debug src/nl-neigh-dump brief

and check if the netlink message is sent by the kenrel for the
neighbour in question. 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Packet per Second

2007-12-17 Thread Glen Turner
[Apologies for off-topic]

On Mon, 2007-12-17 at 11:18 +, Flávio Pires wrote:
> I alread though about something like this. But, isn`t NetFlow just for
> Cisco IOS ?

NetFlow is a trade mark of Cisco Systems Inc (USA).

Packets in the identical format used by NetFlow are produced by
a wide range of networking equipment, including a number of
Linux tools.  I've seen the Linux tools used in customer
networks but I've never evaluated them myself, which is why
I'm didn't make a recommendation of a particular tool for the
sampler.

Because of the trade mark you'll often find NetFlow traffic
samplers under names other than NetFlow (eg, Juniper uses
"cflowd" as a synonym for NetFlow).  There is one exception:
sFlow is *not* identical to the NetFlow format.

If you want more information on ISP accounting tools, the NANOG
list is a more suitable forum.  The Cisco-NSP and Juniper-NSP
lists often host useful discussions too.  The archives of all
these lists are online.

Best wishes, Glen

-- 
Glen Turner   
Tel: 0416 295 857 or +61 416 295 857

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sysctl: Fix ax25 checks

2007-12-17 Thread Eric W. Biederman
Bernard Pidoux <[EMAIL PROTECTED]> writes:

> Eric,
>
> I applied your patch and now I have all /proc/sys/net/ax25
> created and initialized as before.

Thanks for reporting this.

Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sysctl: Fix ax25 checks

2007-12-17 Thread Bernard Pidoux

Eric,

I applied your patch and now I have all /proc/sys/net/ax25
created and initialized as before.

Thanks.

Bernard Pidoux




Eric W. Biederman wrote:

Bernard Pidoux <[EMAIL PROTECTED]> writes:


With 2.6.24-rc5 there is no /proc/net/ax25


/proc/sys/net/ax25?


Here is an extract from dmesg after boot :


Groan.  I thought I had found the last of the bugs with
my sysctl sanity checks.  I guess you actually have to
use ax25 for this bug to show up.

Thank you for catching this. 


===
sysctl table check failed: /net/ax25/ax0/ax25_default_mode .3.9.1.2 Unknown
sysctl binary path
Pid: 2936, comm: kissattach Not tainted 2.6.24-rc5 #1
 [] set_fail+0x3b/0x43
 [] sysctl_check_table+0x408/0x456
 [] sysctl_check_table+0x41c/0x456
 [] sysctl_check_table+0x41c/0x456
 [] _spin_unlock+0x14/0x1c
 [] sysctl_check_table+0x41c/0x456
 [] sysctl_set_parent+0x19/0x2a
 [] register_sysctl_table+0x45/0x85
 [] ax25_register_sysctl+0x112/0x11c [ax25]
 [] ax25_device_event+0x2e/0x90 [ax25]
 [] notifier_call_chain+0x2a/0x47
 [] raw_notifier_call_chain+0x17/0x1a
 [] dev_open+0x6f/0x75
 [] dev_change_flags+0x9c/0x148
 [] __dev_get_by_name+0x68/0x73
 [] devinet_ioctl+0x22e/0x53b
 [] dev_ioctl+0x472/0x5ba
 [] sock_ioctl+0x1aa/0x1cf
 [] sock_ioctl+0x0/0x1cf
 [] do_ioctl+0x19/0x4c
 [] vfs_ioctl+0x1f4/0x20b
 [] sysenter_past_esp+0x9a/0xa9
 [] sys_ioctl+0x45/0x5d
 [] sysenter_past_esp+0x5f/0xa9
 ===
sysctl table check failed: /net/ax25/ax0/backoff_type .3.9.1.3 Unknown sysctl
binary path
(...) truncated
 ===
sysctl table check failed: /net/ax25/ax0/connect_mode .3.9.1.4 Unknown sysctl
binary path
(...)
 ===
sysctl table check failed: /net/ax25/ax0/standard_window_size .3.9.1.5 Unknown
sysctl binary path
 ===
(...)

and so on ...



Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
---
 kernel/sysctl_check.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index bed939f..a68425a 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -428,7 +428,7 @@ static struct trans_ctl_table trans_net_netrom_table[] = {
{}
 };
 
-static struct trans_ctl_table trans_net_ax25_table[] = {

+static struct trans_ctl_table trans_net_ax25_param_table[] = {
{ NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" },
{ NET_AX25_DEFAULT_MODE,"ax25_default_mode" },
{ NET_AX25_BACKOFF_TYPE,"backoff_type" },
@@ -446,6 +446,11 @@ static struct trans_ctl_table trans_net_ax25_table[] = {
{}
 };
 
+static struct trans_ctl_table trans_net_ax25_table[] = {

+   { 0, NULL, trans_net_ax25_param_table },
+   {}
+};
+
 static struct trans_ctl_table trans_net_bridge_table[] = {
{ NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" },
{ NET_BRIDGE_NF_CALL_IPTABLES,  "bridge-nf-call-iptables" },

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-17 Thread Rusty Russell
On Wednesday 12 December 2007 23:54:00 Dor Laor wrote:
> commit 763769621d271d92204ed27552d75448587c1ac0
> Author: Dor Laor <[EMAIL PROTECTED]>
> Date:   Wed Dec 12 14:52:00 2007 +0200
>
> [virtio-net][PATCH] Don't arm tx hrtimer with a constant 50us each
> transmit
>
> The current start_xmit sets 500us hrtimer to kick the host.
> The problem is that if another xmit happens before the timer was
> fired then
> the first xmit will have to wait additional 500us.
> This patch does not re-arm the timer if there is existing one.
> This will shorten the latency for tx.

Hi Dor!

Yes, I pondered this when I wrote the code.  On the one hand, it's a 
low-probability pathological corner case, on the other, your patch reduces 
the number of timer reprograms in the normal case.

So I've applied it, thanks!
Rusty.





>
> Signed-off-by: Dor Laor <[EMAIL PROTECTED]>
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 7b051d5..8bb17d1
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -406,10 +405,10 @@ again:
>  virtio_debug(vdebug, "%s: before calling kick %d\n",
> __FUNCTION__, __LINE__);
>  vi->svq->vq_ops->kick(vi->svq);
>  vi->out_num = 0;
> -} else {
> -vi->stats.hrtimer_starts++;
> -hrtimer_start(&vi->tx_timer, ktime_set(0,50),
> -  HRTIMER_MODE_REL);
> +} else if (!hrtimer_is_queued(&vi->tx_timer)) {
> +vi->stats.hrtimer_starts++;
> +hrtimer_start(&vi->tx_timer, ktime_set(0,50),
> +  HRTIMER_MODE_REL);
>  }
>  return 0;
>  }


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: "ip neigh show" not showing arp cache entries?

2007-12-17 Thread Patrick McHardy

Chris Friesen wrote:

Patrick McHardy wrote:


 From a kernel perspective there are only complete dumps, the
filtering is done by iproute. So the fact that it shows them
when querying specifically implies there is a bug in the
iproute neighbour filter. Does it work if you omit "all"
from the ip neigh show command?


Omitting "all" gives identical results.  It is still missing entries 
when compared with the output of "arp".



In that case the easiest way to debug this is probably if you
add some debugging to ip/ipneigh.c:print_neigh() since I'm
unable to reproduce this problem. A printf for all the filter
conditions (=> return 0) at the top should do.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] add driver for enc28j60 ethernet chip

2007-12-17 Thread Jeff Garzik
oh yeah:  make sure your Kconfig/Makefile stuff is in the _same_ patch 
as your driver.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] net/netfilter/: Spelling fixes

2007-12-17 Thread Patrick McHardy

Joe Perches wrote:

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/netfilter/nf_conntrack_sip.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)



Both your netfilter patches conflict with some pending patches
of mine (which also fix those spelling errors). So for now I'm
going to say no, please resubmit in case I won't get my patches
in shape for 2.6.25.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] add driver for enc28j60 ethernet chip

2007-12-17 Thread Jeff Garzik

Claudio Lanconelli wrote:
These patches add support for Microchip enc28j60 ethernet chip 
controlled via SPI.

I tested it on my custom board (S162) with ARM9 s3c2442 SoC.
Any comments are welcome.

Signed-off-by: Claudio Lanconelli <[EMAIL PROTECTED]>



comments:

* overall:  a clean driver that looks mostly acceptable, good work

* use stats in net_device rather than defining your own

* use ethtool rather than 'full_duplex' variable to select duplex

* [suggestion but not requirement] kernel prefers "u8" and "u32" types 
to the C99 types uint8_t or uint32_t


* remove the 'inline' markers from functions, and let the compiler make 
the decision


* udelay() in enc28j60_phy_write() -- and any similar code pattern -- 
may not actually delay for the specified amount of time, when you 
consider that writes may be posted.  normally a read will flush a write.


* Why do interrupt work in a kernel thread?  Your comment says you 
cannot, but does not explain.


* should use NAPI

* should be able to program multicast list while everything is active


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'upstream-jgarzik' branch of wireless-2.6

2007-12-17 Thread Jeff Garzik

Hum, this required merging also, and broke the build too :/

drivers/net/wireless/iwlwifi/iwl3945-base.c: In function 
‘iwl3945_alive_start’:
drivers/net/wireless/iwlwifi/iwl3945-base.c:6285: error: implicit 
declaration of function ‘iwl_rate_control_unregister’

make[4]: *** [drivers/net/wireless/iwlwifi/iwl3945-base.o] Error 1
make[3]: *** [drivers/net/wireless/iwlwifi] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

I'll leave it there and assume that you will send a fix --on top of-- 
netdev#upstream ...




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'upstream-jgarzik' branch of wireless-2.6

2007-12-17 Thread Jeff Garzik

John W. Linville wrote:

Jeff,

Some more patches intended for 2.6.25...  There are a bunch of libertas
patches in there, as well as some iwlwifi cleanups from the last merge
and a couple of b43 fixes resulting from a regression in an earlier
patch already queued in netdev-2.6#upstream.

Let me know if there are any problems!

Thanks,

John

---

Individual patches available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-jgarzik

---

The following changes since commit 9c8e86195d75a1f4875e9ced083a015a99cec94e:
  John W. Linville (1):
rt2x00: correct "skb_buff" typo

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 
upstream-jgarzik ..BRANCH.NOT.VERIFIED..

Dan Williams (11):
  orinoco: always use latest BSS info when caching scan results
  libertas: make lbs_cmd() usage nicer
  libertas: clean up is_command_allowed_in_ps()
  libertas: clean up direct command handling
  libertas: add simple copyback command callback
  libertas: convert GET_HW_SPEC to a direct command
  libertas: rename and re-type bufvirtualaddr to cmdbuf
  libertas: fix case of FWT_ACCESS_LIST_ROUTE and FWT_ACCESS_LIST_NEIGHBOR 
commands
  libertas: convert DATA_RATE to a direct command
  libertas: convert RF_CHANNEL to a direct command
  libertas: endianness fixes for get_channel/set_channel

David Woodhouse (76):
  libertas: Fix memory leak of RX skbs
  libertas: Remove cmd_oid from struct cmd_ctrl_node
  libertas: Consolidate lbs_host_to_card_done() function.
  libertas: Don't claim to have checksummed incoming packets.
  libertas: Move SET_BOOT2_VER command to if_usb where it belongs
  libertas: Zero 'pdata_size' field in cmd_ctrl_node reliably.
  libertas: Byteswap cmdptr->size in lbs_cmd()
  libertas: Use lbs_cmd() for setting Boot2 version
  libertas: Remove SET_BOOT2_VER support from the Big Switch Statement.
  libertas: Fix endianness in boot2_version handling.
  libertas: when usb_submit_usb fails, include the error code in the printk
  libertas: Switch to using a callback function pointer for commands
  libertas: Don't set IW_ENCODE_NOKEY when returning WEP keys.
  libertas: Fix up error handling in lbs_setuserscan()
  libertas: kill adapter->nr_cmd_pending
  libertas: switch lbs_cmd() to take a callback function pointer
  libertas: clean up lbs_thread() to make it slightly more readable
  libertas: fix lbs_rtap attribute in sysfs
  libertas: kill TxLockFlag
  libertas: kill struct lbs_adapter
  libertas: use lbs_host_to_card_done() in lbs_tx_timeout()
  libertas: cope with device which already has firmware loaded
  libertas: stop debugfs code looking at cmdpendingq
  libertas: kill internal tx queue for PS mode
  libertas: kill SendSinglePacket() function.
  libertas: move lbs_hard_start_xmit() into tx.c
  libertas: kill lbs_process_tx() by merging it into lbs_hard_start_xmit()
  libertas: clean up lbs_hard_start_xmit()
  libertas: kill lbs_pre_start_xmit(), lib_mesh_pre_start_xmit()
  libertas: stop using ieee80211 for radiotap device
  libertas: set dev_addr on rtap device
  libertas: TX packet is radiotap iff it comes from rtap_dev
  libertas: free successfully transmitted skbs again
  libertas: refactor the 'should I sleep?' decision in lbs_thread()
  libertas: Move actual transmission to main thread
  libertas: remove unreachable code from process_rxed_802_11_packet()
  libertas: fix error cases in lbs_process_rxed_802_11_packet()
  libertas: kill lbs_upload_tx_packet()
  libertas: kill (IS,SET,UNSET)_MESH_FRAME.
  libertas: add opaque extra argument to cmd callback function
  libertas: clean up lbs_interrupt()
  libertas: remove pre_open_check()
  libertas: make rtap and normal modes mutually exclusive, clean up 
open/stop
  libertas: improve reliability of firmware reloading on USB
  libertas: switch to a waitqueue and timer for handling USB firmware load
  libertas: don't run thread while firmware not yet ready
  libertas: switch USB cardp->priv to 'struct lbs_private *' and resulting 
fix
  libertas: move removal of lbs_rtap file to lbs_stop_card()
  libertas: wait for 'firmware ready' event from firmware after loading
  libertas: fix debug output in lbs_cmd_copyback() function.
  libertas: convert CMD_MESH_ACCESS to a direct command
  libertas: remove casts from lbs_cmd() and lbs_cmd_with_response() macros
  libertas: make some more functions static
  libertas: fix sparse endianness warnings in scan.c
  libertas: add lbs_mesh sysfs attribute for enabling mesh
  libertas: kill references to mesh autostart
  libertas: kill rx_urb_recall and eth_dev members of struct usb_card_rec
  libertas: whitespace cleanup in host.h
  liber

Re: [PATCH/RFC] [POWERPC] Add fixed-phy support for fs_enet

2007-12-17 Thread Jeff Garzik

Jochen Friedrich wrote:

This patch adds support to use the fixed-link property
of an ethernet node to fs_enet for the
CONFIG_PPC_CPM_NEW_BINDING case.

Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>
---
 drivers/net/fs_enet/fs_enet-main.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..8220c70 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np,
struct device_node *phynode, *mdionode;
struct resource res;
int ret = 0, len;
+   const u32 *data;
+
+   data  = of_get_property(np, "fixed-link", NULL);
+   if (data) {
+   snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
+   return 0;
+   }

-   const u32 *data = of_get_property(np, "phy-handle", &len);
+   data = of_get_property(np, "phy-handle", &len);
if (!data || len != 4)


ACK, pass this through paulus?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()

2007-12-17 Thread Jeff Garzik

Andrew Gallatin wrote:

Remove the bogus netif_running() check from myri10ge_poll().

This eliminates any chance that myri10ge_poll() can trigger
an oops by calling netif_rx_complete() and returning
with work_done == budget.

Signed-off-by: Andrew Gallatin <[EMAIL PROTECTED]>


holding onto this patch but not applying, because NAPI discussions 
appear to be continuing...



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Pull request for 'ipg' branch

2007-12-17 Thread Jeff Garzik

Francois Romieu wrote:

Please pull from branch 'ipg' in repository

git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git ipg

to get the changes below.

Distance from 'upstream' (558f08ed31c6909d3c9ae5d6dbf81220ede4b54a)
---

4918e9ebf74735bb8e664f97dc1dcc1e3d6abf9e
e7b6ced0731fc6ad1a15a015de7e8c2e15da95f8
46bc63253ca320770b855249ef8cb894940a3437
992a029067f6e5c70021a0df65b2469a06362832
adf129afde7ea8444fb6441da27e2d3385dbc297
25ba65ab7ff51de58ea0c70d23b3257f658f180d
2af61e99e3d1c959840ea007ff56b15db794fb99
9312ed326b6d944ec01636db69cba84de46c0c69

Diffstat


 drivers/net/ipg.c |  284 -
 drivers/net/ipg.h |   99 +++
 2 files changed, 168 insertions(+), 215 deletions(-)


pulled


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Pull request for 'sis190' branch

2007-12-17 Thread Jeff Garzik

Francois Romieu wrote:

Please pull from branch 'sis190' in repository

git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git sis190

to get the changes below.

Distance from 'upstream-linus' (7962024e9d16e9349d76b553326f3fa7be64305e)
-

c27e14e508664471b8e44ef1f81ec080213ea314
348de67fe200e25d8cb80cff35642192436cfeda
004a22d03d62cd08e5287273a5143447db009cd0
14deb44ffe7220be2de697d616f28cce17e72297

Diffstat


 drivers/net/sis190.c |   21 ++---
 1 files changed, 10 insertions(+), 11 deletions(-)

Shortlog


Francois Romieu (4):
  sis190: add cmos ram access code for the SiS19x/968 chipset pair
  sis190: remove duplicate INIT_WORK
  sis190: mdio operation failure is not correctly detected
  sis190: scheduling while atomic error


pulled into #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] endianness annotations and fixes for olympic

2007-12-17 Thread Jeff Garzik

Al Viro wrote:

* missing braces in !readl(...) & ...
* trivial endianness annotations
* in olympic_arb_cmd() the loop collecting fragments of
packet is b0rken on big-endian - we have
(next_ptr && (buf_ptr=olympic_priv->olympic_lap + ntohs(next_ptr)))
as condition and it should have swab16(), not ntohs() - it's host-endian
byteswapped, not big-endian.  So if we get more than one fragment on big-endian
host, we get screwed.
This ntohs() got missed back when the rest of those had been switched
to swab16() in 2.4.0-test2-pre1 - at a guess, nobody had hit fragmented
packets during the testing of PPC fixes.

PS: Ken Aaker cc'd on assumption that he is the same guy who'd done the
original set of PPC fixes in olympic

Signed-off-by: Al Viro <[EMAIL PROTECTED]>


applied #upstream


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-2.6.25 1/8] Create ipv4_is_(__be32 addr) functions

2007-12-17 Thread Jan Engelhardt

On Dec 17 2007 14:43, David Miller wrote:
>> On Dec 13 2007 15:38, Joe Perches wrote:
>> >+static inline bool ipv4_is_private_10(__be32 addr)
>> >+{
>> >+   return (addr & htonl(0xff00)) == htonl(0x0a00);
>> >+}
>> 
>> What are these functions needed for, even? There does not seem to be
>> any code (at least in davem's net-2.6.25:net/ipv4/, where I dared to grep)
>> that uses them.
>
>You really need to grep the whole tree, never ever decrease the scope
>of directories to search if you want to see if an interface is used.
>
Hah you got me there :)

>It's used by some ipv6 address translation code as well as some
>bits in SCTP:
>
>include/net/addrconf.h:eui[0] = (ipv4_is_zeronet(addr) || 
>ipv4_is_private_10(addr) ||
>net/sctp/protocol.c:   } else if (ipv4_is_private_10(addr->v4.sin_addr.s_addr) 
>||
>
>So lazy...

I just discovered git-grep...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sysctl: Fix ax25 checks

2007-12-17 Thread Eric W. Biederman
Bernard Pidoux <[EMAIL PROTECTED]> writes:

> With 2.6.24-rc5 there is no /proc/net/ax25

/proc/sys/net/ax25?

> Here is an extract from dmesg after boot :

Groan.  I thought I had found the last of the bugs with
my sysctl sanity checks.  I guess you actually have to
use ax25 for this bug to show up.

Thank you for catching this. 

> ===
> sysctl table check failed: /net/ax25/ax0/ax25_default_mode .3.9.1.2 Unknown
> sysctl binary path
> Pid: 2936, comm: kissattach Not tainted 2.6.24-rc5 #1
>  [] set_fail+0x3b/0x43
>  [] sysctl_check_table+0x408/0x456
>  [] sysctl_check_table+0x41c/0x456
>  [] sysctl_check_table+0x41c/0x456
>  [] _spin_unlock+0x14/0x1c
>  [] sysctl_check_table+0x41c/0x456
>  [] sysctl_set_parent+0x19/0x2a
>  [] register_sysctl_table+0x45/0x85
>  [] ax25_register_sysctl+0x112/0x11c [ax25]
>  [] ax25_device_event+0x2e/0x90 [ax25]
>  [] notifier_call_chain+0x2a/0x47
>  [] raw_notifier_call_chain+0x17/0x1a
>  [] dev_open+0x6f/0x75
>  [] dev_change_flags+0x9c/0x148
>  [] __dev_get_by_name+0x68/0x73
>  [] devinet_ioctl+0x22e/0x53b
>  [] dev_ioctl+0x472/0x5ba
>  [] sock_ioctl+0x1aa/0x1cf
>  [] sock_ioctl+0x0/0x1cf
>  [] do_ioctl+0x19/0x4c
>  [] vfs_ioctl+0x1f4/0x20b
>  [] sysenter_past_esp+0x9a/0xa9
>  [] sys_ioctl+0x45/0x5d
>  [] sysenter_past_esp+0x5f/0xa9
>  ===
> sysctl table check failed: /net/ax25/ax0/backoff_type .3.9.1.3 Unknown sysctl
> binary path
> (...) truncated
>  ===
> sysctl table check failed: /net/ax25/ax0/connect_mode .3.9.1.4 Unknown sysctl
> binary path
> (...)
>  ===
> sysctl table check failed: /net/ax25/ax0/standard_window_size .3.9.1.5 Unknown
> sysctl binary path
>  ===
> (...)
>
> and so on ...
>

Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
---
 kernel/sysctl_check.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index bed939f..a68425a 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -428,7 +428,7 @@ static struct trans_ctl_table trans_net_netrom_table[] = {
{}
 };
 
-static struct trans_ctl_table trans_net_ax25_table[] = {
+static struct trans_ctl_table trans_net_ax25_param_table[] = {
{ NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" },
{ NET_AX25_DEFAULT_MODE,"ax25_default_mode" },
{ NET_AX25_BACKOFF_TYPE,"backoff_type" },
@@ -446,6 +446,11 @@ static struct trans_ctl_table trans_net_ax25_table[] = {
{}
 };
 
+static struct trans_ctl_table trans_net_ax25_table[] = {
+   { 0, NULL, trans_net_ax25_param_table },
+   {}
+};
+
 static struct trans_ctl_table trans_net_bridge_table[] = {
{ NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" },
{ NET_BRIDGE_NF_CALL_IPTABLES,  "bridge-nf-call-iptables" },
-- 
1.5.3.rc6.17.g1911

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.25 0/9]: SCTP: Update ADD-IP implementation to conform to spec

2007-12-17 Thread David Miller
From: Vlad Yasevich <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 17:40:25 -0500

> David Miller wrote:
> > From: Vlad Yasevich <[EMAIL PROTECTED]>
> > Date: Mon, 17 Dec 2007 16:32:40 -0500
> > 
> >> The following is a set of patches that updates the SCTP ADD-IP
> >> implementation to conform to the recently published RFC.
> > 
> > Patch 7 didn't seem to make it.
> > 
> > If you CC: on submissions like this, in the worst case at
> > least I'll get a copy even if the mailing list blocks it
> > for whatever reason (size, SPAM filter, etc.)
> 
> Hm... only missing from netdev.. :)
> 
> Do you want me to send just patch 7, or resend the whole series?

I'd like to see patch 7 so please send it.
Is it particularly big?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-2.6.25 1/8] Create ipv4_is_(__be32 addr) functions

2007-12-17 Thread David Miller
From: Jan Engelhardt <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 23:37:24 +0100 (CET)

> 
> On Dec 13 2007 15:38, Joe Perches wrote:
> >+static inline bool ipv4_is_private_10(__be32 addr)
> >+{
> >+return (addr & htonl(0xff00)) == htonl(0x0a00);
> >+}
> 
> What are these functions needed for, even? There does not seem to be
> any code (at least in davem's net-2.6.25:net/ipv4/, where I dared to grep)
> that uses them.

You really need to grep the whole tree, never ever decrease the scope
of directories to search if you want to see if an interface is used.

It's used by some ipv6 address translation code as well as some
bits in SCTP:

include/net/addrconf.h: eui[0] = (ipv4_is_zeronet(addr) || 
ipv4_is_private_10(addr) ||
net/sctp/protocol.c:} else if (ipv4_is_private_10(addr->v4.sin_addr.s_addr) 
||

So lazy...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-2.6.25 1/8] Create ipv4_is_(__be32 addr) functions

2007-12-17 Thread Joe Perches
On Mon, 2007-12-17 at 23:37 +0100, Jan Engelhardt wrote:
> >+static inline bool ipv4_is_loopback(__be32 addr)
> >+{
> >+return (addr & htonl(0xff00)) == htonl(0x7f00);
> >+}
> >+
> Can we use __constant_htonl()?

I believe the generated code is the same.

> >+static inline bool ipv4_is_private_10(__be32 addr)
> >+{
> >+return (addr & htonl(0xff00)) == htonl(0x0a00);
> >+}
> 
> What are these functions needed for, even? There does not seem to be
> any code (at least in davem's net-2.6.25:net/ipv4/, where I dared to grep)
> that uses them.

include/net/addrconf.h
net/sctp/protocol.c

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-2.6.25 1/8] Create ipv4_is_(__be32 addr) functions

2007-12-17 Thread David Miller
From: Jan Engelhardt <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 23:37:24 +0100 (CET)

> Can we use __constant_htonl()?

That should only be used in initializers.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.25 0/9]: SCTP: Update ADD-IP implementation to conform to spec

2007-12-17 Thread Vlad Yasevich
David Miller wrote:
> From: Vlad Yasevich <[EMAIL PROTECTED]>
> Date: Mon, 17 Dec 2007 16:32:40 -0500
> 
>> The following is a set of patches that updates the SCTP ADD-IP
>> implementation to conform to the recently published RFC.
> 
> Patch 7 didn't seem to make it.
> 
> If you CC: on submissions like this, in the worst case at
> least I'll get a copy even if the mailing list blocks it
> for whatever reason (size, SPAM filter, etc.)

Hm... only missing from netdev.. :)

Do you want me to send just patch 7, or resend the whole series?

-vlad

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-2.6.25 1/8] Create ipv4_is_(__be32 addr) functions

2007-12-17 Thread Jan Engelhardt

On Dec 13 2007 15:38, Joe Perches wrote:
>
>Change IPV4 specific macros LOOPBACK MULTICAST LOCAL_MCAST BADCLASS and ZERONET
>macros to inline functions ipv4_is_(__be32 addr)
>
>Adds type safety and arguably some readability.
>
>Changes since last submission:
>
>Removed ipv4_addr_octets function
>Used hex constants
>Converted recently added rfc3330 macros
>
>Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
>---
>+static inline bool ipv4_is_loopback(__be32 addr)
>+{
>+  return (addr & htonl(0xff00)) == htonl(0x7f00);
>+}
>+

Can we use __constant_htonl()?

>+static inline bool ipv4_is_private_10(__be32 addr)
>+{
>+  return (addr & htonl(0xff00)) == htonl(0x0a00);
>+}

What are these functions needed for, even? There does not seem to be
any code (at least in davem's net-2.6.25:net/ipv4/, where I dared to grep)
that uses them.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.25 0/9]: SCTP: Update ADD-IP implementation to conform to spec

2007-12-17 Thread David Miller
From: Vlad Yasevich <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 16:32:40 -0500

> The following is a set of patches that updates the SCTP ADD-IP
> implementation to conform to the recently published RFC.

Patch 7 didn't seem to make it.

If you CC: on submissions like this, in the worst case at
least I'll get a copy even if the mailing list blocks it
for whatever reason (size, SPAM filter, etc.)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] e1000: Dump the eeprom when a user encounters a bad checksum

2007-12-17 Thread Joe Perches
On Mon, 2007-12-17 at 13:50 -0800, Auke Kok wrote:
> diff --git a/drivers/net/e1000/e1000_main.c
> b/drivers/net/e1000/e1000_main.c
> index efd8c2d..aac55be 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -979,23 +1036,29 @@ e1000_probe(struct pci_dev *pdev,
>   e1000_reset_hw(&adapter->hw);
>  
>   /* make sure the EEPROM is good */
> -
>   if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
>   DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
> - goto err_eeprom;
> + e1000_dump_eeprom(adapter);
> + /*
> +  * set MAC address to all zeroes to invalidate and temporary
> +  * disable this device for the user. This blocks regular
> +  * traffic while still permitting ethtool ioctls from reaching
> +  * the hardware as well as allowing the user to run the
> +  * interface after manually setting a hw addr using
> +  * `ip set address`
> +  */
> + memset(adapter->hw.mac_addr, 0, netdev->addr_len);

Do you need to set netdev->dev_addr too?

> + } else {
> + /* copy the MAC address out of the EEPROM */
> + if (e1000_read_mac_addr(&adapter->hw))
> + DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
>   }
> -
> - /* copy the MAC address out of the EEPROM */
> -
> - if (e1000_read_mac_addr(&adapter->hw))
> - DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
> + /* don't block initalization here due to bad MAC address */

I just sent a patch to fix these typos and another pops up...

initialization

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] e1000: Dump the eeprom when a user encounters a bad checksum

2007-12-17 Thread Auke Kok
To help supporting users with a bad eeprom checksum, dump the
eeprom info when such a situation is encountered by a user.

Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
---

 drivers/net/e1000/e1000_main.c |   85 +++-
 1 files changed, 74 insertions(+), 11 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index efd8c2d..aac55be 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -817,6 +817,64 @@ e1000_reset(struct e1000_adapter *adapter)
 }
 
 /**
+ *  Dump the eeprom for users having checksum issues
+ **/
+void e1000_dump_eeprom(struct e1000_adapter *adapter)
+{
+   struct net_device *netdev = adapter->netdev;
+   struct ethtool_eeprom eeprom;
+   const struct ethtool_ops *ops = netdev->ethtool_ops;
+   u8 *data;
+   int i;
+   u16 csum_old, csum_new = 0;
+
+   eeprom.len = ops->get_eeprom_len(netdev);
+   eeprom.offset = 0;
+
+   data = kmalloc(eeprom.len, GFP_KERNEL);
+   if (!data) {
+   printk(KERN_ERR "Unable to allocate memory to dump EEPROM"
+  " data\n");
+   return;
+   }
+
+   ops->get_eeprom(netdev, &eeprom, data);
+
+   csum_old = (data[EEPROM_CHECKSUM_REG * 2]) +
+  (data[EEPROM_CHECKSUM_REG * 2 + 1] << 8);
+   for (i = 0; i < EEPROM_CHECKSUM_REG * 2; i += 2)
+   csum_new += data[i] + (data[i + 1] << 8);
+   csum_new = EEPROM_SUM - csum_new;
+
+   printk(KERN_ERR "/*/\n");
+   printk(KERN_ERR "Current EEPROM Checksum : 0x%04x\n", csum_old);
+   printk(KERN_ERR "Calculated  : 0x%04x\n", csum_new);
+
+   printk(KERN_ERR "OffsetValues\n");
+   printk(KERN_ERR "  ==\n");
+   print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 16, 1, data, 128, 0);
+
+   printk(KERN_ERR "Include this output when contacting your support "
+  "provider.\n");
+   printk(KERN_ERR "This is not a software error! Something bad "
+  "happened to your hardware or\n");
+   printk(KERN_ERR "EEPROM image. Ignoring this "
+  "problem could result in further problems,\n");
+   printk(KERN_ERR "possibly loss of data, corruption or system hangs!\n");
+   printk(KERN_ERR "The MAC Address will be reset to 00:00:00:00:00:00, "
+  "which is invalid\n");
+   printk(KERN_ERR "and requires you to set the proper MAC "
+  "address manually before continuing\n");
+   printk(KERN_ERR "to enable this network device.\n");
+   printk(KERN_ERR "Please inspect the EEPROM dump and report the issue "
+  "to your hardware vendor\n");
+   printk(KERN_ERR "or Intel Customer Support: [EMAIL PROTECTED]");
+   printk(KERN_ERR "/*/\n");
+
+   kfree(data);
+}
+
+/**
  * e1000_probe - Device Initialization Routine
  * @pdev: PCI device information struct
  * @ent: entry in e1000_pci_tbl
@@ -967,7 +1025,6 @@ e1000_probe(struct pci_dev *pdev,
adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw);
 
/* initialize eeprom parameters */
-
if (e1000_init_eeprom_params(&adapter->hw)) {
E1000_ERR("EEPROM initialization failed\n");
goto err_eeprom;
@@ -979,23 +1036,29 @@ e1000_probe(struct pci_dev *pdev,
e1000_reset_hw(&adapter->hw);
 
/* make sure the EEPROM is good */
-
if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
-   goto err_eeprom;
+   e1000_dump_eeprom(adapter);
+   /*
+* set MAC address to all zeroes to invalidate and temporary
+* disable this device for the user. This blocks regular
+* traffic while still permitting ethtool ioctls from reaching
+* the hardware as well as allowing the user to run the
+* interface after manually setting a hw addr using
+* `ip set address`
+*/
+   memset(adapter->hw.mac_addr, 0, netdev->addr_len);
+   } else {
+   /* copy the MAC address out of the EEPROM */
+   if (e1000_read_mac_addr(&adapter->hw))
+   DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
}
-
-   /* copy the MAC address out of the EEPROM */
-
-   if (e1000_read_mac_addr(&adapter->hw))
-   DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
+   /* don't block initalization here due to bad MAC address */
memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len);
memcpy(netdev->perm_addr, adapter->hw.mac_addr, netdev->addr_len);
 
-   if (!is_valid_ether_addr(netdev->perm_addr)) {
+   if (!is_valid_ether_addr(netdev->perm_addr))
DPRINTK(PROBE, ERR, "Invalid MAC Address\n");
-   g

[PATCH drivers/net/skfp/h/fplustm.h] parentheses around RX_FIFO_SPACE definition

2007-12-17 Thread Roel Kluin
drivers/net/skfp/h/fplustm.h:129:
#define RX_FIFO_SPACE   0x4000 - RX_FIFO_OFF

drivers/net/skfp/fplustm.c:1404:
smc->hw.fp.fifo.rx1_fifo_size = RX_FIFO_SPACE *
SMT_R1_RXD_COUNT/(SMT_R1_RXD_COUNT+SMT_R2_RXD_COUNT) ;
smc->hw.fp.fifo.rx2_fifo_size = RX_FIFO_SPACE *
SMT_R2_RXD_COUNT/(SMT_R1_RXD_COUNT+SMT_R2_RXD_COUNT) ;

Add parentheses to definition to prevent operator precedence errors

Signed-off-by: Roel Kluin <[EMAIL PROTECTED]>
---
diff --git a/drivers/net/skfp/h/fplustm.h b/drivers/net/skfp/h/fplustm.h
index 98bbf65..588579c 100644
--- a/drivers/net/skfp/h/fplustm.h
+++ b/drivers/net/skfp/h/fplustm.h
@@ -126,7 +126,7 @@ struct s_smt_rx_queue {
 #defineSYNC_TRAFFIC_ON 0x2
 
 /* big FIFO memory */
-#defineRX_FIFO_SPACE   0x4000 - RX_FIFO_OFF
+#defineRX_FIFO_SPACE   (0x4000 - RX_FIFO_OFF)
 #defineTX_FIFO_SPACE   0x4000
 
 #defineTX_SMALL_FIFO   0x0900
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] lack of /proc/net/ax25 with 2.6.24-rc5

2007-12-17 Thread Rafael J. Wysocki
On Sunday, 16 of December 2007, Bernard Pidoux wrote:
> With 2.6.24-rc5 there is no /proc/net/ax25

FYI, I've created a Bugzilla entry for this issue at:
http://bugzilla.kernel.org/show_bug.cgi?id=9589

Please add your address to the CC list in there.

Thanks,
Rafael


> Here is an extract from dmesg after boot :
> 
> ===
> sysctl table check failed: /net/ax25/ax0/ax25_default_mode .3.9.1.2 
> Unknown sysctl binary path
> Pid: 2936, comm: kissattach Not tainted 2.6.24-rc5 #1
>   [] set_fail+0x3b/0x43
>   [] sysctl_check_table+0x408/0x456
>   [] sysctl_check_table+0x41c/0x456
>   [] sysctl_check_table+0x41c/0x456
>   [] _spin_unlock+0x14/0x1c
>   [] sysctl_check_table+0x41c/0x456
>   [] sysctl_set_parent+0x19/0x2a
>   [] register_sysctl_table+0x45/0x85
>   [] ax25_register_sysctl+0x112/0x11c [ax25]
>   [] ax25_device_event+0x2e/0x90 [ax25]
>   [] notifier_call_chain+0x2a/0x47
>   [] raw_notifier_call_chain+0x17/0x1a
>   [] dev_open+0x6f/0x75
>   [] dev_change_flags+0x9c/0x148
>   [] __dev_get_by_name+0x68/0x73
>   [] devinet_ioctl+0x22e/0x53b
>   [] dev_ioctl+0x472/0x5ba
>   [] sock_ioctl+0x1aa/0x1cf
>   [] sock_ioctl+0x0/0x1cf
>   [] do_ioctl+0x19/0x4c
>   [] vfs_ioctl+0x1f4/0x20b
>   [] sysenter_past_esp+0x9a/0xa9
>   [] sys_ioctl+0x45/0x5d
>   [] sysenter_past_esp+0x5f/0xa9
>   ===
> sysctl table check failed: /net/ax25/ax0/backoff_type .3.9.1.3 Unknown 
> sysctl binary path
> (...) truncated
>   ===
> sysctl table check failed: /net/ax25/ax0/connect_mode .3.9.1.4 Unknown 
> sysctl binary path
> (...)
>   ===
> sysctl table check failed: /net/ax25/ax0/standard_window_size .3.9.1.5 
> Unknown sysctl binary path
>   ===
> (...)
> 
> and so on ...
> 
> 
> 
> Bernard Pidoux
> [EMAIL PROTECTED]
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 



-- 
"Premature optimization is the root of all evil." - Donald Knuth
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2.6.25 6/9] SCTP: Update ASCONF processing to conform to spec.

2007-12-17 Thread Vlad Yasevich
The processing of the ASCONF chunks has changed a lot in the
spec.  New items are:
1. A list of ASCONF-ACK chunks is now cached
2. The source of the packet is used in response.
3. New handling for unexpect ASCONF chunks.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/structs.h |   24 +---
 net/sctp/associola.c   |   58 ++-
 net/sctp/outqueue.c|   29 ++-
 net/sctp/sm_make_chunk.c   |   12 +++-
 net/sctp/sm_statefuns.c|   64 ---
 5 files changed, 143 insertions(+), 44 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index fb9b7e7..39e74d7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -744,6 +744,7 @@ struct sctp_chunk {
__u8 tsn_missing_report; /* Data chunk missing counter. */
__u8 data_accepted; /* At least 1 chunk in this packet accepted */
__u8 auth;  /* IN: was auth'ed | OUT: needs auth */
+   __u8 has_asconf;/* IN: have seen an asconf before */
 };
 
 void sctp_chunk_hold(struct sctp_chunk *);
@@ -1785,20 +1786,16 @@ struct sctp_association {
 */
struct sctp_chunk *addip_last_asconf;
 
-   /* ADDIP Section 4.2 Upon reception of an ASCONF Chunk.
+   /* ADDIP Section 5.2 Upon reception of an ASCONF Chunk.
 *
-* IMPLEMENTATION NOTE: As an optimization a receiver may wish
-* to save the last ASCONF-ACK for some predetermined period
-* of time and instead of re-processing the ASCONF (with the
-* same serial number) it may just re-transmit the
-* ASCONF-ACK. It may wish to use the arrival of a new serial
-* number to discard the previously saved ASCONF-ACK or any
-* other means it may choose to expire the saved ASCONF-ACK.
+* This is needed to implement itmes E1 - E4 of the updated
+* spec.  Here is the justification:
 *
-* [This is our saved ASCONF-ACK.  We invalidate it when a new
-* ASCONF serial number arrives.]
+* Since the peer may bundle multiple ASCONF chunks toward us,
+* we now need the ability to cache multiple ACKs.  The section
+* describes in detail how they are cached and cleaned up.
 */
-   struct sctp_chunk *addip_last_asconf_ack;
+   struct list_head asconf_ack_list;
 
/* These ASCONF chunks are waiting to be sent.
 *
@@ -1947,6 +1944,11 @@ int sctp_assoc_set_bind_addr_from_cookie(struct 
sctp_association *,
 struct sctp_cookie*,
 gfp_t gfp);
 int sctp_assoc_set_id(struct sctp_association *, gfp_t);
+void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc);
+struct sctp_chunk *sctp_assoc_lookup_asconf_ack(
+   const struct sctp_association *asoc,
+   __be32 serial);
+
 
 int sctp_cmp_addr_exact(const union sctp_addr *ss1,
const union sctp_addr *ss2);
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 61bebb9..a016e78 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -61,6 +61,7 @@
 
 /* Forward declarations for internal functions. */
 static void sctp_assoc_bh_rcv(struct work_struct *work);
+static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc);
 
 
 /* 1st Level Abstractions. */
@@ -242,6 +243,7 @@ static struct sctp_association 
*sctp_association_init(struct sctp_association *a
asoc->addip_serial = asoc->c.initial_tsn;
 
INIT_LIST_HEAD(&asoc->addip_chunk_list);
+   INIT_LIST_HEAD(&asoc->asconf_ack_list);
 
/* Make an empty list of remote transport addresses.  */
INIT_LIST_HEAD(&asoc->peer.transport_addr_list);
@@ -431,8 +433,7 @@ void sctp_association_free(struct sctp_association *asoc)
asoc->peer.transport_count = 0;
 
/* Free any cached ASCONF_ACK chunk. */
-   if (asoc->addip_last_asconf_ack)
-   sctp_chunk_free(asoc->addip_last_asconf_ack);
+   sctp_assoc_free_asconf_acks(asoc);
 
/* Free any cached ASCONF chunk. */
if (asoc->addip_last_asconf)
@@ -1485,3 +1486,56 @@ retry:
asoc->assoc_id = (sctp_assoc_t) assoc_id;
return error;
 }
+
+/* Free asconf_ack cache */
+static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc)
+{
+   struct sctp_chunk *ack;
+   struct sctp_chunk *tmp;
+
+   list_for_each_entry_safe(ack, tmp, &asoc->asconf_ack_list,
+   transmitted_list) {
+   list_del_init(&ack->transmitted_list);
+   sctp_chunk_free(ack);
+   }
+}
+
+/* Clean up the ASCONF_ACK queue */
+void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc)
+{
+   struct sctp_chunk *ack;
+   struct sctp_chunk *t

[PATCH 2.6.25 8/9] SCTP: Implement ADD-IP special case processing for ABORT chunk

2007-12-17 Thread Vlad Yasevich
ADD-IP spec has a special case for processing ABORTs:
F4) ... One special consideration is that ABORT
Chunks arriving destined to the IP address being deleted MUST be
ignored (see Section 5.3.1 for further details).

Check if the address we received on is in the DEL state, and if
so, ignore the ABORT.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/structs.h |2 +
 net/sctp/bind_addr.c   |   26 ++
 net/sctp/sm_statefuns.c|   52 ---
 3 files changed, 76 insertions(+), 4 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 32e6591..27e9cf5 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1200,6 +1200,8 @@ int sctp_add_bind_addr(struct sctp_bind_addr *, union 
sctp_addr *,
 int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
 int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
 struct sctp_sock *);
+int sctp_bind_addr_state(const struct sctp_bind_addr *bp,
+const union sctp_addr *addr);
 union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr  *bp,
const union sctp_addr   *addrs,
int addrcnt,
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index 4326611..13fbfb4 100644
--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -353,6 +353,32 @@ int sctp_bind_addr_match(struct sctp_bind_addr *bp,
return match;
 }
 
+/* Get the state of the entry in the bind_addr_list */
+int sctp_bind_addr_state(const struct sctp_bind_addr *bp,
+const union sctp_addr *addr)
+{
+   struct sctp_sockaddr_entry *laddr;
+   struct sctp_af *af;
+   int state = -1;
+
+   af = sctp_get_af_specific(addr->sa.sa_family);
+   if (unlikely(!af))
+   return state;
+
+   rcu_read_lock();
+   list_for_each_entry_rcu(laddr, &bp->address_list, list) {
+   if (!laddr->valid)
+   continue;
+   if (af->cmp_addr(&laddr->a, addr)) {
+   state = laddr->state;
+   break;
+   }
+   }
+   rcu_read_unlock();
+
+   return state;
+}
+
 /* Find the first address in the bind address list that is not present in
  * the addrs packed array.
  */
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 8fe2e61..eed47c6 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -143,6 +143,12 @@ static sctp_ierror_t sctp_sf_authenticate(const struct 
sctp_endpoint *ep,
const sctp_subtype_t type,
struct sctp_chunk *chunk);
 
+static sctp_disposition_t __sctp_sf_do_9_1_abort(const struct sctp_endpoint 
*ep,
+   const struct sctp_association *asoc,
+   const sctp_subtype_t type,
+   void *arg,
+   sctp_cmd_seq_t *commands);
+
 /* Small helper function that checks if the chunk length
  * is of the appropriate length.  The 'required_length' argument
  * is set to be the size of a specific chunk we are testing.
@@ -2095,11 +2101,20 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort(
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_abort_chunk_t)))
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
+   /* ADD-IP: Special case for ABORT chunks
+* F4)  One special consideration is that ABORT Chunks arriving
+* destined to the IP address being deleted MUST be
+* ignored (see Section 5.3.1 for further details).
+*/
+   if (SCTP_ADDR_DEL ==
+   sctp_bind_addr_state(&asoc->base.bind_addr, &chunk->dest))
+   return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
+
/* Stop the T5-shutdown guard timer.  */
sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
SCTP_TO(SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD));
 
-   return sctp_sf_do_9_1_abort(ep, asoc, type, arg, commands);
+   return __sctp_sf_do_9_1_abort(ep, asoc, type, arg, commands);
 }
 
 /*
@@ -2131,6 +2146,15 @@ sctp_disposition_t sctp_sf_shutdown_sent_abort(const 
struct sctp_endpoint *ep,
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_abort_chunk_t)))
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
+   /* ADD-IP: Special case for ABORT chunks
+* F4)  One special consideration is that ABORT Chunks arriving
+* destined to the IP address being deleted MUST be
+* ignored (see Section 5.3.1 for further details).
+*/
+   if (SCTP_ADDR_DEL ==
+   sctp_bind_addr_state(&asoc->base.bind_addr, &chunk->dest))
+   

[PATCH 2.6.25 5/9] SCTP: ADD-IP updates the states where ASCONFs can be sent

2007-12-17 Thread Vlad Yasevich
   C4)  Both ASCONF and ASCONF-ACK Chunks MUST NOT be sent in any SCTP
state except ESTABLISHED, SHUTDOWN-PENDING, SHUTDOWN-RECEIVED,
and SHUTDOWN-SENT.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_statetable.c |   18 +-
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index a93a4bc..e6016e4 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -457,11 +457,11 @@ static const sctp_sm_table_entry_t 
chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][
/* SCTP_STATE_ESTABLISHED */ \
TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
/* SCTP_STATE_SHUTDOWN_PENDING */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
/* SCTP_STATE_SHUTDOWN_SENT */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
 } /* TYPE_SCTP_ASCONF */
@@ -478,11 +478,11 @@ static const sctp_sm_table_entry_t 
chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][
/* SCTP_STATE_ESTABLISHED */ \
TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
/* SCTP_STATE_SHUTDOWN_PENDING */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
/* SCTP_STATE_SHUTDOWN_SENT */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
-   TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+   TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
 } /* TYPE_SCTP_ASCONF_ACK */
@@ -691,11 +691,11 @@ chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
/* SCTP_STATE_ESTABLISHED */ \
TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
/* SCTP_STATE_SHUTDOWN_PENDING */ \
-   TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
+   TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
/* SCTP_STATE_SHUTDOWN_SENT */ \
-   TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
+   TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
-   TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
+   TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
 } /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */
-- 
1.5.3.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2.6.25 9/9] SCTP: Follow Add-IP security consideratiosn wrt INIT/INIT-ACK

2007-12-17 Thread Vlad Yasevich
The Security Considerations section of RFC 5061 has the following
text:

   If an SCTP endpoint that supports this extension receives an INIT
   that indicates that the peer supports the ASCONF extension but does
   NOT support the [RFC4895] extension, the receiver of such an INIT
   MUST send an ABORT in response.  Note that an implementation is
   allowed to silently discard such an INIT as an option as well, but
   under NO circumstance is an implementation allowed to proceed with
   the association setup by sending an INIT-ACK in response.

   An implementation that receives an INIT-ACK that indicates that the
   peer does not support the [RFC4895] extension MUST NOT send the
   COOKIE-ECHO to establish the association.  Instead, the
   implementation MUST discard the INIT-ACK and report to the upper-
   layer user that an association cannot be established destroying the
   Transmission Control Block (TCB).

Follow the recomendations.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_make_chunk.c |   47 ++---
 net/sctp/sm_statefuns.c  |7 ++---
 2 files changed, 46 insertions(+), 8 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 68a994c..ae9fc9e 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1830,6 +1830,39 @@ static int sctp_process_hn_param(const struct 
sctp_association *asoc,
return 0;
 }
 
+static int sctp_verify_ext_param(union sctp_params param)
+{
+   __u16 num_ext = ntohs(param.p->length) - sizeof(sctp_paramhdr_t);
+   int have_auth = 0;
+   int have_asconf = 0;
+   int i;
+
+   for (i = 0; i < num_ext; i++) {
+   switch (param.ext->chunks[i]) {
+   case SCTP_CID_AUTH:
+   have_auth = 1;
+   break;
+   case SCTP_CID_ASCONF:
+   case SCTP_CID_ASCONF_ACK:
+   have_asconf = 1;
+   break;
+   }
+   }
+
+   /* ADD-IP Security: The draft requires us to ABORT or ignore the
+* INIT/INIT-ACK if ADD-IP is listed, but AUTH is not.  Do this
+* only if ADD-IP is turned on and we are not backward-compatible
+* mode.
+*/
+   if (sctp_addip_noauth)
+   return 1;
+
+   if (sctp_addip_enable && !have_auth && have_asconf)
+   return 0;
+
+   return 1;
+}
+
 static void sctp_process_ext_param(struct sctp_association *asoc,
union sctp_params param)
 {
@@ -1960,7 +1993,11 @@ static sctp_ierror_t sctp_verify_param(const struct 
sctp_association *asoc,
case SCTP_PARAM_UNRECOGNIZED_PARAMETERS:
case SCTP_PARAM_ECN_CAPABLE:
case SCTP_PARAM_ADAPTATION_LAYER_IND:
+   break;
+
case SCTP_PARAM_SUPPORTED_EXT:
+   if (!sctp_verify_ext_param(param))
+   return SCTP_IERROR_ABORT;
break;
 
case SCTP_PARAM_SET_PRIMARY:
@@ -2133,10 +2170,11 @@ int sctp_process_init(struct sctp_association *asoc, 
sctp_cid_t cid,
!asoc->peer.peer_hmacs))
asoc->peer.auth_capable = 0;
 
-
-   /* If the peer claims support for ADD-IP without support
-* for AUTH, disable support for ADD-IP.
-* Do this only if backward compatible mode is turned off.
+   /* In a non-backward compatible mode, if the peer claims
+* support for ADD-IP but not AUTH,  the ADD-IP spec states
+* that we MUST ABORT the association. Section 6.  The section
+* also give us an option to silently ignore the packet, which
+* is what we'll do here.
 */
if (!sctp_addip_noauth &&
 (asoc->peer.asconf_capable && !asoc->peer.auth_capable)) {
@@ -2144,6 +2182,7 @@ int sctp_process_init(struct sctp_association *asoc, 
sctp_cid_t cid,
  SCTP_PARAM_DEL_IP |
  SCTP_PARAM_SET_PRIMARY);
asoc->peer.asconf_capable = 0;
+   goto clean_up;
}
 
/* Walk list of transports, removing transports in the UNKNOWN state. */
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index eed47c6..aadbed1 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -507,7 +507,9 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct 
sctp_endpoint *ep,
  &err_chunk)) {
 
/* This chunk contains fatal error. It is to be discarded.
-* Send an ABORT, with causes if there is any.
+* Send an ABORT, with causes.  If there are no causes,
+* then there wasn't enough memory.  Just terminate
+* the association.
 */
if (err_chunk) {
packet = sctp_abort_

[PATCH 2.6.25 3/9] SCTP: Add the handling of "Set Primary IP Address" parameter to INIT

2007-12-17 Thread Vlad Yasevich
The ADD-IP "Set Primary IP Address" parameter is allowed in the
INIT/INIT-ACK exchange.  Allow processing of this parameter during
the INIT/INIT-ACK.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/structs.h |1 +
 net/sctp/sm_make_chunk.c   |   27 +++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 55acadc..fb9b7e7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -451,6 +451,7 @@ union sctp_params {
struct sctp_random_param *random;
struct sctp_chunks_param *chunks;
struct sctp_hmac_algo_param *hmac_algo;
+   struct sctp_addip_param *addip;
 };
 
 /* RFC 2960.  Section 3.3.5 Heartbeat.
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 00598ee..62af33d 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1963,6 +1963,11 @@ static sctp_ierror_t sctp_verify_param(const struct 
sctp_association *asoc,
case SCTP_PARAM_SUPPORTED_EXT:
break;
 
+   case SCTP_PARAM_SET_PRIMARY:
+   if (sctp_addip_enable)
+   break;
+   goto fallthrough;
+
case SCTP_PARAM_HOST_NAME_ADDRESS:
/* Tell the peer, we won't support this param.  */
sctp_process_hn_param(asoc, param, chunk, err_chunk);
@@ -2280,6 +2285,8 @@ static int sctp_process_param(struct sctp_association 
*asoc,
sctp_scope_t scope;
time_t stale;
struct sctp_af *af;
+   union sctp_addr_param *addr_param;
+   struct sctp_transport *t;
 
/* We maintain all INIT parameters in network byte order all the
 * time.  This allows us to not worry about whether the parameters
@@ -2370,6 +2377,26 @@ static int sctp_process_param(struct sctp_association 
*asoc,
asoc->peer.adaptation_ind = param.aind->adaptation_ind;
break;
 
+   case SCTP_PARAM_SET_PRIMARY:
+   addr_param = param.v + sizeof(sctp_addip_param_t);
+
+   af = sctp_get_af_specific(param_type2af(param.p->type));
+   af->from_addr_param(&addr, addr_param,
+   htons(asoc->peer.port), 0);
+
+   /* if the address is invalid, we can't process it.
+* XXX: see spec for what to do.
+*/
+   if (!af->addr_valid(&addr, NULL, NULL))
+   break;
+
+   t = sctp_assoc_lookup_paddr(asoc, &addr);
+   if (!t)
+   break;
+
+   sctp_assoc_set_primary(asoc, t);
+   break;
+
case SCTP_PARAM_SUPPORTED_EXT:
sctp_process_ext_param(asoc, param);
break;
-- 
1.5.3.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2.6.25 4/9] SCTP: Update association lookup to look at ASCONF chunks as well

2007-12-17 Thread Vlad Yasevich
ADD-IP draft section 5.2 specifies that if an association can not
be found using the source and destination of the IP packet,
then, if the packet contains ASCONF chunks, the Address Parameter
TLV should be used to lookup an association.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/input.c |  124 -
 1 files changed, 103 insertions(+), 21 deletions(-)

diff --git a/net/sctp/input.c b/net/sctp/input.c
index b08c7cb..d695f71 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -891,14 +891,6 @@ static struct sctp_association 
*__sctp_rcv_init_lookup(struct sk_buff *skb,
 
ch = (sctp_chunkhdr_t *) skb->data;
 
-   /* The code below will attempt to walk the chunk and extract
-* parameter information.  Before we do that, we need to verify
-* that the chunk length doesn't cause overflow.  Otherwise, we'll
-* walk off the end.
-*/
-   if (WORD_ROUND(ntohs(ch->length)) > skb->len)
-   return NULL;
-
/*
 * This code will NOT touch anything inside the chunk--it is
 * strictly READ-ONLY.
@@ -935,6 +927,44 @@ static struct sctp_association 
*__sctp_rcv_init_lookup(struct sk_buff *skb,
return NULL;
 }
 
+/* ADD-IP, Section 5.2
+ * When an endpoint receives an ASCONF Chunk from the remote peer
+ * special procedures may be needed to identify the association the
+ * ASCONF Chunk is associated with. To properly find the association
+ * the following procedures SHOULD be followed:
+ *
+ * D2) If the association is not found, use the address found in the
+ * Address Parameter TLV combined with the port number found in the
+ * SCTP common header. If found proceed to rule D4.
+ *
+ * D2-ext) If more than one ASCONF Chunks are packed together, use the
+ * address found in the ASCONF Address Parameter TLV of each of the
+ * subsequent ASCONF Chunks. If found, proceed to rule D4.
+ */
+static struct sctp_association *__sctp_rcv_asconf_lookup(
+   sctp_chunkhdr_t *ch,
+   const union sctp_addr *laddr,
+   __be32 peer_port,
+   struct sctp_transport **transportp)
+{
+   sctp_addip_chunk_t *asconf = (struct sctp_addip_chunk *)ch;
+   struct sctp_af *af;
+   union sctp_addr_param *param;
+   union sctp_addr paddr;
+
+   /* Skip over the ADDIP header and find the Address parameter */
+   param = (union sctp_addr_param *)(asconf + 1);
+
+   af = sctp_get_af_specific(param_type2af(param->v4.param_hdr.type));
+   if (unlikely(!af))
+   return NULL;
+
+   af->from_addr_param(&paddr, param, peer_port, 0);
+
+   return __sctp_lookup_association(laddr, &paddr, transportp);
+}
+
+
 /* SCTP-AUTH, Section 6.3:
 *If the receiver does not find a STCB for a packet containing an AUTH
 *chunk as the first chunk and not a COOKIE-ECHO chunk as the second
@@ -943,20 +973,64 @@ static struct sctp_association 
*__sctp_rcv_init_lookup(struct sk_buff *skb,
 *
 * This means that any chunks that can help us identify the association need
 * to be looked at to find this assocation.
-*
-* TODO: The only chunk currently defined that can do that is ASCONF, but we
-* don't support that functionality yet.
 */
-static struct sctp_association *__sctp_rcv_auth_lookup(struct sk_buff *skb,
- const union sctp_addr *paddr,
+static struct sctp_association *__sctp_rcv_walk_lookup(struct sk_buff *skb,
  const union sctp_addr *laddr,
  struct sctp_transport **transportp)
 {
-   /* XXX - walk through the chunks looking for something that can
-* help us find the association.  INIT, and INIT-ACK are not permitted.
-* That leaves ASCONF, but we don't support that yet.
+   struct sctp_association *asoc = NULL;
+   sctp_chunkhdr_t *ch;
+   int have_auth = 0;
+   unsigned int chunk_num = 1;
+   __u8 *ch_end;
+
+   /* Walk through the chunks looking for AUTH or ASCONF chunks
+* to help us find the association.
 */
-   return NULL;
+   ch = (sctp_chunkhdr_t *) skb->data;
+   do {
+   /* Break out if chunk length is less then minimal. */
+   if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t))
+   break;
+
+   ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
+   if (ch_end > skb_tail_pointer(skb))
+   break;
+
+   switch(ch->type) {
+   case SCTP_CID_AUTH:
+   have_auth = chunk_num;
+   break;
+
+   case SCTP_CID_COOKIE_ECHO:
+   /* If a packet arrives containing an AUTH chunk as
+* a first chunk, a COOKIE-ECHO chunk 

[PATCH 2.6.25 1/9] SCTP: Discard unauthenticated ASCONF and ASCONF ACK chunks

2007-12-17 Thread Vlad Yasevich
Now that we support AUTH, discard unauthenticated ASCONF and ASCONF ACK
chunks as mandated in the ADD-IP spec.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 net/sctp/sm_statefuns.c |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 5fb8477..859be75 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3399,6 +3399,15 @@ sctp_disposition_t sctp_sf_do_asconf(const struct 
sctp_endpoint *ep,
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
}
 
+   /* ADD-IP: Section 4.1.1
+* This chunk MUST be sent in an authenticated way by using
+* the mechanism defined in [I-D.ietf-tsvwg-sctp-auth]. If this chunk
+* is received unauthenticated it MUST be silently discarded as
+* described in [I-D.ietf-tsvwg-sctp-auth].
+*/
+   if (!sctp_addip_noauth && !chunk->auth)
+   return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
+
/* Make sure that the ASCONF ADDIP chunk has a valid length.  */
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_addip_chunk_t)))
return sctp_sf_violation_chunklen(ep, asoc, type, arg,
@@ -3485,6 +3494,15 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct 
sctp_endpoint *ep,
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
}
 
+   /* ADD-IP, Section 4.1.2:
+* This chunk MUST be sent in an authenticated way by using
+* the mechanism defined in [I-D.ietf-tsvwg-sctp-auth]. If this chunk
+* is received unauthenticated it MUST be silently discarded as
+* described in [I-D.ietf-tsvwg-sctp-auth].
+*/
+   if (!sctp_addip_noauth && !asconf_ack->auth)
+   return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
+
/* Make sure that the ADDIP chunk has a valid length.  */
if (!sctp_chunk_length_valid(asconf_ack, sizeof(sctp_addip_chunk_t)))
return sctp_sf_violation_chunklen(ep, asoc, type, arg,
-- 
1.5.3.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2.6.25 2/9] SCTP: Handle the wildcard ADD-IP Address parameter

2007-12-17 Thread Vlad Yasevich
The Address Parameter in the parameter list of the ASCONF chunk
may be a wildcard address.  In this case special processing
is required.  For the 'add' case, the source IP of the packet is
added.  In the 'del' case, all addresses except the source IP
of packet are removed. In the "mark primary" case, the source
address is marked as primary.

Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
---
 include/net/sctp/structs.h |2 ++
 net/sctp/associola.c   |   17 +
 net/sctp/sm_make_chunk.c   |   40 
 3 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 002a00a..55acadc 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1938,6 +1938,8 @@ void sctp_assoc_rwnd_increase(struct sctp_association *, 
unsigned);
 void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned);
 void sctp_assoc_set_primary(struct sctp_association *,
struct sctp_transport *);
+void sctp_assoc_del_nonprimary_peers(struct sctp_association *,
+   struct sctp_transport *);
 int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
 gfp_t);
 int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 33ae9b0..61bebb9 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -730,6 +730,23 @@ struct sctp_transport *sctp_assoc_lookup_paddr(
return NULL;
 }
 
+/* Remove all transports except a give one */
+void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc,
+struct sctp_transport *primary)
+{
+   struct sctp_transport   *temp;
+   struct sctp_transport   *t;
+
+   list_for_each_entry_safe(t, temp, &asoc->peer.transport_addr_list,
+transports) {
+   /* if the current transport is not the primary one, delete it */
+   if (t != primary)
+   sctp_assoc_rm_peer(asoc, t);
+   }
+
+   return;
+}
+
 /* Engage in transport control operations.
  * Mark the transport up or down and send a notification to the user.
  * Select and update the new active and retran paths.
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f487629..00598ee 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2721,7 +2721,6 @@ static __be16 sctp_process_asconf_param(struct 
sctp_association *asoc,
struct sctp_transport *peer;
struct sctp_af *af;
union sctp_addr addr;
-   struct list_head *pos;
union sctp_addr_param *addr_param;
 
addr_param = (union sctp_addr_param *)
@@ -2732,8 +2731,24 @@ static __be16 sctp_process_asconf_param(struct 
sctp_association *asoc,
return SCTP_ERROR_INV_PARAM;
 
af->from_addr_param(&addr, addr_param, htons(asoc->peer.port), 0);
+
+   /* ADDIP 4.2.1  This parameter MUST NOT contain a broadcast
+* or multicast address.
+* (note: wildcard is permitted and requires special handling so
+*  make sure we check for that)
+*/
+   if (!af->is_any(&addr) && !af->addr_valid(&addr, NULL, asconf->skb))
+   return SCTP_ERROR_INV_PARAM;
+
switch (asconf_param->param_hdr.type) {
case SCTP_PARAM_ADD_IP:
+   /* Section 4.2.1:
+* If the address 0.0.0.0 or ::0 is provided, the source
+* address of the packet MUST be added.
+*/
+   if (af->is_any(&addr))
+   memcpy(&addr, &asconf->source, sizeof(addr));
+
/* ADDIP 4.3 D9) If an endpoint receives an ADD IP address
 * request and does not have the local resources to add this
 * new address to the association, it MUST return an Error
@@ -2755,8 +2770,7 @@ static __be16 sctp_process_asconf_param(struct 
sctp_association *asoc,
 * MUST send an Error Cause TLV with the error cause set to the
 * new error code 'Request to Delete Last Remaining IP Address'.
 */
-   pos = asoc->peer.transport_addr_list.next;
-   if (pos->next == &asoc->peer.transport_addr_list)
+   if (asoc->peer.transport_count == 1)
return SCTP_ERROR_DEL_LAST_IP;
 
/* ADDIP 4.3 D8) If a request is received to delete an IP
@@ -2769,9 +2783,27 @@ static __be16 sctp_process_asconf_param(struct 
sctp_association *asoc,
if (sctp_cmp_addr_exact(sctp_source(asconf), &addr))
return SCTP_ERROR_DEL_SRC_IP;
 
-   sctp_assoc_del_peer(asoc, &addr);
+   /* Section 4.2.2
+* If the address 0.0.0.0 or ::0 is provided, all
+* addresses of the peer except the sou

[PATCH 2.6.25 0/9]: SCTP: Update ADD-IP implementation to conform to spec

2007-12-17 Thread Vlad Yasevich
The following is a set of patches that updates the SCTP ADD-IP implementation
to conform to the recently published RFC.

ADD-IP is a SCTP Dynamic Address Configuration extensions, whereby
the two end systems can dynamically modify the address lists for a given
connection.  One of the applications of this is mobility.  The systems
exchange Address Configuration (ASCONF) and Address Configuration
Acknowlegement (ASCONF-ACK) messages which contain the info.  If you
want more info the operation, read RFC 5061.

The implementation in lksctp was a few years old and implemented draft-05
of the specification.  So this long overdue.

-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Please pull 'upstream-davem' branch of wireless-2.6

2007-12-17 Thread John W. Linville
Dave,

A few more patches for 2.6.25...  Note that there are a few one-line
patches to some drivers to support a new flag used for timestamps in
radiotap headers for mac80211, and a couple others related to the new
scan capabilities stuff added to WEXT in order to better support hidden
SSIDs for wpa_supplicant/NetworkManager.  I'll CC Jeff as well...

Let me know if there are any problems!

Thanks,

John

---

Individual patches are available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem

---

The following changes since commit e75bf3477c0d63cdd1f49f91a90816e4360ffc23:
  Joe Perches (1):
[PARISC]: Fix build after ipv4_is_*() changes.

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 
upstream-davem

Dan Williams (1):
  introduce WEXT scan capabilities

Johannes Berg (2):
  mac80211: conditionally include timestamp in radiotap information
  wireless: make drivers include the TSF RX flag where appropriate

 drivers/net/wireless/b43/xmit.c|1 +
 drivers/net/wireless/b43legacy/xmit.c  |1 +
 drivers/net/wireless/hostap/hostap_ioctl.c |3 ++
 drivers/net/wireless/ipw2200.c |2 +
 drivers/net/wireless/p54common.c   |1 +
 drivers/net/wireless/rtl8187_dev.c |1 +
 include/linux/wireless.h   |   13 +++
 include/net/mac80211.h |3 ++
 net/mac80211/ieee80211_ioctl.c |2 +
 net/mac80211/rx.c  |   48 ++-
 10 files changed, 59 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 0bd6f8a..77b3690 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -526,6 +526,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, 
const void *_rxhdr)
status.rate = b43_plcp_get_bitrate_cck(plcp);
status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);
status.mactime = mactime;
+   status.flag |= RX_FLAG_TSFT;
 
chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
switch (chanstat & B43_RX_CHAN_PHYTYPE) {
diff --git a/drivers/net/wireless/b43legacy/xmit.c 
b/drivers/net/wireless/b43legacy/xmit.c
index fa1e656..b71cc94 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -532,6 +532,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev,
status.rate = b43legacy_plcp_get_bitrate_cck(plcp);
status.antenna = !!(phystat0 & B43legacy_RX_PHYST0_ANT);
status.mactime = mactime;
+   status.flag |= RX_FLAG_TSFT;
 
chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
  B43legacy_RX_CHAN_ID_SHIFT;
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c 
b/drivers/net/wireless/hostap/hostap_ioctl.c
index d8f5efc..3a57d48 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1089,6 +1089,9 @@ static int prism2_ioctl_giwrange(struct net_device *dev,
range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
 
+   if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1))
+   range->scan_capa = IW_SCAN_CAPA_ESSID;
+
return 0;
 }
 
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 54f44e5..e30ad24 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -8901,6 +8901,8 @@ static int ipw_wx_get_range(struct net_device *dev,
range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
 
+   range->scan_capa = IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE;
+
IPW_DEBUG_WX("GET Range\n");
return 0;
 }
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c
index 1437db0..5f8d898 100644
--- a/drivers/net/wireless/p54common.c
+++ b/drivers/net/wireless/p54common.c
@@ -314,6 +314,7 @@ static void p54_rx_data(struct ieee80211_hw *dev, struct 
sk_buff *skb)
rx_status.phymode = MODE_IEEE80211G;
rx_status.antenna = hdr->antenna;
rx_status.mactime = le64_to_cpu(hdr->timestamp);
+   rx_status.flag |= RX_FLAG_TSFT;
 
skb_pull(skb, sizeof(*hdr));
skb_trim(skb, le16_to_cpu(hdr->len));
diff --git a/drivers/net/wireless/rtl8187_dev.c 
b/drivers/net/wireless/rtl8187_dev.c
index e454ae8..b23191f 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -225,6 +225,7 @@ static void rtl8187_rx_cb(struct urb *urb)
rx_status.channel = dev->conf.channel;
rx_status.phymode = dev->conf.phymode;
rx_status.mactime = le64_to_cpu(hdr->mac_time);
+   rx_status.flag |= RX_FLAG_TSFT;
if (flags & (1 << 13))
rx_stat

Please pull 'fixes-davem' branch of wireless-2.6

2007-12-17 Thread John W. Linville
Dave,

A few more small fixes for 2.6.24.  Let me know if there are any
problems!

Thanks,

John

---

Individual patches are available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/fixes-davem

---

The following changes since commit 82d29bf6dc7317aeb0a3a13c2348ca8591965875:
  Linus Torvalds (1):
Linux 2.6.24-rc5

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 
fixes-davem

Cyrill Gorcunov (1):
  NET: mac80211: fix inappropriate memory freeing

Johannes Berg (1):
  mac80211: fix header ops

Michael Wu (1):
  mac80211: Drop out of associated state if link is lost

 net/mac80211/ieee80211.c  |1 -
 net/mac80211/ieee80211_rate.c |2 +-
 net/mac80211/ieee80211_sta.c  |8 ++--
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 505af1f..6378850 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -427,7 +427,6 @@ static const struct header_ops ieee80211_header_ops = {
 void ieee80211_if_setup(struct net_device *dev)
 {
ether_setup(dev);
-   dev->header_ops = &ieee80211_header_ops;
dev->hard_start_xmit = ieee80211_subif_start_xmit;
dev->wireless_handlers = &ieee80211_iw_handler_def;
dev->set_multicast_list = ieee80211_set_multicast_list;
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 7254bd6..9f26a10 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -59,11 +59,11 @@ void ieee80211_rate_control_unregister(struct 
rate_control_ops *ops)
list_for_each_entry(alg, &rate_ctrl_algs, list) {
if (alg->ops == ops) {
list_del(&alg->list);
+   kfree(alg);
break;
}
}
mutex_unlock(&rate_ctrl_mutex);
-   kfree(alg);
 }
 EXPORT_SYMBOL(ieee80211_rate_control_unregister);
 
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 16afd24..bee8080 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -808,12 +808,8 @@ static void ieee80211_associated(struct net_device *dev,
sta_info_put(sta);
}
if (disassoc) {
-   union iwreq_data wrqu;
-   memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
-   wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-   wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
-   mod_timer(&ifsta->timer, jiffies +
- IEEE80211_MONITORING_INTERVAL + 30 * HZ);
+   ifsta->state = IEEE80211_DISABLED;
+   ieee80211_set_associated(dev, ifsta, 0);
} else {
mod_timer(&ifsta->timer, jiffies +
  IEEE80211_MONITORING_INTERVAL);
-- 
John W. Linville
[EMAIL PROTECTED]
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] drivers/net/: Spelling fixes

2007-12-17 Thread Joe Perches
On Mon, 2007-12-17 at 21:56 +0100, Stefano Brivio wrote:
> On Mon, 17 Dec 2007 11:40:08 -0800
> Joe Perches <[EMAIL PROTECTED]> wrote:
> > diff --git a/drivers/net/ucc_geth_ethtool.c
> b/drivers/net/ucc_geth_ethtool.c
> > index 9a9622c..f8d319b 100644
> > --- a/drivers/net/ucc_geth_ethtool.c
> > +++ b/drivers/net/ucc_geth_ethtool.c
> > @@ -7,7 +7,7 @@
> >   *
> >   * Limitation: 
> >   * Can only get/set setttings of the first queue.
>  ^^^

Good eyes...  Unrelated to what I changed too.
cheers, Joe

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 121cb10..cdfb2b0 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -6823,8 +6823,8 @@ static void do_s2io_card_down(struct s2io_nic * sp, int 
do_io)
while(do_io) {
/* As per the HW requirement we need to replenish the
 * receive buffer to avoid the ring bump. Since there is
-* no intention of processing the Rx frame at this pointwe are
-* just settting the ownership bit of rxd in Each Rx
+* no intention of processing the Rx frame at this point we are
+* just setting the ownership bit of rxd in each Rx
 * ring to HW and set the appropriate buffer size
 * based on the ring mode
 */
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c
index f8d319b..3e50df8 100644
--- a/drivers/net/ucc_geth_ethtool.c
+++ b/drivers/net/ucc_geth_ethtool.c
@@ -6,7 +6,7 @@
  * Author: Li Yang <[EMAIL PROTECTED]>
  *
  * Limitation: 
- * Can only get/set setttings of the first queue.
+ * Can only get/set settings of the first queue.
  * Need to re-open the interface manually after changing some parameters.
  *
  * This program is free software; you can redistribute  it and/or modify it


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'fixes-jgarzik' branch of wireless-2.6

2007-12-17 Thread Jeff Garzik

John W. Linville wrote:

Jeff,

A few more fixes for 2.6.24...let me know if there are any problems!

Thanks,

John

P.S.  The zd1211rw patch is already in netdev-2.6#upstream, but it
belongs in 2.6.24 as well.

---

Individual patches available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/fixes-jgarzik

---

The following changes since commit 82d29bf6dc7317aeb0a3a13c2348ca8591965875:
  Linus Torvalds (1):
Linux 2.6.24-rc5

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 
fixes-jgarzik

Adrian Bunk (1):
  wireless/ipw2200.c: add __dev{init,exit} annotations

Andrew Morton (1):
  bcm43xx_debugfs sscanf fix

Cyrill Gorcunov (2):
  ieee80211_rate: missed unlock
  iwlwifi3945/4965: fix rate control algo reference leak

Dan Williams (1):
  libertas: select WIRELESS_EXT

Larry Finger (1):
  b43: Fix rfkill radio LED

Stefano Brivio (1):
  libertas: add Dan Williams as maintainer

Ulrich Kunitz (1):
  zd1211rw: Fix alignment problems

Zhu Yi (1):
  iwlwifi: fix rf_kill state inconsistent during suspend and resume

 MAINTAINERS|6 
 drivers/net/wireless/Kconfig   |1 +
 drivers/net/wireless/b43/leds.c|4 ++
 drivers/net/wireless/b43/main.c|   22 +++---
 drivers/net/wireless/b43/rfkill.c  |   37 ---
 drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c |2 +-
 drivers/net/wireless/ipw2200.c |7 ++--
 drivers/net/wireless/iwlwifi/iwl3945-base.c|5 ++-
 drivers/net/wireless/iwlwifi/iwl4965-base.c|5 ++-
 drivers/net/wireless/zd1211rw/zd_mac.c |   10 +-
 net/mac80211/ieee80211_rate.c  |1 +
 11 files changed, 76 insertions(+), 24 deletions(-)


pulled


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] net/sctp/: Spelling fixes

2007-12-17 Thread Vlad Yasevich
Joe Perches wrote:
> Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

Thanks...  I am surprised this is all you found :)

ACK.

-vlad

> ---
>  net/sctp/sm_make_chunk.c |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index f487629..ed7c9e3 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -286,7 +286,7 @@ struct sctp_chunk *sctp_make_init(const struct 
> sctp_association *asoc,
>  
>   sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param);
>  
> - /* Add the supported extensions paramter.  Be nice and add this
> + /* Add the supported extensions parameter.  Be nice and add this
>* fist before addiding the parameters for the extensions themselves
>*/
>   if (num_ext) {
> @@ -2859,7 +2859,7 @@ struct sctp_chunk *sctp_process_asconf(struct 
> sctp_association *asoc,
>   chunk_len -= length;
>  
>   /* Skip the address parameter and store a pointer to the first
> -  * asconf paramter.
> +  * asconf parameter.
>*/
>   length = ntohs(addr_param->v4.param_hdr.length);
>   asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
> @@ -2868,7 +2868,7 @@ struct sctp_chunk *sctp_process_asconf(struct 
> sctp_association *asoc,
>   /* create an ASCONF_ACK chunk.
>* Based on the definitions of parameters, we know that the size of
>* ASCONF_ACK parameters are less than or equal to the twice of ASCONF
> -  * paramters.
> +  * parameters.
>*/
>   asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2);
>   if (!asconf_ack)
> @@ -3062,7 +3062,7 @@ int sctp_process_asconf_ack(struct sctp_association 
> *asoc,
>   asconf_len -= length;
>  
>   /* Skip the address parameter in the last asconf sent and store a
> -  * pointer to the first asconf paramter.
> +  * pointer to the first asconf parameter.
>*/
>   length = ntohs(addr_param->v4.param_hdr.length);
>   asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [NET][POWERPC] ucc_geth: really fix section mismatch

2007-12-17 Thread Jeff Garzik

Anton Vorontsov wrote:

Commit ed7e63a51d46e835422d89c687b8a3e419a4212a has tried to fix
section mismatch:

WARNING: vmlinux.o(.init.text+0x17278): Section mismatch: reference to
.exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init')

But that mismatch still happens.

This patch actually fixing section mismatch by removing __exit from
the header file.

Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
---
 drivers/net/ucc_geth_mii.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h
index d834370..1e45b20 100644
--- a/drivers/net/ucc_geth_mii.h
+++ b/drivers/net/ucc_geth_mii.h
@@ -96,5 +96,5 @@ enum enet_tbi_mii_reg {
 int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum);
 int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
 int __init uec_mdio_init(void);
-void __exit uec_mdio_exit(void);


applied #upstream-fixes


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT] tehuti: napi fix

2007-12-17 Thread Stephen Hemminger
On Sun, 16 Dec 2007 13:38:33 -0800 (PST)
David Miller <[EMAIL PROTECTED]> wrote:

> From: Stephen Hemminger <[EMAIL PROTECTED]>
> Date: Wed, 12 Dec 2007 13:58:52 -0800
> 
> > This should fix the tehuti napi fence post problems by getting
> > rid of priv->napi_stop, and setting weight to 32 (like other 10G).
> > 
> > Also, used the wierd entry/exit macro's like rest of driver.
> 
> It fixes the fench-post problem, but like the comments you
> removed explain:
> 
> > -   /* from time to time we exit to let NAPI layer release
> > -* device lock and allow waiting tasks (eg rmmod) to advance) */
> > -   priv->napi_stop = 0;
> > -
> 
> We now hang on rmmod during constant packet load.
> 
> This change just trades one bug for another, we have to
> get the device close issue sorted out before we can go
> around removing these things.

Well the napi_stop had the same effect as having a smaller weight
value, so my patch just shrunk the weight. That causes the device
to exit NAPI (and should solve the rmmod problem).


-- 
Stephen Hemminger <[EMAIL PROTECTED]>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'fixes-jgarzik' branch of wireless-2.6

2007-12-17 Thread Jeff Garzik

John W. Linville wrote:

On Sat, Dec 15, 2007 at 11:31:48PM -0500, John W. Linville wrote:


Cyrill Gorcunov (2):
  ieee80211_rate: missed unlock



 net/mac80211/ieee80211_rate.c  |1 +



diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 7254bd6..3260a4a 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -33,6 +33,7 @@ int ieee80211_rate_control_register(struct rate_control_ops 
*ops)
if (!strcmp(alg->ops->name, ops->name)) {
/* don't register an algorithm twice */
WARN_ON(1);
+   mutex_unlock(&rate_ctrl_mutex);
return -EALREADY;
}
}


Crud...there is a one-line fix in here that should have gone to Dave.

Jeff, (assuming Dave ACKs it) would you mind just taking it your
way along with the other posted patches?  Since this is intended for
2.6.24, there should be no great maintenance hardship if it goes to
Linus through your tree instead of Dave's.


Will do...

Jeff




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please pull 'fixes-jgarzik' branch of wireless-2.6

2007-12-17 Thread David Miller
From: "John W. Linville" <[EMAIL PROTECTED]>
Date: Mon, 17 Dec 2007 14:34:02 -0500

> On Sat, Dec 15, 2007 at 11:31:48PM -0500, John W. Linville wrote:
> 
> > Cyrill Gorcunov (2):
> >   ieee80211_rate: missed unlock
> 
> >  net/mac80211/ieee80211_rate.c  |1 +
> 
> > diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
> > index 7254bd6..3260a4a 100644
> > --- a/net/mac80211/ieee80211_rate.c
> > +++ b/net/mac80211/ieee80211_rate.c
> > @@ -33,6 +33,7 @@ int ieee80211_rate_control_register(struct 
> > rate_control_ops *ops)
> > if (!strcmp(alg->ops->name, ops->name)) {
> > /* don't register an algorithm twice */
> > WARN_ON(1);
> > +   mutex_unlock(&rate_ctrl_mutex);
> > return -EALREADY;
> > }
> > }
> 
> Crud...there is a one-line fix in here that should have gone to Dave.
> 
> Jeff, (assuming Dave ACKs it) would you mind just taking it your
> way along with the other posted patches?  Since this is intended for
> 2.6.24, there should be no great maintenance hardship if it goes to
> Linus through your tree instead of Dave's.

It's totally fine if Jeff takes this, don't worry so much about
it :-)

And yes the change looks fine to me too :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/1] IPN: Inter Process Networking

2007-12-17 Thread david

On Mon, 17 Dec 2007, Ludovico Gardenghi wrote:


On Mon, Dec 17, 2007 at 04:10:19AM -0800, [EMAIL PROTECTED] wrote:


if you are talking network connections between virtual systems, then the
exiting tap interfaces would seem to do everything you are looking for. you
can add them to bridges, route between them, filter traffic between them
(at whatever layer you want with netfilter), use multicast, etc as you
would any real interface.

if, however, you are talking about non-network communications (your example
of sending raw video frames across the interface), and want multiple
processes to receive them, this sounds like exactly the thing that splice
was designed to do, distribute data to multiple recipiants simultaniously
and efficiantly.


I'll try to explain.

Our first interest was to be able to interconnect virtual, real, and partial
virtual machines. We developed VDE for this, it's a user-level L2
switch. Specific as it may be, it's quite popular as a simple but
flexible tool. It can interconnect UML, Qemu, UMView, slirp, everything that
can be connected to a tap interface, etc.

So, you say, it's a networking issue and we could live with tun/tap.
There's a major point here: at present, dealing with tun/tap, bridges,
routing is quite difficult if you are a *regular* user with *no*
capabilites at all. You have tun/tap persistency and association to a
specific user (or group, recently), at most. That's good - we don't want
regular users to mess with global networking rules and settings.

Think of a bunch of etherogeneous virtual machines, partial virtual
machines (i.e. VMs where only a subset of system calls may be
virtualized or not depending on the parameters - that's the case of
View-OS) that must be interconnected and that may or may not have a
connection to a real network interface (maybe via a tunnel towards a
different machine). There's no need for administrator intervention here.
Why should an user have to ask root to create lots of tap interfaces for
him, bind them in a bridge and set up filtering/routing rules? What
would the list of interfaces become when different users asked for the
same thing at the same time?

You could define a specific interconnecting bus, but we've already have
it: ethernet. VDE comes in help as it allows regular users to build
distributed ethernet networks.

VDE works fine, but at present often results in a bottleneck because of
the high number of user-processes involved and user-kernel-user switches
needed in order to transfer a single ethernet frame. Moving the core
inside the kernel would limit this problem and result in faster
communication with still no need for root intervention or global
namespace messing. (we're thinking if something can be done working with
containers or similar structures, both for networking and partial
virtualization, but that's another topic).


so it sounds like the real issue you are trying to deal with is that only 
root is allowed to make changes to the networking configuration, and you 
want to allow non-root users to make changes.


in doing this you started by duplicating the kernel networking 
functionality into userspace (your userspace L2 switch) and are running 
into performance problems so trying to push this into the kernel to reduce 
context switches.


besides your approach I see two other options on their way into the 
kernel.


1. no changes, run your switch in a VM and your users (with their group 
permissions) connect their VM interfaces to the interfaces of the VM 
running the switch/filtering. this allows them 'root' inside the VM where 
they can make all these changes.


this may have the same performance problems as your current userspace 
switch.


2. networking virtualization. there is work being done to be able to have 
what would be essentially multiple networking stacks on a machine to allow 
a VM/container to control some things without having to go through the 
tun/tap interface. This would allow a user to change the filtering rules 
without the changes being global.


however, note that if the VM's are more then just a test-bed and actually 
need to talk to the outside world, at some point they will need to connect 
to the real interfaces, and making that connection should still require 
superuser privilages on the master kernel.


besides, useing the standard networking stack has the advantage that if 
you end up needing to spread your VM's across multiple machines the 
support is already there, where adding a new IPC mechanism will require 
figuring out how to extend that mechanism across machines.


It also doesn't require the applications to be coded specificly for your 
mechanism. they just use standard networking API's and the virtual 
connections happen for them.



So we started thinking how to use existing kernel structures, and we
concluded that:

- no existing kernel structures appeared to be optimal for this work;
- if we've had to design a new structure, it would have been more
  useful if we tr

Re: Please pull 'fixes-jgarzik' branch of wireless-2.6

2007-12-17 Thread John W. Linville
On Sat, Dec 15, 2007 at 11:31:48PM -0500, John W. Linville wrote:

> Cyrill Gorcunov (2):
>   ieee80211_rate: missed unlock

>  net/mac80211/ieee80211_rate.c  |1 +

> diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
> index 7254bd6..3260a4a 100644
> --- a/net/mac80211/ieee80211_rate.c
> +++ b/net/mac80211/ieee80211_rate.c
> @@ -33,6 +33,7 @@ int ieee80211_rate_control_register(struct rate_control_ops 
> *ops)
>   if (!strcmp(alg->ops->name, ops->name)) {
>   /* don't register an algorithm twice */
>   WARN_ON(1);
> + mutex_unlock(&rate_ctrl_mutex);
>   return -EALREADY;
>   }
>   }

Crud...there is a one-line fix in here that should have gone to Dave.

Jeff, (assuming Dave ACKs it) would you mind just taking it your
way along with the other posted patches?  Since this is intended for
2.6.24, there should be no great maintenance hardship if it goes to
Linus through your tree instead of Dave's.

Thanks,

John
-- 
John W. Linville
[EMAIL PROTECTED]
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] net/netlabel/: Spelling fixes

2007-12-17 Thread Paul Moore
On Monday 17 December 2007 2:40:35 pm Joe Perches wrote:
> Signed-off-by: Joe Perches <[EMAIL PROTECTED]>

Thanks Joe.

Acked-by: Paul Moore <[EMAIL PROTECTED]>

> ---
>  net/netlabel/netlabel_mgmt.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
> index 5648337..9c41464 100644
> --- a/net/netlabel/netlabel_mgmt.c
> +++ b/net/netlabel/netlabel_mgmt.c
> @@ -71,7 +71,7 @@ static const struct nla_policy
> netlbl_mgmt_genl_policy[NLBL_MGMT_A_MAX + 1] = { };
>
>  /*
> - * NetLabel Misc Managment Functions
> + * NetLabel Misc Management Functions
>   */
>
>  /**



-- 
paul moore
linux security @ hp
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: "ip neigh show" not showing arp cache entries?

2007-12-17 Thread Chris Friesen

Patrick McHardy wrote:


 From a kernel perspective there are only complete dumps, the
filtering is done by iproute. So the fact that it shows them
when querying specifically implies there is a bug in the
iproute neighbour filter. Does it work if you omit "all"
from the ip neigh show command?


Omitting "all" gives identical results.  It is still missing entries 
when compared with the output of "arp".


Chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/ipv4/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/ipv4/netfilter/nf_nat_sip.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index 3ca9897..8996ccb 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -165,7 +165,7 @@ static int mangle_content_len(struct sk_buff *skb,
 
dataoff = ip_hdrlen(skb) + sizeof(struct udphdr);
 
-   /* Get actual SDP lenght */
+   /* Get actual SDP length */
if (ct_sip_get_info(ct, dptr, skb->len - dataoff, &matchoff,
&matchlen, POS_SDP_HEADER) > 0) {
 
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] [UDP6]: Counter increment on BH mode

2007-12-17 Thread Christoph Lameter
On Sun, 16 Dec 2007, Herbert Xu wrote:

> If we can get the address of the per-cpu counter against
> some sort of a per-cpu base pointer, e.g., %gs on x86, then
> we can do
> 
>   incq%gs:(%rax)
> 
> where %rax would be the offset with %gs as the base.  This would
> obviate the need for the CPU ID and therefore avoid disabling
> preemption.
> 
> Hmm, wasn't Christoph working on something like that?

Yes that is what the cpu alloc patchset implements.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/netfilter/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/netfilter/nf_conntrack_sip.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 8f8b5a4..515abff 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -187,7 +187,7 @@ static const struct sip_header_nfo ct_sip_hdrs[] = {
}
 };
 
-/* get line lenght until first CR or LF seen. */
+/* get line length until first CR or LF seen. */
 int ct_sip_lnlen(const char *line, const char *limit)
 {
const char *k = line;
@@ -236,7 +236,7 @@ static int digits_len(struct nf_conn *ct, const char *dptr,
return len;
 }
 
-/* get digits lenght, skiping blank spaces. */
+/* get digits length, skipping blank spaces. */
 static int skp_digits_len(struct nf_conn *ct, const char *dptr,
  const char *limit, int *shift)
 {
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/sctp/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/sctp/sm_make_chunk.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f487629..ed7c9e3 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -286,7 +286,7 @@ struct sctp_chunk *sctp_make_init(const struct 
sctp_association *asoc,
 
sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param);
 
-   /* Add the supported extensions paramter.  Be nice and add this
+   /* Add the supported extensions parameter.  Be nice and add this
 * fist before addiding the parameters for the extensions themselves
 */
if (num_ext) {
@@ -2859,7 +2859,7 @@ struct sctp_chunk *sctp_process_asconf(struct 
sctp_association *asoc,
chunk_len -= length;
 
/* Skip the address parameter and store a pointer to the first
-* asconf paramter.
+* asconf parameter.
 */
length = ntohs(addr_param->v4.param_hdr.length);
asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
@@ -2868,7 +2868,7 @@ struct sctp_chunk *sctp_process_asconf(struct 
sctp_association *asoc,
/* create an ASCONF_ACK chunk.
 * Based on the definitions of parameters, we know that the size of
 * ASCONF_ACK parameters are less than or equal to the twice of ASCONF
-* paramters.
+* parameters.
 */
asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2);
if (!asconf_ack)
@@ -3062,7 +3062,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
asconf_len -= length;
 
/* Skip the address parameter in the last asconf sent and store a
-* pointer to the first asconf paramter.
+* pointer to the first asconf parameter.
 */
length = ntohs(addr_param->v4.param_hdr.length);
asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/netlabel/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/netlabel/netlabel_mgmt.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index 5648337..9c41464 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -71,7 +71,7 @@ static const struct nla_policy 
netlbl_mgmt_genl_policy[NLBL_MGMT_A_MAX + 1] = {
 };
 
 /*
- * NetLabel Misc Managment Functions
+ * NetLabel Misc Management Functions
  */
 
 /**
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/core/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/core/dev.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 26a3a3a..be9d301 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2819,7 +2819,7 @@ void dev_set_allmulti(struct net_device *dev, int inc)
 /*
  * Upload unicast and multicast address lists to device and
  * configure RX filtering. When the device doesn't support unicast
- * filtering it is put in promiscous mode while unicast addresses
+ * filtering it is put in promiscuous mode while unicast addresses
  * are present.
  */
 void __dev_set_rx_mode(struct net_device *dev)
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net/sched/: Spelling fixes

2007-12-17 Thread Joe Perches

Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
---
 net/sched/sch_hfsc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 55e7e45..a6ad491 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -160,7 +160,7 @@ struct hfsc_class
u64 cl_vtoff;   /* inter-period cumulative vt offset */
u64 cl_cvtmax;  /* max child's vt in the last period */
u64 cl_cvtoff;  /* cumulative cvtmax of all periods */
-   u64 cl_pcvtoff; /* parent's cvtoff at initalization
+   u64 cl_pcvtoff; /* parent's cvtoff at initialization
   time */
 
struct internal_sc cl_rsc;  /* internal real-time service curve */
-- 
1.5.3.7.949.g2221a6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >