Re: [patch 10/10] forcedeth: work around NULL skb dereference crash

2007-04-03 Thread Ingo Molnar

* Ayaz Abdulla [EMAIL PROTECTED] wrote:

 I had responded eariler to the thread asking you to try out the patch
 found in bug 8058:
 http://bugzilla.kernel.org/show_bug.cgi?id=8058
 
 I believe that is the caush of the NULL skb dereference issue.

there's a different type of regression now: under high load i dont get a 
crash, i get a hung interface instead. No error packets or other weird 
interface state - just a hung interface. The condition happens after a 
stream of:

 eth1: too many iterations (6) in nv_nic_irq.
 eth1: too many iterations (6) in nv_nic_irq.
 eth1: too many iterations (6) in nv_nic_irq.
 eth1: too many iterations (6) in nv_nic_irq.
 eth1: too many iterations (6) in nv_nic_irq.

If i increase max_interrupt_work from 5 to 50 to paper over this 
condition then the hangs go away. So i suspect there might still be a 
queue-wakeup problem in one of these paths - or that a filled up tx ring 
somehow gets stuck. (and i've got commits 3ba4d093fe8a26f and 
fcc5f2665c81e08, so all the latest stuff that is upstream at the moment)

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


[bug] forcedeth: hung interface under load

2007-04-03 Thread Ingo Molnar

* Ingo Molnar [EMAIL PROTECTED] wrote:

 
  I had responded eariler to the thread asking you to try out the patch
  found in bug 8058:
  http://bugzilla.kernel.org/show_bug.cgi?id=8058
  
  I believe that is the caush of the NULL skb dereference issue.
 
 there's a different type of regression now: under high load i dont get 
 a crash, i get a hung interface instead. No error packets or other 
 weird interface state - just a hung interface. [...]

the interface stats do not change from that point on:

eth1  Link encap:Ethernet  HWaddr 00:13:D4:DC:41:12
  inet addr:10.0.1.12  Bcast:10.0.1.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:14976 errors:0 dropped:0 overruns:0 frame:0
  TX packets:3928743 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:1028544 (1004.4 KiB)  TX bytes:4126766510 (3.8 GiB)
  Interrupt:16 Base address:0xa000

and the irq count does not change either:

 16:8163463148   IO-APIC-fasteoi   eth1

no matter what i do to the interface. So it's completely stuck. 
No kernel messages either - apparently nv_tx_timeout() never triggered.

note, the hang occurs faster if you set max_interrupt_work to a really 
low value (such as 0). [ The hang occurs _much_ faster if you apply the 
-rt patch and enable PREEMPT_RT - but the hang occurs on mainline too. ]

Ingo
-
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] Exclude truncated packets from InHdrErrors statistics

2007-04-03 Thread Mitsuru Chinen
Incoming trancated packets are counted as not only InTruncatedPkts but
also InHdrErrors. They should be counted as InTruncatedPkts only.

Signed-off-by: Mitsuru Chinen [EMAIL PROTECTED]
---
 net/ipv6/ip6_input.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index f225fa1..be0ee8a 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -108,8 +108,10 @@ int ipv6_rcv(struct sk_buff *skb, struct
 
/* pkt_len may be zero if Jumbo payload option is present */
if (pkt_len || hdr-nexthdr != NEXTHDR_HOP) {
-   if (pkt_len + sizeof(struct ipv6hdr)  skb-len)
-   goto truncated;
+   if (pkt_len + sizeof(struct ipv6hdr)  skb-len) {
+   IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS);
+   goto drop;
+   }
if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) {
IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
goto drop;
@@ -128,8 +130,6 @@ int ipv6_rcv(struct sk_buff *skb, struct
rcu_read_unlock();
 
return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, 
ip6_rcv_finish);
-truncated:
-   IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS);
 err:
IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
 drop:
-- 
1.4.3.4

-
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.20.4: NETDEV WATCHDOG and lockups

2007-04-03 Thread Christian Kujau

On Tue, 3 Apr 2007, Jarek Poplawski wrote:

Did you try with 8139cp instead of 8139too?


I forgot about that, thanks.


(Maybe even try some other card to narrow the problem?)


We're try to convince our hosting provider to replace the NIC with a 
e1000.



You could also try to test without ehci, if it's possible.


Sure, I think USB is not needed.

thanks for your input!

Christian.
--
BOFH excuse #387:

Your computer's union contract is set to expire at midnight.
-
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: IPsec PMTUD problem

2007-04-03 Thread Herbert Xu
Hi Patrick:

On Mon, Apr 02, 2007 at 04:10:25PM +0200, Patrick McHardy wrote:
 I noticed a problem with PMTUD between two IPsec tunnel endpoints.
 When sending a packet larger than the PMTU with IP_DF from one
 tunnel endpoint to the other, xfrm4_output sends an ICMP frag.
 required with the IPsec MTU. Since the addresses match the tunnel
 endpoints, this updates the MTU for the XFRM route with the value
 that was calculated for the entire bundle, which in turn causes
 a decrease for the bundle, resulting in further ICMP frag. required
 messages until the minimum is reached.

I presume you're using the same pair of addresses inside and
outside the tunnel? If so the problem is that the kernel doesn't
distinguish between internal ICMP errors and external ones.
So when an MTU update occurs for the internal pair the external
pair is also affected.

We'd need some field in the routing cache to distinguish the
two pairs.

Of course the easy work-around is to use distinct addresses
within IPsec tunnels.

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: [PATCH 1/9] AF_RXRPC: Add blkcipher accessors for using kernel data directly

2007-04-03 Thread David Howells
Herbert Xu [EMAIL PROTECTED] wrote:

 Would it be possible to just use the existing scatterlist interface
 for now? We can simplify it later when things settle down.

I'll apply the attached patch for now and drop the bypass patch.  It's a bit
messy, but it does let me use the sg-list interface.

Note that it does paste stack space into sg-list elements, which I think
should be okay, and it asks the compiler to get it appropriately aligned bits
of stack.

David

diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index b3bd399..1eaf529 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -111,8 +111,11 @@ static void rxkad_prime_packet_security(struct 
rxrpc_connection *conn)
 {
struct rxrpc_key_payload *payload;
struct blkcipher_desc desc;
+   struct scatterlist sg[2];
struct rxrpc_crypt iv;
-   __be32 tmpbuf[4];
+   struct {
+   __be32 x[4];
+   } tmpbuf __attribute__((aligned(16))); /* must all be in same page */
 
_enter();
 
@@ -126,16 +129,18 @@ static void rxkad_prime_packet_security(struct 
rxrpc_connection *conn)
desc.info = iv.x;
desc.flags = 0;
 
-   tmpbuf[0] = conn-epoch;
-   tmpbuf[1] = conn-cid;
-   tmpbuf[2] = 0;
-   tmpbuf[3] = htonl(conn-security_ix);
+   tmpbuf.x[0] = conn-epoch;
+   tmpbuf.x[1] = conn-cid;
+   tmpbuf.x[2] = 0;
+   tmpbuf.x[3] = htonl(conn-security_ix);
 
-   crypto_blkcipher_encrypt_kernel_iv(desc, (void *) tmpbuf,
-  (void *) tmpbuf, sizeof(tmpbuf));
+   memset(sg, 0, sizeof(sg));
+   sg_set_buf(sg[0], tmpbuf, sizeof(tmpbuf));
+   sg_set_buf(sg[1], tmpbuf, sizeof(tmpbuf));
+   crypto_blkcipher_encrypt_iv(desc, sg[0], sg[1], sizeof(tmpbuf));
 
-   memcpy(conn-csum_iv, tmpbuf[2], sizeof(conn-csum_iv));
-   ASSERTCMP(conn-csum_iv.n[0], ==, tmpbuf[2]);
+   memcpy(conn-csum_iv, tmpbuf.x[2], sizeof(conn-csum_iv));
+   ASSERTCMP(conn-csum_iv.n[0], ==, tmpbuf.x[2]);
 
_leave();
 }
@@ -151,10 +156,11 @@ static int rxkad_secure_packet_auth(const struct 
rxrpc_call *call,
struct rxrpc_skb_priv *sp;
struct blkcipher_desc desc;
struct rxrpc_crypt iv;
+   struct scatterlist sg[2];
struct {
struct rxkad_level1_hdr hdr;
__be32  first;  /* first four bytes of data and padding */
-   } buf;
+   } tmpbuf __attribute__((aligned(8))); /* must all be in same page */
u16 check;
 
