Re: divide error: 0000 in fib6_rule_match [Re: 2.6.18-rc4-mm3]

2006-08-29 Thread Mattia Dongili
On Mon, August 28, 2006 11:30 pm, Andrew Morton said:
 On Mon, 28 Aug 2006 22:07:16 +0200
 Mattia Dongili [EMAIL PROTECTED] wrote:
[...]
 it's at fib6_rules.c:132 but since I can't tell why r-fwmask is 0 I'll
 avoid proposing a wrong patch :)

 Oh.  It looks like this has already been fixed:

 #ifdef CONFIG_IPV6_ROUTE_FWMARK
 if ((r-fwmark ^ fl-fl6_fwmark)  r-fwmask)
 return 0;
 #endif

 there's no divide in there now.

Ok, great, I have a division instead of the bitwise and there in fact.

thanks
-- 
mattia
:wq!


-
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: [2.6 patch] net/atm/: proper prototypes

2006-08-29 Thread David Miller
From: Adrian Bunk [EMAIL PROTECTED]
Date: Mon, 21 Aug 2006 01:00:06 +0200

 This patch adds proper prototypes in net/atm/mpc.h for two global 
 functions in net/atm/mpoa_proc.c
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

Applied to net-2.6.19, thanks Adrian.
-
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] Make struct sockaddr_in::sin_port __be16

2006-08-29 Thread David Miller
From: Alexey Dobriyan [EMAIL PROTECTED]
Date: Mon, 21 Aug 2006 03:21:24 +0400

 Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]

Also 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] Make struct in_addr::s_addr __be32

2006-08-29 Thread David Miller
From: Alexey Dobriyan [EMAIL PROTECTED]
Date: Mon, 21 Aug 2006 03:20:51 +0400

 There will be relatively small increase in sparse endian warnings, but
 this (and sin_port) patch is a first step to make networking code endian
 clean.
 
 Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]

Applied, thanks Alexey.
-
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: SNMPv2 ipv6IfStatsInAddrErrors counter error

2006-08-29 Thread David Miller
From: Lv Liangying [EMAIL PROTECTED]
Date: Sun, 19 Jun 2005 16:45:04 -0400

 Hi, All
 
When I tested Linux kernel 2.6.17.7 about statistics
 ipv6IfStatsInAddrErrors, found that this counter couldn't increase
 correctly. The criteria is RFC2465:
  ipv6IfStatsInAddrErrors OBJECT-TYPE
   SYNTAX  Counter32
   MAX-ACCESS  read-only
   STATUS  current
   DESCRIPTION
  The number of input datagrams discarded because
  the IPv6 address in their IPv6 header's destination
  field was not a valid address to be received at
  this entity.  This count includes invalid
  addresses (e.g., ::0) and unsupported addresses
  (e.g., addresses with unallocated prefixes).  For
  entities which are not IPv6 routers and therefore
  do not forward datagrams, this counter includes
  datagrams discarded because the destination address
  was not a local address.
   ::= { ipv6IfStatsEntry 5 }
 
 When I send packet to host with destination that is ether invalid
 address(::0) or unsupported addresses(1::1), the Linux kernel just
 discard the packet, and the counter doesn't increase(in the function
 ip6_pkt_discard).
 
 signed-off by Lv Liangying [EMAIL PROTECTED]

Looks good, patch applied.  Thanks a lot.

BTW, the correct form of a sign off is:

Signed-off-by: David S. Miller [EMAIL PROTECTED]

Please keep the capitalization, colon character, etc.
consistent with that.  Thanks again.
-
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 5/5] d80211: add ioctl to stop data frame tx

2006-08-29 Thread Johannes Berg
Hi Elliot,

Thanks for the explanation.


 Radar is initially detected by the low-level radio driver.  Userspace
 gets notified of radar via calls to ieee80211_radar_status, which
 generates a fake management frame with a struct ieee80211_radar_info
 in it.  Userspace is then responsible for handling the resultant
 activities, such as stopping transmission on that channel, selecting
 another channel, sending out channel switch announcements, changing
 channels, and remembering to block use of the old channel for the
 required time.

I think that would warrant a new netlink multicast group and doing over
nl80211 to start with ;) Inserting fake management frames into the mgt
interface sounds pretty weird to me.

johannes
-
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 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN

2006-08-29 Thread Johannes Berg
I intend to kill the nick command with nl80211 since it seems to be
useless. Any objections?

johannes
-
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


[RFC IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Olaf Kirch
Hi,

we had bug reports from people seeing lots of spurious messages
like the following:

kernel: peth0: received packet with own address as source address.

and

xenbr0: duplicate address detected!

This is on a Xen enabled machine, with lots of Xen machines on the
same network.

When the Xen code configures the bridge device, this will do IPv6
autoconfiguration for the interface, and since they use synthetic MAC
addresses, there will be DAD collisions.

When the Xen people looked for a way to disable IPv6 autoconf of the
bridge, they didn't find any way to do it without bringing up the
device first (and thereby triggering DAD).

The attached tentative patch makes IPv6 autoconf depend on the
availability of IFF_MULTICAST. This is admittedly a bit of a hack, but
it makes sense, since DAD and router solicitation do rely on multicast.

Any comments?

Thanks,
Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
Summary: Allow to bring up network interface w/o ipv6 autoconf

When bringing up a xen bridge device, it will always be configured to
use a MAC address of ff:ff:ff:ff:ff:fe.  This greatly confuses IPv6 DAD,
which starts logging lots and lots of useless messages to syslog.

We really want to disable IPv6 on these interfaces, and there doesn't
seem to be a reliable way to do this without bringing the interface
up first (and triggering IPv6 autoconf). 

This patch makes autoconf (DAD and router discovery) depend on the
interface's ability to do multicast. Turning off multicast for an
interface before bringing it up will suppress autoconfiguration.

Signed-off-by: Olaf Kirch [EMAIL PROTECTED]

 net/ipv6/addrconf.c |2 ++
 1 files changed, 2 insertions(+)

Index: build/net/ipv6/addrconf.c
===
--- build.orig/net/ipv6/addrconf.c
+++ build/net/ipv6/addrconf.c
@@ -2462,6 +2462,7 @@ static void addrconf_dad_start(struct in
spin_lock_bh(ifp-lock);
 
if (dev-flags(IFF_NOARP|IFF_LOOPBACK) ||
+   !(dev-flagsIFF_MULTICAST) ||
!(ifp-flagsIFA_F_TENTATIVE)) {
ifp-flags = ~IFA_F_TENTATIVE;
spin_unlock_bh(ifp-lock);
@@ -2546,6 +2547,7 @@ static void addrconf_dad_completed(struc
if (ifp-idev-cnf.forwarding == 0 
ifp-idev-cnf.rtr_solicits  0 
(dev-flagsIFF_LOOPBACK) == 0 
+   (dev-flags  IFF_MULTICAST) 
(ipv6_addr_type(ifp-addr)  IPV6_ADDR_LINKLOCAL)) {
struct in6_addr all_routers;
 


Re: PROBLEM: kernel BUG at net/ipv6/ip6_output.c:718

2006-08-29 Thread Herbert Xu
On Mon, Aug 28, 2006 at 02:49:07AM +0200, cagri coltekin wrote:
 
 Ooops, sorry for the confusion. It happens with 2.6.17 too (see
 below), cutpaste from wrong log. The rest of the data provided
 in the previous message is actually fresh.

Thanks.  Please try this patch and tell me if it prints anything out.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4fb47a2..5e2e4ea 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -508,6 +508,10 @@ static int ip6_fragment(struct sk_buff *
dev = rt-u.dst.dev;
hlen = ip6_find_1stfragopt(skb, prevhdr);
nexthdr = *prevhdr;
+   if (unlikely(hlen  skb-len)) {
+   printk(KERN_CRIT ip6_fragment: hlen = 0x%x, len = 0x%x, 
nexthdr=%d\n, hlen, skb-len, nexthdr);
+   BUG();
+   }
 
mtu = dst_mtu(rt-u.dst);
if (np  np-frag_size  mtu) {
-
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 IPv6] Fix race condition in ipv6_add_addr

2006-08-29 Thread Olaf Kirch
Here's a patch originally from Keir Fraser, which we included in SLES10,
but which we forgot to submit upstream so far.

During stress testing, machines were frequently crashing in
__ipv6_ifa_notify on dst_hold(ifp-rt.u_dst), with ifp-rt being a
NULL pointer.

The attached patch fixes the problem.

Thanks,
Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
From: Keir Fraser [EMAIL PROTECTED]
Subject: ipv6_add_addr should install dstentry earlier

ipv6_add_addr allocates a struct inet6_ifaddr and a dstentry, but it
doesn't install the dstentry in ifa-rt until after it releases the
addrconf_hash_lock. This means other CPUs will be able to see the new
address while it hasn't been initialized completely yet.

One possible fix would be to grab the ifp-lock spinlock when
creating the address struct; a simpler fix is to just move the
assignment.

Acked-by: [EMAIL PROTECTED]
Acked-by: [EMAIL PROTECTED]

--- linux-2.6.16.13-old/net/ipv6/addrconf.c 2006-05-02 22:38:44.0 
+0100
+++ linux-2.6.16.13-new/net/ipv6/addrconf.c 2006-06-18 10:16:50.0 
+0100
@@ -549,6 +549,8 @@
ifa-flags = flags | IFA_F_TENTATIVE;
ifa-cstamp = ifa-tstamp = jiffies;
 
+   ifa-rt = rt;
+
ifa-idev = idev;
in6_dev_hold(idev);
/* For caller */
@@ -575,8 +577,6 @@
}
 #endif
 
-   ifa-rt = rt;
-
in6_ifa_hold(ifa);
write_unlock(idev-lock);
 out2:


Re: [PATCH] tcp: RFC3465 Appropriate Byte Count fix

2006-08-29 Thread David Miller
From: Daikichi Osuga [EMAIL PROTECTED]
Date: Tue, 22 Aug 2006 14:52:43 +0900

 From: Daikichi Osuga [EMAIL PROTECTED]
 
 RFC3465 Appropriate Byte Count fix
 slow start after retransmit timeout does not work is fixed.
 case of L=2*SMSS acked bytes comparison is fixed.
 
 Signed-off-by: Daikichi Osuga [EMAIL PROTECTED]

Thank you very much for these bug fixes.

Patch applied.
-
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 5/10]: [XFRM]: Dynamic xfrm_state hash table sizing.

2006-08-29 Thread Eric Dumazet
On Tuesday 15 August 2006 13:39, David Miller wrote:
 [XFRM]: Dynamic xfrm_state hash table sizing.

 +static struct hlist_head *xfrm_state_hash_alloc(unsigned int sz)
 +{
 + struct hlist_head *n;
 +
 + if (sz = PAGE_SIZE)
 + n = kmalloc(sz, GFP_KERNEL);
 + else if (hashdist)
 + n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL);
 + else
 + n = (struct hlist_head *)
 + __get_free_pages(GFP_KERNEL, get_order(sz));
 +
 + if (n)
 + memset(n, 0, sz);
 +
 + return n;
 +}

This kind of functions are becoming very common and duplicated... maybe we can 
factorize it ?

Also, it would be cool to be able to vmalloc()/free_pages hugetlb pages for 
very large hash tables...

 +
 +static void xfrm_state_hash_free(struct hlist_head *n, unsigned int sz)
 +{
 + if (sz = PAGE_SIZE)
 + kfree(n);
 + else if (hashdist)
 + vfree(n);
 + else
 + free_pages((unsigned long)n, get_order(sz));
 +}
 +

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 IPv6] Fix race condition in ipv6_add_addr

2006-08-29 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Tue, 29 Aug 2006 10:35:36 +0200), Olaf Kirch 
[EMAIL PROTECTED] says:

 During stress testing, machines were frequently crashing in
 __ipv6_ifa_notify on dst_hold(ifp-rt.u_dst), with ifp-rt being a
 NULL pointer.
 
 The attached patch fixes the problem.

Acked-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]

-- 
YOSHIFUJI Hideaki @ USAGI Project  [EMAIL PROTECTED]
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Tue, 29 Aug 2006 10:24:35 +0200), Olaf Kirch 
[EMAIL PROTECTED] says:

 When the Xen code configures the bridge device, this will do IPv6
 autoconfiguration for the interface, and since they use synthetic MAC
 addresses, there will be DAD collisions.
:
 The attached tentative patch makes IPv6 autoconf depend on the
 availability of IFF_MULTICAST. This is admittedly a bit of a hack, but
 it makes sense, since DAD and router solicitation do rely on multicast.

I disagree.  The node MUST NOT assign live address on
that interface.

Further analysis is needed, but one idea is to skip
addrconf_dev_config() if !(dev-flags  IFF_MULTICAST).

--yoshfuji

-
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 IPv6] Fix race condition in ipv6_add_addr

2006-08-29 Thread David Miller
From: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 18:21:28 +0900 (JST)

 In article [EMAIL PROTECTED] (at Tue, 29 Aug 2006 10:35:36 +0200), Olaf 
 Kirch [EMAIL PROTECTED] says:
 
  During stress testing, machines were frequently crashing in
  __ipv6_ifa_notify on dst_hold(ifp-rt.u_dst), with ifp-rt being a
  NULL pointer.
  
  The attached patch fixes the problem.
 
 Acked-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]

Applied, thanks everyone.

Although the only reason this is a problem is due to the fact that we
use rwlock's here.  If addrconf_lock were a normal spinlock, or taken
as a writer in this code path, the problematic cases would not be
possible.

I guess this is a reminder that I need to revisit my patches which
move all IPV6 address and inet6_dev changes out of software interrupt
context, plus add use of RCU. :-)
-
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 5/10]: [XFRM]: Dynamic xfrm_state hash table sizing.

2006-08-29 Thread David Miller
From: Eric Dumazet [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 11:15:56 +0200

 This kind of functions are becoming very common and
 duplicated... maybe we can factorize it ?

That's certainly why a subsequent patch in that set moved all of this
to net/xfrm/xfrm_hash.c :-)

Only when my routing cache hash changes are checked in will there be
any similar use outside of the XFRM layer.  I did not put my
routing cache dynamic hash table changes anywhere yet because
frankly the growth logic is incomplete and needs to be in a working
state.

If nobody takes on the task to work on that, and I might not be
strong enough to do this, the dynamic hashing patches for the
routing cache will certainly rot.  We really cannot put those
changes in without good growth logic.

Eric you used to be so active.  Please try to find some free time from
your busy schedule to work on something like this ;-)

 Also, it would be cool to be able to vmalloc()/free_pages hugetlb pages for 
 very large hash tables...

I always wanted to do this on sparc64, especially for modules.  It
requires arch-level support, for sure.

At least in the modules case, it's kind of easy, since you just
preallocate 4MB chunks and then dish out regions within those
chunks.  Something similar could be done to handle hash tables
too, but we'd need to be careful about fragmentation.

-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread David Miller
From: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 18:34:26 +0900 (JST)

 Further analysis is needed, but one idea is to skip
 addrconf_dev_config() if !(dev-flags  IFF_MULTICAST).

Yes, it is logical because without multicast IPV6 cannot
work correctly.

But from another perspective (I assume these bridged Xen devices use
ARPHRD_ETHER, do they?) a device with ARPHRD_ETHER and cleared
IFF_MULTICAST flag seems potentially problematic.  How many other
things break over such a device?
-
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: call panic if nl_table allocation fails

2006-08-29 Thread David Miller
From: Akinobu Mita [EMAIL PROTECTED]
Date: Wed, 23 Aug 2006 20:37:40 +0900

 This patch makes crash happen if initialization of nl_table fails
 in initcalls. It is better than getting use after free crash later.
 
 Cc: Patrick McHardy [EMAIL PROTECTED]
 Cc: David Miller [EMAIL PROTECTED]
 Signed-off-by: Akinobu Mita [EMAIL PROTECTED]

Patch applied, thank you.
-
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: 2.6.18-rc4-mm[1,2,3] -- Network card not getting assigned an eth device name