sp = rxrpc_skb(skb);
@@ -164,8 +170,8 @@ static int rxkad_secure_packet_auth(const struct rxrpc_call 
*call,
check = ntohl(sp-hdr.seq ^ sp-hdr.callNumber);
data_size |= (u32) check  16;
 
-   buf.hdr.data_size = htonl(data_size);
-   memcpy(buf.first, sechdr + 4, sizeof(buf.first));
+   tmpbuf.hdr.data_size = htonl(data_size);
+   memcpy(tmpbuf.first, sechdr + 4, sizeof(tmpbuf.first));
 
/* start the encryption afresh */
memset(iv, 0, sizeof(iv));
@@ -173,10 +179,12 @@ static int rxkad_secure_packet_auth(const struct 
rxrpc_call *call,
desc.info = iv.x;
desc.flags = 0;
 
-   crypto_blkcipher_encrypt_kernel_iv(desc, (void *) buf,
-  (void *) buf, sizeof(buf));
+   memset(sg, 0, sizeof(sg));
+   sg_set_buf(sg[0], tmpbuf, sizeof(tmpbuf));
+   sg_set_buf(sg[1], tmpbuf, sizeof(tmpbuf));
+   crypto_blkcipher_encrypt_iv(desc, sg[0], sg[1], sizeof(tmpbuf));
 
-   memcpy(sechdr, buf, sizeof(buf));
+   memcpy(sechdr, tmpbuf, sizeof(tmpbuf));
 
_leave( = 0);
return 0;
@@ -191,7 +199,8 @@ static int rxkad_secure_packet_encrypt(const struct 
rxrpc_call *call,
void *sechdr)
 {
const struct rxrpc_key_payload *payload;
-   struct rxkad_level2_hdr rxkhdr;
+   struct rxkad_level2_hdr rxkhdr
+   __attribute__((aligned(8))); /* must be all on one page */
struct rxrpc_skb_priv *sp;
struct blkcipher_desc desc;
struct rxrpc_crypt iv;
@@ -217,8 +226,10 @@ static int rxkad_secure_packet_encrypt(const struct 
rxrpc_call *call,
desc.info = iv.x;
desc.flags = 0;
 
-   crypto_blkcipher_encrypt_kernel_iv(desc, (void *) sechdr,
-  (void *) rxkhdr, sizeof(rxkhdr));
+   memset(sg, 0, sizeof(sg[0]) * 2);
+   sg_set_buf(sg[0], sechdr, sizeof(rxkhdr));
+   sg_set_buf(sg[1], rxkhdr, sizeof(rxkhdr));
+   crypto_blkcipher_encrypt_iv(desc, sg[0], sg[1], sizeof(rxkhdr));
 
/* we want to encrypt the skbuff in-place */
nsg = skb_cow_data(skb, 0, trailer);
@@ -246,7 +257,11 @@ static int rxkad_secure_packet(const struct rxrpc_call 
*call,
struct rxrpc_skb_priv *sp;
struct blkcipher_desc desc;
struct rxrpc_crypt iv;
-   __be32 tmpbuf[2], x;
+   struct scatterlist sg[2];
+   struct {
+   __be32 x[2];
+

[PATCH 1/8] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code [try #2]

2007-04-03 Thread David Howells
Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can
use it too.

The kdoc comments I've attached to the functions needs to be checked by whoever
wrote them as I had to make some guesses about the workings of these functions.

Signed-Off-By: David Howells [EMAIL PROTECTED]
---

 include/linux/skbuff.h |6 ++
 include/net/esp.h  |2 -
 net/core/skbuff.c  |  188 
 net/xfrm/xfrm_algo.c   |  169 ---
 4 files changed, 194 insertions(+), 171 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 82f43ad..d53ff7c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -83,6 +83,7 @@
  */
 
 struct net_device;
+struct scatterlist;
 
 #ifdef CONFIG_NETFILTER
 struct nf_conntrack {
@@ -364,6 +365,11 @@ extern struct sk_buff *skb_realloc_headroom(struct sk_buff 
*skb,
 extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
   int newheadroom, int newtailroom,
   gfp_t priority);
+extern intskb_to_sgvec(struct sk_buff *skb,
+   struct scatterlist *sg, int offset,
+   int len);
+extern intskb_cow_data(struct sk_buff *skb, int tailbits,
+   struct sk_buff **trailer);
 extern intskb_pad(struct sk_buff *skb, int pad);
 #define dev_kfree_skb(a)   kfree_skb(a)
 extern void  skb_over_panic(struct sk_buff *skb, int len,
diff --git a/include/net/esp.h b/include/net/esp.h
index 713d039..d05d8d2 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -40,8 +40,6 @@ struct esp_data
} auth;
 };
 
-extern int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int 
offset, int len);
-extern int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff 
**trailer);
 extern void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len);
 
 static inline int esp_mac_digest(struct esp_data *esp, struct sk_buff *skb,
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 87573ae..156b9c0 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -55,6 +55,7 @@
 #include linux/cache.h
 #include linux/rtnetlink.h
 #include linux/init.h
+#include linux/scatterlist.h
 
 #include net/protocol.h
 #include net/dst.h
@@ -2060,6 +2061,190 @@ void __init skb_init(void)
NULL, NULL);
 }
 
+/**
+ * skb_to_sgvec - Fill a scatter-gather list from a socket buffer
+ * @skb: Socket buffer containing the buffers to be mapped
+ * @sg: The scatter-gather list to map into
+ * @offset: The offset into the buffer's contents to start mapping
+ * @len: Length of buffer space to be mapped
+ *
+ * Fill the specified scatter-gather list with mappings/pointers into a
+ * region of the buffer space attached to a socket buffer.
+ */
+int
+skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
+{
+   int start = skb_headlen(skb);
+   int i, copy = start - offset;
+   int elt = 0;
+
+   if (copy  0) {
+   if (copy  len)
+   copy = len;
+   sg[elt].page = virt_to_page(skb-data + offset);
+   sg[elt].offset = (unsigned long)(skb-data + offset) % 
PAGE_SIZE;
+   sg[elt].length = copy;
+   elt++;
+   if ((len -= copy) == 0)
+   return elt;
+   offset += copy;
+   }
+
+   for (i = 0; i  skb_shinfo(skb)-nr_frags; i++) {
+   int end;
+
+   BUG_TRAP(start = offset + len);
+
+   end = start + skb_shinfo(skb)-frags[i].size;
+   if ((copy = end - offset)  0) {
+   skb_frag_t *frag = skb_shinfo(skb)-frags[i];
+
+   if (copy  len)
+   copy = len;
+   sg[elt].page = frag-page;
+   sg[elt].offset = frag-page_offset+offset-start;
+   sg[elt].length = copy;
+   elt++;
+   if (!(len -= copy))
+   return elt;
+   offset += copy;
+   }
+   start = end;
+   }
+
+   if (skb_shinfo(skb)-frag_list) {
+   struct sk_buff *list = skb_shinfo(skb)-frag_list;
+
+   for (; list; list = list-next) {
+   int end;
+
+   BUG_TRAP(start = offset + len);
+
+   end = start + list-len;
+   if ((copy = end - offset)  0) {
+   if (copy  len)
+   copy = len;
+   elt += skb_to_sgvec(list, sg+elt, offset - 
start, copy);
+   if ((len -= copy) == 0)

[PATCH 2/8] AF_RXRPC: Make it possible to merely try to cancel timers and delayed work [try #2]

2007-04-03 Thread David Howells
Export try_to_del_timer_sync() for use by the RxRPC module.

Add a try_to_cancel_delayed_work() so that it is possible to merely attempt to
cancel a delayed work timer.

Signed-Off-By: David Howells [EMAIL PROTECTED]
---

 include/linux/workqueue.h |   21 +
 kernel/timer.c|2 ++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 2a7b38d..40a61ae 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -204,4 +204,25 @@ static inline int cancel_delayed_work(struct delayed_work 
*work)
return ret;
 }
 
+/**
+ * try_to_cancel_delayed_work - Try to kill pending scheduled, delayed work
+ * @work: the work to cancel
+ *
+ * Try to kill off a pending schedule_delayed_work().
+ * - The timer may still be running afterwards, and if so, the work may still
+ *   be pending
+ * - Returns -1 if timer still active, 1 if timer removed, 0 if not scheduled
+ * - Can be called from the work routine; if it's still pending, just return
+ *   and it'll be called again.
+ */
+static inline int try_to_cancel_delayed_work(struct delayed_work *work)
+{
+   int ret;
+
+   ret = try_to_del_timer_sync(work-timer);
+   if (ret  0)
+   work_release(work-work);
+   return ret;
+}
+
 #endif
diff --git a/kernel/timer.c b/kernel/timer.c
index 440048a..ba4d6e0 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -505,6 +505,8 @@ out:
return ret;
 }
 
+EXPORT_SYMBOL(try_to_del_timer_sync);
+
 /**
  * del_timer_sync - deactivate a timer and wait for the handler to finish.
  * @timer: the timer to be deactivated

-
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/8] AF_RXRPC socket family and AFS rewrite [try #2]

2007-04-03 Thread David Howells

The first of these patches together provide secure client-side RxRPC
connectivity as a Linux kernel socket family.  Only the RxRPC transport/session
side is supplied - the presentation side (marshalling the data) is left to the
client.  Copies of the patches can be found here:

http://people.redhat.com/~dhowells/rxrpc/series
http://people.redhat.com/~dhowells/rxrpc/01-move-skb-generic.diff
http://people.redhat.com/~dhowells/rxrpc/02-timers.diff
http://people.redhat.com/~dhowells/rxrpc/03-keys.diff
http://people.redhat.com/~dhowells/rxrpc/04-af_rxrpc.diff

Further patches make the in-kernel AFS filesystem use AF_RXRPC and delete the
old RxRPC implementation:

http://people.redhat.com/~dhowells/rxrpc/05-afs-cleanup.diff
http://people.redhat.com/~dhowells/rxrpc/06-af_rxrpc-kernel.diff
http://people.redhat.com/~dhowells/rxrpc/07-af_rxrpc-afs.diff
http://people.redhat.com/~dhowells/rxrpc/08-af_rxrpc-delete-old.diff

The userspace access methods make use of the control data passed to/by
sendmsg() and recvmsg().  See the three simple test programs:

http://people.redhat.com/~dhowells/rxrpc/klog.c
http://people.redhat.com/~dhowells/rxrpc/rxrpc.c
http://people.redhat.com/~dhowells/rxrpc/listen.c

TODO:

 (*) Make certain parameters (such as connection timeouts) userspace
 configurable.

 (*) Make userspace utilities use it; librxrpc.

 (*) Userspace documentation.

 (*) KerberosV security.

Changes:

 (*) SOCK_RPC has been removed.  SOCK_DGRAM is now used instead.

 (*) I've add a facility whereby calls can be made to destinations other than
 the connect() address of a client socket by making use of msg_name in the
 msghdr struct when using sendmsg() to send the first data packet of a
 call.  Indeed, a client socket need not be connected before being used
 so.

 (*) I've also added a facility whereby client calls may also be made on
 server sockets, again by using msg_name in the msghdr struct.  In such a
 case, the server's local transport endpoint is used.

 (*) I've made the write buffer space check available to various callers
 (sk_write_space) and implemented poll support.

 (*) Rewrote rxrpc_recvmsg().  It now concatenates adjacent data messages from
 the same call when delivering them.

 (*) Updated the documentation to include notes on recvmsg, cover control
 messages and cover SOL_RXRPC-level socket options.

 (*) Provided an in-kernel interface to give in-kernel utilities easier access
 to the facility.

 (*) Made fs/afs/ use it.

 (*) Deleted the old contents of net/rxrpc/.

 (*) Use the scatterlist interface to the crypto API for now.  The patch that
 added the direct access interface conflicts with patches Herbert Xu is
 producing, so I've dropped it for the moment.

 (*) Moved a bug fix to make secure connection reuse from the af_rxrpc-kernel
 patch to the af_rxrpc main patch.

David
-
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/8] AF_RXRPC: Add an interface to the AF_RXRPC module for the AFS filesystem to use [try #2]

2007-04-03 Thread David Howells
Add an interface to the AF_RXRPC module so that the AFS filesystem module can
more easily make use of the services available.  AFS still opens a socket but
then uses the action functions in lieu of sendmsg() and registers an intercept
functions to grab messages before they're queued on the socket Rx queue.

This permits AFS (or whatever) to:

 (1) Avoid the overhead of using the recvmsg() call.

 (2) Use different keys directly on individual client calls on one socket
 rather than having to open a whole slew of sockets, one for each key it
 might want to use.

 (3) Avoid calling request_key() at the point of issue of a call or opening of
 a socket.  This is done instead by AFS at the point of open(), unlink() or
 other VFS operation and the key handed through.

 (4) Request the use of something other than GFP_KERNEL to allocate memory.

Furthermore:

 (*) The socket buffer markings used by RxRPC are made available for AFS so
 that it can interpret the cooked RxRPC messages itself.

 (*) rxgen (un)marshalling abort codes are made available.


The following documentation for the kernel interface is added to
Documentation/networking/rxrpc.txt:

=
AF_RXRPC KERNEL INTERFACE
=

The AF_RXRPC module also provides an interface for use by in-kernel utilities
such as the AFS filesystem.  This permits such a utility to:

 (1) Use different keys directly on individual client calls on one socket
 rather than having to open a whole slew of sockets, one for each key it
 might want to use.

 (2) Avoid having RxRPC call request_key() at the point of issue of a call or
 opening of a socket.  Instead the utility is responsible for requesting a
 key at the appropriate point.  AFS, for instance, would do this during VFS
 operations such as open() or unlink().  The key is then handed through
 when the call is initiated.

 (3) Request the use of something other than GFP_KERNEL to allocate memory.

 (4) Avoid the overhead of using the recvmsg() call.  RxRPC messages can be
 intercepted before they get put into the socket Rx queue and the socket
 buffers manipulated directly.

To use the RxRPC facility, a kernel utility must still open an AF_RXRPC socket,
bind an addess as appropriate and listen if it's to be a server socket, but
then it passes this to the kernel interface functions.

The kernel interface functions are as follows:

 (*) Begin a new client call.

struct rxrpc_call *
rxrpc_kernel_begin_call(struct socket *sock,
struct sockaddr_rxrpc *srx,
struct key *key,
unsigned long user_call_ID,
gfp_t gfp);

 This allocates the infrastructure to make a new RxRPC call and assigns
 call and connection numbers.  The call will be made on the UDP port that
 the socket is bound to.  The call will go to the destination address of a
 connected client socket unless an alternative is supplied (srx is
 non-NULL).

 If a key is supplied then this will be used to secure the call instead of
 the key bound to the socket with the RXRPC_SECURITY_KEY sockopt.  Calls
 secured in this way will still share connections if at all possible.

 The user_call_ID is equivalent to that supplied to sendmsg() in the
 control data buffer.  It is entirely feasible to use this to point to a
 kernel data structure.

 If this function is successful, an opaque reference to the RxRPC call is
 returned.  The caller now holds a reference on this and it must be
 properly ended.

 (*) End a client call.

void rxrpc_kernel_end_call(struct rxrpc_call *call);

 This is used to end a previously begun call.  The user_call_ID is expunged
 from AF_RXRPC's knowledge and will not be seen again in association with
 the specified call.

 (*) Send data through a call.

int rxrpc_kernel_send_data(struct rxrpc_call *call, struct msghdr *msg,
   size_t len);

 This is used to supply either the request part of a client call or the
 reply part of a server call.  msg.msg_iovlen and msg.msg_iov specify the
 data buffers to be used.  msg_iov may not be NULL and must point
 exclusively to in-kernel virtual addresses.  msg.msg_flags may be given
 MSG_MORE if there will be subsequent data sends for this call.

 The msg must not specify a destination address, control data or any flags
 other than MSG_MORE.  len is the total amount of data to transmit.

 (*) Abort a call.

void rxrpc_kernel_abort_call(struct rxrpc_call *call, u32 abort_code);

 This is used to abort a call if it's still in an abortable state.  The
 abort code specified will be placed in the ABORT message sent.

 (*) Intercept received RxRPC messages.

typedef void (*rxrpc_interceptor_t)(struct sock *sk,
 

[PATCH 3/8] AF_RXRPC: Key facility changes for AF_RXRPC [try #2]

2007-04-03 Thread David Howells
Export the keyring key type definition and document its availability.

Add alternative types into the key's type_data union to make it more useful.
Not all users necessarily want to use it as a list_head (AF_RXRPC doesn't, for
example), so make it clear that it can be used in other ways.

Signed-Off-By: David Howells [EMAIL PROTECTED]
---

 Documentation/keys.txt  |   12 
 include/linux/key.h |2 ++
 security/keys/keyring.c |2 ++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/Documentation/keys.txt b/Documentation/keys.txt
index 60c665d..81d9aa0 100644
--- a/Documentation/keys.txt
+++ b/Documentation/keys.txt
@@ -859,6 +859,18 @@ payload contents for more information.
void unregister_key_type(struct key_type *type);
 
 
+Under some circumstances, it may be desirable to desirable to deal with a
+bundle of keys.  The facility provides access to the keyring type for managing
+such a bundle:
+
+   struct key_type key_type_keyring;
+
+This can be used with a function such as request_key() to find a specific
+keyring in a process's keyrings.  A keyring thus found can then be searched
+with keyring_search().  Note that it is not possible to use request_key() to
+search a specific keyring, so using keyrings in this way is of limited utility.
+
+
 ===
 NOTES ON ACCESSING PAYLOAD CONTENTS
 ===
diff --git a/include/linux/key.h b/include/linux/key.h
index 169f05e..a9220e7 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -160,6 +160,8 @@ struct key {
 */
union {
struct list_headlink;
+   unsigned long   x[2];
+   void*p[2];
} type_data;
 
/* key data
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index ad45ce7..88292e3 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -66,6 +66,8 @@ struct key_type key_type_keyring = {
.read   = keyring_read,
 };
 
+EXPORT_SYMBOL(key_type_keyring);
+
 /*
  * semaphore to serialise link/link calls to prevent two link calls in parallel
  * introducing a cycle

-
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.20.4: NETDEV WATCHDOG and lockups

2007-04-03 Thread Christian Kujau

On Mon, 2 Apr 2007, Chuck Ebbert wrote:

Where is the info from before you changed to noapic? Or were the
machines always using XT-PIC for all the interrupts???


We booted with 'acpi=off lapic' (with ACPI options compiled in, to be 
able to boot with acpi=on later on) and the box locked up again.


I'll try to boot with a slightly different .config later on. With 
'lapic' /proc/interrupts looks like:


  CPU0   CPU1
  0:  63656  63396   IO-APIC-edge  timer
  1:  0  8   IO-APIC-edge  i8042
  2:  0  0XT-PIC-XTcascade
  4:  6  1   IO-APIC-edge  serial
  6:  0  3   IO-APIC-edge  floppy
  8:  0  1   IO-APIC-edge  rtc
 17:  17050  1   IO-APIC-fasteoi   eth1
 18:102  80615   IO-APIC-fasteoi   eth0
 20: 195817  77721   IO-APIC-fasteoi   libata
NMI:  0  0
LOC: 126969 126970
ERR:  0
MIS:  0

Christian.

--
BOFH excuse #146:

Communications satellite used by the military for star wars.
-
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: PROBLEM: sky2 hangs

2007-04-03 Thread Peter Trifonov
Dear Stephen,
  I have got a PC based on Gigabyte GA-965P-S3 motherboard with an 
  integrated Marvell Yukon 88E8056 PCI-E gigabit ethernet controller.
 There have been several updates since 2.6.18. Please try and 
 reproduce with 2.6.20 or later kernel. Or contact the vendor 
 to update their kernel.

Thanks a lot!

After installing 2.6.20 kernel the NIC works perfectly!


With best regards,
P. Trifonov  


-
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.20.4: NETDEV WATCHDOG and lockups

2007-04-03 Thread Christian Kujau

On Tue, 3 Apr 2007, Jarek Poplawski wrote:

Did you try with 8139cp instead of 8139too?


Tried that, 8139cp could not be loaded :(


(Maybe even try some other card to narrow the problem?)
You could also try to test without ehci, if it's possible.


USB has been disabled completely. After booting with 'acpi=off lapic' 
the box survived ~30min then locked up again and rebooted.


Christian.
--
BOFH excuse #305:

IRQ-problems with the Un-Interruptible-Power-Supply
-
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: IPsec PMTUD problem

2007-04-03 Thread Patrick McHardy
Herbert Xu wrote:
 On Mon, Apr 02, 2007 at 04:10:25PM +0200, Patrick McHardy wrote:
 
I noticed a problem with PMTUD between two IPsec tunnel endpoints.
When sending a packet larger than the PMTU with IP_DF from one
tunnel endpoint to the other, xfrm4_output sends an ICMP frag.
required with the IPsec MTU. Since the addresses match the tunnel
endpoints, this updates the MTU for the XFRM route with the value
that was calculated for the entire bundle, which in turn causes
a decrease for the bundle, resulting in further ICMP frag. required
messages until the minimum is reached.
 
 
 I presume you're using the same pair of addresses inside and
 outside the tunnel? If so the problem is that the kernel doesn't
 distinguish between internal ICMP errors and external ones.
 So when an MTU update occurs for the internal pair the external
 pair is also affected.

Exactly.

 We'd need some field in the routing cache to distinguish the
 two pairs.

I'm not sure I understand how this would work, the ICMP message
looks the same in both cases. Or are you suggesting to
differentiate based on the source of the ICMP message?

 Of course the easy work-around is to use distinct addresses
 within IPsec tunnels.

Yes, that would work as a workaround, but it still seems like
something worth fixing.

-
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


[XFRM]: Optimize MTU calculation

2007-04-03 Thread Patrick McHardy
I've updated my IPsec MTU optimization patch I've posted a couple
of month ago to net-2.6.22 and added the further optimization
suggested by Herbert to account for the space lost due to alignment
in the room reserved for IP options in transport mode.

Tested with IPv4 and IPv6 in tunnel and transport mode. Beet mode
is untested since no keying daemon seems to support it.

[XFRM]: Optimize MTU calculation

Replace the probing based MTU estimation, which usually takes 2-3 iterations
to find a fitting value and may underestimate the MTU, by an exact calculation.

Also fixes underestimation of the XFRM trailer_len, which causes unnecessary
reallocations.

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]

---
commit f4de4e63b441ce18a7ef19256fcb85ea737e45bb
tree 7b1feb6d5a47467c6e6a74f19e589e53534c2b56
parent 565b89fa1b7c55b69f66af0ba1e84addbf9a0e1a
author Patrick McHardy [EMAIL PROTECTED] Tue, 03 Apr 2007 17:20:47 +0200
committer Patrick McHardy [EMAIL PROTECTED] Tue, 03 Apr 2007 17:20:47 +0200

 include/net/xfrm.h|2 +-
 net/ipv4/esp4.c   |   30 ++
 net/ipv6/esp6.c   |   22 --
 net/xfrm/xfrm_state.c |   36 
 4 files changed, 39 insertions(+), 51 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 5a00aa8..e144a25 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -279,7 +279,7 @@ struct xfrm_type
xfrm_address_t  *(*local_addr)(struct xfrm_state *, 
xfrm_address_t *);
xfrm_address_t  *(*remote_addr)(struct xfrm_state *, 
xfrm_address_t *);
/* Estimate maximal size of result of transformation of a dgram */
-   u32 (*get_max_size)(struct xfrm_state *, int size);
+   u32 (*get_mtu)(struct xfrm_state *, int size);
 };
 
 extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 5e56139..24238fb 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -272,32 +272,34 @@ out:
return -EINVAL;
 }
 
-static u32 esp4_get_max_size(struct xfrm_state *x, int mtu)
+static u32 esp4_get_mtu(struct xfrm_state *x, int mtu)
 {
struct esp_data *esp = x-data;
u32 blksize = ALIGN(crypto_blkcipher_blocksize(esp-conf.tfm), 4);
-   int enclen = 0;
+   u32 align = max_t(u32, blksize, esp-conf.padlen);
+   u32 rem;
+
+   mtu -= x-props.header_len + esp-auth.icv_trunc_len;
+   rem = mtu  (align - 1);
+   mtu = ~(align - 1);
 
switch (x-props.mode) {
case XFRM_MODE_TUNNEL:
-   mtu = ALIGN(mtu +2, blksize);
break;
default:
case XFRM_MODE_TRANSPORT:
/* The worst case */
-   mtu = ALIGN(mtu + 2, 4) + blksize - 4;
+   mtu -= blksize - 4;
+   mtu += min_t(u32, blksize - 4, rem);
break;
case XFRM_MODE_BEET:
/* The worst case. */
-   enclen = IPV4_BEET_PHMAXLEN;
-   mtu = ALIGN(mtu + enclen + 2, blksize);
+   mtu -= IPV4_BEET_PHMAXLEN;
+   mtu += min_t(u32, IPV4_BEET_PHMAXLEN, rem);
break;
}
 
-   if (esp-conf.padlen)
-   mtu = ALIGN(mtu, esp-conf.padlen);
-
-   return mtu + x-props.header_len + esp-auth.icv_trunc_len - enclen;
+   return mtu - 2;
 }
 
 static void esp4_err(struct sk_buff *skb, u32 info)
@@ -340,6 +342,7 @@ static int esp_init_state(struct xfrm_state *x)
 {
struct esp_data *esp = NULL;
struct crypto_blkcipher *tfm;
+   u32 align;
 
/* null auth and encryption can have zero length keys */
if (x-aalg) {
@@ -421,7 +424,10 @@ static int esp_init_state(struct xfrm_state *x)
}
}
x-data = esp;
-   x-props.trailer_len = esp4_get_max_size(x, 0) - x-props.header_len;
+   align = ALIGN(crypto_blkcipher_blocksize(esp-conf.tfm), 4);
+   if (esp-conf.padlen)
+   align = max_t(u32, align, esp-conf.padlen);
+   x-props.trailer_len = align + 1 + esp-auth.icv_trunc_len;
return 0;
 
 error:
@@ -438,7 +444,7 @@ static struct xfrm_type esp_type =
.proto  = IPPROTO_ESP,
.init_state = esp_init_state,
.destructor = esp_destroy,
-   .get_max_size   = esp4_get_max_size,
+   .get_mtu= esp4_get_mtu,
.input  = esp_input,
.output = esp_output
 };
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index b8e8914..61af22d 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -235,22 +235,24 @@ out:
return ret;
 }
 
-static u32 esp6_get_max_size(struct xfrm_state *x, int mtu)
+static u32 esp6_get_mtu(struct xfrm_state *x, int mtu)
 {
struct esp_data *esp = x-data;
u32 blksize = ALIGN(crypto_blkcipher_blocksize(esp-conf.tfm), 4);
+   u32 align = max_t(u32, blksize, 

[PATCH] TCP Illinois congestion control

2007-04-03 Thread Stephen Hemminger
This is a new implementation of TCP Illinois invented by Shao Liu
at University of Illinois. It is a another variant of Reno which adapts
the alpha and beta parameters based on RTT. The basic idea is to increase
window less rapidly as delay approaches the maximum. See the papers
and talks to get a more complete description.

Please consider for 2.6.22.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/ipv4/Kconfig|   13 +++
 net/ipv4/Makefile   |1 +
 net/ipv4/tcp_illinois.c |  212 +++
 3 files changed, 226 insertions(+), 0 deletions(-)
 create mode 100644 net/ipv4/tcp_illinois.c

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index dc61e66..e62aee0 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -588,6 +588,19 @@ config TCP_CONG_YEAH
For further details look here:
  http://wil.cs.caltech.edu/pfldnet2007/paper/YeAH_TCP.pdf
 
+config TCP_CONG_ILLINOIS
+   tristate TCP Illinois
+   depends on EXPERIMENTAL
+   default n
+   ---help---
+   TCP-Illinois is a sender-side modificatio of TCP Reno for
+   high speed long delay links. It uses round-trip-time to
+   adjust the alpha and beta parameters to achieve a higher average
+   throughput and maintain fairness.
+
+   For further details see:
+ http://www.ews.uiuc.edu/~shaoliu/tcpillinois/index.html
+
 choice
prompt Default TCP congestion control
default DEFAULT_CUBIC
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index eeb94d5..4ff6c15 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o
 obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
 obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
 obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
+obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
 obj-$(CONFIG_NETLABEL) += cipso_ipv4.o
 
 obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
new file mode 100644
index 000..f7c0b76
--- /dev/null
+++ b/net/ipv4/tcp_illinois.c
@@ -0,0 +1,212 @@
+/*
+ * TCP Illinois congestion control.
+ * Home page:
+ * http://www.ews.uiuc.edu/~shaoliu/tcpillinois/index.html
+ *
+ * The algorithm is described in:
+ * TCP-Illinois: A Loss and Delay-Based Congestion Control Algorithm
+ *  for High-Speed Networks
+ *  http://www.ews.uiuc.edu/~shaoliu/papersandslides/tcpillinois_10pages.pdf
+ *
+ * Implemented from description in paper and ns-2 simulation.
+ * Copyright (C) 2007 Stephen Hemminger [EMAIL PROTECTED]
+ */
+
+#include linux/module.h
+#include net/tcp.h
+#include linux/skbuff.h
+#include linux/inet_diag.h
+
+#define ALPHA_SHIFT7
+#define ALPHA_SCALE(1uALPHA_SHIFT)
+#define ALPHA_MIN  (ALPHA_SCALE/10)
+#define ALPHA_MAX  (10*ALPHA_SCALE)
+#define ALPHA_BASE ALPHA_SCALE /* 1.0 */
+
+#define BETA_SHIFT 6
+#define BETA_SCALE (1uBETA_SHIFT)
+#define BETA_MIN   (BETA_SCALE/8)
+#define BETA_MAX   (BETA_SCALE/2)
+#define BETA_BASE  BETA_MAX/* 0.5 */
+
+static int win_thresh __read_mostly = 15;
+module_param(win_thresh, int, 0644);
+MODULE_PARM_DESC(win_thresh, Window threshold for starting adaptive sizing);
+
+/* TCP Illinois Parameters */
+struct tcp_illinois {
+   u32 min_rtt;
+   u32 max_rtt;
+   u32 avg_rtt;
+};
+
+static void tcp_illinois_init(struct sock *sk)
+{
+   struct tcp_illinois *ca = inet_csk_ca(sk);
+
+   ca-min_rtt = 0x7fff;
+}
+
+/*
+ * Keep track of min, max and average RTT
+ *
+ * In the paper, it implies that they want average of RTT over
+ * last window of packets. Doing that exactly would require too much
+ * memory (W samples). So we use a sliding average.
+ */
+static void tcp_illinois_rtt_calc(struct sock *sk, u32 rtt)
+{
+   struct tcp_sock *tp = tcp_sk(sk);
+   struct tcp_illinois *ca = inet_csk_ca(sk);
+
+   /* Compute sliding average over last N packets */
+   ca-avg_rtt = (ca-avg_rtt * (tp-snd_cwnd-1) + rtt) / tp-snd_cwnd;
+
+   if (rtt  ca-min_rtt)
+   ca-min_rtt = rtt;
+
+   if (rtt  ca-max_rtt)
+   ca-max_rtt = rtt;
+}
+
+/*
+ * Compute value of alpha used for additive increase.
+ * If small window then use 1.0, equivalent to Reno.
+ *
+ * For larger windows, adjust based on average delay.
+ * A. If average delay is at minimum (we are uncongested),
+ *then use large alpha (10.0) to increase faster.
+ * B. If average delay is at maximum (getting congested)
+ *then use small alpha (1.0)
+ *
+ * The result is a convex window growth curve.
+ */
+static inline u32 alpha(const struct sock *sk)
+{
+   const struct tcp_sock *tp = tcp_sk(sk);
+   const struct tcp_illinois *ca = inet_csk_ca(sk);
+   u32 dm, da;
+
+   if (tp-snd_cwnd  win_thresh)
+   return ALPHA_BASE;  /* same as Reno (1.0) */
+
+   dm = ca-max_rtt - ca-min_rtt; /* max queuing 

[PATCH] [iputils] Add documentation for the -l flag.

2007-04-03 Thread John Heffner
---
 doc/tracepath.sgml |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/doc/tracepath.sgml b/doc/tracepath.sgml
index 71eaa8d..c0f308b 100644
--- a/doc/tracepath.sgml
+++ b/doc/tracepath.sgml
@@ -15,6 +15,7 @@ traces path to a network host discovering MTU along this 
path/refpurpose
 refsynopsisdiv
 cmdsynopsis
 commandtracepath/command
+arg choice=opt-l replaceable/pktlen//arg
 arg choice=reqreplaceable/destination//arg
 arg choice=optreplaceable/port//arg
 /cmdsynopsis
@@ -39,6 +40,18 @@ of UDP ports to maintain trace history.
 /para
 /refsect1
 
+refsect1titleOPTIONS/title
+variablelist
+ varlistentry
+  termoption/-l//term
+  listitempara
+Sets the initial packet length to replaceable/pktlen/ instead of
+65536 for command/tracepath/ or 128000 for command/tracepath6/.
+  /para/listitem
+ /varlistentry
+/variablelist
+/refsect1
+
 refsect1titleOUTPUT/title
 para
 literallayout
-- 
1.5.0.2.gc260-dirty

-
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] [iputils] Document -n flag.

2007-04-03 Thread John Heffner
---
 doc/tracepath.sgml |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/doc/tracepath.sgml b/doc/tracepath.sgml
index c0f308b..1bc83b9 100644
--- a/doc/tracepath.sgml
+++ b/doc/tracepath.sgml
@@ -15,6 +15,7 @@ traces path to a network host discovering MTU along this 
path/refpurpose
 refsynopsisdiv
 cmdsynopsis
 commandtracepath/command
+arg choice=opt-n/arg
 arg choice=opt-l replaceable/pktlen//arg
 arg choice=reqreplaceable/destination//arg
 arg choice=optreplaceable/port//arg
@@ -42,6 +43,14 @@ of UDP ports to maintain trace history.
 
 refsect1titleOPTIONS/title
 variablelist
+
+ varlistentry
+  termoption/-n//term
+  listitempara
+Do not look up host names.  Only print IP addresses numerically.
+  /para/listitem
+ /varlistentry
+
  varlistentry
   termoption/-l//term
   listitempara
-- 
1.5.0.2.gc260-dirty

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


[PATCH] net: cleanup extra semicolons

2007-04-03 Thread Stephen Hemminger
Spring cleaning time...

There seems to be a lot of places in the network code that have
extra bogus semicolons after conditionals.  Most commonly is a
bogus semicolon after: switch() { }

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/802/tr.c |3 ++-
 net/8021q/vlan.c |6 +++---
 net/8021q/vlan_dev.c |4 ++--
 net/ax25/ax25_ip.c   |2 +-
 net/bluetooth/hci_core.c |4 ++--
 net/bluetooth/sco.c  |2 +-
 net/core/link_watch.c|2 +-
 net/core/pktgen.c|6 +++---
 net/core/rtnetlink.c |2 +-
 net/core/skbuff.c|2 +-
 net/ipv4/fib_semantics.c |2 +-
 net/ipv4/ipconfig.c  |4 ++--
 net/ipv4/multipath_drr.c |2 +-
 net/ipv4/tcp.c   |7 ---
 net/ipv4/tcp_input.c |9 +
 net/ipv4/xfrm4_policy.c  |2 +-
 net/ipv6/addrconf.c  |4 ++--
 net/ipv6/datagram.c  |2 +-
 net/ipv6/exthdrs.c   |2 +-
 net/ipv6/icmp.c  |5 +++--
 net/ipv6/ndisc.c |2 +-
 net/ipv6/raw.c   |   14 --
 net/ipv6/route.c |2 +-
 net/ipv6/xfrm6_policy.c  |5 +++--
 net/irda/af_irda.c   |4 ++--
 net/iucv/af_iucv.c   |2 +-
 net/key/af_key.c |2 +-
 net/sched/cls_u32.c  |2 +-
 net/sched/sch_dsmark.c   |6 +++---
 net/sched/sch_ingress.c  |4 ++--
 net/sched/sch_prio.c |2 +-
 net/sctp/associola.c |2 +-
 net/sctp/debug.c |5 +++--
 net/sctp/ipv6.c  |2 +-
 net/sctp/output.c|2 +-
 net/sctp/outqueue.c  |   12 ++--
 net/sctp/sm_make_chunk.c |4 ++--
 net/sctp/sm_sideeffect.c |5 +++--
 net/sctp/sm_statefuns.c  |   10 +-
 net/sctp/sm_statetable.c |2 +-
 net/sctp/socket.c|   11 ++-
 net/sctp/transport.c |2 +-
 net/sctp/ulpqueue.c  |8 
 net/tipc/link.c  |2 +-
 net/xfrm/xfrm_policy.c   |2 +-
 net/xfrm/xfrm_state.c|8 
 net/xfrm/xfrm_user.c |   22 +++---
 47 files changed, 113 insertions(+), 103 deletions(-)

diff --git a/net/802/tr.c b/net/802/tr.c
index eb2de0d..0ba1946 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -554,7 +554,8 @@ static int rif_seq_show(struct seq_file *seq, void *v)
if(j==1) {

segment=ntohs(entry-rseg[j-1])4;
seq_printf(seq,  
%03X,segment);
-   };
+   }
+
segment=ntohs(entry-rseg[j])4;
brdgnmb=ntohs(entry-rseg[j-1])0x00f;

seq_printf(seq,-%01X-%03X,brdgnmb,segment);
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index eb1c71e..c0c7bb8 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -470,7 +470,7 @@ static struct net_device *register_vlan_device(const char 
*eth_IF_name,
 */
default:
snprintf(name, IFNAMSIZ, vlan%.4i, VLAN_ID);
-   };
+   }
 
new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
   vlan_setup);
@@ -685,7 +685,7 @@ static int vlan_device_event(struct notifier_block *unused, 
unsigned long event,
break;
}
break;
-   };
+   }
 
 out:
return NOTIFY_DONE;
@@ -819,7 +819,7 @@ static int vlan_ioctl_handler(void __user *arg)
printk(VLAN_DBG %s: Unknown VLAN CMD: %x \n,
__FUNCTION__, args.cmd);
return -EINVAL;
-   };
+   }
 out:
return err;
 }
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 9f4cfd0..9c85785 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -66,7 +66,7 @@ int vlan_dev_rebuild_header(struct sk_buff *skb)
 
memcpy(veth-h_source, dev-dev_addr, ETH_ALEN);
break;
-   };
+   }
 
return 0;
 }
@@ -219,7 +219,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device 
*dev,
break;
default:
break;
-   };
+   }
 
/*  Was a VLAN packet, grab the encapsulated protocol, which the layer
 * three protocols care about.
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 4d4ef35..930e491 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -121,7 +121,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
digipeat = route-digipeat;
dev = route-dev;
ip_mode = route-ip_mode;
-   };
+   }
 
if (dev == NULL)
dev = skb-dev;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c177e75..aa4b56a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -149,7 +149,7 @@ static int 

[PATCH 2/2] [iputils] Re-probe at same TTL after MTU reduction.

2007-04-03 Thread John Heffner
This fixes a bug that would miss a hop after an ICMP packet too big message,
since it would continue increase the TTL without probing again.
---
 tracepath.c  |6 ++
 tracepath6.c |6 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tracepath.c b/tracepath.c
index d035a1e..19b2c6b 100644
--- a/tracepath.c
+++ b/tracepath.c
@@ -352,8 +352,14 @@ main(int argc, char **argv)
exit(1);
}
 
+restart:
for (i=0; i3; i++) {
+   int old_mtu;
+   
+   old_mtu = mtu;
res = probe_ttl(fd, ttl);
+   if (mtu != old_mtu)
+   goto restart;
if (res == 0)
goto done;
if (res  0)
diff --git a/tracepath6.c b/tracepath6.c
index a010218..65c4a4a 100644
--- a/tracepath6.c
+++ b/tracepath6.c
@@ -422,8 +422,14 @@ int main(int argc, char **argv)
exit(1);
}
 
+restart:
for (i=0; i3; i++) {
+   int old_mtu;
+   
+   old_mtu = mtu;
res = probe_ttl(fd, ttl);
+   if (mtu != old_mtu)
+   goto restart;
if (res == 0)
goto done;
if (res  0)
-- 
1.5.0.2.gc260-dirty

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


[PATCH 1/2] [iputils] Fix asymm messages.

2007-04-03 Thread John Heffner
We should only print the asymm messages in tracepath/6 when you receive a
TTL expired message, because this is the only time when we'd expect the
same number of hops back as our TTL was set to for a symmetric path.
---
 tracepath.c  |   25 -
 tracepath6.c |   25 -
 2 files changed, 24 insertions(+), 26 deletions(-)

diff --git a/tracepath.c b/tracepath.c
index a562d88..d035a1e 100644
--- a/tracepath.c
+++ b/tracepath.c
@@ -163,19 +163,6 @@ restart:
}
}
 
-   if (rethops=0) {
-   if (rethops=64)
-   rethops = 65-rethops;
-   else if (rethops=128)
-   rethops = 129-rethops;
-   else
-   rethops = 256-rethops;
-   if (sndhops=0  rethops != sndhops)
-   printf(asymm %2d , rethops);
-   else if (sndhops0  rethops != ttl)
-   printf(asymm %2d , rethops);
-   }
-
if (rettv) {
int diff = 
(tv.tv_sec-rettv-tv_sec)*100+(tv.tv_usec-rettv-tv_usec);
printf(%3d.%03dms , diff/1000, diff%1000);
@@ -204,6 +191,18 @@ restart:
if (e-ee_origin == SO_EE_ORIGIN_ICMP 
e-ee_type == 11 
e-ee_code == 0) {
+   if (rethops=0) {
+   if (rethops=64)
+   rethops = 65-rethops;
+   else if (rethops=128)
+   rethops = 129-rethops;
+   else
+   rethops = 256-rethops;
+   if (sndhops=0  rethops != sndhops)
+   printf(asymm %2d , rethops);
+   else if (sndhops0  rethops != ttl)
+   printf(asymm %2d , rethops);
+   }
printf(\n);
break;
}
diff --git a/tracepath6.c b/tracepath6.c
index 6f13a51..a010218 100644
--- a/tracepath6.c
+++ b/tracepath6.c
@@ -176,19 +176,6 @@ restart:
}
}
 
-   if (rethops=0) {
-   if (rethops=64)
-   rethops = 65-rethops;
-   else if (rethops=128)
-   rethops = 129-rethops;
-   else
-   rethops = 256-rethops;
-   if (sndhops=0  rethops != sndhops)
-   printf(asymm %2d , rethops);
-   else if (sndhops0  rethops != ttl)
-   printf(asymm %2d , rethops);
-   }
-
if (rettv) {
int diff = 
(tv.tv_sec-rettv-tv_sec)*100+(tv.tv_usec-rettv-tv_usec);
printf(%3d.%03dms , diff/1000, diff%1000);
@@ -220,6 +207,18 @@ restart:
(e-ee_origin == SO_EE_ORIGIN_ICMP6 
 e-ee_type == 3 
 e-ee_code == 0)) {
+   if (rethops=0) {
+   if (rethops=64)
+   rethops = 65-rethops;
+   else if (rethops=128)
+   rethops = 129-rethops;
+   else
+   rethops = 256-rethops;
+   if (sndhops=0  rethops != sndhops)
+   printf(asymm %2d , rethops);
+   else if (sndhops0  rethops != ttl)
+   printf(asymm %2d , rethops);
+   }
printf(\n);
break;
}
-- 
1.5.0.2.gc260-dirty

-
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]S2io: Change of driver maintainers

2007-04-03 Thread Ramkrishna Vepa
- Changed the maintainers for the S2io driver.
(Resending; forgot to send to netdev)

Signed-off-by: Ramkrishna Vepa [EMAIL PROTECTED]
---
diff -pNur linux-2.6.org/drivers/net/s2io.c linux-2.6/drivers/net/s2io.c
--- linux-2.6.org/drivers/net/s2io.c2007-03-29 18:49:39.0 -0700
+++ linux-2.6/drivers/net/s2io.c2007-03-29 19:06:52.0 -0700
@@ -84,7 +84,7 @@
 #include s2io.h
 #include s2io-regs.h
 
-#define DRV_VERSION 2.0.19.1
+#define DRV_VERSION 2.0.22.1
 
 /* S2io Driver name  version. */
 static char s2io_driver_name[] = Neterion;