2006-08-29 Thread David Miller
From: Miles Lane [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 01:43:48 -0700

 Then, when I testing running NetworkManager.bak, I got:
 
 [NetworkManager.:6078]: Changing netdevice name from [eth1] to 
 [`$,3u=(B$,3u=(B]
 [NetworkManager.:6078]: Changing netdevice name from [eth0] to 
 [`$,3u=(B$,3u=(B]

Someone who can debug NetworkManager with gdb or similar needs
to step through it and figure out why it wants to use this
crazy garbage string as the name.
-
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/4] net: VM deadlock avoidance framework

2006-08-29 Thread Peter Zijlstra
On Tue, 2006-08-29 at 02:01 +0200, Indan Zupancic wrote:
 On Mon, August 28, 2006 19:32, Peter Zijlstra said:

  Ah, no accident there, I'm fully aware that there would need to be a
  spinlock in adjust_memalloc_reserve() if there were another caller.
  (I even had it there for some time) - added comment.
 
 Good that you're aware of it. Thing is, how much sense does the split-up into
 adjust_memalloc_reserve() and sk_adjust_memalloc() make at this point? Why not
 merge the code of adjust_memalloc_reserve() with sk_adjust_memalloc() and only
 add adjust_memalloc_reserve() when it's really needed? It saves an export.

mm/ vs net/core/

 Better to put the lock next to min_free_kbytes, both for readability and
 cache behaviour. And it satisfies the lock data, not code mantra.

True enough.

 If you prefer to avoid cmpxchg (which is often used in atomic_add_unless
 and can be expensive) then you can use something like:

Yes, way too large, out of lined it already. Don't care about the
cmpxchg, its not a fast path anyway.

  @@ -195,6 +196,86 @@ __u32 sysctl_rmem_default = SK_RMEM_MAX;
   /* Maximal space eaten by iovec or ancilliary data plus some space */
   int sysctl_optmem_max = sizeof(unsigned long)*(2*UIO_MAXIOV + 512);
 
  +static DEFINE_SPINLOCK(memalloc_lock);
  +static int memalloc_reserve;
  +static unsigned int vmio_request_queues;
  +
  +atomic_t vmio_socks;
  +atomic_t emergency_rx_pages_used;
  +EXPORT_SYMBOL_GPL(vmio_socks);
 
 Is this export needed? It's only used in net/core/skbuff.c and 
 net/core/sock.c,
 which are compiled into one module.
 
  +EXPORT_SYMBOL_GPL(emergency_rx_pages_used);
 
 Same here. It's only used by code in sock.c and skbuff.c, and no external
 code calls emergency_rx_alloc(), nor emergency_rx_free().

Good point, I've gone over the link relations of these things and was
indeed capable of removing several EXPORTs. Thanks.

 I think I depleted my usefulness, there isn't much left to say for me.
 It's up to the big guys to decide about the merrit of this patch.

Thanks for all your feedback.

 IMHO:
 
 - This patch isn't really a framework, more a minimal fix for one specific,
 though important problem. But it's small and doesn't have much impact

Well, perhaps, its merit is that is allows for full service for a few
sockets even under severe memory pressure. And it provides the
primitives to solve this problem for all instances, (NBD, iSCSI, NFS,
AoE, ...) hence framework.

Evgeniy's allocator does not cater for this, so even if it were to
replace all the allocation stuff, we would still need the SOCK_VMIO and
all protocol hooks this patch introduces.

 - If Evgeniy's network allocator is as good as it looks, then why can't it
 replace the existing one? Just adding private subsystem specific memory
 allocators seems wrong. I might be missing the big picture, but it looks
 like memory allocator things should be at least synchronized and discussed
 with Christoph Lameter and his modular slab allocator patch.

SLAB is very very good in that is will not suffer from external
fragmentation (one could suffer from external fragmentation when viewing
the slab allocator from the page allocation layer - but most of that is
avoidable by allocation strategies in the slab layer), it does however
suffer from internal fragmentation - by design.

For variable size allocators it has been proven that for each allocator
there is an allocation pattern that will defeat it. And figuring the
pattern out and proving it will not happen in a long-running system is
hard hard work.

(free block coalescence is not a guarantee against fragmentation; there
is even evidence that delayed coalescence will reduce fragmentation - it
introduces history and this extra information can help predict the
future.)

This is exactly why long running systems (like our kernel) love slabs.

For those interested in memory allocators, this paper is a good (albeit
a bit dated) introduction:
http://citeseer.ist.psu.edu/wilson95dynamic.html

That said, it might be that Evgeniy's allocator works out for our
network load - only time will tell, the math is not tractable afaik.

 All in all it seems it will take a while until Evgeniy's code will be merged,
 so I think applying Peter's patch soonish and removing it again the moment it
 becomes unnecessary is reasonable.

Thanks and like said, I think even then most of this patch will need to
survive.

-
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][PATCHv2 2.6.18-rc4-mm3 3/3] net/ipv4: misc. support files

2006-08-29 Thread gerrit
Quoting Patrick McHardy:
|  [EMAIL PROTECTED] wrote:
|   [Net/IPv4]: REVISED Miscellaneous changes which complete the 
|   v4 support for UDP-Lite.
|   
|  
|   --- a/include/net/xfrm.h
|   +++ b/include/net/xfrm.h
|   @@ -467,6 +467,7 @@ u16 xfrm_flowi_sport(struct flowi *fl)
|  switch(fl-proto) {
|  case IPPROTO_TCP:
|  case IPPROTO_UDP:
|   +  case IPPROTO_UDPLITE:
|  case IPPROTO_SCTP:
|  port = fl-fl_ip_sport;
|  break;
|   @@ -492,6 +493,7 @@ u16 xfrm_flowi_dport(struct flowi *fl)
|  switch(fl-proto) {
|  case IPPROTO_TCP:
|  case IPPROTO_UDP:
|   +  case IPPROTO_UDPLITE:
|  case IPPROTO_SCTP:
|  port = fl-fl_ip_dport;
|  break;

Many thanks for the helpful pointers - I will make sure that the changes
are in the next version. I will be waiting a little while for further comments
before the update.

- Gerrit
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Olaf Kirch
On Tue, Aug 29, 2006 at 08:39:53PM +1000, Herbert Xu wrote:
 Netfilter is broken for a different reason.  It breaks because packets
 pass through it twice, once going through brigde netfilter and once
 through the Xen netloop interface.  So ideally they'd get rid of the
 netloop device in which case they won't have to disable multicasting
 on the bridge device anymore.

I agree, this would be the right long-term fix.

Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Olaf Kirch
On Tue, Aug 29, 2006 at 06:34:26PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
  The attached tentative patch makes IPv6 autoconf depend on the
  availability of IFF_MULTICAST. This is admittedly a bit of a hack, but
  it makes sense, since DAD and router solicitation do rely on multicast.
 
 I disagree.  The node MUST NOT assign live address on
 that interface.

I'm not sure I understand. The Xen bridge devices get fe:ff:ff:ff:ff:ff
as MAC address.  Which is a bit hackish, but that seems to be the way
the Xen folks want to do it.

OTOH they do not want to do any IPv6 autoconfiguration with these
addresses, because they generate DAD warnings, and cause one
random machine to obtain fe80::::feff: as link-local
address.

 Further analysis is needed, but one idea is to skip
 addrconf_dev_config() if !(dev-flags  IFF_MULTICAST).

That should work just as well. Do you want me to submit an
updated patch?

Thanks,
Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Pekka Savola

On Tue, 29 Aug 2006, David Miller wrote:

From: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Date: Tue, 29 Aug 2006 18:34:26 +0900 (JST)


Further analysis is needed, but one idea is to skip
addrconf_dev_config() if !(dev-flags  IFF_MULTICAST).


Yes, it is logical because without multicast IPV6 cannot
work correctly.

But from another perspective (I assume these bridged Xen devices use
ARPHRD_ETHER, do they?) a device with ARPHRD_ETHER and cleared
IFF_MULTICAST flag seems potentially problematic.  How many other
things break over such a device?


It's not obvious that IFF_MULTICAST is good enough.  IMHO, you should 
be able to run addrconf on non-multicast interfaces as well (e.g., 
point-to-point interfaces, tunnels in particular).


It seems that current code already excludes IFF_NOARP interfaces 
though.


--
Pekka Savola You each name yourselves king, yet the
Netcore Oykingdom bleeds.
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
-
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: e1000 and 802.1ad/stacked vlan tagging

2006-08-29 Thread Stephan von Krawczynski
On Mon, 28 Aug 2006 13:53:36 -0700
Brandeburg, Jesse [EMAIL PROTECTED] wrote:

  I tried enlarging both real-device and first vlan interface mtu but
  that does not work out. I really thought that the visible device
  setting of mtu=1500 should have worked out and that the driver (or
  some code in between) should have corrected the allowed frame size to
  reflect the actual setup, not? 
 
 unfortunately I believe that your hardware MTU on the base interface
 MUST be adjusted in order to do stacked vlans because the vlan code
 doesn't fragment packets, it just inserts tags.  The e1000 hardware is
 capable of inserting/stripping 1 level of tags without dropping overlong
 frames, but cannot seamlessly handle 1+n levels of inserted tags.
 Transmit, we don't care how long the frames are that are given to us
 (the driver doesn't enforce MTU on transmit) but on receive we have
 limited space so it is important that each frame fit into the allocated
 buffer (including CRC).
 
 Please try MTU 1508 on eth0 (base interface only), as that configuration
 worked for me.

Hello Jesse,

I can confirm that the setup seems to work if enlarging the hw if mtu to 1508.
This is good.
Nevertheless I think that the receive buffer size of a physical device should
always be MAX(all virtual device mtu + tags and the like), you know what I
mean.
If I enlarge the basic mtu this may or may not have drawbacks concerning the
traffic routed directly via this interface.
Obviously the setup is somehow not consistent, as everything works well
without tuning mtus as long as you use only 1 tag. I always thought that the
driver uses at least hard_header_len + mtu as buffer size which should be
correct even in stacked setup. Only this information doesn't make it to the
driver level, right?

-- 
Regards,
Stephan von Krawczynski

-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Olaf Kirch
On Tue, Aug 29, 2006 at 01:55:28PM +0300, Pekka Savola wrote:
 It's not obvious that IFF_MULTICAST is good enough.  IMHO, you should 
 be able to run addrconf on non-multicast interfaces as well (e.g., 
 point-to-point interfaces, tunnels in particular).

So would it work to use this?
(flags  (IFF_MULTICAST|IFF_POINTOPOINT)) == 0

 It seems that current code already excludes IFF_NOARP interfaces 
 though.

I looked at that - it doesn't help because it just disables DAD, but
still does router solicitation, and I think it also sends a MLD listener
report with the bogus link-layer address. I tend to agree that it's
incorrect to assign an address at all in this case.

Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Peter Bieringer
Pekka Savola schrieb:
 On Tue, 29 Aug 2006, David Miller wrote:
 From: YOSHIFUJI Hideaki [EMAIL PROTECTED]
 Date: Tue, 29 Aug 2006 18:34:26 +0900 (JST)

 Further analysis is needed, but one idea is to skip
 addrconf_dev_config() if !(dev-flags  IFF_MULTICAST).

 Yes, it is logical because without multicast IPV6 cannot
 work correctly.

 But from another perspective (I assume these bridged Xen devices use
 ARPHRD_ETHER, do they?) a device with ARPHRD_ETHER and cleared
 IFF_MULTICAST flag seems potentially problematic.  How many other
 things break over such a device?
 
 It's not obvious that IFF_MULTICAST is good enough.  IMHO, you should be
 able to run addrconf on non-multicast interfaces as well (e.g.,
 point-to-point interfaces, tunnels in particular).

Hmm, at least on RHEL4 (2.6.9):

1: lo: LOOPBACK,UP mtu 16436 qdisc noqueue
2: eth0: BROADCAST,MULTICAST,UP mtu 1500 qdisc pfifo_fast qlen 1000
3: eth1: BROADCAST,MULTICAST,UP mtu 1500 qdisc pfifo_fast qlen 1000
4: sit0: NOARP mtu 1480 qdisc noop
5: [EMAIL PROTECTED]: POINTOPOINT,NOARP,UP mtu 1480 qdisc noqueue
6: ppp0: POINTOPOINT,MULTICAST,NOARP,UP mtu 1492 qdisc pfifo_fast qlen 3
8: [EMAIL PROTECTED]: NOARP,UP mtu 1480 qdisc noqueue


And contributed from FC5:

5: vmnet8: BROADCAST,MULTICAST,UP,1 mtu 1500 qdisc pfifo_fast qlen
1000
7: tun0: POINTOPOINT,MULTICAST,NOARP,UP,1 mtu 1500 qdisc
pfifo_fast qlen 100


ppp0, tun0 has IFF_MULTICAST set, so not an issue.

 It seems that current code already excludes IFF_NOARP interfaces though.

So 6-in-4 tunnels are already except.


Don't wonder about Flag 1, missing support in ip, already
reported https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202199 and
fixed in rawhide.


Just my 2 cents,

Peter
-- 
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D   mailto:[EMAIL PROTECTED]
Deep Space 6 Co-Founder and Core Member  http://www.deepspace6.net/
OpenBChttp://www.openbc.com/hp/Peter_Bieringer/
Personal invitation to OpenBC  http://www.openbc.com/go/invita/3889
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Hasso Tepper
Olaf Kirch wrote:
 When the Xen people looked for a way to disable IPv6 autoconf of the
 bridge, they didn't find any way to do it without bringing up the
 device first (and thereby triggering DAD).

Because no /proc/sys/net/ipv6/conf/interface exist (yes, I know it's 
user visible effect)? This is just odd IMHO. I asked why it was changed 
and how userspace should behave now regarding this, but got no answer.

Simple scenario with GNU/Debian:

Computer is booted with no ethernet link. Ethernet interface should get 
address via autoconf. No link = no IPv6 addresses on interface = 
no /proc/sys/net/ipv6/conf/interface. Bootup scripts (procps.sh reading 
sysctl.conf existing in most of distributions AFAIK) can't set/get 
anything in /proc/sys/net/ipv6/conf/interface because it doesn't exist.

How userspace should behave now? Mandating daemon which listens interface 
events via netlink?


regards,

-- 
Hasso Tepper
-
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/5] skge: use dev_alloc_skb

2006-08-29 Thread Christoph Hellwig
On Mon, Aug 28, 2006 at 04:19:37PM -0700, Stephen Hemminger wrote:
 To avoid problems with buggy protocols that assume extra header space,
 use dev_alloc_skb() when allocating receive buffers.
 
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
 
 --- skge-2.6.orig/drivers/net/skge.c
 +++ skge-2.6/drivers/net/skge.c
 @@ -827,7 +827,8 @@ static int skge_rx_fill(struct skge_port
   do {
   struct sk_buff *skb;
  
 - skb = alloc_skb(skge-rx_buf_size + NET_IP_ALIGN, GFP_KERNEL);
 + skb = __dev_alloc_skb(skge-rx_buf_size + NET_IP_ALIGN,
 +   GFP_KERNEL);

While you're at it please use netdev_alloc_skb.

-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Peter Bieringer
Hasso Tepper schrieb:
 Olaf Kirch wrote:
 When the Xen people looked for a way to disable IPv6 autoconf of the
 bridge, they didn't find any way to do it without bringing up the
 device first (and thereby triggering DAD).
 
 Because no /proc/sys/net/ipv6/conf/interface exist (yes, I know it's 
 user visible effect)? This is just odd IMHO. I asked why it was changed 
 and how userspace should behave now regarding this, but got no answer.
 
 Simple scenario with GNU/Debian:
 
 Computer is booted with no ethernet link. Ethernet interface should get 
 address via autoconf. No link = no IPv6 addresses on interface = 
 no /proc/sys/net/ipv6/conf/interface. Bootup scripts (procps.sh reading 
 sysctl.conf existing in most of distributions AFAIK) can't set/get 
 anything in /proc/sys/net/ipv6/conf/interface because it doesn't exist.
 
 How userspace should behave now? Mandating daemon which listens interface 
 events via netlink?

BTW: this is also the reason why autoconf or accept_ra cannot be
disabled by e.g. initscripts *per* interface before bringing one up.

This issue was discussed some time ago with Pekka and reported in
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809

There is still no solution for that afaik.

Peter
-- 
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D   mailto:[EMAIL PROTECTED]
Deep Space 6 Co-Founder and Core Member  http://www.deepspace6.net/
OpenBChttp://www.openbc.com/hp/Peter_Bieringer/
Personal invitation to OpenBC  http://www.openbc.com/go/invita/3889
-
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 5/5] d80211: add ioctl to stop data frame tx

2006-08-29 Thread John W. Linville
On Tue, Aug 29, 2006 at 09:30:57AM +0200, Johannes Berg wrote:

  Radar is initially detected by the low-level radio driver.  Userspace
  gets notified of radar via calls to ieee80211_radar_status, which
  generates a fake management frame with a struct ieee80211_radar_info
  in it.  Userspace is then responsible for handling the resultant
  activities, such as stopping transmission on that channel, selecting
  another channel, sending out channel switch announcements, changing
  channels, and remembering to block use of the old channel for the
  required time.
 
 I think that would warrant a new netlink multicast group and doing over
 nl80211 to start with ;) Inserting fake management frames into the mgt
 interface sounds pretty weird to me.

I concur -- inserting frames is a neat hack, but not the preferred
way for the long haul.

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 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN

2006-08-29 Thread John W. Linville
On Tue, Aug 29, 2006 at 09:49:17AM +0200, Johannes Berg wrote:
 I intend to kill the nick command with nl80211 since it seems to be
 useless. Any objections?

I can't defend it myself, but I have heard of people using it.
I think some of the distro's init scripts might set it as well?

Can anyone defend the practice of setting a nickname for a wireless
device?

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 2/2]d80211: add hardware scan callback

2006-08-29 Thread Johannes Berg
On Fri, 2006-08-25 at 16:32 +0800, Hong Liu wrote:
 
 +   local-sta_scanning = 1;
 +   if (local-hw-hw_scan)
 +   return local-hw-hw_scan(dev, ssid, ssid_len); 

You set sta_scanning even if that returns an error, is that correct?

johannes
-
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] powerpc: ibmveth: Harden driver initilisation for kexec

2006-08-29 Thread Michael Ellerman

On 4/29/06, Santiago Leon [EMAIL PROTECTED] wrote:

Michael Ellerman wrote:
 Any chance of getting it into to 2.6.17 ...


2.6.19 perhaps?

cheers
-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Herbert Xu
Peter Bieringer [EMAIL PROTECTED] wrote:

 anything in /proc/sys/net/ipv6/conf/interface because it doesn't exist.
 
 How userspace should behave now? Mandating daemon which listens interface 
 events via netlink?
 
 BTW: this is also the reason why autoconf or accept_ra cannot be
 disabled by e.g. initscripts *per* interface before bringing one up.

You can disable it in /proc/sys/net/ipv6/conf/default/... and then
reenable it on the interfaces that you actually want.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [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: [RFC IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Hasso Tepper
Herbert Xu wrote:
 Peter Bieringer [EMAIL PROTECTED] wrote:
  BTW: this is also the reason why autoconf or accept_ra cannot be
  disabled by e.g. initscripts *per* interface before bringing one up.

 You can disable it in /proc/sys/net/ipv6/conf/default/... and then
 reenable it on the interfaces that you actually want.

You can't do that either (ie. reenable) in initscripts before link is up.


regards,

-- 
Hasso

-
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/6] Various NetLabel fixes and cleanups

2006-08-29 Thread paul . moore
This patchset contains a series of small patches to fix a bug and some general
ugliness from the original author (that moron ...).  All of the following
patches are against David's net-2.6.19 tree.

Please consider these for 2.6.19, thanks.

--
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


[PATCH 6/6] NetLabel: add some missing #includes to various header files

2006-08-29 Thread paul . moore
Add some missing include files to the NetLabel related header files.

Signed-off-by: Paul Moore [EMAIL PROTECTED]
---
 include/net/cipso_ipv4.h|2 ++
 include/net/netlabel.h  |1 +
 net/netlabel/netlabel_domainhash.h  |4 
 net/netlabel/netlabel_user.h|5 +++--
 security/selinux/include/selinux_netlabel.h |9 +
 5 files changed, 19 insertions(+), 2 deletions(-)

Index: net-2.6.19/include/net/cipso_ipv4.h
===
--- net-2.6.19.orig/include/net/cipso_ipv4.h
+++ net-2.6.19/include/net/cipso_ipv4.h
@@ -37,6 +37,8 @@
 #include linux/types.h
 #include linux/rcupdate.h
 #include linux/list.h
+#include linux/net.h
+#include linux/skbuff.h
 #include net/netlabel.h
 
 /* known doi values */
Index: net-2.6.19/include/net/netlabel.h
===
--- net-2.6.19.orig/include/net/netlabel.h
+++ net-2.6.19/include/net/netlabel.h
@@ -31,6 +31,7 @@
 #define _NETLABEL_H
 
 #include linux/types.h
+#include linux/net.h
 #include linux/skbuff.h
 #include net/netlink.h
 
Index: net-2.6.19/net/netlabel/netlabel_domainhash.h
===
--- net-2.6.19.orig/net/netlabel/netlabel_domainhash.h
+++ net-2.6.19/net/netlabel/netlabel_domainhash.h
@@ -32,6 +32,10 @@
 #ifndef _NETLABEL_DOMAINHASH_H
 #define _NETLABEL_DOMAINHASH_H
 
+#include linux/types.h
+#include linux/rcupdate.h
+#include linux/list.h
+
 /* Domain hash table size */
 /* XXX - currently this number is an uneducated guess */
 #define NETLBL_DOMHSH_BITSIZE   7
Index: net-2.6.19/net/netlabel/netlabel_user.h
===
--- net-2.6.19.orig/net/netlabel/netlabel_user.h
+++ net-2.6.19/net/netlabel/netlabel_user.h
@@ -31,11 +31,12 @@
 #ifndef _NETLABEL_USER_H
 #define _NETLABEL_USER_H
 
+#include linux/types.h
 #include linux/skbuff.h
 #include linux/capability.h
-#include linux/genetlink.h
-#include net/netlabel.h
+#include net/netlink.h
 #include net/genetlink.h
+#include net/netlabel.h
 
 /* NetLabel NETLINK helper functions */
 
Index: net-2.6.19/security/selinux/include/selinux_netlabel.h
===
--- net-2.6.19.orig/security/selinux/include/selinux_netlabel.h
+++ net-2.6.19/security/selinux/include/selinux_netlabel.h
@@ -27,6 +27,15 @@
 #ifndef _SELINUX_NETLABEL_H_
 #define _SELINUX_NETLABEL_H_
 
+#include linux/types.h
+#include linux/fs.h
+#include linux/net.h
+#include linux/skbuff.h
+#include net/sock.h
+
+#include avc.h
+#include objsec.h
+
 #ifdef CONFIG_NETLABEL
 void selinux_netlbl_cache_invalidate(void);
 int selinux_netlbl_socket_post_create(struct socket *sock,

--
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


[PATCH 1/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread paul . moore
Fix a problem where the NetLabel specific fields of the sk_security_struct
structure were not being initialized early enough in some cases.

Signed-off-by: Paul Moore [EMAIL PROTECTED]
---
 security/selinux/hooks.c|6 +++
 security/selinux/include/selinux_netlabel.h |   18 +++
 security/selinux/ss/services.c  |   45 ++--
 3 files changed, 67 insertions(+), 2 deletions(-)

Index: net-2.6.19/security/selinux/hooks.c
===
--- net-2.6.19.orig/security/selinux/hooks.c
+++ net-2.6.19/security/selinux/hooks.c
@@ -281,6 +281,8 @@ static int sk_alloc_security(struct sock
ssec-sid = SECINITSID_UNLABELED;
sk-sk_security = ssec;
 
+   selinux_netlbl_sk_security_init(ssec, family);
+
return 0;
 }
 
@@ -3585,6 +3587,8 @@ static void selinux_sk_clone_security(co
 
newssec-sid = ssec-sid;
newssec-peer_sid = ssec-peer_sid;
+
+   selinux_netlbl_sk_clone_security(ssec, newssec);
 }
 
 static void selinux_sk_getsecid(struct sock *sk, u32 *secid)
@@ -3648,6 +3652,8 @@ static void selinux_inet_csk_clone(struc
   new socket in sync, but we don't have the isec available yet.
   So we will wait until sock_graft to do it, by which
   time it will have been created and available. */
+
+   selinux_netlbl_sk_security_init(newsksec, req-rsk_ops-family);
 }
 
 static void selinux_req_classify_flow(const struct request_sock *req,
Index: net-2.6.19/security/selinux/include/selinux_netlabel.h
===
--- net-2.6.19.orig/security/selinux/include/selinux_netlabel.h
+++ net-2.6.19/security/selinux/include/selinux_netlabel.h
@@ -39,6 +39,10 @@ int selinux_netlbl_sock_rcv_skb(struct s
struct avc_audit_data *ad);
 u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock);
 u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb);
+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
+int family);
+void selinux_netlbl_sk_clone_security(struct sk_security_struct *ssec,
+ struct sk_security_struct *newssec);
 
 int __selinux_netlbl_inode_permission(struct inode *inode, int mask);
 /**
@@ -115,6 +119,20 @@ static inline u32 selinux_netlbl_socket_
return SECSID_NULL;
 }
 
+static inline void selinux_netlbl_sk_security_init(
+  struct sk_security_struct *ssec,
+  int family)
+{
+   return;
+}
+
+static inline void selinux_netlbl_sk_clone_security(
+  struct sk_security_struct *ssec,
+  struct sk_security_struct *newssec)
+{
+   return;
+}
+
 static inline int selinux_netlbl_inode_permission(struct inode *inode,
  int mask)
 {
Index: net-2.6.19/security/selinux/ss/services.c
===
--- net-2.6.19.orig/security/selinux/ss/services.c
+++ net-2.6.19/security/selinux/ss/services.c
@@ -2423,6 +2423,45 @@ netlbl_socket_setsid_return:
 }
 
 /**
+ * selinux_netlbl_sk_security_init - Setup the NetLabel fields
+ * @ssec: the sk_security_struct
+ * @family: the socket family
+ *
+ * Description:
+ * Called when a new sk_security_struct is allocated to initialize the NetLabel
+ * fields.
+ *
+ */
+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
+int family)
+{
+if (family == PF_INET)
+   ssec-nlbl_state = NLBL_REQUIRE;
+   else
+   ssec-nlbl_state = NLBL_UNSET;
+}
+
+/**
+ * selinux_netlbl_sk_clone_security - Copy the NetLabel fields
+ * @ssec: the original sk_security_struct
+ * @newssec: the cloned sk_security_struct
+ *
+ * Description:
+ * Clone the NetLabel specific sk_security_struct fields from @ssec to
+ * @newssec.
+ *
+ */
+void selinux_netlbl_sk_clone_security(struct sk_security_struct *ssec,
+ struct sk_security_struct *newssec)
+{
+   newssec-sclass = ssec-sclass;
+   if (ssec-nlbl_state != NLBL_UNSET)
+   newssec-nlbl_state = NLBL_REQUIRE;
+   else
+   newssec-nlbl_state = NLBL_UNSET;
+}
+
+/**
  * selinux_netlbl_socket_post_create - Label a socket using NetLabel
  * @sock: the socket to label
  * @sock_family: the socket family
@@ -2440,10 +2479,11 @@ int selinux_netlbl_socket_post_create(st
struct inode_security_struct *isec = SOCK_INODE(sock)-i_security;
struct sk_security_struct *sksec = sock-sk-sk_security;
 
+   sksec-sclass = isec-sclass;
+
if (sock_family != PF_INET)
return 0;
 
-   sksec-sclass = isec-sclass;
sksec-nlbl_state = NLBL_REQUIRE;
 

Re: [PATCH 4/6] net neighbour: convert to RCU

2006-08-29 Thread Alexey Kuznetsov
Hello!

 @@ -346,8 +354,8 @@ struct neighbour *neigh_lookup(struct ne
   
   NEIGH_CACHE_STAT_INC(tbl, lookups);
  
 - read_lock_bh(tbl-lock);
 - hlist_for_each_entry(n, tmp, tbl-hash_buckets[hash_val], hlist) {
 + rcu_read_lock();
 + hlist_for_each_entry_rcu(n, tmp, tbl-hash_buckets[hash_val], hlist) {
   if (dev == n-dev  !memcmp(n-primary_key, pkey, key_len)) {
   neigh_hold(n);
   NEIGH_CACHE_STAT_INC(tbl, hits);

Sure? Seems, you cannot grab refcnt here, the entry can be already
released.

Probably, you should do atomic_inc_and_test() here and restart lookup,
if it fails.

Alexey
-
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] pcnet32: fix user visible typo

2006-08-29 Thread Don Fry
Alexey,

Your patch is fine.  I had not looked at the if which would prevent zero
cards from even printing.

On Mon, Aug 28, 2006 at 04:51:42PM -0700, Don Fry wrote:
 The cause of #6428 has already been fixed in v1.32 of the pcnet32
 driver.  To be correct, the printk should be:
 
   printk(KERN_INFO PFX %d card%s found\n,
   cards_found, cards_found != 1 ? s : );
 
 So that zero cards also says 'pcnet32: 0 cards found.'
 Why delete the period from the end of the sentence?
 
 On Tue, Aug 29, 2006 at 03:32:49AM +0400, Alexey Dobriyan wrote:
  Also, final dot removed and single form fixed. The cause of #6428 is
  still to be found.
  
  Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
  ---
  
   drivers/net/pcnet32.c |3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
  
  --- a/drivers/net/pcnet32.c
  +++ b/drivers/net/pcnet32.c
  @@ -2986,7 +2986,8 @@ static int __init pcnet32_init_module(vo
  pcnet32_probe_vlbus(pcnet32_portlist);
   
  if (cards_found  (pcnet32_debug  NETIF_MSG_PROBE))
  -   printk(KERN_INFO PFX %d cards_found.\n, cards_found);
  +   printk(KERN_INFO PFX %d card%s found\n,
  +   cards_found, cards_found  1 ? s : );
   
  return (pcnet32_have_pci + cards_found) ? 0 : -ENODEV;
   }
  
  -
-- 
Don Fry
[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: [RFC IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Stephen Hemminger
On Tue, 29 Aug 2006 12:44:18 +0200
Olaf Kirch [EMAIL PROTECTED] wrote:

 On Tue, Aug 29, 2006 at 06:34:26PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ 
 wrote:
   The attached tentative patch makes IPv6 autoconf depend on the
   availability of IFF_MULTICAST. This is admittedly a bit of a hack, but
   it makes sense, since DAD and router solicitation do rely on multicast.
  
  I disagree.  The node MUST NOT assign live address on
  that interface.
 
 I'm not sure I understand. The Xen bridge devices get fe:ff:ff:ff:ff:ff
 as MAC address.  Which is a bit hackish, but that seems to be the way
 the Xen folks want to do it.

They should be using random_ether_addr() or putting some per instance
specific info into the address.

-- 
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


Fw: 2.6.18-rc4-mm3: BUG: warning at include/net/dst.h:154/dst_release()

2006-08-29 Thread Andrew Morton


Begin forwarded message:

Date: Tue, 29 Aug 2006 10:25:07 -0400
From: [EMAIL PROTECTED]
To: Andrew Morton [EMAIL PROTECTED]
Cc: linux-kernel@vger.kernel.org
Subject: 2.6.18-rc4-mm3: BUG: warning at include/net/dst.h:154/dst_release()


Seeing this a lot on 2.6.18-rc4-mm3 with 2 different stack tracebacks
(one for received packets, other for sending).  I already picked up the
fix for the ^ / confusion in fib_rules.c and that didn't help matters.

[  731.252000] BUG: warning at include/net/dst.h:154/dst_release()
[  731.252000]  [c01036d4] dump_trace+0x64/0x1b2
[  731.252000]  [c0103834] show_trace_log_lvl+0x12/0x25
[  731.252000]  [c0103d62] show_trace+0xd/0x10
[  731.252000]  [c0103dff] dump_stack+0x19/0x1b
[  731.252000]  [c0347fe8] fib6_rule_action+0x79/0xad
[  731.253000]  [c02dfe62] fib_rules_lookup+0x4e/0x93
[  731.255000]  [c0348065] fib6_rule_lookup+0x2d/0x7d
[  731.256000]  [c032fe6d] rt6_lookup+0x45/0x83
[  731.257000]  [c032d9cd] addrconf_prefix_rcv+0xf4/0x743
[  731.258000]  [c0335410] ndisc_rcv+0x7d5/0xaf3
[  731.259000]  [c033ad0e] icmpv6_rcv+0x767/0x7e9
[  731.26]  [c03286d4] ip6_input+0x1e0/0x2a2
[  731.262000]  [c03287c8] ip6_mc_input+0x32/0x40
[  731.263000]  [c0328bf6] ipv6_rcv+0x19f/0x1cd
[  731.264000]  [c02d480b] netif_receive_skb+0x143/0x1b6
[  731.265000]  [c02d5bb0] process_backlog+0x71/0xf3
[  731.266000]  [c02d5a92] net_rx_action+0x56/0xcf
[  731.267000]  [c0116d3c] __do_softirq+0x38/0x7a
[  731.267000]  [c010460c] do_softirq+0x3e/0x87
[  731.267000]  [c0116cf8] irq_exit+0x28/0x34
[  731.267000]  [c01045c1] do_IRQ+0xab/0xb8
[  731.267000]  [c010323a] common_interrupt+0x1a/0x20

[ 1498.555000] BUG: warning at include/net/dst.h:154/dst_release()
[ 1498.555000]  [c01036d4] dump_trace+0x64/0x1b2
[ 1498.555000]  [c0103834] show_trace_log_lvl+0x12/0x25
[ 1498.555000]  [c0103d62] show_trace+0xd/0x10
[ 1498.555000]  [c0103dff] dump_stack+0x19/0x1b
[ 1498.555000]  [c0347db8] fib6_rule_action+0x79/0xad
[ 1498.557000]  [c02dfc32] fib_rules_lookup+0x4e/0x93
[ 1498.558000]  [c0347e35] fib6_rule_lookup+0x2d/0x7d
[ 1498.56]  [c032fc9c] ip6_route_output+0x21/0x24
[ 1498.561000]  [c032647c] ip6_dst_lookup_tail+0x19/0x92
[ 1498.562000]  [c0326503] ip6_dst_lookup+0xe/0x10
[ 1498.563000]  [c0344727] ip6_datagram_connect+0x322/0x50a
[ 1498.565000]  [c0309850] inet_dgram_connect+0x4b/0x55
[ 1498.566000]  [c02cc970] sys_connect+0x67/0x84
[ 1498.567000]  [c02ccfeb] sys_socketcall+0x8c/0x186
[ 1498.568000]  [c01028cf] syscall_call+0x7/0xb
[ 1498.568000] DWARF2 unwinder stuck at syscall_call+0x7/0xb


-
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


Fw: [Bugme-new] [Bug 7071] New: Can't bring Sun Quad GigaSwift Ethernet interfaces up (Cassini driver)

2006-08-29 Thread Andrew Morton


Begin forwarded message:

Date: Tue, 29 Aug 2006 09:15:29 -0700
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Bugme-new] [Bug 7071] New: Can't bring Sun Quad GigaSwift Ethernet 
interfaces up (Cassini driver)


http://bugzilla.kernel.org/show_bug.cgi?id=7071

   Summary: Can't bring Sun Quad GigaSwift Ethernet interfaces up
(Cassini driver)
Kernel Version: 2.6.17.11 #2 SMP PREEMPT
Status: NEW
  Severity: blocking
 Owner: [EMAIL PROTECTED]
 Submitter: [EMAIL PROTECTED]


Most recent kernel where this bug did not occur:
Distribution: Debian for Sparc
Hardware Environment: Sun Netra T1125
Software Environment: sparc64 GNU/Linux
Problem Description: can't bring Sun Quad GigaSwift Ethernet interfaces up

Steps to reproduce: compile Cassini driver as module, boot and load the cassini 
driver : new interfaces are recognized correctly, and ethtool can see them. 
Then, try to bring up the ethernet interfaces using the ifconfig command -- 
ifconfig crashes :

toundra:~# lsmod 
Module  Size  Used by
toundra:~# modinfo cassini
filename:   /lib/modules/2.6.17.11/kernel/drivers/net/cassini.ko
author: Adrian Sun ([EMAIL PROTECTED])
description:Sun Cassini(+) ethernet driver
license:GPL
vermagic:   2.6.17.11 SMP preempt mod_unload gcc-4.1
depends:
alias:  pci:v108EdABBAsv*sd*bc*sc*i*
alias:  pci:v100Bd0035sv*sd*bc*sc*i*
parm:   linkdown_timeout:min reset interval in sec. for PCS linkdown 
issue; disabled if not positive (int)
parm:   link_mode:default link mode (int)
parm:   cassini_debug:Cassini bitmapped debugging message enable value 
(int)
toundra:~# 
toundra:~# modprobe cassini
cassini.c:v1.4 (1 July 2004)
eth0: Sun Cassini+ (64bit/66MHz PCI/Cu) Ethernet[0] 00:14:4f:24:47:a4 
eth1: Sun Cassini+ (64bit/66MHz PCI/Cu) Ethernet[0] 00:14:4f:24:47:a5 
eth2: Sun Cassini+ (64bit/66MHz PCI/Cu) Ethernet[0] 00:14:4f:24:47:a6 
eth3: Sun Cassini+ (64bit/66MHz PCI/Cu) Ethernet[0] 00:14:4f:24:47:a7 

toundra:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full 
100baseT/Half 100baseT/Full 
1000baseT/Full 
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
100baseT/Half 100baseT/Full 
1000baseT/Full 
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Current message level: 0x00ff (255)
Link detected: yes
toundra:~# ifconfig eth1 up
Unable to handle kernel NULL pointer dereference
tsk-{mm,active_mm}-context = 048e
tsk-{mm,active_mm}-pgd = f80080736000
  \|/  \|/
  @'/ .. \`@
  /_| \__/ |_\
 \__U_/
ifconfig(1501): Oops [#1]
TSTATE: 80009605 TPC: 0041cf74 TNPC: 0041cf78 Y: 
Not tainted
TPC: request_irq+0x14/0x500
g0: f018 g1: ae78 g2: f800afe0d800 g3: 
f800aec56da0
g4: f800805d1260 g5: f8007fbf2000 g6: f800aec2c000 g7: 
f800ae5983a0
o0:  o1:  o2: 0001 o3: 
0002
o4: 0010 o5: f800ae779d20 sp: f800aec2eda1 ret_pc: 
10002190
RPC: cas_spare_recover+0x210/0x2a0 [cassini]
l0:  l1: 0100 l2: f800aec504d8 l3: 
f800aec2f650
l4: f800aec56db0 l5: f7ea330c l6: f800aec504d0 l7: 
f8002000
i0: ffea i1: 10003640 i2: 0400 i3: 
f800aec5
i4: f800aec5 i5: 104307a0 i6: f800aec2ee71 i7: 
10007cf4
I7: cas_open+0x214/0x300 [cassini]
Caller[10007cf4]: cas_open+0x214/0x300 [cassini]
Caller[00625ff0]: dev_open+0x50/0xc0
Caller[006249c8]: dev_change_flags+0x128/0x180
Caller[00675984]: devinet_ioctl+0x704/0x820
Caller[00618ed8]: sock_ioctl+0x1b8/0x280
Caller[004b18a4]: do_ioctl+0x24/0xa0
Caller[004b198c]: vfs_ioctl+0x6c/0x360
Caller[004b1ca8]: sys_ioctl+0x28/0x60
Caller[004d2e94]: dev_ifsioc+0x54/0x320
Caller[004ce0fc]: compat_sys_ioctl+0xdc/0x3a0
Caller[00406c14]: linux_sparc_syscall32+0x34/0x40
Caller[00011330]: 0x11330
Instruction DUMP: 02c64022  b0103fea  a1322000 c25c2008 02c0401e  b0103fed  
27001c30  8214e140  80a40001 
Killed
toundra:~#

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  

dealing with hard_start_xmit of net_device

2006-08-29 Thread Frank Schneider


hi all,

I am customizing a linux driver code of WLAN card as Access Point on Linux 
kernel 2.6.12 to work with.


We know struct net_device has a member pointer to a method called
hard_start_xmit that initiates the transmission through the device. Data 
should contain sk_buff structure.


For that particular device, the whole driver code is consists of some 
modules. Among those one module already assigned a function to this pointer 
hard_start_xmit. I already tested its working well to transmit outgoing 
data frame from AP.
My question is, how can I assign another function in different module. I 
need to call this function when transmit data frame, but in practice, this 
function will not send any data frame, e.g. won’t use dev_queue_xmit.
You can assume, when something to  transmit it will call two functions in 
two modules of same driver


Any suggestions to do that please ?



regards,
/ Frank

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-
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 IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Alexey Kuznetsov
Hello!

 Yes, it is logical because without multicast IPV6 cannot
 work correctly.

This is not quite true. IFF_BROADCAST is enough, it will work just
like IPv4.

Real troubles start only when interface is not IFF_BROADCAST and not
IFF_POINTOPOINT.


 IFF_MULTICAST flag seems potentially problematic.  How many other
 things break over such a device?

Nothing should break. IFF_MULTICAST is an advisory flag, saying
mostly You do not want to stream high bandwidth multicast video here.
So that, it can be used to block autoconfiguration.

It does not change the fact that Xen device makes something profoundly
wrong. IPv6 autoconfiguration is _auto_configuration. It is triggered
only for a few of media types, for which autoconfiguration is prescribed
by corresponding RFCs. Ethernet is one of them.

If Xen does not support the things, which are required for each
ethernet device, it should not be ARPHRD_ETHER. If it wants to pretend
to be ARPHRD_ETHER, it must support basic ethernet functions, which IMHO
is so _easy_, that the question does not even makes sense.

Alexey
-
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 05/26] e1000: error out if we cannot enable PCI device on resume

2006-08-29 Thread Kok, Auke

Do not ignore errors returned by pci_enable_device, instead error out.

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

 drivers/net/e1000/e1000_main.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 426811a..630fe60 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4709,11 +4709,14 @@ e1000_resume(struct pci_dev *pdev)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
struct e1000_adapter *adapter = netdev_priv(netdev);
-   uint32_t manc, ret_val;
+   uint32_t manc, err;
 
pci_set_power_state(pdev, PCI_D0);
e1000_pci_restore_state(adapter);
-   ret_val = pci_enable_device(pdev);
+   if ((err = pci_enable_device(pdev))) {
+   printk(KERN_ERR e1000: Cannot enable PCI device from 
suspend\n);
+   return err;
+   }
pci_set_master(pdev);
 
pci_enable_wake(pdev, PCI_D3hot, 0);



---
Auke Kok [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


[PATCH 07/26] e1000: Use module param array code

2006-08-29 Thread Kok, Auke

Use module param array code to distinguish between defaults and user
specified values.

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

 drivers/net/e1000/e1000_param.c |  161 +++
 1 files changed, 110 insertions(+), 51 deletions(-)

diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
index 0ef4131..2128427 100644
--- a/drivers/net/e1000/e1000_param.c
+++ b/drivers/net/e1000/e1000_param.c
@@ -324,7 +324,6 @@ e1000_check_options(struct e1000_adapter
DPRINTK(PROBE, NOTICE,
   Warning: no configuration for board #%i\n, bd);
DPRINTK(PROBE, NOTICE, Using defaults for all values\n);
-   bd = E1000_MAX_NIC;
}
 
{ /* Transmit Descriptor Count */
@@ -342,9 +341,14 @@ e1000_check_options(struct e1000_adapter
opt.arg.r.max = mac_type  e1000_82544 ?
E1000_MAX_TXD : E1000_MAX_82544_TXD;
 
-   tx_ring-count = TxDescriptors[bd];
-   e1000_validate_option(tx_ring-count, opt, adapter);
-   E1000_ROUNDUP(tx_ring-count, REQ_TX_DESCRIPTOR_MULTIPLE);
+   if (num_TxDescriptors  bd) {
+   tx_ring-count = TxDescriptors[bd];
+   e1000_validate_option(tx_ring-count, opt, adapter);
+   E1000_ROUNDUP(tx_ring-count,
+   REQ_TX_DESCRIPTOR_MULTIPLE);
+   } else {
+   tx_ring-count = opt.def;
+   }
for (i = 0; i  adapter-num_tx_queues; i++)
tx_ring[i].count = tx_ring-count;
}
@@ -363,9 +367,14 @@ e1000_check_options(struct e1000_adapter
opt.arg.r.max = mac_type  e1000_82544 ? E1000_MAX_RXD :
E1000_MAX_82544_RXD;
 
-   rx_ring-count = RxDescriptors[bd];
-   e1000_validate_option(rx_ring-count, opt, adapter);
-   E1000_ROUNDUP(rx_ring-count, REQ_RX_DESCRIPTOR_MULTIPLE);
+   if (num_RxDescriptors  bd) {
+   rx_ring-count = RxDescriptors[bd];
+   e1000_validate_option(rx_ring-count, opt, adapter);
+   E1000_ROUNDUP(rx_ring-count,
+   REQ_RX_DESCRIPTOR_MULTIPLE);
+   } else {
+   rx_ring-count = opt.def;
+   }
for (i = 0; i  adapter-num_rx_queues; i++)
rx_ring[i].count = rx_ring-count;
}
@@ -377,9 +386,13 @@ e1000_check_options(struct e1000_adapter
.def  = OPTION_ENABLED
};
 
-   int rx_csum = XsumRX[bd];
-   e1000_validate_option(rx_csum, opt, adapter);
-   adapter-rx_csum = rx_csum;
+   if (num_XsumRX  bd) {
+   int rx_csum = XsumRX[bd];
+   e1000_validate_option(rx_csum, opt, adapter);
+   adapter-rx_csum = rx_csum;
+   } else {
+   adapter-rx_csum = opt.def;
+   }
}
{ /* Flow Control */
 
@@ -399,9 +412,13 @@ e1000_check_options(struct e1000_adapter
 .p = fc_list }}
};
 