@@ -394,7 +394,6 @@ static const u64 fix_mac[] = {
END_SIGN
 };
 
-MODULE_AUTHOR(Raghavendra Koushik [EMAIL PROTECTED]);
 MODULE_LICENSE(GPL);
 MODULE_VERSION(DRV_VERSION);
 
diff -pNur linux-2.6.org/MAINTAINERS linux-2.6/MAINTAINERS
--- linux-2.6.org/MAINTAINERS   2007-03-29 18:49:39.0 -0700
+++ linux-2.6/MAINTAINERS   2007-03-29 19:00:46.0 -0700
@@ -2470,6 +2470,19 @@ M:   [EMAIL PROTECTED]
 L: [EMAIL PROTECTED] (subscribers-only)
 S: Maintained
 
+NETERION (S2IO) Xframe 10GbE DRIVER
+P: Ramkrishna Vepa
+M: [EMAIL PROTECTED]
+P: Rastapur Santosh
+M: [EMAIL PROTECTED]
+P: Sivakumar Subramani
+M: [EMAIL PROTECTED]
+P: Sreenivasa Honnur
+M: [EMAIL PROTECTED]
+L: netdev@vger.kernel.org
+W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
+S: Supported
+
 OPENCORES I2C BUS DRIVER
 P: Peter Korsgaard
 M: [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] TCP Illinois preliminary version