-   int fc = FlowControl[bd];
-   e1000_validate_option(fc, opt, adapter);
-   adapter-hw.fc = adapter-hw.original_fc = fc;
+   if (num_FlowControl  bd) {
+   int fc = FlowControl[bd];
+   e1000_validate_option(fc, opt, adapter);
+   adapter-hw.fc = adapter-hw.original_fc = fc;
+   } else {
+   adapter-hw.fc = adapter-hw.original_fc = opt.def;
+   }
}
{ /* Transmit Interrupt Delay */
struct e1000_option opt = {
@@ -413,8 +430,13 @@ e1000_check_options(struct e1000_adapter
 .max = MAX_TXDELAY }}
};
 
-   adapter-tx_int_delay = TxIntDelay[bd];
-   e1000_validate_option(adapter-tx_int_delay, opt, adapter);
+   if (num_TxIntDelay  bd) {
+   adapter-tx_int_delay = TxIntDelay[bd];
+   e1000_validate_option(adapter-tx_int_delay, opt,
+ adapter);
+   } else {
+   adapter-tx_int_delay = opt.def;
+   }
}
{ /* Transmit Absolute Interrupt Delay */
struct e1000_option opt = {
@@ -426,9 +448,13 @@ e1000_check_options(struct e1000_adapter
 .max = MAX_TXABSDELAY }}
};
 
-   adapter-tx_abs_int_delay = TxAbsIntDelay[bd];
-   e1000_validate_option(adapter-tx_abs_int_delay, opt,
- adapter);
+  

[PATCH 19/26] ixgb: convert dev-priv to netdev_priv(dev).

2006-08-29 Thread Kok, Auke

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

 drivers/net/ixgb/ixgb_main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 6959735..fee4c5a 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -2190,7 +2190,7 @@ ixgb_restore_vlan(struct ixgb_adapter *a
 
 static void ixgb_netpoll(struct net_device *dev)
 {
-   struct ixgb_adapter *adapter = dev-priv;
+   struct ixgb_adapter *adapter = netdev_priv(dev);
 
disable_irq(adapter-pdev-irq);
ixgb_intr(adapter-pdev-irq, dev, NULL);



---
Auke Kok [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


[PATCH 25/26] ixgb: remove skb-dev assignment

2006-08-29 Thread Kok, Auke

Same change as e1000: remove skb-dev assignment, it's now done
by netdev_alloc_skb.

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

 drivers/net/ixgb/ixgb_main.c |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index abca75f..ee12a85 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1974,7 +1974,6 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a
netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
if (new_skb) {
skb_reserve(new_skb, NET_IP_ALIGN);
-   new_skb-dev = netdev;
memcpy(new_skb-data - NET_IP_ALIGN,
   skb-data - NET_IP_ALIGN,
   length + NET_IP_ALIGN);
@@ -2054,14 +2053,14 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
/* leave three descriptors unused */
while(--cleancount  2) {
/* recycle! its good for you */
-   if (!(skb = buffer_info-skb))
-   skb = netdev_alloc_skb(netdev, adapter-rx_buffer_len
-   + NET_IP_ALIGN);
-   else {
+   skb = buffer_info-skb;
+   if (skb) {
skb_trim(skb, 0);
goto map_skb;
}
 
+   skb = netdev_alloc_skb(netdev, adapter-rx_buffer_len
+  + NET_IP_ALIGN);
if (unlikely(!skb)) {
/* Better luck next round */
adapter-alloc_rx_buff_failed++;
@@ -2074,8 +2073,6 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
 */
skb_reserve(skb, NET_IP_ALIGN);
 
-   skb-dev = netdev;
-
buffer_info-skb = skb;
buffer_info-length = adapter-rx_buffer_len;
 map_skb:



---
Auke Kok [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


[PATCH 14/26] e100: fix error recovery

2006-08-29 Thread Kok, Auke

A recent patch in -mm3 titled
gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch causes
pci_enable_device() to be a no-op if the kernel thinks that the device is
already enabled.  This change breaks the PCI error recovery mechanism in
the e100 device driver, since, after PCI slot reset, the card is no longer
enabled.  This is a trivial fix for this problem.  Tested.

Signed-off-by: Linas Vepstas [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e100.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 458af6a..e12cc68 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2791,6 +2791,7 @@ static pci_ers_result_t e100_io_error_de
/* Detach; put netif into state similar to hotplug unplug. */
netif_poll_enable(netdev);
netif_device_detach(netdev);
+   pci_disable_device(pdev);
 
/* Request a slot reset. */
return PCI_ERS_RESULT_NEED_RESET;



---
Auke Kok [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


[PATCH 24/26] ixgb: Add PCI Error recovery callbacks

2006-08-29 Thread Kok, Auke

Adds PCI Error recovery callbacks to the Intel 10-gigabit ethernet ixgb
device driver.  Lightly tested, works.

Zhang, Yanmin [EMAIL PROTECTED] wrote:

Both pci_disable_device and ixgb_down would access the device.  It doesn't
follow Documentation/pci-error-recovery.txt that error_detected shouldn't do
any access to the device.

Signed-off-by: Linas Vepstas [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/ixgb/ixgb_main.c |  112 ++
 1 files changed, 111 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index a5da48a..abca75f 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -118,15 +118,26 @@ static void ixgb_restore_vlan(struct ixg
 static void ixgb_netpoll(struct net_device *dev);
 #endif
 
-/* Exported from other modules */
+static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
+enum pci_channel_state state);
+static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev);
+static void ixgb_io_resume (struct pci_dev *pdev);
 
+/* Exported from other modules */
 extern void ixgb_check_options(struct ixgb_adapter *adapter);
 
+static struct pci_error_handlers ixgb_err_handler = {
+   .error_detected = ixgb_io_error_detected,
+   .slot_reset = ixgb_io_slot_reset,
+   .resume = ixgb_io_resume,
+};
+
 static struct pci_driver ixgb_driver = {
.name = ixgb_driver_name,
.id_table = ixgb_pci_tbl,
.probe= ixgb_probe,
.remove   = __devexit_p(ixgb_remove),
+   .err_handler = ixgb_err_handler
 };
 
 MODULE_AUTHOR(Intel Corporation, [EMAIL PROTECTED]);
@@ -1550,6 +1561,11 @@ void
 ixgb_update_stats(struct ixgb_adapter *adapter)
 {
struct net_device *netdev = adapter-netdev;
+   struct pci_dev *pdev = adapter-pdev;
+
+   /* Prevent stats update while adapter is being reset */
+   if (pdev-error_state  pdev-error_state != pci_channel_io_normal)
+   return;
 
if((netdev-flags  IFF_PROMISC) || (netdev-flags  IFF_ALLMULTI) ||
   (netdev-mc_count  IXGB_MAX_NUM_MULTICAST_ADDRESSES)) {
@@ -2205,4 +2221,98 @@ static void ixgb_netpoll(struct net_devi
 }
 #endif
 
+/**
+ * ixgb_io_error_detected() - called when PCI error is detected
+ * @pdevpointer to pci device with error
+ * @state   pci channel state after error
+ *
+ * This callback is called by the PCI subsystem whenever
+ * a PCI bus error is detected.
+ */
+static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
+enum pci_channel_state state)
+{
+   struct net_device *netdev = pci_get_drvdata(pdev);
+   struct ixgb_adapter *adapter = netdev-priv;
+
+   if(netif_running(netdev))
+   ixgb_down(adapter, TRUE);
+
+   pci_disable_device(pdev);
+
+   /* Request a slot reset. */
+   return PCI_ERS_RESULT_NEED_RESET;
+}
+
+/**
+ * ixgb_io_slot_reset - called after the pci bus has been reset.
+ * @pdevpointer to pci device with error
+ *
+ * This callback is called after the PCI buss has been reset.
+ * Basically, this tries to restart the card from scratch.
+ * This is a shortened version of the device probe/discovery code,
+ * it resembles the first-half of the ixgb_probe() routine.
+ */
+static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev)
+{
+   struct net_device *netdev = pci_get_drvdata(pdev);
+   struct ixgb_adapter *adapter = netdev-priv;
+
+   if(pci_enable_device(pdev)) {
+   DPRINTK(PROBE, ERR, Cannot re-enable PCI device after 
reset.\n);
+   return PCI_ERS_RESULT_DISCONNECT;
+   }
+
+   /* Perform card reset only on one instance of the card */
+   if (0 != PCI_FUNC (pdev-devfn))
+   return PCI_ERS_RESULT_RECOVERED;
+
+   pci_set_master(pdev);
+
+   netif_carrier_off(netdev);
+   netif_stop_queue(netdev);
+   ixgb_reset(adapter);
+
+   /* Make sure the EEPROM is good */
+   if(!ixgb_validate_eeprom_checksum(adapter-hw)) {
+   DPRINTK(PROBE, ERR, After reset, the EEPROM checksum is not 
valid.\n);
+   return PCI_ERS_RESULT_DISCONNECT;
+   }
+   ixgb_get_ee_mac_addr(adapter-hw, netdev-dev_addr);
+   memcpy(netdev-perm_addr, netdev-dev_addr, netdev-addr_len);
+
+   if(!is_valid_ether_addr(netdev-perm_addr)) {
+   DPRINTK(PROBE, ERR, After reset, invalid MAC address.\n);
+   return PCI_ERS_RESULT_DISCONNECT;
+   }
+
+   return PCI_ERS_RESULT_RECOVERED;
+}
+
+/**
+ * ixgb_io_resume - called when its OK to resume normal operations
+ * @pdevpointer to pci device with error
+ *
+ * The error recovery driver tells us that its OK to resume
+ * normal operation. Implementation resembles the second-half
+ * of the ixgb_probe() routine.
+ */
+static void ixgb_io_resume 

[PATCH 08/26] e1000: Deprecate mii-tool SIOCMIIREG ioctl

2006-08-29 Thread Kok, Auke

Deprecate mii-tool SIOCMIIREG ioctl. This ioctl is broken in e1000 and
ethtool has this functionality in working order.

Signed-off-by: Jeff Kirsher [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000_main.c |   69 
 1 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index c128f62..70d0acd 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4263,9 +4263,6 @@ e1000_mii_ioctl(struct net_device *netde
 {
struct e1000_adapter *adapter = netdev_priv(netdev);
struct mii_ioctl_data *data = if_mii(ifr);
-   int retval;
-   uint16_t mii_reg;
-   uint16_t spddplx;
unsigned long flags;
 
if (adapter-hw.media_type != e1000_media_type_copper)
@@ -4287,72 +4284,6 @@ e1000_mii_ioctl(struct net_device *netde
spin_unlock_irqrestore(adapter-stats_lock, flags);
break;
case SIOCSMIIREG:
-   if (!capable(CAP_NET_ADMIN))
-   return -EPERM;
-   if (data-reg_num  ~(0x1F))
-   return -EFAULT;
-   mii_reg = data-val_in;
-   spin_lock_irqsave(adapter-stats_lock, flags);
-   if (e1000_write_phy_reg(adapter-hw, data-reg_num,
-   mii_reg)) {
-   spin_unlock_irqrestore(adapter-stats_lock, flags);
-   return -EIO;
-   }
-   if (adapter-hw.media_type == e1000_media_type_copper) {
-   switch (data-reg_num) {
-   case PHY_CTRL:
-   if (mii_reg  MII_CR_POWER_DOWN)
-   break;
-   if (mii_reg  MII_CR_AUTO_NEG_EN) {
-   adapter-hw.autoneg = 1;
-   adapter-hw.autoneg_advertised = 0x2F;
-   } else {
-   if (mii_reg  0x40)
-   spddplx = SPEED_1000;
-   else if (mii_reg  0x2000)
-   spddplx = SPEED_100;
-   else
-   spddplx = SPEED_10;
-   spddplx += (mii_reg  0x100)
-  ? DUPLEX_FULL :
-  DUPLEX_HALF;
-   retval = e1000_set_spd_dplx(adapter,
-   spddplx);
-   if (retval) {
-   spin_unlock_irqrestore(
-   adapter-stats_lock,
-   flags);
-   return retval;
-   }
-   }
-   if (netif_running(adapter-netdev))
-   e1000_reinit_locked(adapter);
-   else
-   e1000_reset(adapter);
-   break;
-   case M88E1000_PHY_SPEC_CTRL:
-   case M88E1000_EXT_PHY_SPEC_CTRL:
-   if (e1000_phy_reset(adapter-hw)) {
-   spin_unlock_irqrestore(
-   adapter-stats_lock, flags);
-   return -EIO;
-   }
-   break;
-   }
-   } else {
-   switch (data-reg_num) {
-   case PHY_CTRL:
-   if (mii_reg  MII_CR_POWER_DOWN)
-   break;
-   if (netif_running(adapter-netdev))
-   e1000_reinit_locked(adapter);
-   else
-   e1000_reset(adapter);
-   break;
-   }
-   }
-   spin_unlock_irqrestore(adapter-stats_lock, flags);
-   break;
default:
return -EOPNOTSUPP;
}



---
Auke Kok [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


[PATCH 10/26] e1000: Add PCI ID 0x10a4 for our new 4-port PCI-Express device

2006-08-29 Thread Kok, Auke

Device 0x10a4 is a double 82571 on a single PCI-Express card and
has 4 gigabit capable ports.

Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000_ethtool.c |1 +
 drivers/net/e1000/e1000_hw.c  |1 +
 drivers/net/e1000/e1000_hw.h  |1 +
 drivers/net/e1000/e1000_main.c|2 ++
 4 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index 0403072..3fccffd 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1705,6 +1705,7 @@ static int e1000_wol_exclusion(struct e1
/* return success for non excluded adapter ports */
retval = 0;
break;
+   case E1000_DEV_ID_82571EB_QUAD_COPPER:
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
/* quad port adapters only support WoL on port A */
if (!adapter-quad_port_a) {
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index f56d4cd..4b54c48 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -389,6 +389,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
 case E1000_DEV_ID_82571EB_COPPER:
 case E1000_DEV_ID_82571EB_FIBER:
 case E1000_DEV_ID_82571EB_SERDES:
+case E1000_DEV_ID_82571EB_QUAD_COPPER:
 hw-mac_type = e1000_82571;
 break;
 case E1000_DEV_ID_82572EI_COPPER:
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 4f74242..a170e96 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -470,6 +470,7 @@ int32_t e1000_check_phy_reset_block(stru
 #define E1000_DEV_ID_82571EB_COPPER  0x105E
 #define E1000_DEV_ID_82571EB_FIBER   0x105F
 #define E1000_DEV_ID_82571EB_SERDES  0x1060
+#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
 #define E1000_DEV_ID_82572EI_COPPER  0x107D
 #define E1000_DEV_ID_82572EI_FIBER   0x107E
 #define E1000_DEV_ID_82572EI_SERDES  0x107F
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 6dbafb1..87a562f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -98,6 +98,7 @@ static struct pci_device_id e1000_pci_tb
INTEL_E1000_ETHERNET_DEVICE(0x1098),
INTEL_E1000_ETHERNET_DEVICE(0x1099),
INTEL_E1000_ETHERNET_DEVICE(0x109A),
+   INTEL_E1000_ETHERNET_DEVICE(0x10A4),
INTEL_E1000_ETHERNET_DEVICE(0x10B5),
INTEL_E1000_ETHERNET_DEVICE(0x10B9),
INTEL_E1000_ETHERNET_DEVICE(0x10BA),
@@ -922,6 +923,7 @@ e1000_probe(struct pci_dev *pdev,
adapter-eeprom_wol = 0;
break;
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
+   case E1000_DEV_ID_82571EB_QUAD_COPPER:
/* if quad port adapter, disable WoL on all but port A */
if (global_quad_port_a != 0)
adapter-eeprom_wol = 0;



---
Auke Kok [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


[PATCH 18/26] ixgb: Convert dev_alloc_skb to netdev_alloc_skb.

2006-08-29 Thread Kok, Auke

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

 drivers/net/ixgb/ixgb_main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 346273d..6959735 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1948,7 +1948,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a
 #define IXGB_CB_LENGTH 256
if (length  IXGB_CB_LENGTH) {
struct sk_buff *new_skb =
-   dev_alloc_skb(length + NET_IP_ALIGN);
+   netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
if (new_skb) {
skb_reserve(new_skb, NET_IP_ALIGN);
new_skb-dev = netdev;
@@ -2032,7 +2032,7 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
while(--cleancount  2) {
/* recycle! its good for you */
if (!(skb = buffer_info-skb))
-   skb = dev_alloc_skb(adapter-rx_buffer_len
+   skb = netdev_alloc_skb(netdev, adapter-rx_buffer_len
+ NET_IP_ALIGN);
else {
skb_trim(skb, 0);



---
Auke Kok [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


[PATCH 16/26] e100: remove skb-dev assignment

2006-08-29 Thread Kok, Auke

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

 drivers/net/e100.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index eb467f8..a98e23a 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1763,7 +1763,6 @@ static int e100_rx_alloc_skb(struct nic 
return -ENOMEM;
 
/* Align, init, and map the RFD. */
-   rx-skb-dev = nic-netdev;
skb_reserve(rx-skb, NET_IP_ALIGN);
memcpy(rx-skb-data, nic-blank_rfd, sizeof(struct rfd));
rx-dma_addr = pci_map_single(nic-pdev, rx-skb-data,



---
Auke Kok [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


[PATCH 26/26] ixgb: Increment version to 1.0.112-k2

2006-08-29 Thread Kok, Auke

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

 drivers/net/ixgb/ixgb_main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index ee12a85..e36dee1 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = Inte
 #else
 #define DRIVERNAPI -NAPI
 #endif
-#define DRV_VERSION1.0.109-k4DRIVERNAPI
+#define DRV_VERSION1.0.112-k2DRIVERNAPI
 char ixgb_driver_version[] = DRV_VERSION;
 static char ixgb_copyright[] = Copyright (c) 1999-2006 Intel Corporation.;
 



---
Auke Kok [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


[PATCH 20/26] ixgb: Set a constant blink rate for ixgb adapter identify (1sec on, 1sec off)

2006-08-29 Thread Kok, Auke

Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/ixgb/ixgb_ethtool.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index cf19b89..ba62108 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -654,11 +654,7 @@ ixgb_phys_id(struct net_device *netdev, 
 
mod_timer(adapter-blink_timer, jiffies);
 
-   if (data)
-   schedule_timeout_interruptible(data * HZ);
-   else
-   schedule_timeout_interruptible(MAX_SCHEDULE_TIMEOUT);
-
+   msleep_interruptible(data * 1000);
del_timer_sync(adapter-blink_timer);
ixgb_led_off(adapter-hw);
clear_bit(IXGB_LED_ON, adapter-led_status);



---
Auke Kok [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


[PATCH 15/26] e100: reduce time under spinlock

2006-08-29 Thread Kok, Auke

We're waiting for a write flush to finish before unlocking, which
is not needed. Release the spinlock after the write command.

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

 drivers/net/e100.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e12cc68..eb467f8 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -597,8 +597,8 @@ static void e100_enable_irq(struct nic *
 
spin_lock_irqsave(nic-cmd_lock, flags);
writeb(irq_mask_none, nic-csr-scb.cmd_hi);
-   e100_write_flush(nic);
spin_unlock_irqrestore(nic-cmd_lock, flags);
+   e100_write_flush(nic);
 }
 
 static void e100_disable_irq(struct nic *nic)
@@ -607,8 +607,8 @@ static void e100_disable_irq(struct nic 
 
spin_lock_irqsave(nic-cmd_lock, flags);
writeb(irq_mask_all, nic-csr-scb.cmd_hi);
-   e100_write_flush(nic);
spin_unlock_irqrestore(nic-cmd_lock, flags);
+   e100_write_flush(nic);
 }
 
 static void e100_hw_reset(struct nic *nic)



---
Auke Kok [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


[PATCH 11/26] e1000: clean up skb allocation code, patch submitted by Christoph

2006-08-29 Thread Kok, Auke

Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]
Acked-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 87a562f..656db12 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3741,7 +3741,6 @@ e1000_clean_rx_irq(struct e1000_adapter 
netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
if (new_skb) {
skb_reserve(new_skb, NET_IP_ALIGN);
-   new_skb-dev = netdev;
memcpy(new_skb-data - NET_IP_ALIGN,
   skb-data - NET_IP_ALIGN,
   length + NET_IP_ALIGN);
@@ -4008,13 +4007,13 @@ e1000_alloc_rx_buffers(struct e1000_adap
buffer_info = rx_ring-buffer_info[i];
 
while (cleaned_count--) {
-   if (!(skb = buffer_info-skb))
-   skb = netdev_alloc_skb(netdev, bufsz);
-   else {
+   skb = buffer_info-skb;
+   if (skb) {
skb_trim(skb, 0);
goto map_skb;
}
 
+   skb = netdev_alloc_skb(netdev, bufsz);
if (unlikely(!skb)) {
/* Better luck next round */
adapter-alloc_rx_buff_failed++;
@@ -4039,10 +4038,10 @@ e1000_alloc_rx_buffers(struct e1000_adap
dev_kfree_skb(skb);
dev_kfree_skb(oldskb);
break; /* while !buffer_info-skb */
-   } else {
-   /* Use new allocation */
-   dev_kfree_skb(oldskb);
}
+
+   /* Use new allocation */
+   dev_kfree_skb(oldskb);
}
/* Make buffer alignment 2 beyond a 16 byte boundary
 * this will result in a 16 byte aligned IP header after
@@ -4050,8 +4049,6 @@ e1000_alloc_rx_buffers(struct e1000_adap
 */
skb_reserve(skb, NET_IP_ALIGN);
 
-   skb-dev = netdev;
-
buffer_info-skb = skb;
buffer_info-length = adapter-rx_buffer_len;
 map_skb:
@@ -4165,8 +4162,6 @@ e1000_alloc_rx_buffers_ps(struct e1000_a
 */
skb_reserve(skb, NET_IP_ALIGN);
 
-   skb-dev = netdev;
-
buffer_info-skb = skb;
buffer_info-length = adapter-rx_ps_bsize0;
buffer_info-dma = pci_map_single(pdev, skb-data,



---
Auke Kok [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


[PATCH 17/26] e100: increment version to 3.5.16-k2

2006-08-29 Thread Kok, Auke

Increment the version of e100 to 3.5.16-k2, increment dates.

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

 drivers/net/e100.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index a98e23a..23afdff 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -159,7 +159,7 @@
 
 #define DRV_NAME   e100
 #define DRV_EXT-NAPI
-#define DRV_VERSION3.5.10-k4DRV_EXT
+#define DRV_VERSION3.5.16-k2DRV_EXT
 #define DRV_DESCRIPTIONIntel(R) PRO/100 Network Driver
 #define DRV_COPYRIGHT  Copyright(c) 1999-2006 Intel Corporation
 #define PFXDRV_NAME : 



---
Auke Kok [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


[PATCH 21/26] ixgb: recalculate after how many descriptors to wake the queue

2006-08-29 Thread Kok, Auke

Recalculate when to wake the queue using DESC_NEEDED instead of a
static hardcoded number.

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

 drivers/net/ixgb/ixgb.h  |3 ---
 drivers/net/ixgb/ixgb_main.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h
index 82b67af..a4bee8c 100644
--- a/drivers/net/ixgb/ixgb.h
+++ b/drivers/net/ixgb/ixgb.h
@@ -110,9 +110,6 @@ struct ixgb_adapter;
 #define IXGB_RXBUFFER_8192  8192
 #define IXGB_RXBUFFER_16384 16384
 
-/* How many Tx Descriptors do we need to call netif_wake_queue? */
-#define IXGB_TX_QUEUE_WAKE 16
-
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
 #define IXGB_RX_BUFFER_WRITE   4   /* Must be power of 2 */
 
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index fee4c5a..960b44b 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1787,7 +1787,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *a
if (unlikely(netif_queue_stopped(netdev))) {
spin_lock(adapter-tx_lock);
if (netif_queue_stopped(netdev)  netif_carrier_ok(netdev) 
-   (IXGB_DESC_UNUSED(tx_ring)  IXGB_TX_QUEUE_WAKE))
+   (IXGB_DESC_UNUSED(tx_ring) = DESC_NEEDED))
netif_wake_queue(netdev);
spin_unlock(adapter-tx_lock);
}



---
Auke Kok [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


[PATCH 02/26] e1000: IRQ resources cleanup

2006-08-29 Thread Kok, Auke

irq leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge: if
e1000_up fails in e1000_open() we do not free allocated irq

Signed-off-by: Vasily Averin [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000_main.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 610a0cd..354d778 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1207,7 +1207,7 @@ e1000_open(struct net_device *netdev)
 
err = e1000_request_irq(adapter);
if (err)
-   goto err_up;
+   goto err_req_irq;
 
e1000_power_up_phy(adapter);
 
@@ -1228,6 +1228,9 @@ e1000_open(struct net_device *netdev)
return E1000_SUCCESS;
 
 err_up:
+   e1000_power_down_phy(adapter);
+   e1000_free_irq(adapter);
+err_req_irq:
e1000_free_all_rx_resources(adapter);
 err_setup_rx:
e1000_free_all_tx_resources(adapter);



---
Auke Kok [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


[PATCH 03/26] e1000: e1000_probe resources cleanup

2006-08-29 Thread Kok, Auke

Fix resources cleanup in e1000_probe()

Signed-off-by: Vasily Averin [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000_main.c |   44 +---
 1 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 354d778..c273b45 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -695,21 +695,20 @@ e1000_probe(struct pci_dev *pdev,
if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) 
(err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
E1000_ERR(No usable DMA configuration, aborting\n);
-   return err;
+   goto err_dma;
}
pci_using_dac = 0;
}
 
if ((err = pci_request_regions(pdev, e1000_driver_name)))
-   return err;
+   goto err_pci_reg;
 
pci_set_master(pdev);
 
+   err = -ENOMEM;
netdev = alloc_etherdev(sizeof(struct e1000_adapter));
-   if (!netdev) {
-   err = -ENOMEM;
+   if (!netdev)
goto err_alloc_etherdev;
-   }
 
SET_MODULE_OWNER(netdev);
SET_NETDEV_DEV(netdev, pdev-dev);
@@ -724,11 +723,10 @@ e1000_probe(struct pci_dev *pdev,
mmio_start = pci_resource_start(pdev, BAR_0);
mmio_len = pci_resource_len(pdev, BAR_0);
 
+   err = -EIO;
adapter-hw.hw_addr = ioremap(mmio_start, mmio_len);
-   if (!adapter-hw.hw_addr) {
-   err = -EIO;
+   if (!adapter-hw.hw_addr)
goto err_ioremap;
-   }
 
for (i = BAR_1; i = BAR_5; i++) {
if (pci_resource_len(pdev, i) == 0)
@@ -773,6 +771,7 @@ e1000_probe(struct pci_dev *pdev,
if ((err = e1000_sw_init(adapter)))
goto err_sw_init;
 
+   err = -EIO;
/* Flash BAR mapping must happen after e1000_sw_init
 * because it depends on mac_type */
if ((adapter-hw.mac_type == e1000_ich8lan) 
@@ -780,13 +779,11 @@ e1000_probe(struct pci_dev *pdev,
flash_start = pci_resource_start(pdev, 1);
flash_len = pci_resource_len(pdev, 1);
adapter-hw.flash_address = ioremap(flash_start, flash_len);
-   if (!adapter-hw.flash_address) {
-   err = -EIO;
+   if (!adapter-hw.flash_address)
goto err_flashmap;
-   }
}
 
-   if ((err = e1000_check_phy_reset_block(adapter-hw)))
+   if (e1000_check_phy_reset_block(adapter-hw))
DPRINTK(PROBE, INFO, PHY reset is blocked due to SOL/IDER 
session.\n);
 
/* if ksp3, indicate if it's port a being setup */
@@ -829,7 +826,7 @@ e1000_probe(struct pci_dev *pdev,
 
if (e1000_init_eeprom_params(adapter-hw)) {
E1000_ERR(EEPROM initialization failed\n);
-   return -EIO;
+   goto err_eeprom;
}
 
/* before reading the EEPROM, reset the controller to
@@ -841,7 +838,6 @@ e1000_probe(struct pci_dev *pdev,
 
if (e1000_validate_eeprom_checksum(adapter-hw)  0) {
DPRINTK(PROBE, ERR, The EEPROM Checksum Is Not Valid\n);
-   err = -EIO;
goto err_eeprom;
}
 
@@ -854,7 +850,6 @@ e1000_probe(struct pci_dev *pdev,
 
if (!is_valid_ether_addr(netdev-perm_addr)) {
DPRINTK(PROBE, ERR, Invalid MAC Address\n);
-   err = -EIO;
goto err_eeprom;
}
 
@@ -963,16 +958,33 @@ e1000_probe(struct pci_dev *pdev,
return 0;
 
 err_register:
+   e1000_release_hw_control(adapter);
+err_eeprom:
+   if (!e1000_check_phy_reset_block(adapter-hw))
+   e1000_phy_hw_reset(adapter-hw);
+
if (adapter-hw.flash_address)
iounmap(adapter-hw.flash_address);
 err_flashmap:
+#ifdef CONFIG_E1000_NAPI
+   for (i = 0; i  adapter-num_rx_queues; i++)
+   dev_put(adapter-polling_netdev[i]);
+#endif
+
+   kfree(adapter-tx_ring);
+   kfree(adapter-rx_ring);
+#ifdef CONFIG_E1000_NAPI
+   kfree(adapter-polling_netdev);
+#endif
 err_sw_init:
-err_eeprom:
iounmap(adapter-hw.hw_addr);
 err_ioremap:
free_netdev(netdev);
 err_alloc_etherdev:
pci_release_regions(pdev);
+err_pci_reg:
+err_dma:
+   pci_disable_device(pdev);
return err;
 }
 



---
Auke Kok [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


[PATCH 00/26] e100, e1000, ixgb updates

2006-08-29 Thread Kok, Auke

Hi,

Here are updates targeted to branch #upstream from netdev-2.6,
including updates to e100, e1000 and ixgb.

These changes are available through git.

git pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 upstream

and against
 netdev-2.6#upstream 699a71238856b19091503c671bac8abb1e3f9a3a


Summary:

Vasily Averin [EMAIL PROTECTED]
 e1000: IRQ resources cleanup
 e1000: e1000_probe resources cleanup
 e1000: ring buffers resources cleanup

Jesse Brandeburg [EMAIL PROTECTED]
 e1000: unify WoL capability detection code
 e1000: Add PCI ID 0x10a4 for our new 4-port PCI-Express device
 ixgb: Set a constant blink rate for ixgb adapter identify (1sec on, 1sec 
off)
 ixgb: Cache-align all TX components of the adapter struct.
 ixgb: Add buffer_info and test like e1000 has.

Christoph Hellwig [EMAIL PROTECTED]
 e1000: clean up skb allocation code, patch submitted by Christoph

Jeff Kirsher [EMAIL PROTECTED]
 e1000: Deprecate mii-tool SIOCMIIREG ioctl

Auke Kok [EMAIL PROTECTED]
 e1000: Whitespace cleanup, cosmetic changes
 e1000: error out if we cannot enable PCI device on resume
 e1000: remove unused part_num reading code
 e1000: Use module param array code
 e1000: Increment driver version to 7.2.7-k2
 e100: Convert e100 to use netdev_alloc_skb().
 e100: reduce time under spinlock
 e100: remove skb-dev assignment
 e100: increment version to 3.5.16-k2
 ixgb: Convert dev_alloc_skb to netdev_alloc_skb.
 ixgb: convert dev-priv to netdev_priv(dev).
 ixgb: recalculate after how many descriptors to wake the queue
 ixgb: remove skb-dev assignment
 ixgb: Increment version to 1.0.112-k2

Linas Vepstas [EMAIL PROTECTED]
 e100: fix error recovery
 ixgb: Add PCI Error recovery callbacks


Cheers,

Auke

---

 drivers/net/e100.c|   12
 drivers/net/e1000/e1000.h |6
 drivers/net/e1000/e1000_ethtool.c |  219 ---
 drivers/net/e1000/e1000_hw.c  | 1059 ++
 drivers/net/e1000/e1000_hw.h  |   26
 drivers/net/e1000/e1000_main.c|  214 +++
 drivers/net/e1000/e1000_param.c   |  161 +++--
 drivers/net/ixgb/ixgb.h   |5
 drivers/net/ixgb/ixgb_ethtool.c   |6
 drivers/net/ixgb/ixgb_main.c  |  140 -
 10 files changed, 981 insertions(+), 867 deletions(-)

---
Auke Kok [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


[PATCH 04/26] e1000: ring buffers resources cleanup

2006-08-29 Thread Kok, Auke

Memory leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge: We
should free resources allocated for previous rings if following allocation
fails.

Signed-off-by: Vasily Averin [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000_main.c |   14 ++
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index c273b45..426811a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1395,10 +1395,6 @@ setup_tx_desc_die:
  *   (Descriptors) for all queues
  * @adapter: board private structure
  *
- * If this function returns with an error, then it's possible one or
- * more of the rings is populated (while the rest are not).  It is the
- * callers duty to clean those orphaned rings.
- *
  * Return 0 on success, negative on failure
  **/
 
@@ -1412,6 +1408,9 @@ e1000_setup_all_tx_resources(struct e100
if (err) {
DPRINTK(PROBE, ERR,
Allocation for Tx Queue %u failed\n, i);
+   for (i-- ; i = 0; i--)
+   e1000_free_tx_resources(adapter,
+   adapter-tx_ring[i]);
break;
}
}
@@ -1651,10 +1650,6 @@ setup_rx_desc_die:
  *   (Descriptors) for all queues
  * @adapter: board private structure
  *
- * If this function returns with an error, then it's possible one or
- * more of the rings is populated (while the rest are not).  It is the
- * callers duty to clean those orphaned rings.
- *
  * Return 0 on success, negative on failure
  **/
 
@@ -1668,6 +1663,9 @@ e1000_setup_all_rx_resources(struct e100
if (err) {
DPRINTK(PROBE, ERR,
Allocation for Rx Queue %u failed\n, i);
+   for (i-- ; i = 0; i--)
+   e1000_free_rx_resources(adapter,
+   adapter-rx_ring[i]);
break;
}
}



---
Auke Kok [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


[PATCH 22/26] ixgb: Cache-align all TX components of the adapter struct.

2006-08-29 Thread Kok, Auke

Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/ixgb/ixgb.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h
index a4bee8c..e157247 100644
--- a/drivers/net/ixgb/ixgb.h
+++ b/drivers/net/ixgb/ixgb.h
@@ -170,7 +170,7 @@ struct ixgb_adapter {
unsigned long led_status;
 
/* TX */
-   struct ixgb_desc_ring tx_ring;
+   struct ixgb_desc_ring tx_ring cacheline_aligned;
unsigned long timeo_start;
uint32_t tx_cmd_type;
uint64_t hw_csum_tx_good;



---
Auke Kok [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


[PATCH 09/26] e1000: unify WoL capability detection code

2006-08-29 Thread Kok, Auke

WoL is constantly giving problems and needed a rewrite. Consolidates
all WoL capabilities into a single function, and disables WoL for all
other ports on the device except for port A.

Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/e1000/e1000.h |3 -
 drivers/net/e1000/e1000_ethtool.c |  164 -
 drivers/net/e1000/e1000_main.c|   47 ---
 3 files changed, 126 insertions(+), 88 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 70ba378..98afa9c 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -246,7 +246,6 @@ struct e1000_adapter {
uint32_t bd_number;
uint32_t rx_buffer_len;
uint32_t wol;
-   uint32_t ksp3_port_a;
uint32_t smartspeed;
uint32_t en_mng_pt;
uint16_t link_speed;
@@ -341,7 +340,9 @@ struct e1000_adapter {
boolean_t tso_force;
 #endif
boolean_t smart_power_down; /* phy smart power down */
+   boolean_t quad_port_a;
unsigned long flags;
+   uint32_t eeprom_wol;
 };
 
 enum e1000_state_t {
diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index ab2f153..0403072 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1675,14 +1675,12 @@ e1000_diag_test(struct net_device *netde
msleep_interruptible(4 * 1000);
 }
 
-static void
-e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
+static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct 
ethtool_wolinfo *wol)
 {
-   struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = adapter-hw;
+   int retval = 1; /* fail by default */
 
-   switch (adapter-hw.device_id) {
-   case E1000_DEV_ID_82542:
+   switch (hw-device_id) {
case E1000_DEV_ID_82543GC_FIBER:
case E1000_DEV_ID_82543GC_COPPER:
case E1000_DEV_ID_82544EI_FIBER:
@@ -1690,52 +1688,86 @@ e1000_get_wol(struct net_device *netdev,
case E1000_DEV_ID_82545EM_FIBER:
case E1000_DEV_ID_82545EM_COPPER:
case E1000_DEV_ID_82546GB_QUAD_COPPER:
+   case E1000_DEV_ID_82546GB_PCIE:
+   /* these don't support WoL at all */
wol-supported = 0;
-   wol-wolopts   = 0;
-   return;
-
-   case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
-   /* device id 10B5 port-A supports wol */
-   if (!adapter-ksp3_port_a) {
-   wol-supported = 0;
-   return;
-   }
-   /* KSP3 does not suppport UCAST wake-ups for any interface */
-   wol-supported = WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
-
-   if (adapter-wol  E1000_WUFC_EX)
-   DPRINTK(DRV, ERR, Interface does not support 
-   directed (unicast) frame wake-up packets\n);
-   wol-wolopts = 0;
-   goto do_defaults;
-
+   break;
case E1000_DEV_ID_82546EB_FIBER:
case E1000_DEV_ID_82546GB_FIBER:
case E1000_DEV_ID_82571EB_FIBER:
-   /* Wake events only supported on port A for dual fiber */
+   case E1000_DEV_ID_82571EB_SERDES:
+   case E1000_DEV_ID_82571EB_COPPER:
+   /* Wake events not supported on port B */
if (E1000_READ_REG(hw, STATUS)  E1000_STATUS_FUNC_1) {
wol-supported = 0;
-   wol-wolopts   = 0;
-   return;
+   break;
}
-   /* Fall Through */
-
+   /* return success for non excluded adapter ports */
+   retval = 0;
+   break;
+   case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
+   /* quad port adapters only support WoL on port A */
+   if (!adapter-quad_port_a) {
+   wol-supported = 0;
+   break;
+   }
+   /* return success for non excluded adapter ports */
+   retval = 0;
+   break;
default:
-   wol-supported = WAKE_UCAST | WAKE_MCAST |
-WAKE_BCAST | WAKE_MAGIC;
-   wol-wolopts = 0;
+   /* dual port cards only support WoL on port A from now on
+* unless it was enabled in the eeprom for port B
+* so exclude FUNC_1 ports from having WoL enabled */
+   if (E1000_READ_REG(hw, STATUS)  E1000_STATUS_FUNC_1 
+   !adapter-eeprom_wol) {
+   wol-supported = 0;
+   break;
+   }
 
-do_defaults:
-   if (adapter-wol  E1000_WUFC_EX)
-   wol-wolopts |= WAKE_UCAST;
-   if (adapter-wol  E1000_WUFC_MC)
-   wol-wolopts |= 

[PATCH 06/26] e1000: remove unused part_num reading code

2006-08-29 Thread Kok, Auke

Remove the code that reads part_num from the EEPROM. This part number
is never displayed or queryable by the user.

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

 drivers/net/e1000/e1000.h  |1 -
 drivers/net/e1000/e1000_hw.c   |   34 --
 drivers/net/e1000/e1000_main.c |2 --
 3 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index c110781..70ba378 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -245,7 +245,6 @@ struct e1000_adapter {
uint16_t mng_vlan_id;
uint32_t bd_number;
uint32_t rx_buffer_len;
-   uint32_t part_num;
uint32_t wol;
uint32_t ksp3_port_a;
uint32_t smartspeed;
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 57749eb..f56d4cd 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -5556,40 +5556,6 @@ e1000_commit_shadow_ram(struct e1000_hw 
 }
 
 /**
- * Reads the adapter's part number from the EEPROM
- *
- * hw - Struct containing variables accessed by shared code
- * part_num - Adapter's part number
- */
-int32_t
-e1000_read_part_num(struct e1000_hw *hw,
-uint32_t *part_num)
-{
-uint16_t offset = EEPROM_PBA_BYTE_1;
-uint16_t eeprom_data;
-
-DEBUGFUNC(e1000_read_part_num);
-
-/* Get word 0 from EEPROM */
-if (e1000_read_eeprom(hw, offset, 1, eeprom_data)  0) {
-DEBUGOUT(EEPROM Read Error\n);
-return -E1000_ERR_EEPROM;
-}
-/* Save word 0 in upper half of part_num */
-*part_num = (uint32_t) (eeprom_data  16);
-
-/* Get word 1 from EEPROM */
-if (e1000_read_eeprom(hw, ++offset, 1, eeprom_data)  0) {
-DEBUGOUT(EEPROM Read Error\n);
-return -E1000_ERR_EEPROM;
-}
-/* Save word 1 in lower half of part_num */
-*part_num |= eeprom_data;
-
-return E1000_SUCCESS;
-}
-
-/**
  * Reads the adapter's MAC address from the EEPROM and inverts the LSB for the
  * second function of dual function devices
  *
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 630fe60..c128f62 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -853,8 +853,6 @@ e1000_probe(struct pci_dev *pdev,
goto err_eeprom;
}
 
-   e1000_read_part_num(adapter-hw, (adapter-part_num));
-
e1000_get_bus_info(adapter-hw);
 
init_timer(adapter-tx_fifo_stall_timer);



---
Auke Kok [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


[PATCH 13/26] e100: Convert e100 to use netdev_alloc_skb().

2006-08-29 Thread Kok, Auke

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

 drivers/net/e100.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index b42ad76..458af6a 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1759,7 +1759,7 @@ static inline void e100_start_receiver(s
 #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN)
 static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
 {
-   if(!(rx-skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN)))
+   if(!(rx-skb = netdev_alloc_skb(nic-netdev, RFD_BUF_LEN + 
NET_IP_ALIGN)))
return -ENOMEM;
 
/* Align, init, and map the RFD. */
@@ -2139,7 +2139,7 @@ static int e100_loopback_test(struct nic
 
e100_start_receiver(nic, NULL);
 
-   if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) {
+   if(!(skb = netdev_alloc_skb(nic-netdev, ETH_DATA_LEN))) {
err = -ENOMEM;
goto err_loopback_none;
}



---
Auke Kok [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


[PATCH 23/26] ixgb: Add buffer_info and test like e1000 has.

2006-08-29 Thread Kok, Auke

Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]
---

 drivers/net/ixgb/ixgb_main.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 960b44b..a5da48a 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1174,6 +1174,7 @@ ixgb_tso(struct ixgb_adapter *adapter, s
int err;
 
if (likely(skb_is_gso(skb))) {
+   struct ixgb_buffer *buffer_info;
if (skb_header_cloned(skb)) {
err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
if (err)
@@ -1196,6 +1197,8 @@ ixgb_tso(struct ixgb_adapter *adapter, s
 
i = adapter-tx_ring.next_to_use;
context_desc = IXGB_CONTEXT_DESC(adapter-tx_ring, i);
+   buffer_info = adapter-tx_ring.buffer_info[i];
+   WARN_ON(buffer_info-dma != 0);
 
context_desc-ipcss = ipcss;
context_desc-ipcso = ipcso;
@@ -1233,11 +1236,14 @@ ixgb_tx_csum(struct ixgb_adapter *adapte
uint8_t css, cso;
 
if(likely(skb-ip_summed == CHECKSUM_HW)) {
+   struct ixgb_buffer *buffer_info;
css = skb-h.raw - skb-data;
cso = (skb-h.raw + skb-csum) - skb-data;
 
i = adapter-tx_ring.next_to_use;
context_desc = IXGB_CONTEXT_DESC(adapter-tx_ring, i);
+   buffer_info = adapter-tx_ring.buffer_info[i];
+   WARN_ON(buffer_info-dma != 0);
 
context_desc-tucss = css;
context_desc-tucso = cso;
@@ -1283,6 +1289,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter
buffer_info = tx_ring-buffer_info[i];
size = min(len, IXGB_MAX_DATA_PER_TXD);
buffer_info-length = size;
+   WARN_ON(buffer_info-dma != 0);
buffer_info-dma =
pci_map_single(adapter-pdev,
skb-data + offset,



---
Auke Kok [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 1/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Fix a problem where the NetLabel specific fields of the sk_security_struct
 structure were not being initialized early enough in some cases.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Regardless of the mapped ipv6 socket issue, I think these should be 
applied as fixes in their own right.  The mapped ipv6 socket stuff can be 
done separately if required.


Acked-by: James Morris [EMAIL PROTECTED]


-- 
James Morris
[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 1/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 +void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
 +  int family)
 +{
 +if (family == PF_INET)

No tab.

 + ssec-nlbl_state = NLBL_REQUIRE;
 + else
 + ssec-nlbl_state = NLBL_UNSET;
 +}

It doesn't look like this code handles ipv4 packets mapped on ipv6 
sockets.  See the test elsewhere in the SELinux code:

if (family == PF_INET6  skb-protocol == ntohs(ETH_P_IP))


Also, can you verify that you've tested these fixes and that they resolve 
all issues that you've encountered?



-- 
James Morris
[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 5/6] NetLabel: uninline selinux_netlbl_inode_permission()

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Uninline the selinux_netlbl_inode_permission() at the request of Andrew 
 Morton.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Acked-by: James Morris [EMAIL PROTECTED]


These patches should likely go in via Dave's tree.



-- 
James Morris
[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 01/26] e1000: Whitespace cleanup, cosmetic changes

2006-08-29 Thread Auke Kok


Patch 1/26 was truncated by vger, so I've posted them here in 4 separate parts:

http://foo-projects.org/~sofar/e1000_00_whitespace.patch
http://foo-projects.org/~sofar/e1000_01_whitespace.patch
http://foo-projects.org/~sofar/e1000_02_whitespace.patch
http://foo-projects.org/~sofar/e1000_03_whitespace.patch

and all together:

http://foo-projects.org/~sofar/8fc897b00a7d81ffaa24e18881c2d6b10698ab0b.patch

Cheers,

Auke
-
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/6] NetLabel: comment corrections

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Fix some incorrect comments.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Acked-by: James Morris [EMAIL PROTECTED]


-- 
James Morris
[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 4/6] NetLabel: cleanup ebitmap_import()

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Rewrite ebitmap_import() so it is a bit cleaner and easier to read.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Acked-by: James Morris [EMAIL PROTECTED]


-- 
James Morris
[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 6/6] NetLabel: add some missing #includes to various header files

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Add some missing include files to the NetLabel related header files.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Acked-by: James Morris [EMAIL PROTECTED]



-- 
James Morris
[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 2/6] NetLabel: remove unused function prototypes

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

 Removed some older function prototypes for functions that no longer exist.
 
 Signed-off-by: Paul Moore [EMAIL PROTECTED]

Acked-by: James Morris [EMAIL PROTECTED]


-- 
James Morris
[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 22/26] ixgb: Cache-align all TX components of the adapter struct.

2006-08-29 Thread Eric Dumazet
On Tuesday 29 August 2006 18:45, Kok, Auke wrote:

   /* TX */
 - struct ixgb_desc_ring tx_ring;
 + struct ixgb_desc_ring tx_ring cacheline_aligned;
   unsigned long timeo_start;

On UP, this would only enlarge the size of structure and might consume more 
cache lines...

 I guess cacheline_aligned_in_smp is preferred here.

(see include/linux/netdevice.h)

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 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN

2006-08-29 Thread Jouni Malinen
On Tue, Aug 29, 2006 at 07:49:22AM -0400, John W. Linville wrote:
 On Tue, Aug 29, 2006 at 09:49:17AM +0200, Johannes Berg wrote:
  I intend to kill the nick command with nl80211 since it seems to be
  useless. Any objections?
 
 I can't defend it myself, but I have heard of people using it.
 I think some of the distro's init scripts might set it as well?
 
 Can anyone defend the practice of setting a nickname for a wireless
 device?

I think that this was added either based on a non-802.11 protocol or
based on a specific hardware/firmware design that had possibility of
configuring a name for the client (to be exchanged with some proprietary
network management protocol as the device name).

After that, this ioctl seems to be just used for binding some arbitrary
data to an interface to help scripts etc. In other words, I don't see
any real use for this from the view point of IEEE 802.11 networks and it
is confusing at best. This may be useful for some setup scripts, but I
would rather hope they would use something else instead.

The only reason for adding nick command would be to maintain backwards
compatibility with some scripts. I do not use any distro configuration
mechanisms for setting up wireless, so I do not know what is currently
being used. I would not add these ioctls into d80211 unless someone can
point out an existing (and widely used) mechanism that depends on these
ioctls being available.

-- 
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: [PATCH 1/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread Paul Moore
James Morris wrote:
 On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:
+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
+  int family)
+{
+if (family == PF_INET)
 
 No tab. 

I see you already ack'd this patch, should I resubmit with the tab
correction or just leave it alone?

+ ssec-nlbl_state = NLBL_REQUIRE;
+ else
+ ssec-nlbl_state = NLBL_UNSET;
+}
  
 It doesn't look like this code handles ipv4 packets mapped on ipv6 
 sockets.  See the test elsewhere in the SELinux code:
 
   if (family == PF_INET6  skb-protocol == ntohs(ETH_P_IP))

This is an issue which I am still thinking about, but I haven't devoted
to much time to it because in the one example case I have tried
everything works as expected.

Example case:

1. Configure NetLabel so that packets are labeled with CIPSO
2. Ensure SSH is listening for both IPv4 and IPv6 connections and
restart the daemon
3. Connect to the SSH daemon using IPv4

I haven't looked at the sshd code enough in detail to see what it is
doing exactly but simply running 'netstat -nl' shows that sshd is
listening for connections with an IPv6 socket (at least it is listening
on port ':::22').  Once the connection is established the daemon
continues to use an IPv6 socket, ':::127.0.0.1:22', whereas the
client uses a traditional IPv4 socket.  Sniffing the connection
indicates that both directions of network traffic are labeled with the
correct CIPSO tags.

On the receive side in selinux_socket_sock_rcv_skb() the socket's IP
address family is not consulted, only the SELinux socket class and the
skbuff's CIPSO tag if present.

On the outbound side, yes, we only NetLabel sockets which are PF_INET
but I didn't think I could set an IPv4 option on a PF_INET6 socket can
I?  It just sounds wrong ...

 Also, can you verify that you've tested these fixes and that they resolve 
 all issues that you've encountered?

I have verified that this patchset fixes all the issues that I've
encountered.  In addition I have run the patches overnight on a test
machine while hitting the machine pretty hard and I have not noticed any
other problems or regressions.

-- 
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


[PATCH] Fix verify_iovec() to not allow overflow of iov_len values

2006-08-29 Thread Sridhar Samudrala
verify_iovec() has the following piece of code that allows overflow
of iov_len values in an iovec.

for (ct = 0; ct  m-msg_iovlen; ct++) {
err += iov[ct].iov_len;
/*
 * Goal is not to verify user data, but to prevent returning
 * negative value, which is interpreted as errno.
 * Overflow is still possible, but it is harmless.
 */
if (err  0)
return -EMSGSIZE;
}

The comment specifically says that overflow is harmless, but I don't see any
valid reason to allow overflow.

Also, iov_len is of type size_t which is a 64-bit value on 64-bit systems,
but we store and return the overall iovec length in an int.

This patch changes the return type of verify_iovec() and verify_compat_iovec()
to ssize_t and also validates that each iov_len value and the sum of all
the iov_len values do not overflow ssize_t. In case of a overflow, EINVAL is
returned.

The man pages for sendmsg/recvmsg also list this failure mode. 
  http://www.die.net/doc/linux/man/man3/sendmsg.3.html
EINVAL
The sum of the iov_len values overflows an ssize_t

This is based on some earlier patches from Chris Wright and Andrew Morton that
were incomplete.

Signed-off-by: Sridhar Samudrala [EMAIL PROTECTED]

diff --git a/include/linux/socket.h b/include/linux/socket.h
index 3614090..25645b0 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -294,7 +294,7 @@ extern int csum_partial_copy_fromiovecen
  int offset, 
  unsigned int len, int *csump);
 
-extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, 
int mode);
+extern ssize_t verify_iovec(struct msghdr *m, struct iovec *iov, char 
*address, int mode);
 extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
 extern int move_addr_to_user(void *kaddr, int klen, void __user *uaddr, int 
__user *ulen);
 extern int move_addr_to_kernel(void __user *uaddr, int ulen, void *kaddr);
diff --git a/include/net/compat.h b/include/net/compat.h
index 9859b60..c30d648 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -31,7 +31,7 @@ #define compat_msghdr msghdr  /* to avoi
 #endif /* defined(CONFIG_COMPAT) */
 
 extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
-extern int verify_compat_iovec(struct msghdr *, struct iovec *, char *, int);
+extern ssize_t verify_compat_iovec(struct msghdr *, struct iovec *, char *, 
int);
 extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user 
*,unsigned);
 extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user 
*,unsigned);
 extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int 
__user *);
diff --git a/net/compat.c b/net/compat.c
index d5d69fa..f5d1a96 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -29,22 +29,29 @@ #include net/sock.h
 #include asm/uaccess.h
 #include net/compat.h
 
-static inline int iov_from_user_compat_to_kern(struct iovec *kiov,
+static inline ssize_t iov_from_user_compat_to_kern(struct iovec *kiov,
  struct compat_iovec __user *uiov32,
  int niov)
 {
-   int tot_len = 0;
+   compat_ssize_t tot_len = 0;
 
while(niov  0) {
compat_uptr_t buf;
-   compat_size_t len;
+   compat_ssize_t len;
 
if(get_user(len, uiov32-iov_len) ||
   get_user(buf, uiov32-iov_base)) {
tot_len = -EFAULT;
break;
}
+   /* Validate that each iov_len value and the sum of all the
+* iov_len values do not overflow ssize_t.
+*/
+   if (len  0)
+   return -EINVAL; 
tot_len += len;
+   if (tot_len  0)
+   return -EINVAL;
kiov-iov_base = compat_ptr(buf);
kiov-iov_len = (__kernel_size_t) len;
uiov32++;
@@ -74,10 +81,10 @@ int get_compat_msghdr(struct msghdr *kms
 }
 
 /* I've named the args so it is easy to tell whose space the pointers are in. 
*/
-int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
+ssize_t verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
   char *kern_address, int mode)
 {
-   int tot_len;
+   ssize_t tot_len;
 
if(kern_msg-msg_namelen) {
if(mode==VERIFY_READ) {
diff --git a/net/core/iovec.c b/net/core/iovec.c
index 65e4b56..14b0f8f 100644
--- a/net/core/iovec.c
+++ b/net/core/iovec.c
@@ -37,9 +37,10 @@ #include net/sock.h
  * in any case.
  */
 
-int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode)
+ssize_t verify_iovec(struct msghdr *m, struct iovec *iov, 

Re: [PATCH 5/7] d80211: indicate if unassociate/radio off status

2006-08-29 Thread Jouni Malinen
On Mon, Aug 28, 2006 at 02:17:34PM -0700, Michael Wu wrote:

 It would be helpful if you inlined your patches instead of attaching them 
 next 
 time.

Agreed.

 I'm not comfortable with using the name for this purpose.

And agreed. wireless.h has this to say about SIOCGIWNAME:

#define SIOCGIWNAME 0x8B01  /* get name == wireless protocol */
/* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
 * Common values : IEEE 802.11-DS, IEEE 802.11-FH, IEEE 802.11b...
 * Don't put the name of your driver there, it's useless. */


The proposed use here is against this and should not be applied.
SIOCGIWAP can be used to indicate association status and SIOCGIWTXPOW
can be used to indicate whether TX is powered which is quite close to
radio off indication.

-- 
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: [PATCH 4/6] net neighbour: convert to RCU

2006-08-29 Thread Martin Josefsson
On Tue, 2006-08-29 at 11:22 -0700, Stephen Hemminger wrote:

  Probably, you should do atomic_inc_and_test() here and restart lookup,
  if it fails.
  
  Alexey
 
 atomic_inc_and_test is true iff result is zero, so that won't work.

Wouldn't atomic_inc_not_zero() do what you want?

-- 
/Martin


signature.asc
Description: This is a digitally signed message part


Re: [RFC IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Thomas Graf
* Olaf Kirch [EMAIL PROTECTED] 2006-08-29 10:24
 we had bug reports from people seeing lots of spurious messages
 like the following:
 
 kernel: peth0: received packet with own address as source address.
 
 and
 
 xenbr0: duplicate address detected!
 
 This is on a Xen enabled machine, with lots of Xen machines on the
 same network.
 
 When the Xen code configures the bridge device, this will do IPv6
 autoconfiguration for the interface, and since they use synthetic MAC
 addresses, there will be DAD collisions.
 
 When the Xen people looked for a way to disable IPv6 autoconf of the
 bridge, they didn't find any way to do it without bringing up the
 device first (and thereby triggering DAD).

They didn't find any because there is no need to disable it. I
hardly think that the network stack should fix things that Xen
got wrong. Setting dev_addr to -1 is just plain wrong, other
virtual ethernet devices call random_ether_addr(), it's not a
new problem at all.
-
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: Fw: 2.6.18-rc4-mm3: BUG: warning at include/net/dst.h:154/dst_release()

2006-08-29 Thread Thomas Graf
* Andrew Morton [EMAIL PROTECTED] 2006-08-29 09:16
 
 
 Begin forwarded message:
 
 Date: Tue, 29 Aug 2006 10:25:07 -0400
 From: [EMAIL PROTECTED]
 To: Andrew Morton [EMAIL PROTECTED]
 Cc: linux-kernel@vger.kernel.org
 Subject: 2.6.18-rc4-mm3: BUG: warning at include/net/dst.h:154/dst_release()
 
 
 Seeing this a lot on 2.6.18-rc4-mm3 with 2 different stack tracebacks
 (one for received packets, other for sending).  I already picked up the
 fix for the ^ / confusion in fib_rules.c and that didn't help matters.

Should be fixed by this patch:

commit 4305fabb7e4c63ddc3a4fd38aab9ec3f6575b111
Author: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Date:   Mon Aug 28 13:19:30 2006 -0700

[IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup().

In ip6_pol_route_lookup(), when we finish backtracking at the
top-level root entry, we need to hold it.

Bug noticed by Mitsuru Chinen [EMAIL PROTECTED].

Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ad3e3fb..4a46a85 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -510,8 +510,8 @@ restart:
rt = fn-leaf;
rt = rt6_device_match(rt, fl-oif, flags);
BACKTRACK(fl-fl6_src);
-   dst_hold(rt-u.dst);
 out:
+   dst_hold(rt-u.dst);
read_unlock_bh(table-tb6_lock);

rt-u.dst.lastuse = jiffies;

-
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] Fix verify_iovec() to not allow overflow of iov_len values

2006-08-29 Thread Chris Wright
* Sridhar Samudrala ([EMAIL PROTECTED]) wrote:
 -int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int 
 mode)
 +ssize_t verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int 
 mode)
  {
   int size, err, ct;
 + ssize_t tot_len = 0;
   
   if (m-msg_namelen) {
   if (mode == VERIFY_READ) {
 @@ -61,17 +62,22 @@ int verify_iovec(struct msghdr *m, struc
   err = 0;
  
   for (ct = 0; ct  m-msg_iovlen; ct++) {
 - err += iov[ct].iov_len;
 + ssize_t len;
 +
   /*
 -  * Goal is not to verify user data, but to prevent returning
 -  * negative value, which is interpreted as errno.
 -  * Overflow is still possible, but it is harmless.
 +  * Goal is not to verify user data, but to prevent the cases 
 +  * where an iov_len value or the sum of all iov_len values
 +  * overflows ssize_t.
*/
 - if (err  0)
 - return -EMSGSIZE;
 + len = (ssize_t)iov[ct].iov_len;
 + if (len  0)
 + return -EINVAL;
 + tot_len += len;
 + if (tot_len  0)

I specifically used size_t here, because signed integer overflow is not
defined in C.

thanks,
-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


Re: [PATCH 4/6] net neighbour: convert to RCU

2006-08-29 Thread Stephen Hemminger
On Tue, 29 Aug 2006 19:28:16 +0400
Alexey Kuznetsov [EMAIL PROTECTED] wrote:

 Hello!
 
  @@ -346,8 +354,8 @@ struct neighbour *neigh_lookup(struct ne
  
  NEIGH_CACHE_STAT_INC(tbl, lookups);
   
  -   read_lock_bh(tbl-lock);
  -   hlist_for_each_entry(n, tmp, tbl-hash_buckets[hash_val], hlist) {
  +   rcu_read_lock();
  +   hlist_for_each_entry_rcu(n, tmp, tbl-hash_buckets[hash_val], hlist) {
  if (dev == n-dev  !memcmp(n-primary_key, pkey, key_len)) {
  neigh_hold(n);
  NEIGH_CACHE_STAT_INC(tbl, hits);
 
 Sure? Seems, you cannot grab refcnt here, the entry can be already
 released.
 
 Probably, you should do atomic_inc_and_test() here and restart lookup,
 if it fails.
 
 Alexey

atomic_inc_and_test is true iff result is zero, so that won't work.
But the following should work:

hlist_for_each_entry_rcu(n, tmp, tbl-hash_buckets[hash_val], hlist) {
if (dev == n-dev  !memcmp(n-primary_key, pkey, key_len)) {
if (unlikely(atomic_inc_return(n-refcnt) == 1)) {
neigh_release(n);
continue;
}
NEIGH_CACHE_STAT_INC(tbl, hits);

I'll wrap the atomic_inc_return inside neigh_hold_return()


-- 
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: [PATCH 1/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread James Morris
On Tue, 29 Aug 2006, Paul Moore wrote:

 James Morris wrote:
  On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:
 +void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
 +int family)
 +{
 +if (family == PF_INET)
  
  No tab. 
 
 I see you already ack'd this patch, should I resubmit with the tab
 correction or just leave it alone?

Probably easiest to fix it as it's applied.

 Example case:
 
 1. Configure NetLabel so that packets are labeled with CIPSO
 2. Ensure SSH is listening for both IPv4 and IPv6 connections and
 restart the daemon
 3. Connect to the SSH daemon using IPv4
 
 I haven't looked at the sshd code enough in detail to see what it is
 doing exactly but simply running 'netstat -nl' shows that sshd is
 listening for connections with an IPv6 socket (at least it is listening
 on port ':::22').  Once the connection is established the daemon
 continues to use an IPv6 socket, ':::127.0.0.1:22', whereas the
 client uses a traditional IPv4 socket.  Sniffing the connection
 indicates that both directions of network traffic are labeled with the
 correct CIPSO tags.

IIRC, the way I originally tested this was to write a simple app.  I 
wonder if something has changed in the networking code which means we 
don't need to test for this now.

 On the outbound side, yes, we only NetLabel sockets which are PF_INET
 but I didn't think I could set an IPv4 option on a PF_INET6 socket can
 I?  It just sounds wrong ...

If it's carrying IPv4 traffic, it may make sense in some cases.


- James
-- 
James Morris
[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: [RFC IPv6] Disabling IPv6 autoconf

2006-08-29 Thread Olaf Kirch
On Tue, Aug 29, 2006 at 08:10:21PM +0200, Thomas Graf wrote:
  When the Xen people looked for a way to disable IPv6 autoconf of the
  bridge, they didn't find any way to do it without bringing up the
  device first (and thereby triggering DAD).
 
 They didn't find any because there is no need to disable it. I

Well, as a global statement that may merit a separate debate.
In this specific case, maybe.

First off, I do agree that the use of a constant MAC address across the
board is a bad move :)

OTOH, there are good reasons why you want to turn off autoconf on
specific devices; and the current method of first bringing up
the device and then disabling it doesnt quite cut it.

One could also argue that there's a good reason to not assign addresses
to pure bridge devices at all, regardless of their brokenness.
We don't want to assign IPv4 addresses to a pure bridge, and I think it's
a reasonable expectation that there should be a way to tell the IPv6
stack to keep its hands off that device, too.

 got wrong. Setting dev_addr to -1 is just plain wrong, other
 virtual ethernet devices call random_ether_addr(), it's not a
 new problem at all.

Okay, fine with me - maybe we can convince them to use that
instead.

Thanks for the feedback,
Olaf
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] |/ | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
-
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/6] NetLabel: correctly initialize the NetLabel fields

2006-08-29 Thread Paul Moore
James Morris wrote:
 On Tue, 29 Aug 2006, Paul Moore wrote:
James Morris wrote:
On Tue, 29 Aug 2006, [EMAIL PROTECTED] wrote:

+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
+int family)
+{
+if (family == PF_INET)

No tab. 

I see you already ack'd this patch, should I resubmit with the tab
correction or just leave it alone?
 
 Probably easiest to fix it as it's applied.
 
Example case:

1. Configure NetLabel so that packets are labeled with CIPSO
2. Ensure SSH is listening for both IPv4 and IPv6 connections and
restart the daemon
3. Connect to the SSH daemon using IPv4

I haven't looked at the sshd code enough in detail to see what it is
doing exactly but simply running 'netstat -nl' shows that sshd is
listening for connections with an IPv6 socket (at least it is listening
on port ':::22').  Once the connection is established the daemon
continues to use an IPv6 socket, ':::127.0.0.1:22', whereas the
client uses a traditional IPv4 socket.  Sniffing the connection
indicates that both directions of network traffic are labeled with the
correct CIPSO tags.
 
 IIRC, the way I originally tested this was to write a simple app.  I 
 wonder if something has changed in the networking code which means we 
 don't need to test for this now.
 
On the outbound side, yes, we only NetLabel sockets which are PF_INET
but I didn't think I could set an IPv4 option on a PF_INET6 socket can
I?  It just sounds wrong ...
 
 If it's carrying IPv4 traffic, it may make sense in some cases.
 

My concern was if the stack would honor the inet_sock-opt field and
after talking to a coworker here it sounds like it would do the right
thing.  I'll work on a patch to label PF_INET6 sockets as well, but like
you said earlier, I don't think it should hold up this patchset.

-- 
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: [PATCH 3/5] skge: use dev_alloc_skb

2006-08-29 Thread Stephen Hemminger
On Tue, 29 Aug 2006 12:23:36 +0100
Christoph Hellwig [EMAIL PROTECTED] wrote:

 On Mon, Aug 28, 2006 at 04:19:37PM -0700, Stephen Hemminger wrote:
  To avoid problems with buggy protocols that assume extra header space,
  use dev_alloc_skb() when allocating receive buffers.
  
  Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
  
  --- skge-2.6.orig/drivers/net/skge.c
  +++ skge-2.6/drivers/net/skge.c
  @@ -827,7 +827,8 @@ static int skge_rx_fill(struct skge_port
  do {
  struct sk_buff *skb;
   
  -   skb = alloc_skb(skge-rx_buf_size + NET_IP_ALIGN, GFP_KERNEL);
  +   skb = __dev_alloc_skb(skge-rx_buf_size + NET_IP_ALIGN,
  + GFP_KERNEL);
 
 While you're at it please use netdev_alloc_skb.
 

Okay, that will be in the next clump.

-- 
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: [PATCH 11/26] e1000: clean up skb allocation code, patch submitted by Christoph

2006-08-29 Thread Jeff Garzik

Kok, Auke wrote:

Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]
Acked-by: Jesse Brandeburg [EMAIL PROTECTED]
Signed-off-by: Auke Kok [EMAIL PROTECTED]


ACK, but please don't include attribution in the subject line.

Add a From: ...author... as the first line of your patch description 
instead.


See #12 of Documentation/SubmittingPatches for more info.

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: [PATCH 14/26] e100: fix error recovery

2006-08-29 Thread Jeff Garzik

ACK patches 12-14


-
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 07/26] e1000: Use module param array code

2006-08-29 Thread Jeff Garzik

ACK patches 1-7

-
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 15/26] e100: reduce time under spinlock

2006-08-29 Thread Jeff Garzik

Kok, Auke wrote:

We're waiting for a write flush to finish before unlocking, which
is not needed. Release the spinlock after the write command.

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


This undoes the following change:


commit ad8c48ad3bbef078616ed4d2652d362dfd962f09
Author: Catalin(ux aka Dino) BOIE [EMAIL PROTECTED]
Date:   Sat Mar 4 12:18:59 2006 -0500

Fix io ordering problems in e100

Checking e100.c code against Documentation/io_ordering.txt I found the
following problem:

spin_lock_irq...
write
spin-unlock
e100_write_flush

The attached patch fix the code like this:

spin_lock_irq...
write
e100_write_flush
spin-unlock

Signed-off-by: Catalin BOIE [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [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 22/26] ixgb: Cache-align all TX components of the adapter struct.

2006-08-29 Thread Jeff Garzik

Eric Dumazet wrote:

On Tuesday 29 August 2006 18:45, Kok, Auke wrote:

/* TX */
-   struct ixgb_desc_ring tx_ring;
+   struct ixgb_desc_ring tx_ring cacheline_aligned;
unsigned long timeo_start;


On UP, this would only enlarge the size of structure and might consume more 
cache lines...


 I guess cacheline_aligned_in_smp is preferred here.

(see include/linux/netdevice.h)


Agreed.

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: [PATCH 21/26] ixgb: recalculate after how many descriptors to wake the queue

2006-08-29 Thread Jeff Garzik

ACK patches 16-21


-
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 26/26] ixgb: Increment version to 1.0.112-k2

2006-08-29 Thread Jeff Garzik

ACK patches 23-26


-
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   >