2007-04-03 Thread Julian Shao Liu
HI Stephen,

Do you wish me to check the modified code of the implementation in your
first email yesterday? I have noticed the modification and have not had a
chance to check that. I can check it tonight. 

BTW, are all the changes in that first email?

Best regards!
 
Yours sincerely,
Shao Liu (Julian)
 
University of Illinois at Urbana Champaign
Coordinated Science Laboratory and Department of Electrical and Computer
Engineering
www.ews.uiuc.edu/~shaoliu

-Original Message-
From: Stephen Hemminger [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 02, 2007 10:45 PM
To: David Miller
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
netdev@vger.kernel.org
Subject: Re: [RFC] TCP Illinois preliminary version

On Mon, 02 Apr 2007 20:39:37 -0700 (PDT) David Miller [EMAIL PROTECTED]
wrote:

 From: Stephen Hemminger [EMAIL PROTECTED]
 Date: Mon, 2 Apr 2007 20:15:25 -0700
 
  Preliminary version if TCP Illinois for 2.6.22.
  It needs more testing and refinement but it captures the basic 
  concepts.
 
 No objections from me and I don't see any obvious problems.
 
 Would you like me to stuff this into net-2.6.22 now so that it can get 
 some more exposure and people banging on it or would you like me to 
 wait a bit?
 
 Thanks.

I would like one of the originators to check the math. 

In case you are worried, I received assurance from Shao Liu that they
decided not to pursue patent and doing a Linux version was okay.

-
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: [XFRM]: Optimize MTU calculation

2007-04-03 Thread DiegoB

Patrick McHardy wrote:

I've updated my IPsec MTU optimization patch I've posted a couple
of month ago to net-2.6.22 and added the further optimization
suggested by Herbert to account for the space lost due to alignment
in the room reserved for IP options in transport mode.

Tested with IPv4 and IPv6 in tunnel and transport mode. Beet mode
is untested since no keying daemon seems to support it.


Actually for BEET mode you can check the following:

http://hipl.hiit.fi/
http://www.openhip.org/
http://www.hip4inter.net/

Cheers,

Diego


-
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] TCP Illinois preliminary version

2007-04-03 Thread Julian Shao Liu
Hi, Stephen, David 

Yes, you can go ahead to implement it in Linux. We are glad to see that
TCP-Illinois gets more exposure by this way.


Best regards!
 
Yours sincerely,
Shao Liu (Julian)
 
University of Illinois at Urbana Champaign
Coordinated Science Laboratory and Department of Electrical and Computer
Engineering
www.ews.uiuc.edu/~shaoliu

-Original Message-
From: Stephen Hemminger [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 02, 2007 10:45 PM
To: David Miller
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
netdev@vger.kernel.org
Subject: Re: [RFC] TCP Illinois preliminary version

On Mon, 02 Apr 2007 20:39:37 -0700 (PDT) David Miller [EMAIL PROTECTED]
wrote:

 From: Stephen Hemminger [EMAIL PROTECTED]
 Date: Mon, 2 Apr 2007 20:15:25 -0700
 
  Preliminary version if TCP Illinois for 2.6.22.
  It needs more testing and refinement but it captures the basic 
  concepts.
 
 No objections from me and I don't see any obvious problems.
 
 Would you like me to stuff this into net-2.6.22 now so that it can get 
 some more exposure and people banging on it or would you like me to 
 wait a bit?
 
 Thanks.

I would like one of the originators to check the math. 

In case you are worried, I received assurance from Shao Liu that they
decided not to pursue patent and doing a Linux version was okay.

-
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.20.4: NETDEV WATCHDOG and lockups

2007-04-03 Thread Francois Romieu
Christian Kujau [EMAIL PROTECTED] :
 On Tue, 3 Apr 2007, Jarek Poplawski wrote:
 Did you try with 8139cp instead of 8139too?
 
 Tried that, 8139cp could not be loaded :(

It is a different beast.

-- 
Ueimor
-
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.20.4: NETDEV WATCHDOG and lockups

2007-04-03 Thread Francois Romieu
Christian Kujau [EMAIL PROTECTED] :
[...]
 Please see http://nerdbynature.de/bits/2.6.20.4/ for details for both 
 hosts and feel free to ask for more details. Although both boxes are in 
 production we'll be happy test more bootoptions/patches and the like.

If the apic voodoo makes no difference, you can:
1 - leave it enabled
2 - check that netconsole is not used with the 8139 (it is busted)
3 - check that netconsole is not used at all
4 - try:
http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21-rc5/r8169-20070402

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


r8169 doesn't work

2007-04-03 Thread OGAWA Hirofumi
Hi,

I have a r8169 problem, it seems RX doesn't work. To work r8169 for me
I'm needing to revert the following three commits now, but I don't
know why.

9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2
12d86f682e8acad8555718dc7b0082590f2365d0
cc9f022d97d08e4e36d38661857991fe91447d68

Any idea?


02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit 
Ethernet (rev 10)
Subsystem: Micro-Star International Co., Ltd. Unknown device 210c
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- 
TAbort- MAbort- SERR- PERR-
Latency: 64 (8000ns min, 16000ns max), Cache Line Size: 128 bytes
Interrupt: pin A routed to IRQ 20
Region 0: I/O ports at c800 [size=256]
Region 1: Memory at ff8ffc00 (32-bit, non-prefetchable) [size=256]
Expansion ROM at 6000 [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA 
PME(D0-,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: ec 10 69 81 17 00 b0 02 10 00 00 02 20 40 00 00
10: 01 c8 00 00 00 fc 8f ff 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 62 14 0c 21
30: 00 00 8c ff dc 00 00 00 00 00 00 00 05 01 20 40
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 c2 f7
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-- 
OGAWA Hirofumi [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] TCP Illinois congestion control

2007-04-03 Thread Julian Shao Liu
Hi Stephen,

Thanks for the implementation. I have checked the codes, and I have the
following comments:

1, The math is basically correct in computing alpha and beta from da.

2, In the computation of da, you implicitly set d1=0. Setting d1=0 is a
conservative approach, although it also works well (it may lead to a longer
convergence time than a positive d1). The reason is that, even if far from
congestion, there are some burstiness in RTT measurements, and we get
dad_min. This way, we have an alphaalpha_max even if congestion is far
away. We choose d1 to be close to 0 in our simulations for conservativeness,
but we believe even if d1 is non-trivial positive, like 0.05*dm, it should
work, and it might work better.

3, There is one more feature in TCP-Illinois: to avoid setting alpha to be
alpha_max if actually the congestion level is high and the small queueing
delay is due to noise. We have explained that in our updated version of the
paper, available at 
http://www.ews.uiuc.edu/~shaoliu/papersandslides/liubassri06perf.pdf
We have also implemented this feature in our ns-2 code. The basic idea of
this feature is that, once da exceeds d1 and alphaalpha_max, we know that
congestion level is not very low. Once this happen, the congestion level
should not drop unless some user has experienced a packet loss and backed
off its window size. If that is the case, da should drop to below d1 for a
long time. If, however, da drops to below d1 suddenly, but increases back to
above d1 soon, we predict that congestion is not alleviated, and the small
da measurement comes from noise. Under this case, we should not set
alpha=alpha_max, but should set it to be its previous legitimate value.

We believe that this feature is important if there is noise in delay
measurement and if d1 is set to be nonzero. Even if d1 is set to be zero, we
think this feature should be included if the noise is delay measurement is
significant. Under this case, we can modify the feature a little bit: alpha
is initially computed to be around alpha_max when congestion is far. As da
increases, alpha decreases. But alpha cannot be increased as soon as da
drops. Alpha can only be increased if the decrease trend of da last for a
certain period.

4, In your implementation, you set alpha_max=10 and alpha_min=0.1. Although
this parameter setting is chosen by our paper, we suggest you try some
different values, especially for alpha_min. An alpha_min from 0.2 to 0.5
might be a better choice, as this will make the convergence time faster.

Please feel free to tell me if you have any related questions.

Thanks!

Best regards!
 
Yours sincerely,
Shao Liu (Julian)
 
University of Illinois at Urbana Champaign
Coordinated Science Laboratory and Department of Electrical and Computer
Engineering
www.ews.uiuc.edu/~shaoliu

-Original Message-
From: Stephen Hemminger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 11:17 AM
To: David Miller
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
netdev@vger.kernel.org
Subject: [PATCH] TCP Illinois congestion control

This is a new implementation of TCP Illinois invented by Shao Liu at
University of Illinois. It is a another variant of Reno which adapts the
alpha and beta parameters based on RTT. The basic idea is to increase window
less rapidly as delay approaches the maximum. See the papers and talks to
get a more complete description.

Please consider for 2.6.22.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/ipv4/Kconfig|   13 +++
 net/ipv4/Makefile   |1 +
 net/ipv4/tcp_illinois.c |  212
+++
 3 files changed, 226 insertions(+), 0 deletions(-)  create mode 100644
net/ipv4/tcp_illinois.c

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index dc61e66..e62aee0
100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -588,6 +588,19 @@ config TCP_CONG_YEAH
For further details look here:
  http://wil.cs.caltech.edu/pfldnet2007/paper/YeAH_TCP.pdf
 
+config TCP_CONG_ILLINOIS
+   tristate TCP Illinois
+   depends on EXPERIMENTAL
+   default n
+   ---help---
+   TCP-Illinois is a sender-side modificatio of TCP Reno for
+   high speed long delay links. It uses round-trip-time to
+   adjust the alpha and beta parameters to achieve a higher average
+   throughput and maintain fairness.
+
+   For further details see:
+ http://www.ews.uiuc.edu/~shaoliu/tcpillinois/index.html
+
 choice
prompt Default TCP congestion control
default DEFAULT_CUBIC
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index eeb94d5..4ff6c15
100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o
 obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
 obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
 obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
+obj-$(CONFIG_TCP_CONG_ILLINOIS) += 

[PATCH] fix MCA when shutting down tulip quad-NIC

2007-04-03 Thread Olaf Hering
From: [EMAIL PROTECTED]

 https://bugzilla.novell.com/show_bug.cgi?id=SUSE39204

Shutting down the network causes an MCA because of an IO TLB error when
a DEC quad 10/100 card is in any slot.  This problem was originally seen
on an HP rx4640.


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

---

Andrew: Why is it tp-pdev instead of pdev?

 drivers/net/tulip/tulip_core.c |1 +
 1 file changed, 1 insertion(+)

Index: b/drivers/net/tulip/tulip_core.c
===
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1798,6 +1798,7 @@ static void __devexit tulip_remove_one (
return;
 
tp = netdev_priv(dev);
+   pci_disable_device(tp-pdev);
unregister_netdev(dev);
pci_free_consistent (pdev,
 sizeof (struct tulip_rx_desc) * RX_RING_SIZE +
-
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: r8169 doesn't work

2007-04-03 Thread Francois Romieu
OGAWA Hirofumi [EMAIL PROTECTED] :
[...]
 I have a r8169 problem, it seems RX doesn't work. To work r8169 for me
 I'm needing to revert the following three commits now, but I don't
 know why.
 
 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2
 12d86f682e8acad8555718dc7b0082590f2365d0
 cc9f022d97d08e4e36d38661857991fe91447d68

(oh, the horror...)

 Any idea?

Figuring the last known working kernel version and the first broken one
could help (which hardware ? x86_64 + SMP ?) but I'd appreciate if you
try beforehand the patches at:
http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21-rc5/r8169-20070402

-- 
Ueimor
-
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/9] AF_RXRPC: Add blkcipher accessors for using kernel data directly

2007-04-03 Thread Herbert Xu
On Tue, Apr 03, 2007 at 02:52:53PM +0100, David Howells wrote:
 
 Note that it does paste stack space into sg-list elements, which I think
 should be okay, and it asks the compiler to get it appropriately aligned bits
 of stack.

That'll do for now.

Thanks!
-- 
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: r8169 doesn't work

2007-04-03 Thread OGAWA Hirofumi
Francois Romieu [EMAIL PROTECTED] writes:

 OGAWA Hirofumi [EMAIL PROTECTED] :
 [...]
 I have a r8169 problem, it seems RX doesn't work. To work r8169 for me
 I'm needing to revert the following three commits now, but I don't
 know why.
 
 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2
 12d86f682e8acad8555718dc7b0082590f2365d0
 cc9f022d97d08e4e36d38661857991fe91447d68

 (oh, the horror...)

 Any idea?

 Figuring the last known working kernel version and the first broken one
 could help (which hardware ? x86_64 + SMP ?)

IIRC, First broken one was 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2.
To make sure, I'll confirm tomorrow.

 but I'd appreciate if you try beforehand the patches at:
 http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21-rc5/r8169-20070402

Oh, thanks. I'll try.
-- 
OGAWA Hirofumi [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 linux1394-2.6.git 07/15] ieee1394: eth1394: make MTU configurable

2007-04-03 Thread Stefan Richter
On  2 Apr, I wrote:
 +static int eth1394_data_len = 1500;
 +module_param_named(mtu, eth1394_data_len, int, S_IRUGO | S_IWUSR);
 +MODULE_PARM_DESC(mtu, MTU (default = 1500));

Can be solved without a new module load parameter.


From: Stefan Richter [EMAIL PROTECTED]
Subject: ieee1394: eth1394: allow MTU bigger than 1500

RFC 2734 says: IP-capable nodes may operate with an MTU size larger
than the default [1500 octets], but the means by which a larger MTU is
configured are beyond the scope of this document.

Allow users to set an MTU bigger than 1500.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
---
Replaces patch ieee1394: eth1394: make MTU configurable

 drivers/ieee1394/eth1394.c |   34 +++---
 1 file changed, 19 insertions(+), 15 deletions(-)

Index: linux/drivers/ieee1394/eth1394.c
===
--- linux.orig/drivers/ieee1394/eth1394.c
+++ linux/drivers/ieee1394/eth1394.c
@@ -136,9 +136,6 @@ static const int hdr_type_len[] = {
sizeof(struct eth1394_sf_hdr)
 };
 
-/* For now, this needs to be 1500, so that XP works with us */
-#define ETH1394_DATA_LEN   ETH_DATA_LEN
-
 static const u16 eth1394_speedto_maxpayload[] = {
 /* S100, S200, S400, S800, S1600, S3200 */
512, 1024, 2048, 4096,  4096,  4096
@@ -262,17 +259,27 @@ static void ether1394_tx_timeout(struct 
ether1394_host_reset(host);
 }
 
+static inline int ether1394_max_mtu(struct hpsb_host* host)
+{
+   return (1  (host-csr.max_rec + 1))
+   - sizeof(union eth1394_hdr) - ETHER1394_GASP_OVERHEAD;
+}
+
 static int ether1394_change_mtu(struct net_device *dev, int new_mtu)
 {
-   int max_rec =
-   ((struct eth1394_priv *)netdev_priv(dev))-host-csr.max_rec;
+   int max_mtu;
 
-   if (new_mtu  68 ||
-   new_mtu  ETH1394_DATA_LEN ||
-   new_mtu  (1  (max_rec + 1)) - sizeof(union eth1394_hdr) -
- ETHER1394_GASP_OVERHEAD)
+   if (new_mtu  68)
return -EINVAL;
 
+   max_mtu = ether1394_max_mtu(
+   ((struct eth1394_priv *)netdev_priv(dev))-host);
+   if (new_mtu  max_mtu) {
+   ETH1394_PRINT(KERN_INFO, dev-name,
+ Local node constrains MTU to %d\n, max_mtu);
+   return -ERANGE;
+   }
+
dev-mtu = new_mtu;
return 0;
 }
@@ -476,13 +483,10 @@ static void ether1394_reset_priv(struct 
max_speed = host-speed[i];
priv-bc_sspd = max_speed;
 
-   /* We'll use our maximum payload as the default MTU */
if (set_mtu) {
-   int max_payload = 1  (host-csr.max_rec + 1);
-
-   dev-mtu = min(ETH1394_DATA_LEN,
-  (int)(max_payload - sizeof(union eth1394_hdr) -
-ETHER1394_GASP_OVERHEAD));
+   /* Use the RFC 2734 default 1500 octets or the maximum payload
+* as initial MTU */
+   dev-mtu = min(1500, ether1394_max_mtu(host));
 
/* Set our hardware address while we're at it */
memcpy(dev-dev_addr, guid, sizeof(u64));

-- 
Stefan Richter
-=-=-=== -=-- ---==
http://arcgraph.de/sr/

-
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: r8169 doesn't work

2007-04-03 Thread Francois Romieu
OGAWA Hirofumi [EMAIL PROTECTED] :
[...]
 IIRC, First broken one was 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2.
 To make sure, I'll confirm tomorrow.

If your kernel includes 9cb427b6ff0b3e235c518acf5c1fcbbfc95f0ae2 but misses
81f4e6c190a0fa016fd7eecaf76a5f95d121afc2, you can consider it a known
behavior.

[...]
 Oh, thanks. I'll try.

Excellent.

-- 
Ueimor
-
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] zd1211rw-mac80211: Remove invalid CR write during ZD1211 phy reset

2007-04-03 Thread Daniel Drake
The vendor driver only does the CR123 write for non-USB devices (which
don't exist on the consumer market)

Signed-off-by: Daniel Drake [EMAIL PROTECTED]
---
 drivers/net/wireless/mac80211/zd1211rw/zd_chip.c |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c 
b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
index 05624b3..53bbd34 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
@@ -684,17 +684,17 @@ static int zd1211_hw_reset_phy(struct zd_chip *chip)
{ CR111, 0x27 }, { CR112, 0x27 }, { CR113, 0x27 },
{ CR114, 0x27 }, { CR115, 0x26 }, { CR116, 0x24 },
{ CR117, 0xfc }, { CR118, 0xfa }, { CR120, 0x4f },
-   { CR123, 0x27 }, { CR125, 0xaa }, { CR127, 0x03 },
-   { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 },
-   { CR131, 0x0C }, { CR136, 0xdf }, { CR137, 0x40 },
-   { CR138, 0xa0 }, { CR139, 0xb0 }, { CR140, 0x99 },
-   { CR141, 0x82 }, { CR142, 0x54 }, { CR143, 0x1c },
-   { CR144, 0x6c }, { CR147, 0x07 }, { CR148, 0x4c },
-   { CR149, 0x50 }, { CR150, 0x0e }, { CR151, 0x18 },
-   { CR160, 0xfe }, { CR161, 0xee }, { CR162, 0xaa },
-   { CR163, 0xfa }, { CR164, 0xfa }, { CR165, 0xea },
-   { CR166, 0xbe }, { CR167, 0xbe }, { CR168, 0x6a },
-   { CR169, 0xba }, { CR170, 0xba }, { CR171, 0xba },
+   { CR125, 0xaa }, { CR127, 0x03 }, { CR128, 0x14 },
+   { CR129, 0x12 }, { CR130, 0x10 }, { CR131, 0x0C },
+   { CR136, 0xdf }, { CR137, 0x40 }, { CR138, 0xa0 },
+   { CR139, 0xb0 }, { CR140, 0x99 }, { CR141, 0x82 },
+   { CR142, 0x54 }, { CR143, 0x1c }, { CR144, 0x6c },
+   { CR147, 0x07 }, { CR148, 0x4c }, { CR149, 0x50 },
+   { CR150, 0x0e }, { CR151, 0x18 }, { CR160, 0xfe },
+   { CR161, 0xee }, { CR162, 0xaa }, { CR163, 0xfa },
+   { CR164, 0xfa }, { CR165, 0xea }, { CR166, 0xbe },
+   { CR167, 0xbe }, { CR168, 0x6a }, { CR169, 0xba },
+   { CR170, 0xba }, { CR171, 0xba },
/* Note: CR204 must lead the CR203 */
{ CR204, 0x7d },
{ },
-- 
1.5.0.6

-
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] zd1211rw-mac80211: Fix E2P_PHY_REG patching

2007-04-03 Thread Daniel Drake
Due to conflicting/confusing defines in the vendor driver, we were
reading E2P_PHY_REG from the wrong location.

CR157 patching was slightly incorrect in that the vendor driver only
patches in an 8-bit value, whereas we were patching 24 bits.

Additionally, CR157 patching was happening on both zd1211 and zd1211b,
but this should only happen on zd1211.

Signed-off-by: Daniel Drake [EMAIL PROTECTED]
Signed-off-by: Ulrich Kunitz [EMAIL PROTECTED]
---
 drivers/net/wireless/mac80211/zd1211rw/zd_chip.c |   11 +++
 drivers/net/wireless/mac80211/zd1211rw/zd_chip.h |2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c 
b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
index 53bbd34..3b1cd65 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.c
@@ -593,16 +593,16 @@ int zd_chip_unlock_phy_regs(struct zd_chip *chip)
return r;
 }
 
-/* CR157 can be optionally patched by the EEPROM */
+/* CR157 can be optionally patched by the EEPROM for original ZD1211 */
 static int patch_cr157(struct zd_chip *chip)
 {
int r;
-   u32 value;
+   u16 value;
 
if (!chip-patch_cr157)
return 0;
 
-   r = zd_ioread32_locked(chip, value, E2P_PHY_REG);
+   r = zd_ioread16_locked(chip, value, E2P_PHY_REG);
if (r)
return r;
 
@@ -792,11 +792,6 @@ static int zd1211b_hw_reset_phy(struct zd_chip *chip)
goto out;
 
r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
-   if (r)
-   goto unlock;
-
-   r = patch_cr157(chip);
-unlock:
t = zd_chip_unlock_phy_regs(chip);
if (t  !r)
r = t;
diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.h 
b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.h
index 446fe9f..0a8f0e5 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_chip.h
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_chip.h
@@ -636,8 +636,8 @@ enum {
  * also only 11 channels. */
 #define E2P_ALLOWED_CHANNELE2P_DATA(0x18)
 
-#define E2P_PHY_REGE2P_DATA(0x1a)
 #define E2P_DEVICE_VER E2P_DATA(0x20)
+#define E2P_PHY_REGE2P_DATA(0x25)
 #define E2P_36M_CAL_VALUE1 E2P_DATA(0x28)
 #define E2P_36M_CAL_VALUE2  E2P_DATA(0x2a)
 #define E2P_36M_CAL_VALUE3  E2P_DATA(0x2c)
-- 
1.5.0.6

-
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] zd1211rw: Remove invalid CR write during ZD1211 phy reset

2007-04-03 Thread Daniel Drake
The vendor driver only does the CR123 write for non-USB devices (which
don't exist on the consumer market)

Signed-off-by: Daniel Drake [EMAIL PROTECTED]
---
 zd_chip.c |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

Index: linux/drivers/net/wireless/zd1211rw/zd_chip.c
===
--- linux.orig/drivers/net/wireless/zd1211rw/zd_chip.c
+++ linux/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -684,17 +684,17 @@ static int zd1211_hw_reset_phy(struct zd
{ CR111, 0x27 }, { CR112, 0x27 }, { CR113, 0x27 },
{ CR114, 0x27 }, { CR115, 0x26 }, { CR116, 0x24 },
{ CR117, 0xfc }, { CR118, 0xfa }, { CR120, 0x4f },
-   { CR123, 0x27 }, { CR125, 0xaa }, { CR127, 0x03 },
-   { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 },
-   { CR131, 0x0C }, { CR136, 0xdf }, { CR137, 0x40 },
-   { CR138, 0xa0 }, { CR139, 0xb0 }, { CR140, 0x99 },
-   { CR141, 0x82 }, { CR142, 0x54 }, { CR143, 0x1c },
-   { CR144, 0x6c }, { CR147, 0x07 }, { CR148, 0x4c },
-   { CR149, 0x50 }, { CR150, 0x0e }, { CR151, 0x18 },
-   { CR160, 0xfe }, { CR161, 0xee }, { CR162, 0xaa },
-   { CR163, 0xfa }, { CR164, 0xfa }, { CR165, 0xea },
-   { CR166, 0xbe }, { CR167, 0xbe }, { CR168, 0x6a },
-   { CR169, 0xba }, { CR170, 0xba }, { CR171, 0xba },
+   { CR125, 0xaa }, { CR127, 0x03 }, { CR128, 0x14 },
+   { CR129, 0x12 }, { CR130, 0x10 }, { CR131, 0x0C },
+   { CR136, 0xdf }, { CR137, 0x40 }, { CR138, 0xa0 },
+   { CR139, 0xb0 }, { CR140, 0x99 }, { CR141, 0x82 },
+   { CR142, 0x54 }, { CR143, 0x1c }, { CR144, 0x6c },
+   { CR147, 0x07 }, { CR148, 0x4c }, { CR149, 0x50 },
+   { CR150, 0x0e }, { CR151, 0x18 }, { CR160, 0xfe },
+   { CR161, 0xee }, { CR162, 0xaa }, { CR163, 0xfa },
+   { CR164, 0xfa }, { CR165, 0xea }, { CR166, 0xbe },
+   { CR167, 0xbe }, { CR168, 0x6a }, { CR169, 0xba },
+   { CR170, 0xba }, { CR171, 0xba },
/* Note: CR204 must lead the CR203 */
{ CR204, 0x7d },
{ },
-
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] zd1211rw: Fix E2P_PHY_REG patching

2007-04-03 Thread Daniel Drake
Due to conflicting/confusing defines in the vendor driver, we were
reading E2P_PHY_REG from the wrong location.

CR157 patching was slightly incorrect in that the vendor driver only
patches in an 8-bit value, whereas we were patching 24 bits.

Additionally, CR157 patching was happening on both zd1211 and zd1211b,
but this should only happen on zd1211.

Signed-off-by: Daniel Drake [EMAIL PROTECTED]
Signed-off-by: Ulrich Kunitz [EMAIL PROTECTED]
---
 zd_chip.c |   11 +++
 zd_chip.h |2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)

Index: linux/drivers/net/wireless/zd1211rw/zd_chip.c
===
--- linux.orig/drivers/net/wireless/zd1211rw/zd_chip.c
+++ linux/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -593,16 +593,16 @@ int zd_chip_unlock_phy_regs(struct zd_ch
return r;
 }
 
-/* CR157 can be optionally patched by the EEPROM */
+/* CR157 can be optionally patched by the EEPROM for original ZD1211 */
 static int patch_cr157(struct zd_chip *chip)
 {
int r;
-   u32 value;
+   u16 value;
 
if (!chip-patch_cr157)
return 0;
 
-   r = zd_ioread32_locked(chip, value, E2P_PHY_REG);
+   r = zd_ioread16_locked(chip, value, E2P_PHY_REG);
if (r)
return r;
 
@@ -792,11 +792,6 @@ static int zd1211b_hw_reset_phy(struct z
goto out;
 
r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
-   if (r)
-   goto unlock;
-
-   r = patch_cr157(chip);
-unlock:
t = zd_chip_unlock_phy_regs(chip);
if (t  !r)
r = t;
Index: linux/drivers/net/wireless/zd1211rw/zd_chip.h
===
--- linux.orig/drivers/net/wireless/zd1211rw/zd_chip.h
+++ linux/drivers/net/wireless/zd1211rw/zd_chip.h
@@ -641,8 +641,8 @@ enum {
  * also only 11 channels. */
 #define E2P_ALLOWED_CHANNELE2P_DATA(0x18)
 
-#define E2P_PHY_REGE2P_DATA(0x1a)
 #define E2P_DEVICE_VER E2P_DATA(0x20)
+#define E2P_PHY_REGE2P_DATA(0x25)
 #define E2P_36M_CAL_VALUE1 E2P_DATA(0x28)
 #define E2P_36M_CAL_VALUE2  E2P_DATA(0x2a)
 #define E2P_36M_CAL_VALUE3  E2P_DATA(0x2c)
-
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


one more... iproute commands lockup whole system

2007-04-03 Thread Denys
I'm not sure it is mistake or error, but i feel it is dangerous, cause 
commands locking up the system, no kernel panic, no oops, so only watchdog 
can save poor server (and not sure this even)

Commands to lockup system (just i am giving my example, i didnt sort out what 
exactly locked up system, i guess redirecting to eth0.5, which is not 
intended for that):

vconfig add eth0 5
ifconfig eth0.5 192.168.1.2 netmask 255.255.255.128

tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent : protocol ip prio 6 u32 \
match ip src 195.69.208.252/32 flowid 1:16 \
action police rate 64kbit burst 90k pipe \
action mirred egress mirror dev eth0.5

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.

-
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: one more... iproute commands lockup whole system

2007-04-03 Thread jamal


On Wed, 2007-04-04 at 03:03 +0300, Denys wrote:
 I'm not sure it is mistake or error, but i feel it is dangerous, cause 
 commands locking up the system, no kernel panic, no oops, so only watchdog 
 can save poor server (and not sure this even)
 
 Commands to lockup system (just i am giving my example, i didnt sort out what 
 exactly locked up system, i guess redirecting to eth0.5, which is not 
 intended for that):
 

read:
doc/actions/mirred-usage

cheers,
jamal


 vconfig add eth0 5
 ifconfig eth0.5 192.168.1.2 netmask 255.255.255.128
 
 tc qdisc add dev eth0 ingress
 tc filter add dev eth0 parent : protocol ip prio 6 u32 \
 match ip src 195.69.208.252/32 flowid 1:16 \
 action police rate 64kbit burst 90k pipe \
 action mirred egress mirror dev eth0.5
 
 --
 Denys Fedoryshchenko
 Technical Manager
 Virtual ISP S.A.L.
 
 -
 To unsubscribe from this list: send the line unsubscribe netdev in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

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


Re: one more... iproute commands lockup whole system

2007-04-03 Thread Patrick McHardy
jamal wrote:
 On Wed, 2007-04-04 at 03:03 +0300, Denys wrote:
 
I'm not sure it is mistake or error, but i feel it is dangerous, cause 
commands locking up the system, no kernel panic, no oops, so only watchdog 
can save poor server (and not sure this even)

Commands to lockup system (just i am giving my example, i didnt sort out what 
exactly locked up system, i guess redirecting to eth0.5, which is not 
intended for that):
 
 
 read:
 doc/actions/mirred-usage


Are you refering to What NOT to do if you dont want your machine to
crash:? I think we should make sure users can't even accidentally
crash their box, so this should at least be caught at runtime.
I thought the TTL stuff was intended to avoid this ..

-
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


[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY

2007-04-03 Thread Herbert Xu
Hi:

Here's the other patch.

[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY

When a transmitted packet is looped back directly, CHECKSUM_PARTIAL
maps to the semantics of CHECKSUM_UNNECESSARY.  Therefore we should
treat it as such in the stack.

Signed-off-by: Herbert Xu [EMAIL PROTECTED]

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/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -33,10 +33,11 @@
 #define HAVE_ALLOC_SKB /* For the drivers to know */
 #define HAVE_ALIGNABLE_SKB /* Ditto 8)*/
 
+/* Don't change this without changing skb_csum_unnecessary! */
 #define CHECKSUM_NONE 0
-#define CHECKSUM_PARTIAL 1
-#define CHECKSUM_UNNECESSARY 2
-#define CHECKSUM_COMPLETE 3
+#define CHECKSUM_UNNECESSARY 1
+#define CHECKSUM_COMPLETE 2
+#define CHECKSUM_PARTIAL 3
 
 #define SKB_DATA_ALIGN(X)  (((X) + (SMP_CACHE_BYTES - 1))  \
 ~(SMP_CACHE_BYTES - 1))
@@ -1550,6 +1551,11 @@ static inline void __net_timestamp(struc
 extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len);
 extern __sum16 __skb_checksum_complete(struct sk_buff *skb);
 
+static inline int skb_csum_unnecessary(const struct sk_buff *skb)
+{
+   return skb-ip_summed  CHECKSUM_UNNECESSARY;
+}
+
 /**
  * skb_checksum_complete - Calculate checksum of an entire packet
  * @skb: packet to process
@@ -1568,8 +1574,8 @@ extern __sum16 __skb_checksum_complete(s
  */
 static inline unsigned int skb_checksum_complete(struct sk_buff *skb)
 {
-   return skb-ip_summed != CHECKSUM_UNNECESSARY 
-   __skb_checksum_complete(skb);
+   return skb_csum_unnecessary(skb) ?
+  0 : __skb_checksum_complete(skb);
 }
 
 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
diff --git a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -818,7 +818,7 @@ static inline __sum16 __tcp_checksum_com
 
 static inline int tcp_checksum_complete(struct sk_buff *skb)
 {
-   return skb-ip_summed != CHECKSUM_UNNECESSARY 
+   return !skb_csum_unnecessary(skb) 
__tcp_checksum_complete(skb);
 }
 
diff --git a/include/net/udp.h b/include/net/udp.h
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -77,7 +77,7 @@ static inline __sum16 __udp_lib_checksum
 
 static inline int udp_lib_checksum_complete(struct sk_buff *skb)
 {
-   return skb-ip_summed != CHECKSUM_UNNECESSARY 
+   return !skb_csum_unnecessary(skb) 
__udp_lib_checksum_complete(skb);
 }
 
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -86,7 +86,7 @@ static __sum16 checksum_udp(struct sk_bu
 {
__wsum psum;
 
-   if (uh-check == 0 || skb-ip_summed == CHECKSUM_UNNECESSARY)
+   if (uh-check == 0 || skb_csum_unnecessary(skb))
return 0;
 
psum = csum_tcpudp_nofold(saddr, daddr, ulen, IPPROTO_UDP, 0);
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -681,8 +681,7 @@ static int ip_vs_out_icmp(struct sk_buff
}
 
/* Ensure the checksum is correct */
-   if (skb-ip_summed != CHECKSUM_UNNECESSARY 
-   ip_vs_checksum_complete(skb, ihl)) {
+   if (!skb_csum_unnecessary(skb)  ip_vs_checksum_complete(skb, ihl)) {
/* Failed checksum! */
IP_VS_DBG(1, Forward ICMP: failed checksum from 
%d.%d.%d.%d!\n,
  NIPQUAD(iph-saddr));
@@ -921,8 +920,7 @@ ip_vs_in_icmp(struct sk_buff **pskb, int
verdict = NF_DROP;
 
/* Ensure the checksum is correct */
-   if (skb-ip_summed != CHECKSUM_UNNECESSARY 
-   ip_vs_checksum_complete(skb, ihl)) {
+   if (!skb_csum_unnecessary(skb)  ip_vs_checksum_complete(skb, ihl)) {
/* Failed checksum! */
IP_VS_DBG(1, Incoming ICMP: failed checksum from 
%d.%d.%d.%d!\n,
  NIPQUAD(iph-saddr));
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4185,7 +4185,7 @@ static int tcp_copy_to_iovec(struct sock
int err;
 
local_bh_enable();
-   if (skb-ip_summed==CHECKSUM_UNNECESSARY)
+   if (skb_csum_unnecessary(skb))
err = skb_copy_datagram_iovec(skb, hlen, tp-ucopy.iov, chunk);
else
err = skb_copy_and_csum_datagram_iovec(skb, hlen,
@@ -4217,7 +4217,7 @@ static __sum16 __tcp_checksum_complete_u
 
 static inline int tcp_checksum_complete_user(struct sock *sk, struct sk_buff 
*skb)
 {
-   return skb-ip_summed != CHECKSUM_UNNECESSARY 
+   return !skb_csum_unnecessary(skb) 

Re: one more... iproute commands lockup whole system

2007-04-03 Thread jamal
On Wed, 2007-04-04 at 03:39 +0200, Patrick McHardy wrote:

 Are you refering to What NOT to do if you dont want your machine to
 crash:? 

yes.

 I think we should make sure users can't even accidentally
 crash their box, so this should at least be caught at runtime.

It is hard to do without penalizing the common use. Hence
the documentation. 
Sometimes - that is the most sane thing to do. 

I thought the TTL stuff was intended to avoid this ..

The problem is recursive dev queue locking of the same device.  
TTL is not very helpful there.

I dont want to rehash all those discussions we already had; so if you
have a clever way to fix this (without affecting performance of a sane
user), please send a patch and lets discuss.

cheers,
jamal

-
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: one more... iproute commands lockup whole system

2007-04-03 Thread Denys
I think this highly useful feature given by jamal, difficult to be avoided 
from crash, if user not enough experienced in networking(like me). I guess 
packet can be even not ipv4/ipv6 packet, maybe it can be cloned IPX or ARP, 
so TTL field cannot be used. I checked maybe sk_buff have some fields, seems 
also bad luck, if there can be something like internal counter for packet, 
how much times it got redirected, it will help. But in my case of VLAN's it 
is really my own mistake and difficult to avoid it. Only bad thing - machine 
got completely locked up, and if it is remote system - it will not oops/or 
reboot even. But i dont have any idea in mind how to avoid this, only than 
big warning in DOC and internal iproute2 help :-)

On Wed, 04 Apr 2007 03:39:12 +0200, Patrick McHardy wrote
 jamal wrote:
  On Wed, 2007-04-04 at 03:03 +0300, Denys wrote:
  
 I'm not sure it is mistake or error, but i feel it is dangerous, cause 
 commands locking up the system, no kernel panic, no oops, so only 
watchdog 
 can save poor server (and not sure this even)
 
 Commands to lockup system (just i am giving my example, i didnt sort out 
what 
 exactly locked up system, i guess redirecting to eth0.5, which is not 
 intended for that):
  
  
  read:
  doc/actions/mirred-usage
 
 Are you refering to What NOT to do if you dont want your machine to
 crash:? I think we should make sure users can't even accidentally
 crash their box, so this should at least be caught at runtime.
 I thought the TTL stuff was intended to avoid this ..
 
 -
 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


--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.

-
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] netpoll: trapping fix/cleanup

2007-04-03 Thread Jeff Garzik

Sergei Shtylyov wrote:

CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in
the netpoll's trapped mode which easily causes overflows in the drivers with
short TX queues (most notably, in 8139too with its 4-deep queue).
Make this option more sensible by only bypassing TX softirq wakeup and remove
CONFIG_NETPOLL_RX option completely since there is *no* code depending on it.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]


ACK but (a) DaveM not me should apply this, and (b) I would check with 
netpoll people to see what that define is there for.


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 2.6.21-rc5] b44: fix IFF_ALLMULTI handling of CAM slots

2007-04-03 Thread Jeff Garzik

Bill Helfinstine wrote:

If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than
B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast
messages.  This is because the __b44_set_mac_addr call sets the zeroth CAM
entry to the MAC address of the device, and then the loop at line 1722
proceeds to overwrite it unless the value of i is set by the __b44_load_mcast
call.  However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set
to zero.  


Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC
address.

Signed-off-by: Bill Helfinstine [EMAIL PROTECTED]


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 1/2] r8169: issue request_irq after the private data are completely initialized

2007-04-03 Thread Jeff Garzik

Francois Romieu wrote:

The irq handler schedules a NAPI poll request unconditionally as soon as
the status register is not clean. It has been there - and wrong - for
ages but a recent timing change made it apparently easier to trigger.

Signed-off-by: Francois Romieu [EMAIL PROTECTED]
Cc: Jay Cliburn [EMAIL PROTECTED]
---
 drivers/net/r8169.c |   33 ++---
 1 files changed, 18 insertions(+), 15 deletions(-)


applied 1-2


-
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] add NAPI support to sb1250-mac.c (take 2)

2007-04-03 Thread Jeff Garzik

Mark Mason wrote:

Patch to add NAPI support to sb1250-mac.c (rev 2).  This patch differs from
the last in that the NAPI support isn't marked as experimental, nor is it
configurable (ie. once applied - NAPI is enabled all the time).  This was
based on feedback from Ralf and others.

Signed-off-by: Mark Mason [EMAIL PROTECTED]

---
 drivers/net/sb1250-mac.c |  278 ++
 1 files changed, 182 insertions(+), 96 deletions(-)


seems OK but doesn't apply

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


Re: [-mm patch] make drivers/net/qla3xxx.c:PHY_DEVICES[] static

2007-04-03 Thread Jeff Garzik

Adrian Bunk wrote:

On Fri, Mar 30, 2007 at 01:05:59AM -0700, Andrew Morton wrote:

...
Changes since 2.6.21-rc5-mm2:
...
 git-netdev-all.patch
...
 git trees
...



This patch makes the needlessly global PHY_DEVICES[] static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

BTW: Why is the name uppercase?


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


[git patches] net driver fixes

2007-04-03 Thread Jeff Garzik

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

to receive the following updates:

 drivers/net/b44.c |2 +-
 drivers/net/cxgb3/common.h|9 +--
 drivers/net/cxgb3/cxgb3_main.c|   35 +++-
 drivers/net/cxgb3/cxgb3_offload.c |4 ++-
 drivers/net/cxgb3/mc5.c   |3 ++
 drivers/net/cxgb3/regs.h  |4 +++
 drivers/net/cxgb3/sge.c   |2 +-
 drivers/net/cxgb3/t3_hw.c |   24 ++-
 drivers/net/cxgb3/version.h   |5 +++-
 drivers/net/cxgb3/xgmac.c |1 -
 drivers/net/r8169.c   |   46 -
 11 files changed, 89 insertions(+), 46 deletions(-)

Bill Helfinstine (1):
  b44: fix IFF_ALLMULTI handling of CAM slots

Divy Le Ray (4):
  cxgb3 - Safeguard TCAM size usage
  cxgb3 - detect NIC only adapters
  cxgb3 - Tighten xgmac workaround
  cxgb3 - Firwmare update

Francois Romieu (2):
  r8169: issue request_irq after the private data are completely initialized
  r8169: fix suspend/resume for down interface

diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index aaada57..d742bfe 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1709,7 +1709,7 @@ static void __b44_set_rx_mode(struct net_device *dev)
bw32(bp, B44_RXCONFIG, val);
} else {
unsigned char zero[6] = {0, 0, 0, 0, 0, 0};
-   int i = 0;
+   int i = 1;
 
__b44_set_mac_addr(bp);
 
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 85e5543..97128d8 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -112,8 +112,7 @@ enum {
 };
 
 enum {
-   SUPPORTED_OFFLOAD = 1  24,
-   SUPPORTED_IRQ = 1  25
+   SUPPORTED_IRQ  = 1  24
 };
 
 enum { /* adapter interrupt-maintained statistics */
@@ -358,6 +357,9 @@ enum {
MC5_MODE_72_BIT = 2
 };
 
+/* MC5 min active region size */
+enum { MC5_MIN_TIDS = 16 };
+
 struct vpd_params {
unsigned int cclk;
unsigned int mclk;
@@ -402,6 +404,7 @@ struct adapter_params {
unsigned int stats_update_period;   /* MAC stats accumulation 
period */
unsigned int linkpoll_period;   /* link poll period in 0.1s */
unsigned int rev;   /* chip revision */
+   unsigned int offload;
 };
 
 enum { /* chip revisions */
@@ -602,7 +605,7 @@ static inline int is_10G(const struct adapter *adap)
 
 static inline int is_offload(const struct adapter *adap)
 {
-   return adapter_info(adap)-caps  SUPPORTED_OFFLOAD;
+   return adap-params.offload;
 }
 
 static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index d553836..26240fd 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -185,16 +185,26 @@ void t3_os_link_changed(struct adapter *adapter, int 
port_id, int link_stat,
int speed, int duplex, int pause)
 {
struct net_device *dev = adapter-port[port_id];
+   struct port_info *pi = netdev_priv(dev);
+   struct cmac *mac = pi-mac;
 
/* Skip changes from disabled ports. */
if (!netif_running(dev))
return;
 
if (link_stat != netif_carrier_ok(dev)) {
-   if (link_stat)
+   if (link_stat) {
+   t3_set_reg_field(adapter,
+A_XGM_TXFIFO_CFG + mac-offset,
+F_ENDROPPKT, 0);
netif_carrier_on(dev);
-   else
+   } else {
netif_carrier_off(dev);
+   t3_set_reg_field(adapter,
+A_XGM_TXFIFO_CFG + mac-offset,
+F_ENDROPPKT, F_ENDROPPKT);
+   }
+
link_report(dev);
}
 }
@@ -407,7 +417,7 @@ static void quiesce_rx(struct adapter *adap)
 static int setup_sge_qsets(struct adapter *adap)
 {
int i, j, err, irq_idx = 0, qset_idx = 0, dummy_dev_idx = 0;
-   unsigned int ntxq = is_offload(adap) ? SGE_TXQ_PER_SET : 1;
+   unsigned int ntxq = SGE_TXQ_PER_SET;
 
if (adap-params.rev  0  !(adap-flags  USING_MSI))
irq_idx = -1;
@@ -485,12 +495,14 @@ static ssize_t show_##name(struct device *d, struct 
device_attribute *attr, \
 static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
 {
struct adapter *adap = dev-priv;
+   int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0;
 
if (adap-flags  FULL_INIT_DONE)
return -EBUSY;
if (val  adap-params.rev == 0)
return -EINVAL;
-   if (val  

[PATCH] Replace with time_after in drivers/net/tokenring/3c359.c

2007-04-03 Thread Shani Moideen

Hi,

Replacing with time_after in drivers/net/tokenring/3c359.c
Applies and compiles clean on latest linus tree.

thanks.

Signed-off-by: Shani Moideen [EMAIL PROTECTED]


diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 7580bde..512cd4d 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -61,6 +61,7 @@
 #include linux/pci.h
 #include linux/spinlock.h
 #include linux/bitops.h
+#include linux/jiffies.h
 
 #include net/checksum.h
 
@@ -409,7 +410,7 @@ static int xl_hw_reset(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  40*HZ) {
+   if(time_after(jiffies, t + 40*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL  card not 
responding to global reset.\n, dev-name);
return -ENODEV;
}
@@ -520,7 +521,7 @@ static int xl_hw_reset(struct net_device *dev)
t=jiffies;
while ( !(readw(xl_mmio + MMIO_INTSTATUS_AUTO)  INTSTAT_SRB) ) { 
schedule(); 
-   if(jiffies-t  15*HZ) {
+   if(time_after(jiffies, t + 15*HZ)) {
printk(KERN_ERR 3COM 3C359 Velocity XL  card not 
responding.\n);
return -ENODEV; 
}
@@ -796,7 +797,7 @@ static int xl_open_hw(struct net_device *dev)
t=jiffies;
while (! (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_SRB)) { 
schedule(); 
-   if(jiffies-t  40*HZ) {
+   if(time_after(jiffies, t + 40*HZ)) {
printk(KERN_ERR 3COM 3C359 Velocity XL  card not 
responding.\n);
break ; 
}
@@ -1011,7 +1012,7 @@ static void xl_reset(struct net_device *dev)
 
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
-   if(jiffies-t  40*HZ) {
+   if(time_after(jiffies, t + 40*HZ)) {
printk(KERN_ERR 3COM 3C359 Velocity XL  card not 
responding.\n);
break ; 
}
@@ -1283,7 +1284,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies, t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-DNSTALL not 
responding.\n, dev-name);
break ; 
}
@@ -1292,7 +1293,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies, t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-DNDISABLE 
not responding.\n, dev-name);
break ;
}
@@ -1301,7 +1302,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies, t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-UPSTALL not 
responding.\n, dev-name);
break ; 
}
@@ -1318,7 +1319,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (!(readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_SRB)) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies, t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-CLOSENIC 
not responding.\n, dev-name);
break ; 
}
@@ -1347,7 +1348,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies,t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-UPRESET not 
responding.\n, dev-name);
break ; 
}
@@ -1356,7 +1357,7 @@ static int xl_close(struct net_device *dev)
t=jiffies;
while (readw(xl_mmio + MMIO_INTSTATUS)  INTSTAT_CMD_IN_PROGRESS) { 
schedule(); 
-   if(jiffies-t  10*HZ) {
+   if(time_after(jiffies, t + 10*HZ)) {
printk(KERN_ERR %s: 3COM 3C359 Velocity XL-DNRESET not 
responding.\n, dev-name);
break ; 
}

-- 
Shani Moideen
-
To unsubscribe from this list: send the 

Re: NIC data corruption

2007-04-03 Thread Herbert Xu
Andi Kleen [EMAIL PROTECTED] wrote:
 
 Just providing a general global disable hardware checksumming
 knob for the paranoid would be much easier. I guess that would
 be a good idea.

FWIW you can disable RX checksuming with

ethtool -K ifname rx off

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