Re: Network performance degradation from 2.6.11.12 to 2.6.16.20

2006-09-19 Thread Andi Kleen
On Monday 18 September 2006 23:22, David Miller wrote:

 Ok, ok, but don't we have queueing disciplines that need the timestamp
 even on ingress?

I grepped and I can't find any. The only non SIOCGTSTAMP users of the
time stamp seem to be sunrpc and conntrack and I bet both can be converted
over to jiffies without trouble.

-Andi
-
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] EtherIP tunnel driver (RFC 3378)

2006-09-19 Thread Joerg Roedel
On Mon, Sep 18, 2006 at 10:52:52PM +0200, Lennert Buytenhek wrote:

 Check out the thread [PATCH][RFC] etherip: Ethernet-in-IPv4 tunneling
 that was on netdev in January of 2005 -- a number of arguments against
 etherip (and for tunneling ethernet in GRE) were raised back then.

I read this thread some weeks ago.  I think there are reasons to have
both variants in the kernel. Since both versions are implemented in
different operatins systems and devices, having both will Linux make
interoperable with all of them.  In fact, the only implementers for
EtherIP I found were various BSD derivates. I actually implemented this
driver upon request of a BSD user who wanted interoperability of the
NetBSD EtherIP implementation with Linux.

 
 One of the most significant ones, IMHO:
 
  Another argument against etherip would be that OpenBSD apparently
  mis-implemented etherip by putting the etherip version nibble in the
  second nibble of the etherip header instead of the first, which would
  probably prevent the linux and OpenBSD versions from interoperating,
  negating the advantage of using etherip in the first place.

I think this is not really a mistake in the OpenBSD implementation. In
my opinion, the RFC is unclear at this point. I focused on
interoperability in my implementation and did it the same way as OpenBSD
(as NetBSD does also, AFAIK FreeBSD has also an EtherIP implementation,
 but I don't tested it). This is the reason why my driver does not check
the value of the incoming EtherIP header too.

Regards,
Joerg Roedel
-
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


[PATCHv3 1/4][RFC] net/ipv4: consolidated UDP / UDP-Lite code

2006-09-19 Thread Gerrit Renker
Hi David,

please find enclosed for review the proposed changes to integrate UDP-Lite
code with UDP.

Please disregard all earlier patches, I have been putting in more hard work to
consolidate the code further, also with regard to expanding to UDP(-Lite) v6.
(Reductions are drastic: udplite.c is slimmed down to 186 lines.)

This is the v4-side and with a minimum of formatting diffs. Any suggestions
for v4  will automatically be incorporated into the v6 side in the subsequent
revision.

Enclosed patch applies on your 2.6.19 tree and on 2.6.18-rc6-mm2 and has been
tested (UDPv4/v6 as well) for quite a while.

R e s o l v e d   I s s u e s

a)  Common Naming scheme:

 --stuff that works for both UDPv4/6 and UDP-Litev4/6 is called 
udp_lib_xxx()
* restricted to v4: udp4_lib_xxx()
* restricted to v6: udp6_lib_xxx()
* when it should not be called directly:  __udp_lib_xxx() 
[resp.__udp{4,6}_lib_xxx()]

 --some old functions (e.g. udp_v4_mcast_next()) have retained their name
   although they would need to be renamed (here udp4_lib_mcast_next());
   this  is left for later -- a `name-change-only' patch

b)  Correct MIB-counting of de facto received datagrams (resolving
 http://bugzilla.kernel.org/show_bug.cgi?id=6660 for this module; some 
follow-up
work may have to look at doing the same for sunrpc, nfs, and likewise)

c)  udp_v{4,6}_get_port(): consolidated.


  C h a n g e l o g

* inline functions which are shared between UDP and UDP-Lite and v4/v6 have
  been put into header files rather than duplicated in source files
* made net/ipv4/udplite.c self-contained unit (#included at the end of udp.c)
* consolidated v4/v6 checksumming code (generic now for UDP and UDP-Lite)
  --new:   udp_csum_outgoing()
  --contrasts with udplite_csum_outgoing()
  --removed support for disabling UDPv6 checksums (RFC 2460 says it's illegal)
* udp_v{4,6}_hash() and udp_v{4,6}_unhash() identical: inlined into header file
* basic xfrm/netfilter support (thanks to Patrick McHardy)
* updated the protocol registration in udplite4_register to not do
  /proc registration on error (thanks to comments by James Morris)
* detailed per-function breakdown as per earlier mail

Regards,
Gerrit
--
 include/linux/udp.h |   11 +
 include/net/udp.h   |   89 +
 net/ipv4/udp.c  |  485 
 net/ipv6/udp.c  |   50 -
 4 files changed, 406 insertions(+), 229 deletions(-)

diff --git a/include/linux/udp.h b/include/linux/udp.h
index 90223f0..1b7cf10 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -50,12 +50,23 @@ struct udp_sock {
 * when the socket is uncorked.
 */
__u16len;   /* total length of pending frames */
+   /*
+* Fields specific to UDP-Lite.
+*/
+   __u16pcslen;
+   __u16pcrlen;
+/* indicator bits used by pcflag: */
+#define UDPLITE_BIT  0x1   /* set by udplite proto init function */
+#define UDPLITE_SEND_CC  0x2   /* set via udplite setsockopt */
+#define UDPLITE_RECV_CC  0x4   /* set via udplite setsocktopt*/
+   __u8 pcflag;/* marks socket as UDP-Lite if  0*/
 };
 
 static inline struct udp_sock *udp_sk(const struct sock *sk)
 {
return (struct udp_sock *)sk;
 }
+#define IS_UDPLITE(__sk) (udp_sk(__sk)-pcflag)
 
 #endif
 
diff --git a/include/net/udp.h b/include/net/udp.h
index db0c05f..b22abb3 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -26,9 +26,31 @@ #include linux/list.h
 #include net/inet_sock.h
 #include net/sock.h
 #include net/snmp.h
+#include net/ip.h
+#include linux/ipv6.h
 #include linux/seq_file.h
 
 #define UDP_HTABLE_SIZE128
+#include net/udplite.h
+
+/**
+ * struct udp_skb_cb  -  UDP(-Lite) private variables
+ *
+ * @header:  private variables used by IPv4/IPv6
+ * @cscov:   checksum coverage length (UDP-Lite only)
+ * @partial_cov: if set indicates partial csum coverage
+ */
+struct udp_skb_cb {
+   union {
+   struct inet_skb_parmh4;
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+   struct inet6_skb_parm   h6;
+#endif
+   } header;
+   __u16   cscov;
+   __u8partial_cov;
+};
+#define UDP_SKB_CB(__skb)  ((struct udp_skb_cb *)((__skb)-cb))
 
 extern struct hlist_head udp_hash[UDP_HTABLE_SIZE];
 extern rwlock_t udp_hash_lock;
@@ -47,6 +69,56 @@ extern struct proto udp_prot;
 
 struct sk_buff;
 
+/*
+ * Generic checksumming routines for UDP(-Lite) v4 and v6
+ */
+static inline u16  __udp_lib_checksum_complete(struct sk_buff *skb)
+{
+   if (! UDP_SKB_CB(skb)-partial_cov)
+   return __skb_checksum_complete(skb);
+   return  csum_fold(skb_checksum(skb, 0, UDP_SKB_CB(skb)-cscov,
+ skb-csum));
+}
+

[PATCHv3 4/4][RFC] net: misc. files to support UDP-Lite

2006-09-19 Thread Gerrit Renker
Miscellaneous files which complete the support for UDP-Litev4.

--
 Documentation/networking/udplite.txt |  291 +++
 include/linux/in.h   |1
 include/linux/socket.h   |1
 include/net/snmp.h   |2
 net/ipv4/af_inet.c   |9 -
 net/ipv4/proc.c  |   12 +
 6 files changed, 315 insertions(+), 1 deletion(-)


diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index fdd89e3..8b2e66e 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1223,10 +1223,13 @@ static int __init init_ipv4_mibs(void)
tcp_statistics[1] = alloc_percpu(struct tcp_mib);
udp_statistics[0] = alloc_percpu(struct udp_mib);
udp_statistics[1] = alloc_percpu(struct udp_mib);
+   udplite_statistics[0] = alloc_percpu(struct udp_mib);
+   udplite_statistics[1] = alloc_percpu(struct udp_mib);
if (!
(net_statistics[0]  net_statistics[1]  ip_statistics[0]
  ip_statistics[1]  tcp_statistics[0]  tcp_statistics[1]
- udp_statistics[0]  udp_statistics[1]))
+ udp_statistics[0]  udp_statistics[1]
+ udplite_statistics[0]  udplite_statistics[1] ) )
return -ENOMEM;
 
(void) tcp_mib_init();
@@ -1313,6 +1316,10 @@ #endif
/* Setup TCP slab cache for open requests. */
tcp_init();
 
+   /*
+*  Add UDP-Lite (RFC 3828)
+*/
+   udplite4_register();
 
/*
 *  Set the ICMP layer up
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 9c6cbe3..9b72fe4 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -66,6 +66,7 @@ static int sockstat_seq_show(struct seq_
   tcp_death_row.tw_count, atomic_read(tcp_sockets_allocated),
   atomic_read(tcp_memory_allocated));
seq_printf(seq, UDP: inuse %d\n, fold_prot_inuse(udp_prot));
+   seq_printf(seq, UDPLITE: inuse %d\n, fold_prot_inuse(udplite_prot));
seq_printf(seq, RAW: inuse %d\n, fold_prot_inuse(raw_prot));
seq_printf(seq,  FRAG: inuse %d memory %d\n, ip_frag_nqueues,
   atomic_read(ip_frag_mem));
@@ -304,6 +305,17 @@ static int snmp_seq_show(struct seq_file
   fold_field((void **) udp_statistics, 
  snmp4_udp_list[i].entry));
 
+   /* the UDP and UDP-Lite MIBs are the same */
+   seq_puts(seq, \nUdpLite:);
+   for (i = 0; snmp4_udp_list[i].name != NULL; i++)
+   seq_printf(seq,  %s, snmp4_udp_list[i].name);
+
+   seq_puts(seq, \nUdpLite:);
+   for (i = 0; snmp4_udp_list[i].name != NULL; i++)
+   seq_printf(seq,  %lu,
+  fold_field((void **) udplite_statistics,
+ snmp4_udp_list[i].entry) );
+
seq_putc(seq, '\n');
return 0;
 }
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 464970e..34183aa 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -131,6 +131,8 @@ #define SNMP_INC_STATS(mib, field)  \
(per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())-mibs[field]++)
 #define SNMP_DEC_STATS(mib, field) \
(per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())-mibs[field]--)
+#define SNMP_DEC_STATS_BH(mib, field)  \
+   (per_cpu_ptr(mib[0], raw_smp_processor_id())-mibs[field]--)
 #define SNMP_ADD_STATS_BH(mib, field, addend)  \
(per_cpu_ptr(mib[0], raw_smp_processor_id())-mibs[field] += addend)
 #define SNMP_ADD_STATS_USER(mib, field, addend)\
diff --git a/include/linux/in.h b/include/linux/in.h
index bcaca83..0903e5f 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -44,6 +44,7 @@ enum {
 
   IPPROTO_COMP   = 108,/* Compression Header protocol */
   IPPROTO_SCTP   = 132,/* Stream Control Transport Protocol
*/
+  IPPROTO_UDPLITE = 136,   /* UDP-Lite (RFC 3828)  */
 
   IPPROTO_RAW   = 255, /* Raw IP packets   */
   IPPROTO_MAX
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 3614090..592b666 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -264,6 +264,7 @@ #define SOL_UDP 17
 #define SOL_IPV6   41
 #define SOL_ICMPV6 58
 #define SOL_SCTP   132
+#define SOL_UDPLITE136
 #define SOL_RAW255
 #define SOL_IPX256
 #define SOL_AX25   257
diff --git a/Documentation/networking/udplite.txt 
b/Documentation/networking/udplite.txt
new file mode 100644
index 000..a899fa1
--- /dev/null
+++ b/Documentation/networking/udplite.txt
@@ -0,0 +1,291 @@
+  ===
+  The UDP-Lite protocol (RFC 3828)
+  ===
+  last modified:   Mon 18th September 2006
+
+
+  

[PATCHv3 3/4][RFC] net: basic xfrm/netfilter support for UDP-Lite

2006-09-19 Thread Gerrit Renker
Basic xfrm and netfilter support for UDP-Lite:
  * matching of UDP-Lite packets
  * LOG support
  * header file support

--
 include/net/xfrm.h|2 ++
 net/ipv4/netfilter/ipt_LOG.c  |   11 ---
 net/ipv4/xfrm4_policy.c   |1 +
 net/ipv6/netfilter/ip6t_LOG.c |   10 +++---
 net/ipv6/xfrm6_policy.c   |1 +
 net/netfilter/xt_multiport.c  |9 +
 net/netfilter/xt_tcpudp.c |   20 +++-
 7 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index bf8e2df..e697862 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -468,6 +468,7 @@ u16 xfrm_flowi_sport(struct flowi *fl)
switch(fl-proto) {
case IPPROTO_TCP:
case IPPROTO_UDP:
+   case IPPROTO_UDPLITE:
case IPPROTO_SCTP:
port = fl-fl_ip_sport;
break;
@@ -493,6 +494,7 @@ u16 xfrm_flowi_dport(struct flowi *fl)
switch(fl-proto) {
case IPPROTO_TCP:
case IPPROTO_UDP:
+   case IPPROTO_UDPLITE:
case IPPROTO_SCTP:
port = fl-fl_ip_dport;
break;
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 4795985..22b53ea 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -180,6 +180,7 @@ _decode_session4(struct sk_buff *skb, st
if (!(iph-frag_off  htons(IP_MF | IP_OFFSET))) {
switch (iph-protocol) {
case IPPROTO_UDP:
+   case IPPROTO_UDPLITE:
case IPPROTO_TCP:
case IPPROTO_SCTP:
case IPPROTO_DCCP:
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 9391c4c..ea94bd1 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -252,6 +252,7 @@ _decode_session6(struct sk_buff *skb, st
break;
 
case IPPROTO_UDP:
+   case IPPROTO_UDPLITE:
case IPPROTO_TCP:
case IPPROTO_SCTP:
case IPPROTO_DCCP:
diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c
index e76a68e..46414b5 100644
--- a/net/netfilter/xt_tcpudp.c
+++ b/net/netfilter/xt_tcpudp.c
@@ -10,7 +10,7 @@ #include linux/netfilter/xt_tcpudp.h
 #include linux/netfilter_ipv4/ip_tables.h
 #include linux/netfilter_ipv6/ip6_tables.h
 
-MODULE_DESCRIPTION(x_tables match for TCP and UDP, supports IPv4 and IPv6);
+MODULE_DESCRIPTION(x_tables match for TCP and UDP(-Lite), supports IPv4 and 
IPv6);
 MODULE_LICENSE(GPL);
 MODULE_ALIAS(xt_tcp);
 MODULE_ALIAS(xt_udp);
@@ -234,6 +234,24 @@ static struct xt_match xt_tcpudp_match[]
.proto  = IPPROTO_UDP,
.me = THIS_MODULE,
},
+   {
+   .name   = udplite,
+   .family = AF_INET,
+   .checkentry = udp_checkentry,
+   .match  = udp_match,
+   .matchsize  = sizeof(struct xt_udp),
+   .proto  = IPPROTO_UDPLITE,
+   .me = THIS_MODULE,
+   },
+   {
+   .name   = udplite,
+   .family = AF_INET6,
+   .checkentry = udp_checkentry,
+   .match  = udp_match,
+   .matchsize  = sizeof(struct xt_udp),
+   .proto  = IPPROTO_UDPLITE,
+   .me = THIS_MODULE,
+   },
 };
 
 static int __init xt_tcpudp_init(void)
diff --git a/net/netfilter/xt_multiport.c b/net/netfilter/xt_multiport.c
index d3aefd3..9127f85 100644
--- a/net/netfilter/xt_multiport.c
+++ b/net/netfilter/xt_multiport.c
@@ -1,5 +1,5 @@
-/* Kernel module to match one of a list of TCP/UDP/SCTP/DCCP ports: ports are 
in
-   the same place so we can treat them as equal. */
+/* Kernel module to match one of a list of TCP/UDP(-Lite)/SCTP/DCCP ports:
+ * ports are in the same place so we can treat them as equal. */
 
 /* (C) 1999-2001 Paul `Rusty' Russell
  * (C) 2002-2004 Netfilter Core Team [EMAIL PROTECTED]
@@ -161,8 +161,9 @@ check(u_int16_t proto,
   u_int8_t count)
 {
/* Must specify supported protocol, no unknown flags or bad count */
-   return (proto == IPPROTO_TCP || proto == IPPROTO_UDP
-   || proto == IPPROTO_SCTP || proto == IPPROTO_DCCP)
+   return ( proto == IPPROTO_TCP  ||
+proto == IPPROTO_UDP  || proto == IPPROTO_UDPLITE ||
+proto == IPPROTO_SCTP || proto == IPPROTO_DCCP  )
 !(ip_invflags  XT_INV_PROTO)
 (match_flags == XT_MULTIPORT_SOURCE
|| match_flags == XT_MULTIPORT_DESTINATION
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 0cf537d..3cb6bb7 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -270,11 +270,15 @@ static void dump_packet(const struct nf_
}
break;
}

[PATCHv3 2/4][RFC] net/ipv4: self-contained UDP-Lite module

2006-09-19 Thread Gerrit Renker
The self-contained UDP-Litev4 module for v4; logically completely separate from 
ipv4/udp.c.

--
include/net/udplite.h |   86 +++
 net/ipv4/udplite.c|  186 ++
 2 files changed, 272 insertions(+)


diff --git a/include/net/udplite.h b/include/net/udplite.h
new file mode 100644
index 000..90d7aec
--- /dev/null
+++ b/include/net/udplite.h
@@ -0,0 +1,86 @@
+/*
+ * Definitions for the UDP-Lite (RFC 3828) code.
+ */
+#ifndef _UDPLITE_H
+#define _UDPLITE_H
+
+/* UDP-Lite socket options */
+#define UDPLITE_SEND_CSCOV   10 /* sender partial coverage (as sent)  */
+#define UDPLITE_RECV_CSCOV   11 /* receiver partial coverage (threshold ) */
+
+extern struct protoudplite_prot;
+extern struct hlist_head   udplite_hash[UDP_HTABLE_SIZE];
+
+/* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */
+DECLARE_SNMP_STAT(struct udp_mib, udplite_statistics);
+
+/*
+ * Checksum computation is all in software, hence simpler getfrag.
+ */
+static __inline__ int udplite_getfrag(void *from, char *to, int  offset,
+ int len, int odd, struct sk_buff *skb)
+{
+   return memcpy_fromiovecend(to, (struct iovec *) from, offset, len);
+}
+
+/*
+ * Functions used by UDP-Litev4 and UDP-Litev6
+ */
+/* calculate checksum coverage set for outgoing packets */
+static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
+{
+   int cscov = up-len;
+
+   /*
+* Sender has set `partial coverage' option on UDP-Lite socket
+*/
+   if (up-pcflag  UDPLITE_SEND_CC){
+   if (up-pcslen  up-len) {
+   /* up-pcslen == 0 means that full coverage is required,
+* partial coverage only if  0  up-pcslen  up-len */
+   if (0  up-pcslen) {
+  cscov = up-pcslen;
+   }
+   uh-len = htons(up-pcslen);
+   }
+   /*
+* NOTE: Causes for the error case  `up-pcslen  up-len':
+*(i)  Application error (will not be penalized).
+*   (ii)  Payload too big for send buffer: data is split
+* into several packets, each with its own header.
+* In this case (e.g. last segment), coverage may
+* exceed packet length.
+*   Since packets with coverage length  packet length are
+*   illegal, we fall back to the defaults here.
+*/
+   }
+   return cscov;
+}
+
+static inline u32 udplite_csum_outgoing(struct sock *sk, int cscov)
+{
+   struct sk_buff *skb;
+   int off, len;
+   u32 csum = 0;
+
+   skb_queue_walk(sk-sk_write_queue, skb) {
+   off = skb-h.raw - skb-data;
+   len = skb-len - off;
+
+   csum = skb_checksum(skb, off, (cscov  len)? len : cscov, csum);
+
+   if ((cscov -= len) = 0)
+   break;
+   }
+   return csum;
+}
+
+/*
+ * net/ipv4/udplite.c
+ */
+extern voidudplite4_register(void);
+extern int udplite_get_port(struct sock *sk, unsigned short snum,
+   int (*scmp)(const struct sock *, const struct sock *));
+extern int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh,
+ u16 len, u32 saddr, u32 daddr  );
+#endif /* _UDPLITE_H */
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
new file mode 100644
index 000..7f6498d
--- /dev/null
+++ b/net/ipv4/udplite.c
@@ -0,0 +1,186 @@
+/*
+ *  UDPLITE An implementation of the UDP-Lite protocol (RFC 3828).
+ *
+ *  Version:$Id: udplite.c,v 1.24 2006/09/18 21:50:59 gerrit Exp gerrit $
+ *
+ *  Authors:Gerrit Renker   [EMAIL PROTECTED]
+ *
+ *  Changes:
+ *  Fixes:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+struct hlist_head  udplite_hash[UDP_HTABLE_SIZE];
+static int udplite_port_rover;
+DEFINE_SNMP_STAT(struct udp_mib, udplite_statistics)   __read_mostly;
+
+/* Designate sk as UDP-Lite socket */
+static inline int udplite_sk_init(struct sock *sk)
+{
+   udp_sk(sk)-pcflag = UDPLITE_BIT;
+   return 0;
+}
+
+__inline__ int udplite_get_port(struct sock *sk, unsigned short p,
+   int (*c)(const struct sock *, const struct sock *))
+{
+   return  __udp_lib_get_port(sk, p, udplite_hash, udplite_port_rover, c);
+}
+
+static __inline__ int udplite_v4_get_port(struct sock *sk, unsigned short snum)
+{
+   return udplite_get_port(sk, snum, ipv4_rcv_saddr_equal);
+}
+
+static __inline__ struct sock *udplite_v4_lookup(u32 saddr, u16 sport,
+

Re: [PATCHv3 3/4][RFC] net: basic xfrm/netfilter support for UDP-Lite

2006-09-19 Thread Patrick McHardy
Gerrit Renker wrote:
 Basic xfrm and netfilter support for UDP-Lite:
   * matching of UDP-Lite packets
   * LOG support
   * header file support
 
 --
 --- a/net/netfilter/xt_multiport.c
 +++ b/net/netfilter/xt_multiport.c
 @@ -161,8 +161,9 @@ check(u_int16_t proto,
u_int8_t count)
  {
   /* Must specify supported protocol, no unknown flags or bad count */
 - return (proto == IPPROTO_TCP || proto == IPPROTO_UDP
 - || proto == IPPROTO_SCTP || proto == IPPROTO_DCCP)
 + return ( proto == IPPROTO_TCP  ||
 +  proto == IPPROTO_UDP  || proto == IPPROTO_UDPLITE ||
 +  proto == IPPROTO_SCTP || proto == IPPROTO_DCCP  )
!(ip_invflags  XT_INV_PROTO)
(match_flags == XT_MULTIPORT_SOURCE
   || match_flags == XT_MULTIPORT_DESTINATION

The patch looks good besides the fancy formating above. I'm not too
much of a fan of the existing formating, but please keep it consistent.

-
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] xt_policy: remove dups in .family

2006-09-19 Thread Patrick McHardy
Alexey Dobriyan wrote:
 sparse defined twice warning

Thanks, applied with some manual fixup. Please base netfilter patches on
the net-2.6.19 tree.

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


RE: [patch 3/3] Add tsi108 On Chip Ethernet device driver support

2006-09-19 Thread Zang Roy-r61911
 
 I have some review comments about your driver; please 
 consider them for
 fixing
 
Thanks.
 
  +   spin_unlock_irq(phy_lock);
  +   msleep(10);
  +   spin_lock_irq(phy_lock);
  +   }
 
 hmm some places take phy_lock with disabling interrupts, while others
 don't. I sort of fear the others may be buggy are you sure those
 are ok?
Could you interpret your comments in detail?
Roy
-
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 blocked

2006-09-19 Thread Zang Roy-r61911
Hi,
Does anyone can tell me why some of my patches were blocked in the
mailing list.
I do not use attachment. The body of the mail is not exceed 40KB in
size.
Roy

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

2006-09-19 Thread Matti Aarnio
On Tue, Sep 19, 2006 at 04:33:17PM +0800, Zang Roy-r61911 wrote:
 Hi,
   Does anyone can tell me why some of my patches were blocked in the
 mailing list.
   I do not use attachment. The body of the mail is not exceed 40KB in
 size.
 Roy

We are filtering by means of bogofilter, and we are training it
with all messages gone thru the list as ham -- but words that it
does not know are neutral to the statistics so entirely new kind
of message will easily receive that is junk treatment.

The rejection message does tell couple technical details, including
where to contact to ask advice.

/Matti Aarnio -- one of  [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 blocked

2006-09-19 Thread Mike Galbraith
On Tue, 2006-09-19 at 16:33 +0800, Zang Roy-r61911 wrote:
 Hi,
   Does anyone can tell me why some of my patches were blocked in the
 mailing list.
   I do not use attachment. The body of the mail is not exceed 40KB in
 size.
 Roy

A snippet from the 'Bogofilter at VGER' announcment:

...

IF we take it into use, it will start rejecting messages
at SMTP input phase, so if it rejects legitimate message,
you should get a bounce from your email provider's system.
(Or from zeus.kernel.org, which is vger's backup MX.)

In such case, send the bounce with some explanations to 
[EMAIL PROTECTED] -- emails to that address
are explicitely excluded from all filtering!


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

2006-09-19 Thread Zang Roy-r61911
On Tue, 2006-09-19 at 16:50, Matti Aarnio wrote:
 On Tue, Sep 19, 2006 at 04:33:17PM +0800, Zang Roy-r61911 wrote:
  Hi,
Does anyone can tell me why some of my patches were blocked in
 the
  mailing list.
I do not use attachment. The body of the mail is not exceed
 40KB in
  size.
  Roy
 
 We are filtering by means of bogofilter, and we are training it
 with all messages gone thru the list as ham -- but words that it
 does not know are neutral to the statistics so entirely new kind
 of message will easily receive that is junk treatment.
 
 The rejection message does tell couple technical details, including
 where to contact to ask advice.

Well, I do not receive any rejection message. I sent out four patches.
Three of them reached the mailing list. One seemed to disappear. I was
informed nothing.
Roy

-
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: set congestion default through Kconfig

2006-09-19 Thread Andi Kleen
On Tuesday 19 September 2006 06:41, Stephen Hemminger wrote:
 Bert's attempt was noble
 It showed your desire for the truth
 A simple path exists

I guess most people won't have a clue on what to configure here
(especially with such sparse help text, but even with more 
it would be hard). 

And you might end up with some weird error reports if someone
manages to configure one of the more broken algorithms.

How about a single auto selection heuristic: e.g. check the handshake latencies 
and if they are too long switch from reno to the newer one deemed most
stable?

-Andi
-
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: TCP Pacing

2006-09-19 Thread Daniele Lacamera
On Saturday 16 September 2006 02:41, Xiaoliang (David) Wei wrote:
 Hi Daniel,
  Thank you very much for the patch and the reference summary. For
 the implementation and performance of pacing, I just have a few
 suggestion/clarification/support data:
 
 First, in the implementation in the patch, it seems to me that the
 paced gap is set to RTT/cwnd in CA_Open state. This might leads to
 slower growth of congestion window. See our simulation results at
 http://www.cs.caltech.edu/~weixl/technical/ns2pacing/index.html

Hi David.
Thank you for having pointed this out. It's very interesting.
Actually, we already knew about delta calculation based on expected 
congestion window. Carlo and Rosario had studied this matter in deep, 
considered different options (VTC04), and came to the conclusion that 
thought rtt/cwnd solution slows down cwnd growth, the difference is not 
very relevant, so we have preferred to implement the most conservative 
one, which is sligthly simpler and fits all the congestion control 
algorithms.

 If this pacing algorithm is used in a network with non-paced flows, it
 is very likely to lose its fair share of bandwidth. So, I'd suggest to
 use a pacing gap of RTT/max{cwnd+1, min{ssthresh, cwnd*2}} where
 max{cwnd+1, min{ssthresh, cwnd*2}} is the expected congestion window
 in *next RTT*. As shown in the our simulation results, this
 modification will eliminate the slower growth problem.

The expected window value depends on the congestion control algorithm, 
the formula you suggests fits newreno increments, while other congstion 
control options may have different cwnd_expected. 
I don't exclude we may have an additional 'plug' in each congestion 
control module for pacing delta calculation, if this makes sense.

  * Main reference:
  -
 This main reference (Infocom2000) does not say pacing is always
 improving. In fact, it says pacing might have poorer performance, in
 term of average throughput, than non-paced flows in many cases.

I have proposed to use this as main reference because it gives a general 
description and it is one of the most cited about the argument.

 For TCP Hybla, we do have some simulation results to show that Hybla
 introduces huge loss in start-up phase, if pacing is not deployed.
 (Look for the figures of hybla at
 http://www.cs.caltech.edu/~weixl/technical/ns2linux/index.html)

The initial overshoot in Hybla is a known issue. Cwnd increments are 
calculated on RTT, so the longer the RTT, the bigger the initial 
burstiness. 
The way to counteract overshoot is to use both pacing and an initial 
slow-start threshold estimation, like that one suggested in [1]. 
This is what we have been using for all our tests, in simulation (ns-2),  
emulation (linux+nistnet), and satellites. (See [2] and [3]).
As for pacing, I'd like to have bandwidth estimation feature included in 
future versions of hybla module as soon as we can consider it stable.

HAND.

-- 
Daniele
 
[1] J. Hoe, Improving the Start-up Behavior of a Congestion Control 
Scheme for TCP, ACM Sigcomm, Aug. 1996.

[2] C. Caini, R. Firrincieli and D. Lacamera, TCP Performance 
Evaluation: Methodologies and Applications, SPECTS 2005, Philadelphia, 
July 2005.

[3] C. Caini, R. Firrincieli and D. Lacamera, A Linux Based Multi TCP 
Implementation for Experimental Evaluation of TCP Enhancements, SPECTS 
2005, Philadelphia, July 2005.
-
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]:[XFRM] BEET mode

2006-09-19 Thread Miika Komu
Ok, I will resend the patch in a moment. I tested it with cg-* tools and 
it did not create any conflicts with davem branch. The email programs with 
automatic line wrapping are really tricky, seems like mail or mailx 
really the only options.


--
Miika Komu   http://www.iki.fi/miika/
-
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]:[XFRM] BEET mode

2006-09-19 Thread Miika Komu
This patch introduces the BEET mode (Bound End-to-End Tunnel) with as
specified by the ietf draft at the following link:

http://www.ietf.org/internet-drafts/draft-nikander-esp-beet-mode-06.txt

The patch provides only single family support (i.e. inner family =
outer family).

Signed-off-by: Diego Beltrami [EMAIL PROTECTED]
Signed-off-by: Miika Komu [EMAIL PROTECTED]
Signed-off-by: Herbert Xu [EMAIL PROTECTED]
Signed-off-by: Abhinav Pathak [EMAIL PROTECTED]
Signed-off-by: Jeff Ahrenholz [EMAIL PROTECTED]

---
commit c1064da17f2c4a680b72cdf0daa74d7a69f90ea7
tree b6d7762770387223fe2b49a87312ba3ea786cd1b
parent 7800c382abc6b2416eab2e935ff82c20e2f08acd
author Miika Komu [EMAIL PROTECTED] Tue, 19 Sep 2006 12:21:59 +0300
committer Miika Komu [EMAIL PROTECTED] Tue, 19 Sep 2006 12:21:59 +0300

 include/linux/in.h|1 +
 include/linux/ip.h|9 +
 include/linux/ipsec.h |3 ++-
 include/linux/xfrm.h  |3 ++-
 net/ipv4/Kconfig  |9 +
 net/ipv4/Makefile |1 +
 net/ipv4/esp4.c   |   26 +++---
 net/ipv4/ipcomp.c |5 -
 net/ipv6/Kconfig  |   10 ++
 net/ipv6/Makefile |1 +
 net/ipv6/ipcomp6.c|5 -
 net/xfrm/xfrm_user.c  |1 +
 12 files changed, 63 insertions(+), 11 deletions(-)

diff --git a/include/linux/in.h b/include/linux/in.h
index bcaca83..f1ae3cc 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -40,6 +40,7 @@ enum {
 
   IPPROTO_ESP = 50,/* Encapsulation Security Payload protocol */
   IPPROTO_AH = 51, /* Authentication Header protocol   */
+  IPPROTO_BEETPH = 94,/* IP option pseudo header for BEET */
   IPPROTO_PIM= 103,/* Protocol Independent Multicast   
*/
 
   IPPROTO_COMP   = 108,/* Compression Header protocol */
diff --git a/include/linux/ip.h b/include/linux/ip.h
index 2f46001..7a3aee8 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -80,6 +80,8 @@ #define   IPOPT_TS_TSONLY 0   /* 
timestamp
 #defineIPOPT_TS_TSANDADDR  1   /* timestamps and 
addresses */
 #defineIPOPT_TS_PRESPEC3   /* specified modules 
only */
 
+#define IPV4_BEET_PHMAXLEN 8
+
 struct iphdr {
 #if defined(__LITTLE_ENDIAN_BITFIELD)
__u8ihl:4,
@@ -123,4 +125,11 @@ struct ip_comp_hdr {
__u16 cpi;
 };
 
+struct ip_beet_phdr {
+   __u8 nexthdr;
+   __u8 hdrlen;
+   __u8 padlen;
+   __u8 reserved;
+};
+
 #endif /* _LINUX_IP_H */
diff --git a/include/linux/ipsec.h b/include/linux/ipsec.h
index d3c5276..d17a630 100644
--- a/include/linux/ipsec.h
+++ b/include/linux/ipsec.h
@@ -12,7 +12,8 @@ #define IPSEC_PROTO_ANY   255
 enum {
IPSEC_MODE_ANY  = 0,/* We do not support this for SA */
IPSEC_MODE_TRANSPORT= 1,
-   IPSEC_MODE_TUNNEL   = 2
+   IPSEC_MODE_TUNNEL   = 2,
+   IPSEC_MODE_BEET = 3
 };
 
 enum {
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 14ecd19..a745cb3 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -129,7 +129,8 @@ #define XFRM_MODE_TRANSPORT 0
 #define XFRM_MODE_TUNNEL 1
 #define XFRM_MODE_ROUTEOPTIMIZATION 2
 #define XFRM_MODE_IN_TRIGGER 3
-#define XFRM_MODE_MAX 4
+#define XFRM_MODE_BEET 4
+#define XFRM_MODE_MAX 5
 
 /* Netlink configuration messages.  */
 enum {
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 90f9136..c5e3b17 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -433,6 +433,15 @@ config INET_XFRM_MODE_TUNNEL
 
  If unsure, say Y.
 
+config INET_XFRM_MODE_BEET
+   tristate IP: IPsec BEET mode
+   default y
+   select XFRM
+   ---help---
+ Support for IPsec BEET mode.
+
+ If unsure, say Y.
+
 config INET_DIAG
tristate INET: socket monitoring interface
default y
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index f66049e..15645c5 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -23,6 +23,7 @@ obj-$(CONFIG_INET_AH) += ah4.o
 obj-$(CONFIG_INET_ESP) += esp4.o
 obj-$(CONFIG_INET_IPCOMP) += ipcomp.o
 obj-$(CONFIG_INET_XFRM_TUNNEL) += xfrm4_tunnel.o
+obj-$(CONFIG_INET_XFRM_MODE_BEET) += xfrm4_mode_beet.o
 obj-$(CONFIG_INET_TUNNEL) += tunnel4.o
 obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o
 obj-$(CONFIG_INET_XFRM_MODE_TUNNEL) += xfrm4_mode_tunnel.o
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 9628de9..c846f13 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -241,7 +241,8 @@ static int esp_input(struct xfrm_state *
 *as per draft-ietf-ipsec-udp-encaps-06,
 *section 3.1.2
 */
-   if (x-props.mode == XFRM_MODE_TRANSPORT)
+   if (x-props.mode == XFRM_MODE_TRANSPORT ||
+   x-props.mode == XFRM_MODE_BEET)
skb-ip_summed = CHECKSUM_UNNECESSARY;
}
 
@@ -259,17 +260,28 

Re: [PATCH]:[XFRM] BEET mode

2006-09-19 Thread Miika Komu

Ah, forgot to add new files to version control, sorry. My bad...

--
Miika Komu   http://www.iki.fi/miika/
-
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: set congestion default through Kconfig

2006-09-19 Thread Hagen Paul Pfeifer
* Andi Kleen | 2006-09-19 12:03:51 [+0200]:

How about a single auto selection heuristic: e.g. check the handshake 
latencies 
and if they are too long switch from reno to the newer one deemed most
stable?

Thats absolute no practicable solution to discover the 'right' algorithm.
The latenzy is only one piece in the puzzle the determine the optimal
congestion control algorithm and completely inadequate. You must also discover
the bandwith and other factors to make a decision. And this is nearly
impossible and object of actual research.

Through due to the heterogeneity of the net it is often not possible the
select the right one. To select a general purpose algorithm here is the
better choice.

BTW: BIC is sometimes to aggressive in comparison to standard tcp behaviour
(e.g. in short RTT environments) - this is an known issue. Why not cubic as the
default one?

-Andi

HGN



-- 
You need the computing power of a Pentium, 16 MB RAM and 1 GB Harddisk
to run Win95. It took the computing power of 3 Commodore 64
to fly to the Moon. Something is wrong here, and it wasn't the Apollo.

-
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]:[XFRM] BEET mode

2006-09-19 Thread Miika Komu
This patch introduces the BEET mode (Bound End-to-End Tunnel) with as
specified by the ietf draft at the following link:

http://www.ietf.org/internet-drafts/draft-nikander-esp-beet-mode-06.txt

The patch provides only single family support (i.e. inner family =
outer family).

Signed-off-by: Diego Beltrami [EMAIL PROTECTED]
Signed-off-by: Miika Komu [EMAIL PROTECTED]
Signed-off-by: Herbert Xu [EMAIL PROTECTED]
Signed-off-by: Abhinav Pathak [EMAIL PROTECTED]
Signed-off-by: Jeff Ahrenholz [EMAIL PROTECTED]

---
commit d9bc03a423b2436535efb7d4d8c36472a0c51074
tree bd907aaedb2226abb6a51c68380fcc60e09afb12
parent 7800c382abc6b2416eab2e935ff82c20e2f08acd
author Miika Komu [EMAIL PROTECTED] Tue, 19 Sep 2006 15:05:24 +0300
committer Miika Komu [EMAIL PROTECTED] Tue, 19 Sep 2006 15:05:24 +0300

 include/linux/in.h |1 
 include/linux/ip.h |9 +++
 include/linux/ipsec.h  |3 +
 include/linux/xfrm.h   |3 +
 net/ipv4/Kconfig   |9 +++
 net/ipv4/Makefile  |1 
 net/ipv4/esp4.c|   26 ++--
 net/ipv4/ipcomp.c  |5 +-
 net/ipv4/xfrm4_mode_beet.c |  139 
 net/ipv6/Kconfig   |   10 +++
 net/ipv6/Makefile  |1 
 net/ipv6/ipcomp6.c |5 +-
 net/ipv6/xfrm6_mode_beet.c |  107 ++
 net/xfrm/xfrm_user.c   |1 
 14 files changed, 309 insertions(+), 11 deletions(-)

diff --git a/include/linux/in.h b/include/linux/in.h
index bcaca83..f1ae3cc 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -40,6 +40,7 @@ enum {
 
   IPPROTO_ESP = 50,/* Encapsulation Security Payload protocol */
   IPPROTO_AH = 51, /* Authentication Header protocol   */
+  IPPROTO_BEETPH = 94,/* IP option pseudo header for BEET */
   IPPROTO_PIM= 103,/* Protocol Independent Multicast   
*/
 
   IPPROTO_COMP   = 108,/* Compression Header protocol */
diff --git a/include/linux/ip.h b/include/linux/ip.h
index 2f46001..7a3aee8 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -80,6 +80,8 @@ #define   IPOPT_TS_TSONLY 0   /* 
timestamp
 #defineIPOPT_TS_TSANDADDR  1   /* timestamps and 
addresses */
 #defineIPOPT_TS_PRESPEC3   /* specified modules 
only */
 
+#define IPV4_BEET_PHMAXLEN 8
+
 struct iphdr {
 #if defined(__LITTLE_ENDIAN_BITFIELD)
__u8ihl:4,
@@ -123,4 +125,11 @@ struct ip_comp_hdr {
__u16 cpi;
 };
 
+struct ip_beet_phdr {
+   __u8 nexthdr;
+   __u8 hdrlen;
+   __u8 padlen;
+   __u8 reserved;
+};
+
 #endif /* _LINUX_IP_H */
diff --git a/include/linux/ipsec.h b/include/linux/ipsec.h
index d3c5276..d17a630 100644
--- a/include/linux/ipsec.h
+++ b/include/linux/ipsec.h
@@ -12,7 +12,8 @@ #define IPSEC_PROTO_ANY   255
 enum {
IPSEC_MODE_ANY  = 0,/* We do not support this for SA */
IPSEC_MODE_TRANSPORT= 1,
-   IPSEC_MODE_TUNNEL   = 2
+   IPSEC_MODE_TUNNEL   = 2,
+   IPSEC_MODE_BEET = 3
 };
 
 enum {
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 14ecd19..a745cb3 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -129,7 +129,8 @@ #define XFRM_MODE_TRANSPORT 0
 #define XFRM_MODE_TUNNEL 1
 #define XFRM_MODE_ROUTEOPTIMIZATION 2
 #define XFRM_MODE_IN_TRIGGER 3
-#define XFRM_MODE_MAX 4
+#define XFRM_MODE_BEET 4
+#define XFRM_MODE_MAX 5
 
 /* Netlink configuration messages.  */
 enum {
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 90f9136..c5e3b17 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -433,6 +433,15 @@ config INET_XFRM_MODE_TUNNEL
 
  If unsure, say Y.
 
+config INET_XFRM_MODE_BEET
+   tristate IP: IPsec BEET mode
+   default y
+   select XFRM
+   ---help---
+ Support for IPsec BEET mode.
+
+ If unsure, say Y.
+
 config INET_DIAG
tristate INET: socket monitoring interface
default y
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index f66049e..15645c5 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -23,6 +23,7 @@ obj-$(CONFIG_INET_AH) += ah4.o
 obj-$(CONFIG_INET_ESP) += esp4.o
 obj-$(CONFIG_INET_IPCOMP) += ipcomp.o
 obj-$(CONFIG_INET_XFRM_TUNNEL) += xfrm4_tunnel.o
+obj-$(CONFIG_INET_XFRM_MODE_BEET) += xfrm4_mode_beet.o
 obj-$(CONFIG_INET_TUNNEL) += tunnel4.o
 obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o
 obj-$(CONFIG_INET_XFRM_MODE_TUNNEL) += xfrm4_mode_tunnel.o
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 9628de9..c846f13 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -241,7 +241,8 @@ static int esp_input(struct xfrm_state *
 *as per draft-ietf-ipsec-udp-encaps-06,
 *section 3.1.2
 */
-   if (x-props.mode == XFRM_MODE_TRANSPORT)
+   if (x-props.mode == 

Re: [PATCH]:[XFRM] BEET mode

2006-09-19 Thread Miika Komu

On Tue, 19 Sep 2006, Miika Komu wrote:


Ah, forgot to add new files to version control, sorry. My bad...


The last patch I sent should be fine.

--
Miika Komu   http://www.iki.fi/miika/
-
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]:[XFRM] BEET mode

2006-09-19 Thread Diego Beltrami
Quoting Miika Komu [EMAIL PROTECTED]:

 On Tue, 19 Sep 2006, Miika Komu wrote:

  Ah, forgot to add new files to version control, sorry. My bad...

 The last patch I sent should be fine.


Yes, this patch taken from the mail works just fine.



-
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,RESEND] rtl8150: use default MTU of 1500

2006-09-19 Thread Petko Manolov

If this fixes the issue then what else can i say?.. ;-)

However, isn't it better to just change RTL8150_MTU to 1500 instead of 
removing that line?



Petko



On Sun, 17 Sep 2006, Lennert Buytenhek wrote:


The rtl8150 (ethernet) driver uses a default MTU of 1540, which causes
all kinds of problems with for example booting off NFS root.  There isn't
really any reason why we shouldn't use the default of 1500.

Signed-off-by: Lennert Buytenhek [EMAIL PROTECTED]

Index: linux-2.6.18-rc2/drivers/usb/net/rtl8150.c
===
--- linux-2.6.18-rc2.orig/drivers/usb/net/rtl8150.c
+++ linux-2.6.18-rc2/drivers/usb/net/rtl8150.c
@@ -867,9 +867,8 @@
netdev-hard_start_xmit = rtl8150_start_xmit;
netdev-set_multicast_list = rtl8150_set_multicast;
netdev-set_mac_address = rtl8150_set_mac_address;
netdev-get_stats = rtl8150_netdev_stats;
-   netdev-mtu = RTL8150_MTU;
SET_ETHTOOL_OPS(netdev, ops);
dev-intr_interval = 100;/* 100ms */

if (!alloc_all_urbs(dev)) {


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


[RFC] indenting/whitespace/comment clean for lane client

2006-09-19 Thread chas williams - CONTRACTOR
its rather big (4000+ lines) so i am posting a url here instead.
this reduces net/atm/lec.c by about 17k.

ftp://ftp.cmf.nrl.navy.mil/pub/chas/netdev/lec-cleanup-diff
-
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.18-rc7 3/9] NetXen: hw initilization routines

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_init.c 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_init.c
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_init.c   2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_init.c   2006-09-19 
07:51:20.0 -0700
@@ -208,8 +208,8 @@
ops-handle_phy_intr = netxen_nic_gbe_handle_phy_intr;
ops-macaddr_set = netxen_niu_macaddr_set;
ops-set_mtu = netxen_nic_set_mtu_gb;
-   ops-set_promisc_mode = netxen_niu_set_promiscuous_mode;
-   ops-unset_promisc_mode = netxen_niu_set_promiscuous_mode;
+   ops-set_promisc = netxen_niu_set_promiscuous_mode;
+   ops-unset_promisc = netxen_niu_set_promiscuous_mode;
ops-phy_read = netxen_niu_gbe_phy_read;
ops-phy_write = netxen_niu_gbe_phy_write;
ops-init_port = netxen_niu_gbe_init_port;
@@ -225,8 +225,8 @@
ops-handle_phy_intr = netxen_nic_xgbe_handle_phy_intr;
ops-macaddr_set = netxen_niu_xg_macaddr_set;
ops-set_mtu = netxen_nic_set_mtu_xgb;
-   ops-set_promisc_mode = netxen_niu_xg_set_promiscuous_mode;
-   ops-unset_promisc_mode = netxen_niu_xg_set_promiscuous_mode;
+   ops-set_promisc = netxen_niu_xg_set_promiscuous_mode;
+   ops-unset_promisc = netxen_niu_xg_set_promiscuous_mode;
ops-stop_port = netxen_niu_disable_xg_port;
break;

@@ -535,8 +535,8 @@
struct netxen_recv_context *recv_ctx =
(adapter-recv_ctx[ctx]);
u32 consumer;
-   struct status_desc_t *desc_head;
-   struct status_desc_t *desc; /* used to read status desc 
here */
+   struct status_desc *desc_head;
+   struct status_desc *desc;   /* used to read status desc 
here */

consumer = recv_ctx-status_rx_consumer;
desc_head = recv_ctx-rcv_status_desc_head;
@@ -584,7 +584,7 @@
  */
 void
 netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
-  struct status_desc_t *desc)
+  struct status_desc *desc)
 {
struct netxen_port *port = adapter-port[STATUS_DESC_PORT(desc)];
struct pci_dev *pdev = port-pdev;
@@ -674,8 +674,8 @@
 u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max)
 {
struct netxen_recv_context *recv_ctx = (adapter-recv_ctx[ctxid]);
-   struct status_desc_t *desc_head = recv_ctx-rcv_status_desc_head;
-   struct status_desc_t *desc; /* used to read status desc here */
+   struct status_desc *desc_head = recv_ctx-rcv_status_desc_head;
+   struct status_desc *desc;   /* used to read status desc here */
u32 consumer = recv_ctx-status_rx_consumer;
int count = 0, ring;

@@ -829,9 +829,9 @@
__FUNCTION__);
 }

-/**
+/*
  * netxen_post_rx_buffers puts buffer in the Phantom memory
- **/
+ */
 void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx, u32 
ringid)
 {
struct pci_dev *pdev = adapter-ahw.pdev;
@@ -841,7 +841,7 @@
struct netxen_recv_crb *crbarea = recv_crb_registers[ctx];
struct netxen_rcv_desc_crb *rcv_desc_crb = NULL;
u32 producer;
-   struct rcv_desc_t *pdesc;
+   struct rcv_desc *pdesc;
struct netxen_rx_buffer *buffer;
int count = 0;
int index = 0;

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


Re: [PATCH 2.6.18-rc7 2/9] NetXen: Hardware access routines

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.c 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.c
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.c 2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.c 2006-09-19 
07:51:20.0 -0700
@@ -44,7 +44,6 @@
 #define NETXEN_PHANTOM_MEM_BASE(NETXEN_FLASH_BASE)
 #define NETXEN_MAX_MTU 8000
 #define NETXEN_MIN_MTU  64
-#define NETXEN_MTU_MASK0x
 #define NETXEN_ETH_FCS_SIZE 4
 #define NETXEN_ENET_HEADER_SIZE 14
 #define NETXEN_WINDOW_ONE 0x200/* CRB Window: bit 25 of CRB address */
@@ -77,9 +76,9 @@
return 0;
 }

-/**
+/*
  * netxen_nic_set_multi - Multicast
- **/
+ */
 void netxen_nic_set_multi(struct net_device *netdev)
 {
struct netxen_port *port = netdev_priv(netdev);
@@ -89,15 +88,15 @@

mc_ptr = netdev-mc_list;
if (netdev-flags  IFF_PROMISC) {
-   if (adapter-ops-set_promisc_mode)
-   adapter-ops-set_promisc_mode(adapter,
-  port-portnum,
-  
NETXEN_NIU_PROMISCOUS_MODE);
+   if (adapter-ops-set_promisc)
+   adapter-ops-set_promisc(adapter,
+ port-portnum,
+ NETXEN_NIU_PROMISC_MODE);
} else {
-   if (adapter-ops-unset_promisc_mode)
-   adapter-ops-unset_promisc_mode(adapter,
-port-portnum,
-
NETXEN_NIU_NON_PROMISCOUS_MODE);
+   if (adapter-ops-unset_promisc)
+   adapter-ops-unset_promisc(adapter,
+   port-portnum,
+   
NETXEN_NIU_NON_PROMISC_MODE);
}
if (adapter-ahw.board_type == NETXEN_NIC_XGBE) {
netxen_nic_mcr_set_mode_select(netxen_mac_addr_cntl_data, 0x03);
@@ -136,31 +135,21 @@
  * netxen_nic_change_mtu - Change the Maximum Transfer Unit
  * @returns 0 on success, negative on failure
  */
-int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu)
+int netxen_nic_change_mtu(struct net_device *netdev, int mtu)
 {
struct netxen_port *port = netdev_priv(netdev);
-   int max_mtu = new_mtu + NETXEN_ENET_HEADER_SIZE + NETXEN_ETH_FCS_SIZE;
-
-   if (max_mtu  NETXEN_MTU_MASK)
-   return -EINVAL;
-
-   if (max_mtu  NETXEN_MAX_MTU) {
-   printk(KERN_ERR
-  %s: %s MTU  NETXEN_MAX_MTU is not supported\n,
-  netxen_nic_driver_name, netdev-name);
-   return -EINVAL;
-   }
+   struct netxen_adapter *adapter = port-adapter;
+   int eff_mtu = mtu + NETXEN_ENET_HEADER_SIZE + NETXEN_ETH_FCS_SIZE;

-   if (max_mtu  NETXEN_MIN_MTU) {
-   printk(KERN_ERR
-  %s: %s MTU  NETXEN_MIN_MTU is not supported\n,
-  netxen_nic_driver_name, netdev-name);
+   if ((eff_mtu  NETXEN_MAX_MTU) || (eff_mtu  NETXEN_MIN_MTU)) {
+   printk(KERN_ERR %s: %s %d is not supported.\n,
+  netxen_nic_driver_name, netdev-name, mtu);
return -EINVAL;
}

-   if (port-adapter-ops-set_mtu)
-   port-adapter-ops-set_mtu(port, new_mtu);
-   netdev-mtu = new_mtu;
+   if (adapter-ops-set_mtu)
+   adapter-ops-set_mtu(port, mtu);
+   netdev-mtu = mtu;

return 0;
 }
@@ -181,7 +170,7 @@
struct netxen_rcv_desc_crb *rcv_desc_crb = NULL;
struct netxen_recv_context *recv_ctx;
struct netxen_rcv_desc_ctx *rcv_desc;
-   struct cmd_desc_type0_t *pcmd;
+   struct cmd_desc_type0 *pcmd;

DPRINTK(INFO, pci_base: %lx\n, adapter-ahw.pci_base);
DPRINTK(INFO, crb_base: %lx %lx, NETXEN_PCI_CRBSPACE,
@@ -226,7 +215,7 @@
DPRINTK(INFO, Recieve Peg ready too. starting stuff\n);

addr = pci_alloc_consistent(adapter-ahw.pdev,
-   sizeof(struct cmd_desc_type0_t) *
+   sizeof(struct cmd_desc_type0) *
adapter-max_tx_desc_count,
hw-cmd_desc_phys_addr);
if (addr == NULL) {
@@ -236,16 +225,16 @@
}

/* we need to prelink all of the cmd descriptors */
-   pcmd = (struct cmd_desc_type0_t *)addr;
+   pcmd = (struct cmd_desc_type0 *)addr;
for (i = 1; i  adapter-max_tx_desc_count; i++) {
pcmd-netxen_next =
-   (card_cmdring + i * sizeof(struct cmd_desc_type0_t));
+   (card_cmdring + i * sizeof(struct cmd_desc_type0));
pcmd++;
}
/* fill in last 

Re: [PATCH 2.6.18-rc7 1/9] NetXen: Makefile and driver main file

2006-09-19 Thread Pradeep Dalvi

Randy,

Thanks for feedback. We have incorporated all of the suggestions.

--
pradeep

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_main.c 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_main.c
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_main.c   2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_main.c   2006-09-19 
07:51:20.0 -0700
@@ -561,9 +561,9 @@
return 0;
 }

-/**
+/*
  * netxen_nic_close - Disables a network interface entry point
- **/
+ */
 static int netxen_nic_close(struct net_device *netdev)
 {
struct netxen_port *port = netdev_priv(netdev);
@@ -628,7 +628,7 @@

u32 producer = 0;
u32 saved_producer = 0;
-   struct cmd_desc_type0_t *hwdesc;
+   struct cmd_desc_type0 *hwdesc;
int k;
struct netxen_cmd_buffer *pbuf = NULL;
unsigned int tries = 0;
@@ -691,7 +691,7 @@
if (((skb-nh.iph)-ihl * sizeof(u32)) +
((skb-h.th)-doff * sizeof(u32)) +
sizeof(struct ethhdr) 
-   (sizeof(struct cmd_desc_type0_t) - NET_IP_ALIGN)) {
+   (sizeof(struct cmd_desc_type0) - NET_IP_ALIGN)) {
no_of_desc++;
}
}
@@ -733,7 +733,7 @@
producer = local_producer;
saved_producer = producer;
hwdesc = hw-cmd_desc_head[producer];
-   memset(hwdesc, 0, sizeof(struct cmd_desc_type0_t));
+   memset(hwdesc, 0, sizeof(struct cmd_desc_type0));
/* Take skb-data itself */
pbuf = adapter-cmd_buf_arr[producer];
if (skb_shinfo(skb)-gso_size  0) {
@@ -773,7 +773,7 @@
producer = get_next_index(producer,
  adapter-max_tx_desc_count);
hwdesc = hw-cmd_desc_head[producer];
-   memset(hwdesc, 0, sizeof(struct cmd_desc_type0_t));
+   memset(hwdesc, 0, sizeof(struct cmd_desc_type0));
}
frag = skb_shinfo(skb)-frags[i - 1];
len = frag-size;
@@ -819,9 +819,9 @@
if (hw-cmd_desc_head[saved_producer].opcode == TX_TCP_LSO) {
int hdr_len, first_hdr_len, more_hdr;
hdr_len = hw-cmd_desc_head[saved_producer].total_hdr_length;
-   if (hdr_len  (sizeof(struct cmd_desc_type0_t) - NET_IP_ALIGN)) 
{
+   if (hdr_len  (sizeof(struct cmd_desc_type0) - NET_IP_ALIGN)) {
first_hdr_len =
-   sizeof(struct cmd_desc_type0_t) - NET_IP_ALIGN;
+   sizeof(struct cmd_desc_type0) - NET_IP_ALIGN;
more_hdr = 1;
} else {
first_hdr_len = hdr_len;
@@ -964,11 +964,11 @@
return ret;
 }

-/**
+/*
  * netxen_intr - Interrupt Handler
  * @irq: interrupt number
  * data points to adapter stucture (which may be handling more than 1 port
- **/
+ */
 irqreturn_t netxen_intr(int irq, void *data, struct pt_regs * regs)
 {
struct netxen_adapter *adapter;

-
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.18-rc7 5/9] NetXen: ethtool interface

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_ethtool.c 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_ethtool.c
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_ethtool.c2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_ethtool.c2006-09-19 
07:51:20.0 -0700
@@ -115,7 +115,7 @@
uint32_t fw_minor = 0;
uint32_t fw_build = 0;

-   strncpy(drvinfo-driver, NetXen, 32);
+   strncpy(drvinfo-driver, netxen_nic, 32);
strncpy(drvinfo-version, NETXEN_NIC_LINUX_VERSIONID, 32);
fw_major = readl(NETXEN_CRB_NORMALIZE(adapter,
  NETXEN_FW_VERSION_MAJOR));
@@ -551,7 +551,7 @@
return 0;
}

-   /* netxen_niu_gb_mii_mgmt_indicators_t is read only */
+   /* netxen_niu_gb_mii_mgmt_indicators is read only */
netxen_nic_read_w0(adapter,
   NETXEN_NIU_GB_MII_MGMT_INDICATE(port-
   portnum),
@@ -579,7 +579,7 @@
return 0;
}

-   /* netxen_niu_gb_interface_status_t is read only */
+   /* netxen_niu_gb_interface_status is read only */
netxen_nic_read_w0(adapter,
   NETXEN_NIU_GB_INTERFACE_STATUS(port-
  portnum),

-
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.18-rc7 4/9] NetXen: intr routines and niu handling

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_niu.c 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_niu.c
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_niu.c2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_niu.c2006-09-19 
07:51:20.0 -0700
@@ -34,7 +34,7 @@
 #include netxen_nic.h
 #include linux/delay.h

-/** 
+/*

  * netxen_niu_gbe_phy_read - read a register from the GbE PHY via
  * mii management interface.
  *
@@ -46,7 +46,7 @@
  * @returns  0 on success
  *  -1 on error
  *
- **/
+ */
 int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy,
long reg, __le32 * readval)
 {
@@ -134,7 +134,7 @@
return result;
 }

-/** 
+/*

  * netxen_niu_gbe_phy_write - write a register to the GbE PHY via
  * mii management interface.
  *
@@ -146,7 +146,7 @@
  * @returns  0 on success
  *  -1 on error
  *
- **/
+ */
 int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter,
 long phy, long reg, __le32 val)
 {
@@ -282,10 +282,10 @@
return result;
 }

-/** 
+/*

  * netxen_niu_gbe_set_mii_mode- Set 10/100 Mbit Mode for GbE MAC
  *
- **/
+ */
 void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter,
 int port, long enable)
 {
@@ -321,9 +321,9 @@
printk(KERN_ERR PFX ERROR clearing PHY interrupts\n);
 }

-/** 
+/*

  * netxen_niu_gbe_set_gmii_mode- Set GbE Mode for GbE MAC
- **/
+ */
 void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter,
  int port, long enable)
 {
@@ -407,11 +407,11 @@
return result;
 }

-/** 
+/*

  * netxen_niu_gbe_handle_phy_interrupt - Handles GbE PHY interrupts
  * @param enable 0 means don't enable the port
  *   1 means enable (or re-enable) the port
- **/
+ */
 int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter,
int port, long enable)
 {
@@ -500,10 +500,10 @@
return result;
 }

-/**
+/*
  * Return the current station MAC address.
  * Note that the passed-in value must already be in network byte order.
- **/
+ */
 int netxen_niu_macaddr_get(struct netxen_adapter *adapter,
   int phy, netxen_ethernet_macaddr_t * addr)
 {
@@ -530,10 +530,10 @@
return 0;
 }

-/**
+/*
  * Set the station MAC address.
  * Note that the passed-in value must already be in network byte order.
- **/
+ */
 int netxen_niu_macaddr_set(struct netxen_port *port,
   netxen_ethernet_macaddr_t addr)
 {
@@ -680,7 +680,7 @@
if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_GB_DROP_WRONGADDR,
  reg, 4))
return -EIO;
-   if (mode == NETXEN_NIU_PROMISCOUS_MODE) {
+   if (mode == NETXEN_NIU_PROMISC_MODE) {
switch (port) {
case 0:
netxen_clear_gb_drop_gb0(reg);
@@ -721,10 +721,10 @@
return 0;
 }

-/**
+/*
  * Set the MAC address for an XG port
  * Note that the passed-in value must already be in network byte order.
- **/
+ */
 int netxen_niu_xg_macaddr_set(struct netxen_port *port,
  netxen_ethernet_macaddr_t addr)
 {
@@ -749,10 +749,10 @@
return 0;
 }

-/**
+/*
  * Return the current station MAC address.
  * Note that the passed-in value must already be in network byte order.
- **/
+ */
 int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy,
  netxen_ethernet_macaddr_t * addr)
 {
@@ -789,7 +789,7 @@

if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_XGE_CONFIG_1, reg, 4))
return -EIO;
-   if (mode == NETXEN_NIU_PROMISCOUS_MODE)
+   if (mode == NETXEN_NIU_PROMISC_MODE)
reg = (reg | 0x2000UL);
else
reg = (reg  ~0x2000UL);

-
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.18-rc7 6/9] NetXen: Main header file

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic.h 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic.h
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic.h2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic.h2006-09-19 
07:51:20.0 -0700
@@ -62,8 +62,6 @@
 #include asm/uaccess.h
 #include asm/pgtable.h

-#include linux/skbuff.h
-
 #include netxen_nic_hw.h

 #define NETXEN_NIC_BUILD_NO 232
@@ -74,9 +72,9 @@
 #define NETXEN_NIC_FW_VERSIONID 2.3.57

 #define RCV_DESC_RINGSIZE  \
-   (sizeof(struct rcv_desc_t) * adapter-max_rx_desc_count)
+   (sizeof(struct rcv_desc) * adapter-max_rx_desc_count)
 #define STATUS_DESC_RINGSIZE   \
-   (sizeof(struct status_desc_t)* adapter-max_rx_desc_count)
+   (sizeof(struct status_desc)* adapter-max_rx_desc_count)
 #define TX_RINGSIZE\
(sizeof(struct netxen_cmd_buffer) * adapter-max_tx_desc_count)
 #define RCV_BUFFSIZE   \
@@ -158,7 +156,7 @@
 #define MAX_RCV_DESC   MAX_RCV_DESCRIPTORS
 #define MAX_RCVSTATUS_DESC MAX_RCV_DESCRIPTORS
 #define NUM_RCV_DESC   (MAX_RCV_DESC + MAX_JUMBO_RCV_DESCRIPTORS)
-#define MAX_EPG_DESCRIPTORSMAX_CMD_DESCRIPTORS * 8
+#define MAX_EPG_DESCRIPTORS(MAX_CMD_DESCRIPTORS * 8)

 #define MIN_TX_COUNT   4096
 #define MIN_RX_COUNT   4096
@@ -174,16 +172,16 @@
 #define get_index_range(index,length,count)\
(((index) + (count))  ((length) - 1))

-/**
+/*
  * Following data structures describe the descriptors that will be used.
  * Added fileds of tcpHdrSize and ipHdrSize, The driver needs to do it only 
when
  * we are doing LSO (above the 1500 size packet) only.
- **/
+ */

-/**
+/*
  * The size of reference handle been changed to 16 bits to pass the MSS fields
  * for the LSO packet
- **/
+ */

 #define FLAGS_CHECKSUM_ENABLED 0x01
 #define FLAGS_LSO_ENABLED  0x02
@@ -205,7 +203,7 @@
 #define CMD_DESC_PORT_WRT(cmd_desc, var)   \
((cmd_desc)-port_ctxid |= ((var)  0x0F))

-struct cmd_desc_type0_t {
+struct cmd_desc_type0 {
u64 netxen_next;/* for fragments handled by Phantom */
union {
struct {
@@ -261,22 +259,22 @@
 } __attribute__ ((aligned(64)));

 /* Note: sizeof(rcv_desc) should always be a mutliple of 2 */
-struct rcv_desc_t {
+struct rcv_desc {
u16 reference_handle;
u16 reserved;
u32 buffer_length;  /* allocated buffer length (usually 2K) */
u64 addr_buffer;
 };

-/* opcode field in status_desc_t */
+/* opcode field in status_desc */
 #define RCV_NIC_PKT(0xA)
 #define STATUS_NIC_PKT ((RCV_NIC_PKT)  12)

-/* for status field in status_desc_t */
+/* for status field in status_desc */
 #define STATUS_NEED_CKSUM  (1)
 #define STATUS_CKSUM_OK(2)

-/* owner bits of status_desc_t */
+/* owner bits of status_desc */
 #define STATUS_OWNER_HOST  (0x1)
 #define STATUS_OWNER_PHANTOM   (0x2)

@@ -293,7 +291,7 @@
 #define STATUS_DESC_OPCODE(status_desc)\
(((status_desc)-port_status_type_op  12)  0x0F)

-struct status_desc_t {
+struct status_desc {
/* Bit pattern: 0-3 port, 4-7 status, 8-11 type, 12-15 opcode */
u16 port_status_type_op;
u16 total_length;   /* NIC mode */
@@ -625,7 +623,7 @@
struct netxen_board_info boardcfg;
u32 xg_linkup;
/* Address of cmd ring in Phantom */
-   struct cmd_desc_type0_t *cmd_desc_head;
+   struct cmd_desc_type0 *cmd_desc_head;
dma_addr_t cmd_desc_phys_addr;
struct netxen_adapter *adapter;
 };
@@ -657,7 +655,7 @@
u32 rcv_pending;/* Num of bufs posted in phantom */
u32 rcv_free;   /* Num of bufs in free list */
dma_addr_t phys_addr;
-   struct rcv_desc_t *desc_head;   /* address of rx ring in Phantom */
+   struct rcv_desc *desc_head; /* address of rx ring in Phantom */
u32 max_rx_desc_count;
u32 dma_size;
u32 skb_size;
@@ -676,14 +674,13 @@
u32 status_rx_producer;
u32 status_rx_consumer;
dma_addr_t rcv_status_desc_phys_addr;
-   struct status_desc_t *rcv_status_desc_head;
+   struct status_desc *rcv_status_desc_head;
 };

 #define NETXEN_NIC_MSI_ENABLED 0x02

 struct netxen_drvops;

-/* this structure by all ports on the adapter */
 struct netxen_adapter {
struct netxen_hardware_context ahw;
int port_count; /* Number of configured ports  */
@@ -776,10 +773,10 @@
void (*handle_phy_intr) (struct netxen_adapter *);
int (*macaddr_set) (struct netxen_port *, netxen_ethernet_macaddr_t);
int (*set_mtu) (struct netxen_port *, int);
-   int (*set_promisc_mode) (struct netxen_adapter *, int,
-netxen_niu_prom_mode_t);
-   int (*unset_promisc_mode) (struct netxen_adapter *, int,
-  netxen_niu_prom_mode_t);
+   int (*set_promisc) (struct netxen_adapter *, int,
+

Re: [PATCH 2.6.18-rc7 7/9] NetXen: hw access routines header file

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.h 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.h
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.h 2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_hw.h 2006-09-19 
07:51:20.0 -0700
@@ -368,8 +368,8 @@

 /* Promiscous mode options (GbE mode only) */
 typedef enum {
-   NETXEN_NIU_PROMISCOUS_MODE = 0,
-   NETXEN_NIU_NON_PROMISCOUS_MODE
+   NETXEN_NIU_PROMISC_MODE = 0,
+   NETXEN_NIU_NON_PROMISC_MODE
 } netxen_niu_prom_mode_t;

 /*
@@ -415,7 +415,20 @@
 #define netxen_xg_soft_reset(config_word)  \
set_bit(4, (unsigned long*)config_word)

-/* Structure  unm_mac_addr_cntl_t for MAC CONTROL REGISTER */
+/*
+ * MAC Control Register
+ * 
+ * Bit 0-1   : id_pool0

+ * Bit 2 : enable_xtnd0
+ * Bit 4-5   : id_pool1
+ * Bit 6 : enable_xtnd1
+ * Bit 8-9   : id_pool2
+ * Bit 10: enable_xtnd2
+ * Bit 12-13 : id_pool3
+ * Bit 14: enable_xtnd3
+ * Bit 24-25 : mode_select
+ * Bit 28-31 : enable_pool
+ */

 #define netxen_nic_mcr_set_id_pool0(config, val)   \
((config) |= ((val) 0x03))
@@ -436,7 +449,7 @@
 #define netxen_nic_mcr_set_mode_select(config, val)\
((config) |= (((val)  0x03)  24))
 #define netxen_nic_mcr_set_enable_pool(config, val)\
-   ((config) |= (((val)  0x0f)  26))
+   ((config) |= (((val)  0x0f)  28))

 /* Set promiscuous mode for a GbE interface */
 int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port,
-
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: set congestion default through Kconfig

2006-09-19 Thread Stephen Hemminger
On Tue, 19 Sep 2006 12:03:51 +0200
Andi Kleen [EMAIL PROTECTED] wrote:

 On Tuesday 19 September 2006 06:41, Stephen Hemminger wrote:
  Bert's attempt was noble
  It showed your desire for the truth
  A simple path exists
 
 I guess most people won't have a clue on what to configure here
 (especially with such sparse help text, but even with more 
 it would be hard). 
 
 And you might end up with some weird error reports if someone
 manages to configure one of the more broken algorithms.
 

I tried to only put known stable ones in the choices list.
-
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.18-rc7 9/9] NetXen: CRB reg definitions

2006-09-19 Thread Pradeep Dalvi

diff -u linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_phan_reg.h 
linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_phan_reg.h
--- linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_phan_reg.h   2006-09-15 
10:51:59.0 -0700
+++ linux-2.6.18-rc7/drivers/net/netxen/netxen_nic_phan_reg.h   2006-09-19 
07:51:20.0 -0700
@@ -30,26 +30,26 @@
 #ifndef __NIC_PHAN_REG_H_
 #define __NIC_PHAN_REG_H_

-/** 
- * CRB Registers or queue message done only at initialization time

- **/
+/* 
+ * CRB Registers or queue message done only at initialization time.

+ */

-/**
+/*
  * The following 2 are the base adresses for the CRB registers and their
- * offsets will be added to get addresses for the index addresses...
- **/
+ * offsets will be added to get addresses for the index addresses.
+ */
 #define NIC_CRB_BASE_PORT1 NETXEN_CAM_RAM(0x200)
 #define NIC_CRB_BASE_PORT2 NETXEN_CAM_RAM(0x250)

 #define NETXEN_NIC_REG(X)  (NIC_CRB_BASE_PORT1+(X))

-/**
+/*
  * CrbPortPhanCntrHi/Lo is used to pass the address of HostPhantomIndex address
  * which can be read by the Phantom host to get producer/consumer indexes from
  * Phantom/Casper. If it is not HOST_SHARED_MEMORY, then the following
  * registers will be used for the addresses of the ring's shared memory
  * on the Phantom.
- **/
+ */

 #define CRB_PHAN_CNTRL_LO_OFFSET   NETXEN_NIC_REG(0x00)
 #define CRB_PHAN_CNTRL_HI_OFFSET   NETXEN_NIC_REG(0x04)

-
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: set congestion default through Kconfig

2006-09-19 Thread David Miller
From: Hagen Paul Pfeifer [EMAIL PROTECTED]
Date: Tue, 19 Sep 2006 14:35:35 +0200

 BTW: BIC is sometimes to aggressive in comparison to standard tcp
 behaviour (e.g. in short RTT environments) - this is an known
 issue. Why not cubic as the default one?

We may change over to CUBIC as the default in 2.6.19, I wanted
CUBIC to sit around in the tree for a while in case some major
issues came up first.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 22/23] ixgb: convert to netdev_priv(netdev)

2006-09-19 Thread Kok, Auke

PCI error recovery code recently merged needs to use netdev_priv

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

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

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 949e5de..0ac0b75 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -2230,7 +2230,7 @@ static pci_ers_result_t ixgb_io_error_de
 enum pci_channel_state state)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
-   struct ixgb_adapter *adapter = netdev-priv;
+   struct ixgb_adapter *adapter = netdev_priv(netdev);
 
if(netif_running(netdev))
ixgb_down(adapter, TRUE);
@@ -2253,7 +2253,7 @@ static pci_ers_result_t ixgb_io_error_de
 static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
-   struct ixgb_adapter *adapter = netdev-priv;
+   struct ixgb_adapter *adapter = netdev_priv(netdev);
 
if(pci_enable_device(pdev)) {
DPRINTK(PROBE, ERR, Cannot re-enable PCI device after 
reset.\n);
@@ -2297,7 +2297,7 @@ static pci_ers_result_t ixgb_io_slot_res
 static void ixgb_io_resume (struct pci_dev *pdev)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
-   struct ixgb_adapter *adapter = netdev-priv;
+   struct ixgb_adapter *adapter = netdev_priv(netdev);
 
pci_set_master(pdev);
 



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


[PATCH 05/23] e1000: rename flow control symbols

2006-09-19 Thread Kok, Auke

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

 drivers/net/e1000/e1000_ethtool.c |   14 +++---
 drivers/net/e1000/e1000_hw.c  |   84 +++--
 drivers/net/e1000/e1000_hw.h  |   18 
 drivers/net/e1000/e1000_param.c   |   12 +++--
 4 files changed, 63 insertions(+), 65 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index 108e01a..f50faa9 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -228,11 +228,11 @@ e1000_get_pauseparam(struct net_device *
pause-autoneg =
(adapter-fc_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE);
 
-   if (hw-fc == e1000_fc_rx_pause)
+   if (hw-fc == E1000_FC_RX_PAUSE)
pause-rx_pause = 1;
-   else if (hw-fc == e1000_fc_tx_pause)
+   else if (hw-fc == E1000_FC_TX_PAUSE)
pause-tx_pause = 1;
-   else if (hw-fc == e1000_fc_full) {
+   else if (hw-fc == E1000_FC_FULL) {
pause-rx_pause = 1;
pause-tx_pause = 1;
}
@@ -252,13 +252,13 @@ e1000_set_pauseparam(struct net_device *
msleep(1);
 
if (pause-rx_pause  pause-tx_pause)
-   hw-fc = e1000_fc_full;
+   hw-fc = E1000_FC_FULL;
else if (pause-rx_pause  !pause-tx_pause)
-   hw-fc = e1000_fc_rx_pause;
+   hw-fc = E1000_FC_RX_PAUSE;
else if (!pause-rx_pause  pause-tx_pause)
-   hw-fc = e1000_fc_tx_pause;
+   hw-fc = E1000_FC_TX_PAUSE;
else if (!pause-rx_pause  !pause-tx_pause)
-   hw-fc = e1000_fc_none;
+   hw-fc = E1000_FC_NONE;
 
hw-original_fc = hw-fc;
 
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 763a9e8..bfc03ff 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -1017,11 +1017,11 @@ e1000_setup_link(struct e1000_hw *hw)
  * control setting, then the variable hw-fc will
  * be initialized based on a value in the EEPROM.
  */
-if (hw-fc == e1000_fc_default) {
+if (hw-fc == E1000_FC_DEFAULT) {
 switch (hw-mac_type) {
 case e1000_ich8lan:
 case e1000_82573:
-hw-fc = e1000_fc_full;
+hw-fc = E1000_FC_FULL;
 break;
 default:
 ret_val = e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG,
@@ -1031,12 +1031,12 @@ e1000_setup_link(struct e1000_hw *hw)
 return -E1000_ERR_EEPROM;
 }
 if ((eeprom_data  EEPROM_WORD0F_PAUSE_MASK) == 0)
-hw-fc = e1000_fc_none;
+hw-fc = E1000_FC_NONE;
 else if ((eeprom_data  EEPROM_WORD0F_PAUSE_MASK) ==
 EEPROM_WORD0F_ASM_DIR)
-hw-fc = e1000_fc_tx_pause;
+hw-fc = E1000_FC_TX_PAUSE;
 else
-hw-fc = e1000_fc_full;
+hw-fc = E1000_FC_FULL;
 break;
 }
 }
@@ -1046,10 +1046,10 @@ e1000_setup_link(struct e1000_hw *hw)
  * hub or switch with different Flow Control capabilities.
  */
 if (hw-mac_type == e1000_82542_rev2_0)
-hw-fc = (~e1000_fc_tx_pause);
+hw-fc = (~E1000_FC_TX_PAUSE);
 
 if ((hw-mac_type  e1000_82543)  (hw-report_tx_early == 1))
-hw-fc = (~e1000_fc_rx_pause);
+hw-fc = (~E1000_FC_RX_PAUSE);
 
 hw-original_fc = hw-fc;
 
@@ -1101,7 +1101,7 @@ e1000_setup_link(struct e1000_hw *hw)
  * ability to transmit pause frames in not enabled, then these
  * registers will be set to 0.
  */
-if (!(hw-fc  e1000_fc_tx_pause)) {
+if (!(hw-fc  E1000_FC_TX_PAUSE)) {
 E1000_WRITE_REG(hw, FCRTL, 0);
 E1000_WRITE_REG(hw, FCRTH, 0);
 } else {
@@ -1188,11 +1188,11 @@ e1000_setup_fiber_serdes_link(struct e10
  *  3:  Both Rx and TX flow control (symmetric) are enabled.
  */
 switch (hw-fc) {
-case e1000_fc_none:
+case E1000_FC_NONE:
 /* Flow control is completely disabled by a software over-ride. */
 txcw = (E1000_TXCW_ANE | E1000_TXCW_FD);
 break;
-case e1000_fc_rx_pause:
+case E1000_FC_RX_PAUSE:
 /* RX Flow control is enabled and TX Flow control is disabled by a
  * software over-ride. Since there really isn't a way to advertise
  * that we are capable of RX Pause ONLY, we will advertise that we
@@ -1201,13 +1201,13 @@ e1000_setup_fiber_serdes_link(struct e10
  */
 txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK);
 break;
-case e1000_fc_tx_pause:
+case E1000_FC_TX_PAUSE:
 /* TX Flow control is enabled, and RX Flow control is disabled, by a
  * software over-ride.
  */
 txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_ASM_DIR);
 break;
-case e1000_fc_full:
+case E1000_FC_FULL:
  

[PATCH 02/23] e100, e1000, ixgb: Fix an impossible memory overwrite bug

2006-09-19 Thread Kok, Auke

We keep getting requests from people that think that this might be
an exploitable hole where we would overwrite 4 bytes in the netdev
struct if the pci name would exceed 15 characters. In reality this
will never happen but we fix it anyway.

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

 drivers/net/e100.c |2 +-
 drivers/net/e1000/e1000_main.c |2 +-
 drivers/net/ixgb/ixgb_main.c   |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index d9750e2..ab0868c 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2572,7 +2572,7 @@ static int __devinit e100_probe(struct p
 #ifdef CONFIG_NET_POLL_CONTROLLER
netdev-poll_controller = e100_netpoll;
 #endif
-   strcpy(netdev-name, pci_name(pdev));
+   strncpy(netdev-name, pci_name(pdev), sizeof(netdev-name) - 1);
 
nic = netdev_priv(netdev);
nic-netdev = netdev;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 75de83e..dd01fdc 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -759,7 +759,7 @@ e1000_probe(struct pci_dev *pdev,
 #ifdef CONFIG_NET_POLL_CONTROLLER
netdev-poll_controller = e1000_netpoll;
 #endif
-   strcpy(netdev-name, pci_name(pdev));
+   strncpy(netdev-name, pci_name(pdev), sizeof(netdev-name) - 1);
 
netdev-mem_start = mmio_start;
netdev-mem_end = mmio_start + mmio_len;
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index ad604fe..949e5de 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -437,7 +437,7 @@ ixgb_probe(struct pci_dev *pdev,
netdev-poll_controller = ixgb_netpoll;
 #endif
 
-   strcpy(netdev-name, pci_name(pdev));
+   strncpy(netdev-name, pci_name(pdev), sizeof(netdev-name) - 1);
netdev-mem_start = mmio_start;
netdev-mem_end = mmio_start + mmio_len;
netdev-base_addr = adapter-hw.io_base;



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


[PATCH 09/23] e1000: allow ethtool to pass arbitrary speed advertisment

2006-09-19 Thread Kok, Auke

With a patch, ethtool can now signify the driver to advertise more
than just a single speed/duplex setting. This allows you to tell the
card to advertise in 10/100 in any speed if you don't have a gigabit
switch for instance.

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

 drivers/net/e1000/e1000_ethtool.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index 0d329d6..d8b9c3f 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -211,13 +211,9 @@ e1000_set_settings(struct net_device *ne
 ADVERTISED_FIBRE |
 ADVERTISED_Autoneg;
else
-   hw-autoneg_advertised = ADVERTISED_10baseT_Half |
- ADVERTISED_10baseT_Full |
- ADVERTISED_100baseT_Half |
- ADVERTISED_100baseT_Full |
- ADVERTISED_1000baseT_Full|
- ADVERTISED_Autoneg |
- ADVERTISED_TP;
+   hw-autoneg_advertised = ecmd-advertising |
+ADVERTISED_TP |
+ADVERTISED_Autoneg;
ecmd-advertising = hw-autoneg_advertised;
} else
if (e1000_set_spd_dplx(adapter, ecmd-speed + ecmd-duplex)) {



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


[PATCH 03/23] e100: Add debugging code for cb cleaning and csum failures.

2006-09-19 Thread Kok, Auke

Refine cb cleaning debug printout and print out all cleaned cbs' status. Add
debug flag for EEPROM csum failures that were overridden by the user.

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

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

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index ab0868c..ae93c62 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -761,6 +761,8 @@ static int e100_eeprom_load(struct nic *
DPRINTK(PROBE, ERR, EEPROM corrupted\n);
if (!eeprom_bad_csum_allow)
return -EAGAIN;
+   else
+   add_taint(TAINT_MACHINE_CHECK);
}
 
return 0;
@@ -1657,13 +1659,14 @@ static int e100_tx_clean(struct nic *nic
 
spin_lock(nic-cb_lock);
 
-   DPRINTK(TX_DONE, DEBUG, cb-status = 0x%04X\n,
-   nic-cb_to_clean-status);
-
/* Clean CBs marked complete */
for(cb = nic-cb_to_clean;
cb-status  cpu_to_le16(cb_complete);
cb = nic-cb_to_clean = cb-next) {
+   DPRINTK(TX_DONE, DEBUG, cb[%d]-status = 0x%04X\n,
+   (int)(((void*)cb - (void*)nic-cbs)/sizeof(struct cb)),
+   cb-status);
+
if(likely(cb-skb != NULL)) {
nic-net_stats.tx_packets++;
nic-net_stats.tx_bytes += cb-skb-len;



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


[PATCH 12/23] e1000: Maybe stop TX if not enough free descriptors

2006-09-19 Thread Kok, Auke

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

 drivers/net/e1000/e1000_main.c |   52 
 1 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 2ecec51..af9d360 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2899,6 +2899,35 @@ e1000_transfer_dhcp_info(struct e1000_ad
return 0;
 }
 
+static int __e1000_maybe_stop_tx(struct net_device *netdev, int size)
+{
+   struct e1000_adapter *adapter = netdev_priv(netdev);
+   struct e1000_tx_ring *tx_ring = adapter-tx_ring;
+
+   netif_stop_queue(netdev);
+   /* Herbert's original patch had:
+*  smp_mb__after_netif_stop_queue();
+* but since that doesn't exist yet, just open code it. */
+   smp_mb();
+
+   /* We need to check again in a case another CPU has just
+* made room available. */
+   if (likely(E1000_DESC_UNUSED(tx_ring)  size))
+   return -EBUSY;
+
+   /* A reprieve! */
+   netif_start_queue(netdev);
+   return 0;
+}
+
+static int e1000_maybe_stop_tx(struct net_device *netdev,
+   struct e1000_tx_ring *tx_ring, int size)
+{
+   if (likely(E1000_DESC_UNUSED(tx_ring) = size))
+   return 0;
+   return __e1000_maybe_stop_tx(netdev, size);
+}
+
 #define TXD_USE_COUNT(S, X) (((S)  (X)) + 1 )
 static int
 e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
@@ -2917,6 +2946,10 @@ e1000_xmit_frame(struct sk_buff *skb, st
unsigned int f;
len -= skb-data_len;
 
+   /* This goes back to the question of how to logically map a tx queue
+* to a flow.  Right now, performance is impacted slightly negatively
+* if using multiple tx queues.  If the stack breaks away from a
+* single qdisc implementation, we can look at this again. */
tx_ring = adapter-tx_ring;
 
if (unlikely(skb-len = 0)) {
@@ -3012,8 +3045,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
 
/* need: count + 2 desc gap to keep tail from touching
 * head, otherwise try next time */
-   if (unlikely(E1000_DESC_UNUSED(tx_ring)  count + 2)) {
-   netif_stop_queue(netdev);
+   if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) {
spin_unlock_irqrestore(tx_ring-tx_lock, flags);
return NETDEV_TX_BUSY;
}
@@ -3060,8 +3092,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
netdev-trans_start = jiffies;
 
/* Make sure there is space in the ring for the next send. */
-   if (unlikely(E1000_DESC_UNUSED(tx_ring)  MAX_SKB_FRAGS + 2))
-   netif_stop_queue(netdev);
+   e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);
 
spin_unlock_irqrestore(tx_ring-tx_lock, flags);
return NETDEV_TX_OK;
@@ -3557,13 +3588,14 @@ e1000_clean_tx_irq(struct e1000_adapter 
tx_ring-next_to_clean = i;
 
 #define TX_WAKE_THRESHOLD 32
-   if (unlikely(cleaned  netif_queue_stopped(netdev) 
-netif_carrier_ok(netdev))) {
-   spin_lock(tx_ring-tx_lock);
-   if (netif_queue_stopped(netdev) 
-   (E1000_DESC_UNUSED(tx_ring) = TX_WAKE_THRESHOLD))
+   if (unlikely(cleaned  netif_carrier_ok(netdev) 
+E1000_DESC_UNUSED(tx_ring) = TX_WAKE_THRESHOLD)) {
+   /* Make sure that anybody stopping the queue after this
+* sees the new next_to_clean.
+*/
+   smp_mb();
+   if (netif_queue_stopped(netdev))
netif_wake_queue(netdev);
-   spin_unlock(tx_ring-tx_lock);
}
 
if (adapter-detect_tx_hung) {



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


[PATCH 21/23] ixgb: combine more rx descriptors to improve performance

2006-09-19 Thread Kok, Auke

We experimented with more descriptor buffer writebacks and found that
values larger than 8 give HW problems, but 8 is safe and gives us some
improved performance.

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

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

diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h
index a1a7f3b..50ffe90 100644
--- a/drivers/net/ixgb/ixgb.h
+++ b/drivers/net/ixgb/ixgb.h
@@ -111,7 +111,7 @@ struct ixgb_adapter;
 #define IXGB_RXBUFFER_16384 16384
 
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
-#define IXGB_RX_BUFFER_WRITE   4   /* Must be power of 2 */
+#define IXGB_RX_BUFFER_WRITE   8   /* Must be power of 2 */
 
 /* only works for sizes that are powers of 2 */
 #define IXGB_ROUNDUP(i, size) ((i) = (((i) + (size) - 1)  ~((size) - 1)))



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


[PATCH 13/23] e1000: gather hardware bit tweaks.

2006-09-19 Thread Kok, Auke

Several hardware bits were set all over the driver and have been
consolidated into a single function.

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

 drivers/net/e1000/e1000_hw.c   |  142 +---
 drivers/net/e1000/e1000_hw.h   |1 
 drivers/net/e1000/e1000_main.c |   24 +++
 3 files changed, 129 insertions(+), 38 deletions(-)

diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 9422864..a143b49 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -61,6 +61,7 @@ static int32_t e1000_id_led_init(struct 
 static int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 
uint32_t cnf_base_addr, uint32_t cnf_size);
 static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
 static void e1000_init_rx_addrs(struct e1000_hw *hw);
+static void e1000_initialize_hardware_bits(struct e1000_hw *hw);
 static boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw);
 static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
 static int32_t e1000_mng_enable_host_if(struct e1000_hw *hw);
@@ -716,6 +717,110 @@ e1000_reset_hw(struct e1000_hw *hw)
 }
 
 /**
+ *
+ * Initialize a number of hardware-dependent bits
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ */
+static void
+e1000_initialize_hardware_bits(struct e1000_hw *hw)
+{
+if ((hw-mac_type = e1000_82571)  (!hw-initialize_hw_bits_disable)) {
+/* Settings common to all silicon */
+uint32_t reg_ctrl, reg_ctrl_ext;
+uint32_t reg_tarc0, reg_tarc1;
+uint32_t reg_tctl;
+uint32_t reg_txdctl, reg_txdctl1;
+
+reg_tarc0 = E1000_READ_REG(hw, TARC0);
+reg_tarc0 = ~0x7800;   /* Clear bits 30, 29, 28, and 27 */
+
+reg_txdctl = E1000_READ_REG(hw, TXDCTL);
+reg_txdctl |= E1000_TXDCTL_COUNT_DESC;   /* Set bit 22 */
+E1000_WRITE_REG(hw, TXDCTL, reg_txdctl);
+
+reg_txdctl1 = E1000_READ_REG(hw, TXDCTL1);
+reg_txdctl1 |= E1000_TXDCTL_COUNT_DESC;  /* Set bit 22 */
+E1000_WRITE_REG(hw, TXDCTL1, reg_txdctl1);
+
+switch (hw-mac_type) {
+case e1000_82571:
+case e1000_82572:
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+reg_tctl = E1000_READ_REG(hw, TCTL);
+
+/* Set the phy Tx compatible mode bits */
+reg_tarc1 = ~0x6000;   /* Clear bits 30 and 29 */
+
+reg_tarc0 |= 0x0780;/* Set TARC0 bits 23-26 */
+reg_tarc1 |= 0x0700;/* Set TARC1 bits 24-26 */
+
+if (reg_tctl  E1000_TCTL_MULR)
+reg_tarc1 = ~0x1000;   /* Clear bit 28 if MULR is 1b 
*/
+else
+reg_tarc1 |= 0x1000;/* Set bit 28 if MULR is 0b */
+
+E1000_WRITE_REG(hw, TARC1, reg_tarc1);
+break;
+case e1000_82573:
+reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+reg_ctrl = E1000_READ_REG(hw, CTRL);
+
+reg_ctrl_ext = ~0x0080;/* Clear bit 23 */
+reg_ctrl_ext |= 0x0040; /* Set bit 22 */
+reg_ctrl = ~0x2000;/* Clear bit 29 */
+
+E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
+E1000_WRITE_REG(hw, CTRL, reg_ctrl);
+break;
+case e1000_80003es2lan:
+if ((hw-media_type == e1000_media_type_fiber) ||
+(hw-media_type == e1000_media_type_internal_serdes)) {
+reg_tarc0 = ~0x0010;   /* Clear bit 20 */
+}
+
+reg_tctl = E1000_READ_REG(hw, TCTL);
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+if (reg_tctl  E1000_TCTL_MULR)
+reg_tarc1 = ~0x1000;   /* Clear bit 28 if MULR is 1b 
*/
+else
+reg_tarc1 |= 0x1000;/* Set bit 28 if MULR is 0b */
+
+E1000_WRITE_REG(hw, TARC1, reg_tarc1);
+break;
+case e1000_ich8lan:
+if ((hw-revision_id  3) ||
+((hw-device_id != E1000_DEV_ID_ICH8_IGP_M_AMT) 
+ (hw-device_id != E1000_DEV_ID_ICH8_IGP_M)))
+reg_tarc0 |= 0x3000;/* Set TARC0 bits 29 and 28 */
+reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+reg_ctrl_ext |= 0x0040; /* Set bit 22 */
+E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
+
+reg_tarc0 |= 0x0d80;/* Set TARC0 bits 23, 24, 26, 27 */
+
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+reg_tctl = E1000_READ_REG(hw, TCTL);
+
+  

[PATCH 10/23] e1000: Fix MANC detection for PCIE adapters

2006-09-19 Thread Kok, Auke

Several manageability capability detection parts hinted towards
our code being incomplete for PCI-E. According to spec, we do not
want to poke any MANC bits at all.

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

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f3f3d38..e81aa03 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -662,9 +662,7 @@ e1000_reset(struct e1000_adapter *adapte
phy_data);
}
 
-   if (adapter-hw.mac_type  e1000_ich8lan)
-   /* FIXME: this code is duplicate and wrong for PCI Express */
-   if (adapter-en_mng_pt) {
+   if ((adapter-en_mng_pt)  (adapter-hw.mac_type  e1000_82571)) {
manc = E1000_READ_REG(adapter-hw, MANC);
manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
E1000_WRITE_REG(adapter-hw, MANC, manc);
@@ -1042,8 +1040,7 @@ e1000_remove(struct pci_dev *pdev)
 
flush_scheduled_work();
 
-   if (adapter-hw.mac_type = e1000_82540 
-  adapter-hw.mac_type != e1000_ich8lan 
+   if (adapter-hw.mac_type  e1000_82571 
   adapter-hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(adapter-hw, MANC);
if (manc  E1000_MANC_SMBUS_EN) {
@@ -4695,9 +4692,7 @@ e1000_suspend(struct pci_dev *pdev, pm_m
pci_enable_wake(pdev, PCI_D3cold, 0);
}
 
-   /* FIXME: this code is incorrect for PCI Express */
-   if (adapter-hw.mac_type = e1000_82540 
-  adapter-hw.mac_type != e1000_ich8lan 
+   if (adapter-hw.mac_type  e1000_82571 
   adapter-hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(adapter-hw, MANC);
if (manc  E1000_MANC_SMBUS_EN) {
@@ -4749,9 +4744,7 @@ e1000_resume(struct pci_dev *pdev)
 
netif_device_attach(netdev);
 
-   /* FIXME: this code is incorrect for PCI Express */
-   if (adapter-hw.mac_type = e1000_82540 
-  adapter-hw.mac_type != e1000_ich8lan 
+   if (adapter-hw.mac_type  e1000_82571 
   adapter-hw.media_type == e1000_media_type_copper) {
manc = E1000_READ_REG(adapter-hw, MANC);
manc = ~(E1000_MANC_ARP_EN);



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


[PATCH 19/23] e1000: rework polarity, NVM, eeprom code and fixes.

2006-09-19 Thread Kok, Auke

Several minor issues exist in the low-level device handling code of
e1000. The NVM and EEPROM writing/reading code was updated which fixes
unneeded delays, adds proper eeprom aqcuiring steps and handle shadow
ram and flash access. Minor cosmetic adjustments to the polarity code
adding symbols. PHY reset code mistakenly distinguished between MAC
types instead of PHY types, and was fixes.

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

 drivers/net/e1000/e1000_hw.c |  290 +-
 drivers/net/e1000/e1000_hw.h |   10 +
 2 files changed, 155 insertions(+), 145 deletions(-)

diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 9280c27..4d871cd 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -662,19 +662,12 @@ e1000_reset_hw(struct e1000_hw *hw)
 E1000_WRITE_FLUSH(hw);
 }
 /* fall through */
-case e1000_82571:
-case e1000_82572:
-case e1000_ich8lan:
-case e1000_80003es2lan:
+default:
+/* Auto read done will delay 5ms or poll based on mac type */
 ret_val = e1000_get_auto_rd_done(hw);
 if (ret_val)
-/* We don't want to continue accessing MAC registers. */
 return ret_val;
 break;
-default:
-/* Wait for EEPROM reload (it happens automatically) */
-msec_delay(5);
-break;
 }
 
 /* Disable HW ARPs on ASF enabled adapters */
@@ -3796,7 +3789,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
 swfw = E1000_SWFW_PHY0_SM;
 }
 if (e1000_swfw_sync_acquire(hw, swfw)) {
-e1000_release_software_semaphore(hw);
+DEBUGOUT(Unable to acquire swfw sync\n);
 return -E1000_ERR_SWFW_SYNC;
 }
 /* Read the device control register and assert the E1000_CTRL_PHY_RST
@@ -3878,11 +3871,11 @@ e1000_phy_reset(struct e1000_hw *hw)
 if (ret_val)
 return E1000_SUCCESS;
 
-switch (hw-mac_type) {
-case e1000_82541_rev_2:
-case e1000_82571:
-case e1000_82572:
-case e1000_ich8lan:
+switch (hw-phy_type) {
+case e1000_phy_igp:
+case e1000_phy_igp_2:
+case e1000_phy_igp_3:
+case e1000_phy_ife:
 ret_val = e1000_phy_hw_reset(hw);
 if (ret_val)
 return ret_val;
@@ -4030,6 +4023,9 @@ e1000_detect_gig_phy(struct e1000_hw *hw
 
 DEBUGFUNC(e1000_detect_gig_phy);
 
+if (hw-phy_id != 0)
+return E1000_SUCCESS;
+
 /* The 82571 firmware may still be configuring the PHY.  In this
  * case, we cannot access the PHY until the configuration is done.  So
  * we explicitly set the PHY values. */
@@ -4951,44 +4947,43 @@ e1000_read_eeprom(struct e1000_hw *hw,
 {
 struct e1000_eeprom_info *eeprom = hw-eeprom;
 uint32_t i = 0;
-int32_t ret_val;
 
 DEBUGFUNC(e1000_read_eeprom);
 
+/* If eeprom is not yet detected, do so now */
+if (eeprom-word_size == 0)
+e1000_init_eeprom_params(hw);
+
 /* A check for invalid values:  offset too large, too many words, and not
  * enough words.
  */
 if ((offset = eeprom-word_size) || (words  eeprom-word_size - offset) 
||
(words == 0)) {
-DEBUGOUT(\words\ parameter out of bounds\n);
+DEBUGOUT2(\words\ parameter out of bounds. Words = %d, size = 
%d\n, offset, eeprom-word_size);
 return -E1000_ERR_EEPROM;
 }
 
-/* FLASH reads without acquiring the semaphore are safe */
+/* EEPROM's that don't use EERD to read require us to bit-bang the SPI
+ * directly. In this case, we need to acquire the EEPROM so that
+ * FW or other port software does not interrupt.
+ */
 if (e1000_is_onboard_nvm_eeprom(hw) == TRUE 
 hw-eeprom.use_eerd == FALSE) {
-switch (hw-mac_type) {
-case e1000_80003es2lan:
-break;
-default:
-/* Prepare the EEPROM for reading  */
-if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
-return -E1000_ERR_EEPROM;
-break;
-}
+/* Prepare the EEPROM for bit-bang reading */
+if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
+return -E1000_ERR_EEPROM;
 }
 
-if (eeprom-use_eerd == TRUE) {
-ret_val = e1000_read_eeprom_eerd(hw, offset, words, data);
-if ((e1000_is_onboard_nvm_eeprom(hw) == TRUE) ||
-(hw-mac_type != e1000_82573))
-e1000_release_eeprom(hw);
-return ret_val;
-}
+/* Eerd register EEPROM access requires no eeprom aquire/release */
+if (eeprom-use_eerd == TRUE)
+return e1000_read_eeprom_eerd(hw, offset, words, data);
 
+/* ICH EEPROM access is done via the ICH flash controller */
 if (eeprom-type == e1000_eeprom_ich8)
 return e1000_read_eeprom_ich8(hw, offset, words, data);
 
+/* Set up 

[PATCH 11/23] e1000: Jumbo frames fixes for 82573

2006-09-19 Thread Kok, Auke

Disable jumbo frames for 82573L alltogether and when ASPM is enabled
since the hardware has problems with it. For the NICs that do support
this in the 82573 series we set ERT_2048 to attempt to receive as much
traffic as early as we can.

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

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index e81aa03..2ecec51 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3138,11 +3138,13 @@ e1000_change_mtu(struct net_device *netd
}
break;
case e1000_82573:
-   /* only enable jumbo frames if ASPM is disabled completely
-* this means both bits must be zero in 0x1A bits 3:2 */
+   /* Jumbo Frames not supported if:
+* - this is not an 82573L device
+* - ASPM is enabled in any way (0x1A bits 3:2) */
e1000_read_eeprom(adapter-hw, EEPROM_INIT_3GIO_3, 1,
  eeprom_data);
-   if (eeprom_data  EEPROM_WORD1A_ASPM_MASK) {
+   if ((adapter-hw.device_id != E1000_DEV_ID_82573L) ||
+   (eeprom_data  EEPROM_WORD1A_ASPM_MASK)) {
if (max_frame  MAXIMUM_ETHERNET_FRAME_SIZE) {
DPRINTK(PROBE, ERR,
Jumbo Frames not supported.\n);
@@ -3150,6 +3152,8 @@ e1000_change_mtu(struct net_device *netd
}
break;
}
+   /* ERT will be enabled later to enable wire speed receives */
+
/* fall through to get support */
case e1000_82571:
case e1000_82572:



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


[PATCH 06/23] e1000: add enums for several link properties

2006-09-19 Thread Kok, Auke

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

 drivers/net/e1000/e1000_hw.c |   89 +-
 1 files changed, 53 insertions(+), 36 deletions(-)

diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index bfc03ff..34226c4 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -71,7 +71,7 @@ static int32_t e1000_host_if_read_cookie
 static uint8_t e1000_calculate_mng_checksum(char *buffer, uint32_t length);
 static uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw);
 static int32_t e1000_check_downshift(struct e1000_hw *hw);
-static int32_t e1000_check_polarity(struct e1000_hw *hw, uint16_t *polarity);
+static int32_t e1000_check_polarity(struct e1000_hw *hw, e1000_rev_polarity 
*polarity);
 static void e1000_clear_hw_cntrs(struct e1000_hw *hw);
 static void e1000_clear_vfta(struct e1000_hw *hw);
 static int32_t e1000_commit_shadow_ram(struct e1000_hw *hw);
@@ -4060,7 +4060,8 @@ e1000_phy_igp_get_info(struct e1000_hw *
struct e1000_phy_info *phy_info)
 {
 int32_t ret_val;
-uint16_t phy_data, polarity, min_length, max_length, average;
+uint16_t phy_data, min_length, max_length, average;
+e1000_rev_polarity polarity;
 
 DEBUGFUNC(e1000_phy_igp_get_info);
 
@@ -4085,8 +4086,8 @@ e1000_phy_igp_get_info(struct e1000_hw *
 if (ret_val)
 return ret_val;
 
-phy_info-mdix_mode = (phy_data  IGP01E1000_PSSR_MDIX) 
-  IGP01E1000_PSSR_MDIX_SHIFT;
+phy_info-mdix_mode = (e1000_auto_x_mode)((phy_data  
IGP01E1000_PSSR_MDIX) 
+  IGP01E1000_PSSR_MDIX_SHIFT);
 
 if ((phy_data  IGP01E1000_PSSR_SPEED_MASK) ==
IGP01E1000_PSSR_SPEED_1000MBPS) {
@@ -4095,10 +4096,12 @@ e1000_phy_igp_get_info(struct e1000_hw *
 if (ret_val)
 return ret_val;
 
-phy_info-local_rx = (phy_data  SR_1000T_LOCAL_RX_STATUS) 
- SR_1000T_LOCAL_RX_STATUS_SHIFT;
-phy_info-remote_rx = (phy_data  SR_1000T_REMOTE_RX_STATUS) 
-  SR_1000T_REMOTE_RX_STATUS_SHIFT;
+phy_info-local_rx = ((phy_data  SR_1000T_LOCAL_RX_STATUS) 
+ SR_1000T_LOCAL_RX_STATUS_SHIFT) ?
+ e1000_1000t_rx_status_ok : 
e1000_1000t_rx_status_not_ok;
+phy_info-remote_rx = ((phy_data  SR_1000T_REMOTE_RX_STATUS) 
+  SR_1000T_REMOTE_RX_STATUS_SHIFT) ?
+  e1000_1000t_rx_status_ok : 
e1000_1000t_rx_status_not_ok;
 
 /* Get cable length */
 ret_val = e1000_get_cable_length(hw, min_length, max_length);
@@ -4134,7 +4137,8 @@ e1000_phy_ife_get_info(struct e1000_hw *
struct e1000_phy_info *phy_info)
 {
 int32_t ret_val;
-uint16_t phy_data, polarity;
+uint16_t phy_data;
+e1000_rev_polarity polarity;
 
 DEBUGFUNC(e1000_phy_ife_get_info);
 
@@ -4145,8 +4149,9 @@ e1000_phy_ife_get_info(struct e1000_hw *
 if (ret_val)
 return ret_val;
 phy_info-polarity_correction =
-(phy_data  IFE_PSC_AUTO_POLARITY_DISABLE) 
-IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT;
+((phy_data  IFE_PSC_AUTO_POLARITY_DISABLE) 
+IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT) ?
+e1000_polarity_reversal_disabled : 
e1000_polarity_reversal_enabled;
 
 if (phy_info-polarity_correction == e1000_polarity_reversal_enabled) {
 ret_val = e1000_check_polarity(hw, polarity);
@@ -4154,8 +4159,9 @@ e1000_phy_ife_get_info(struct e1000_hw *
 return ret_val;
 } else {
 /* Polarity is forced. */
-polarity = (phy_data  IFE_PSC_FORCE_POLARITY) 
-   IFE_PSC_FORCE_POLARITY_SHIFT;
+polarity = ((phy_data  IFE_PSC_FORCE_POLARITY) 
+ IFE_PSC_FORCE_POLARITY_SHIFT) ?
+ e1000_rev_polarity_reversed : e1000_rev_polarity_normal;
 }
 phy_info-cable_polarity = polarity;
 
@@ -4163,9 +4169,9 @@ e1000_phy_ife_get_info(struct e1000_hw *
 if (ret_val)
 return ret_val;
 
-phy_info-mdix_mode =
- (phy_data  (IFE_PMC_AUTO_MDIX | IFE_PMC_FORCE_MDIX)) 
- IFE_PMC_MDIX_MODE_SHIFT;
+phy_info-mdix_mode = (e1000_auto_x_mode)
+ ((phy_data  (IFE_PMC_AUTO_MDIX | IFE_PMC_FORCE_MDIX)) 
+ IFE_PMC_MDIX_MODE_SHIFT);
 
 return E1000_SUCCESS;
 }
@@ -4181,7 +4187,8 @@ e1000_phy_m88_get_info(struct e1000_hw *
struct e1000_phy_info *phy_info)
 {
 int32_t ret_val;
-uint16_t phy_data, polarity;
+uint16_t phy_data;
+e1000_rev_polarity polarity;
 
 DEBUGFUNC(e1000_phy_m88_get_info);
 
@@ -4194,11 +4201,14 @@ e1000_phy_m88_get_info(struct e1000_hw *
 return ret_val;
 
 

[PATCH 15/23] e1000: add PCI-E capability detection code

2006-09-19 Thread Kok, Auke

Add code to display the detected PCI-E bus width.

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

 drivers/net/e1000/e1000_hw.c   |   17 +
 drivers/net/e1000/e1000_hw.h   |6 ++
 drivers/net/e1000/e1000_main.c |   16 
 3 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index a143b49..9280c27 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -6543,6 +6543,8 @@ e1000_tbi_adjust_stats(struct e1000_hw *
 void
 e1000_get_bus_info(struct e1000_hw *hw)
 {
+int32_t ret_val;
+uint16_t pci_ex_link_status;
 uint32_t status;
 
 switch (hw-mac_type) {
@@ -6552,18 +6554,25 @@ e1000_get_bus_info(struct e1000_hw *hw)
 hw-bus_speed = e1000_bus_speed_unknown;
 hw-bus_width = e1000_bus_width_unknown;
 break;
+case e1000_82571:
 case e1000_82572:
 case e1000_82573:
+case e1000_80003es2lan:
 hw-bus_type = e1000_bus_type_pci_express;
 hw-bus_speed = e1000_bus_speed_2500;
-hw-bus_width = e1000_bus_width_pciex_1;
+ret_val = e1000_read_pcie_cap_reg(hw,
+  PCI_EX_LINK_STATUS,
+  pci_ex_link_status);
+if (ret_val)
+hw-bus_width = e1000_bus_width_unknown;
+else
+hw-bus_width = (pci_ex_link_status  PCI_EX_LINK_WIDTH_MASK) 
+  PCI_EX_LINK_WIDTH_SHIFT;
 break;
-case e1000_82571:
 case e1000_ich8lan:
-case e1000_80003es2lan:
 hw-bus_type = e1000_bus_type_pci_express;
 hw-bus_speed = e1000_bus_speed_2500;
-hw-bus_width = e1000_bus_width_pciex_4;
+hw-bus_width = e1000_bus_width_pciex_1;
 break;
 default:
 status = E1000_READ_REG(hw, STATUS);
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 58b9221..ac013bf 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -409,6 +409,7 @@ void e1000_pci_set_mwi(struct e1000_hw *
 void e1000_pci_clear_mwi(struct e1000_hw *hw);
 void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
 void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
+int32_t e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t 
*value);
 /* Port I/O is only supported on 82544 and newer */
 void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value);
 int32_t e1000_disable_pciex_master(struct e1000_hw *hw);
@@ -2216,6 +2217,11 @@ struct e1000_host_command_info {
 #define E1000_FACTPS_LAN_FUNC_SEL   0x4000
 #define E1000_FACTPS_PM_STATE_CHANGED   0x8000
 
+/* PCI-Ex Config Space */
+#define PCI_EX_LINK_STATUS   0x12
+#define PCI_EX_LINK_WIDTH_MASK   0x3F0
+#define PCI_EX_LINK_WIDTH_SHIFT  4
+
 /* EEPROM Commands - Microwire */
 #define EEPROM_READ_OPCODE_MICROWIRE  0x6  /* EEPROM read opcode */
 #define EEPROM_WRITE_OPCODE_MICROWIRE 0x5  /* EEPROM write opcode */
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 9c41a44..07082e7 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4474,6 +4474,22 @@ e1000_write_pci_cfg(struct e1000_hw *hw,
pci_write_config_word(adapter-pdev, reg, *value);
 }
 
+int32_t
+e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
+{
+struct e1000_adapter *adapter = hw-back;
+uint16_t cap_offset;
+
+cap_offset = pci_find_capability(adapter-pdev, PCI_CAP_ID_EXP);
+if (!cap_offset)
+return -E1000_ERR_CONFIG;
+
+pci_read_config_word(adapter-pdev, cap_offset + reg, value);
+
+return E1000_SUCCESS;
+}
+
+
 void
 e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value)
 {



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


[PATCH 17/23] e1000: driver state fixes (race fix)

2006-09-19 Thread Kok, Auke

We were plagued by our interrupt handler posting a watchdog event which
could occur when our adapter was going down in case a late packet arrived
just before e1000_down() finished. This caused the watchdog timer to start
after the NIC was down and keep rescheduling it every N seconds. Once
the driver unloaded it would panic.

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

 drivers/net/e1000/e1000.h |3 ++-
 drivers/net/e1000/e1000_ethtool.c |6 +++---
 drivers/net/e1000/e1000_main.c|   28 ++--
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index a9501e7..7ecce43 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -345,8 +345,9 @@ struct e1000_adapter {
 };
 
 enum e1000_state_t {
-   __E1000_DRIVER_TESTING,
+   __E1000_TESTING,
__E1000_RESETTING,
+   __E1000_DOWN
 };
 
 #endif /* _E1000_H_ */
diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index d8b9c3f..ea8dfe4 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1624,7 +1624,7 @@ e1000_diag_test(struct net_device *netde
struct e1000_adapter *adapter = netdev_priv(netdev);
boolean_t if_running = netif_running(netdev);
 
-   set_bit(__E1000_DRIVER_TESTING, adapter-flags);
+   set_bit(__E1000_TESTING, adapter-flags);
if (eth_test-flags == ETH_TEST_FL_OFFLINE) {
/* Offline tests */
 
@@ -1669,7 +1669,7 @@ e1000_diag_test(struct net_device *netde
adapter-hw.autoneg = autoneg;
 
e1000_reset(adapter);
-   clear_bit(__E1000_DRIVER_TESTING, adapter-flags);
+   clear_bit(__E1000_TESTING, adapter-flags);
if (if_running)
dev_open(netdev);
} else {
@@ -1684,7 +1684,7 @@ e1000_diag_test(struct net_device *netde
data[2] = 0;
data[3] = 0;
 
-   clear_bit(__E1000_DRIVER_TESTING, adapter-flags);
+   clear_bit(__E1000_TESTING, adapter-flags);
}
msleep_interruptible(4 * 1000);
 }
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 07082e7..7a991a4 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -476,13 +476,14 @@ e1000_up(struct e1000_adapter *adapter)
 
adapter-tx_queue_len = netdev-tx_queue_len;
 
-   mod_timer(adapter-watchdog_timer, jiffies);
-
 #ifdef CONFIG_E1000_NAPI
netif_poll_enable(netdev);
 #endif
e1000_irq_enable(adapter);
 
+   clear_bit(__E1000_DOWN, adapter-flags);
+
+   mod_timer(adapter-watchdog_timer, jiffies + 2 * HZ);
return 0;
 }
 
@@ -561,6 +562,10 @@ e1000_down(struct e1000_adapter *adapter
 {
struct net_device *netdev = adapter-netdev;
 
+   /* signal that we're down so the interrupt handler does not
+* reschedule our watchdog timer */
+   set_bit(__E1000_DOWN, adapter-flags);
+
e1000_irq_disable(adapter);
 
del_timer_sync(adapter-tx_fifo_stall_timer);
@@ -903,11 +908,6 @@ e1000_probe(struct pci_dev *pdev,
INIT_WORK(adapter-reset_task,
(void (*)(void *))e1000_reset_task, netdev);
 
-   /* we're going to reset, so assume we have no link for now */
-
-   netif_carrier_off(netdev);
-   netif_stop_queue(netdev);
-
e1000_check_options(adapter);
 
/* Initial Wake on LAN setting
@@ -1014,6 +1014,10 @@ e1000_probe(struct pci_dev *pdev,
if ((err = register_netdev(netdev)))
goto err_register;
 
+   /* tell the stack to leave us alone until e1000_open() is called */
+   netif_carrier_off(netdev);
+   netif_stop_queue(netdev);
+
DPRINTK(PROBE, INFO, Intel(R) PRO/1000 Network Connection\n);
 
cards_found++;
@@ -1200,6 +1204,8 @@ e1000_sw_init(struct e1000_adapter *adap
atomic_set(adapter-irq_sem, 1);
spin_lock_init(adapter-stats_lock);
 
+   set_bit(__E1000_DOWN, adapter-flags);
+
return 0;
 }
 
@@ -1265,7 +1271,7 @@ e1000_open(struct net_device *netdev)
int err;
 
/* disallow open during test */
-   if (test_bit(__E1000_DRIVER_TESTING, adapter-flags))
+   if (test_bit(__E1000_TESTING, adapter-flags))
return -EBUSY;
 
/* allocate transmit descriptors */
@@ -3072,7 +3078,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
if (unlikely(adapter-hw.mac_type == e1000_82547)) {
if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
netif_stop_queue(netdev);
-   mod_timer(adapter-tx_fifo_stall_timer, jiffies);
+   mod_timer(adapter-tx_fifo_stall_timer, jiffies + 1);
spin_unlock_irqrestore(tx_ring-tx_lock, flags);
return NETDEV_TX_BUSY;
}
@@ -3469,7 

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

2006-09-19 Thread Kok, Auke
Hi,

The following updates are available through git:

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

And apply against c233289c29369dba7177ca873e9b8ed457af2a78 (Jeff Garzik:
drivers/net/phy/fixed: #if 0 some incomplete code)

Cheers,

Auke


---

Auke Kok [EMAIL PROTECTED]:
 e100, e1000, ixgb: update copyright header and remove LICENSE
 e100, e1000, ixgb: Fix an impossible memory overwrite bug
 e100: rework WoL and shutdown handling
 e1000: driver state fixes (race fix)
 e1000: revert 'e1000: Remove 0x1000 as supported device'
 ixgb: convert to netdev_priv(netdev)
 e100, e1000, ixgb: increment version numbers

Bruce Allan [EMAIL PROTECTED]:
 e1000: Jumbo frames fixes for 82573
 e1000: handle manageability for pci-e adapters at PHY powerdown
 e1000: don't strip vlan ID if 8021q claims it

Jeff Kirsher [EMAIL PROTECTED]:
 e1000: rename flow control symbols
 e1000: add enums for several link properties
 e1000: allow ethtool to pass arbitrary speed advertisment
 e1000: Fix MANC detection for PCIE adapters
 e1000: gather hardware bit tweaks.
 e1000: add PCI-E capability detection code
 e1000: reduce RAR entries available for ICH8
 e1000: rework polarity, NVM, eeprom code and fixes.

Jesse Brandeburg [EMAIL PROTECTED]:
 e100: Add debugging code for cb cleaning and csum failures.
 e1000: Maybe stop TX if not enough free descriptors
 ixgb: combine more rx descriptors to improve performance

Mitch Williams [EMAIL PROTECTED]:
 e1000: add multicast stats counters

Nicholas Nunley [EMAIL PROTECTED]:
 e1000: remove unused code and make symbols static

---

 drivers/net/e100.c|  110 +
 drivers/net/e1000/LICENSE |  339 ++
 drivers/net/e1000/Makefile|   35 
 drivers/net/e1000/e1000.h |   65 -
 drivers/net/e1000/e1000_ethtool.c |  340 ++
 drivers/net/e1000/e1000_hw.c  | 2100 --
 drivers/net/e1000/e1000_hw.h  |  116 --
 drivers/net/e1000/e1000_main.c|  407 ++-
 drivers/net/e1000/e1000_osdep.h   |   35 
 drivers/net/e1000/e1000_param.c   |  208 +--
 drivers/net/ixgb/Makefile |   38 
 drivers/net/ixgb/ixgb.h   |   43 
 drivers/net/ixgb/ixgb_ee.c|   36 
 drivers/net/ixgb/ixgb_ee.h|   36 
 drivers/net/ixgb/ixgb_ethtool.c   |   42 
 drivers/net/ixgb/ixgb_hw.c|   47 
 drivers/net/ixgb/ixgb_hw.h|   36 
 drivers/net/ixgb/ixgb_ids.h   |   37 
 drivers/net/ixgb/ixgb_main.c  |  190 ---
 drivers/net/ixgb/ixgb_osdep.h |   36 
 drivers/net/ixgb/ixgb_param.c |   36 
 21 files changed, 2249 insertions(+), 2083 deletions(-)


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


[PATCH 16/23] e1000: reduce RAR entries available for ICH8

2006-09-19 Thread Kok, Auke

Manageability is using one more RAR entry than we anticipated earlier
for ICH8.

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

 drivers/net/e1000/e1000_hw.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index ac013bf..a005001 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -564,10 +564,10 @@ int32_t e1000_check_phy_reset_block(stru
  * E1000_RAR_ENTRIES - 1 multicast addresses.
  */
 #define E1000_RAR_ENTRIES 15
-#define E1000_RAR_ENTRIES_ICH8LAN  7
+#define E1000_RAR_ENTRIES_ICH8LAN  6
 
-#define MIN_NUMBER_OF_DESCRIPTORS 8
-#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8
+#define MIN_NUMBER_OF_DESCRIPTORS  8
+#define MAX_NUMBER_OF_DESCRIPTORS  0xFFF8
 
 /* Receive Descriptor */
 struct e1000_rx_desc {



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


[PATCH 23/23] e100, e1000, ixgb: increment version numbers

2006-09-19 Thread Kok, Auke

e100-3.5.17-k2
e1000-7.2.9-k2
ixgb-1.0.117-k2

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

 drivers/net/e100.c |2 +-
 drivers/net/e1000/e1000_main.c |2 +-
 drivers/net/ixgb/ixgb_main.c   |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 94ca60b..f55669a 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -159,7 +159,7 @@
 
 #define DRV_NAME   e100
 #define DRV_EXT-NAPI
-#define DRV_VERSION3.5.16-k2DRV_EXT
+#define DRV_VERSION3.5.17-k2DRV_EXT
 #define DRV_DESCRIPTIONIntel(R) PRO/100 Network Driver
 #define DRV_COPYRIGHT  Copyright(c) 1999-2006 Intel Corporation
 #define PFXDRV_NAME : 
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index dc14b98..bb0d129 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -35,7 +35,7 @@ static char e1000_driver_string[] = Int
 #else
 #define DRIVERNAPI -NAPI
 #endif
-#define DRV_VERSION 7.2.7-k2DRIVERNAPI
+#define DRV_VERSION 7.2.9-k2DRIVERNAPI
 char e1000_driver_version[] = DRV_VERSION;
 static char e1000_copyright[] = Copyright (c) 1999-2006 Intel Corporation.;
 
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 0ac0b75..b46b5ad 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = Inte
 #else
 #define DRIVERNAPI -NAPI
 #endif
-#define DRV_VERSION1.0.112-k2DRIVERNAPI
+#define DRV_VERSION1.0.117-k2DRIVERNAPI
 char ixgb_driver_version[] = DRV_VERSION;
 static char ixgb_copyright[] = Copyright (c) 1999-2006 Intel Corporation.;
 



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


[PATCH 07/23] e1000: remove unused code and make symbols static

2006-09-19 Thread Kok, Auke

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

 drivers/net/e1000/e1000.h |   21 --
 drivers/net/e1000/e1000_ethtool.c |   15 +
 drivers/net/e1000/e1000_hw.c  |  406 +++--
 drivers/net/e1000/e1000_hw.h  |   14 +
 drivers/net/e1000/e1000_main.c|   31 ++-
 5 files changed, 120 insertions(+), 367 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index e586dd7..a9501e7 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -349,25 +349,4 @@ enum e1000_state_t {
__E1000_RESETTING,
 };
 
-/*  e1000_main.c  */
-extern char e1000_driver_name[];
-extern char e1000_driver_version[];
-int e1000_up(struct e1000_adapter *adapter);
-void e1000_down(struct e1000_adapter *adapter);
-void e1000_reset(struct e1000_adapter *adapter);
-void e1000_reinit_locked(struct e1000_adapter *adapter);
-int e1000_setup_all_tx_resources(struct e1000_adapter *adapter);
-void e1000_free_all_tx_resources(struct e1000_adapter *adapter);
-int e1000_setup_all_rx_resources(struct e1000_adapter *adapter);
-void e1000_free_all_rx_resources(struct e1000_adapter *adapter);
-void e1000_update_stats(struct e1000_adapter *adapter);
-int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx);
-
-/*  e1000_ethtool.c  */
-void e1000_set_ethtool_ops(struct net_device *netdev);
-
-/*  e1000_param.c  */
-void e1000_check_options(struct e1000_adapter *adapter);
-
-
 #endif /* _E1000_H_ */
diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index f50faa9..a954746 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -32,6 +32,21 @@
 
 #include asm/uaccess.h
 
+extern char e1000_driver_name[];
+extern char e1000_driver_version[];
+
+extern int e1000_up(struct e1000_adapter *adapter);
+extern void e1000_down(struct e1000_adapter *adapter);
+extern void e1000_reinit_locked(struct e1000_adapter *adapter);
+extern void e1000_reset(struct e1000_adapter *adapter);
+extern int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx);
+extern int e1000_setup_all_rx_resources(struct e1000_adapter *adapter);
+extern int e1000_setup_all_tx_resources(struct e1000_adapter *adapter);
+extern void e1000_free_all_rx_resources(struct e1000_adapter *adapter);
+extern void e1000_free_all_tx_resources(struct e1000_adapter *adapter);
+extern void e1000_update_stats(struct e1000_adapter *adapter);
+
+
 struct e1000_stats {
char stat_string[ETH_GSTRING_LEN];
int sizeof_stat;
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 34226c4..9422864 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -33,6 +33,62 @@
 
 #include e1000_hw.h
 
+static int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask);
+static void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask);
+static int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, 
uint16_t *data);
+static int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, 
uint16_t data);
+static int32_t e1000_get_software_semaphore(struct e1000_hw *hw);
+static void e1000_release_software_semaphore(struct e1000_hw *hw);
+
+static uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw);
+static int32_t e1000_check_downshift(struct e1000_hw *hw);
+static int32_t e1000_check_polarity(struct e1000_hw *hw, e1000_rev_polarity 
*polarity);
+static void e1000_clear_hw_cntrs(struct e1000_hw *hw);
+static void e1000_clear_vfta(struct e1000_hw *hw);
+static int32_t e1000_commit_shadow_ram(struct e1000_hw *hw);
+static int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, 
boolean_t link_up);
+static int32_t e1000_config_fc_after_link_up(struct e1000_hw *hw);
+static int32_t e1000_detect_gig_phy(struct e1000_hw *hw);
+static int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank);
+static int32_t e1000_get_auto_rd_done(struct e1000_hw *hw);
+static int32_t e1000_get_cable_length(struct e1000_hw *hw, uint16_t 
*min_length, uint16_t *max_length);
+static int32_t e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw);
+static int32_t e1000_get_phy_cfg_done(struct e1000_hw *hw);
+static int32_t e1000_get_software_flag(struct e1000_hw *hw);
+static int32_t e1000_ich8_cycle_init(struct e1000_hw *hw);
+static int32_t e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout);
+static int32_t e1000_id_led_init(struct e1000_hw *hw);
+static int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 
uint32_t cnf_base_addr, uint32_t cnf_size);
+static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
+static void e1000_init_rx_addrs(struct e1000_hw *hw);
+static boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw);
+static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
+static int32_t e1000_mng_enable_host_if(struct e1000_hw *hw);
+static int32_t 

[PATCH 20/23] e1000: don't strip vlan ID if 8021q claims it

2006-09-19 Thread Kok, Auke

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

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7a991a4..dc14b98 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1344,8 +1344,12 @@ e1000_close(struct net_device *netdev)
e1000_free_all_tx_resources(adapter);
e1000_free_all_rx_resources(adapter);
 
+   /* kill manageability vlan ID if supported, but not if a vlan with
+* the same ID is registered on the host OS (let 8021q kill it) */
if ((adapter-hw.mng_cookie.status 
- E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) {
+ E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) 
+!(adapter-vlgrp 
+ adapter-vlgrp-vlan_devices[adapter-mng_vlan_id])) {
e1000_vlan_rx_kill_vid(netdev, adapter-mng_vlan_id);
}
 



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


[PATCH 08/23] e1000: add multicast stats counters

2006-09-19 Thread Kok, Auke

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

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

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index a954746..0d329d6 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -60,6 +60,10 @@ static const struct e1000_stats e1000_gs
{ tx_packets, E1000_STAT(net_stats.tx_packets) },
{ rx_bytes, E1000_STAT(net_stats.rx_bytes) },
{ tx_bytes, E1000_STAT(net_stats.tx_bytes) },
+   { rx_broadcast, E1000_STAT(stats.bprc) },
+   { tx_broadcast, E1000_STAT(stats.bptc) },
+   { rx_multicast, E1000_STAT(stats.mprc) },
+   { tx_multicast, E1000_STAT(stats.mptc) },
{ rx_errors, E1000_STAT(net_stats.rx_errors) },
{ tx_errors, E1000_STAT(net_stats.tx_errors) },
{ tx_dropped, E1000_STAT(net_stats.tx_dropped) },



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


[PATCH 04/23] e100: rework WoL and shutdown handling

2006-09-19 Thread Kok, Auke

Unify our shutdown/suspend/resume code and make it similar to e1000:
e1000_shutdown now calls suspend which does the exact same thing on
shutdown except saving PCI config state on suspend. WoL setup code
is now also more simple and works even when CONFIG_PM is not set, which
was previously broken.

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

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

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index ae93c62..94ca60b 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2717,68 +2717,56 @@ static void __devexit e100_remove(struct
}
 }
 
-#ifdef CONFIG_PM
 static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
-   int retval;
 
-   if(netif_running(netdev))
+   if (netif_running(netdev))
e100_down(nic);
e100_hw_reset(nic);
netif_device_detach(netdev);
 
+#ifdef CONFIG_PM
pci_save_state(pdev);
-   retval = pci_enable_wake(pdev, pci_choose_state(pdev, state),
-nic-flags  (wol_magic | e100_asf(nic)));
-   if (retval)
-   DPRINTK(PROBE,ERR, Error enabling wake\n);
+   if (nic-flags  (wol_magic | e100_asf(nic)))
+#else
+   if (nic-flags  (wol_magic))
+#endif
+   pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
+   else
+   /* disable PME */
+   pci_enable_wake(pdev, 0, 0);
+
pci_disable_device(pdev);
-   retval = pci_set_power_state(pdev, pci_choose_state(pdev, state));
-   if (retval)
-   DPRINTK(PROBE,ERR, Error %d setting power state\n, retval);
+   pci_set_power_state(pdev, pci_choose_state(pdev, state));
 
return 0;
 }
 
+#ifdef CONFIG_PM
 static int e100_resume(struct pci_dev *pdev)
 {
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
-   int retval;
 
-   retval = pci_set_power_state(pdev, PCI_D0);
-   if (retval)
-   DPRINTK(PROBE,ERR, Error waking adapter\n);
+   pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
/* ack any pending wake events, disable PME */
-   retval = pci_enable_wake(pdev, 0, 0);
-   if (retval)
-   DPRINTK(PROBE,ERR, Error clearing wake events\n);
+   pci_enable_wake(pdev, 0, 0);
 
netif_device_attach(netdev);
-   if(netif_running(netdev))
+   if (netif_running(netdev))
e100_up(nic);
 
return 0;
 }
-#endif
+#endif /* CONFIG_PM */
 
 
 static void e100_shutdown(struct pci_dev *pdev)
 {
-   struct net_device *netdev = pci_get_drvdata(pdev);
-   struct nic *nic = netdev_priv(netdev);
-   int retval;
-
-#ifdef CONFIG_PM
-   retval = pci_enable_wake(pdev, 0, nic-flags  (wol_magic | 
e100_asf(nic)));
-#else
-   retval = pci_enable_wake(pdev, 0, nic-flags  (wol_magic));
-#endif
-   if (retval)
-   DPRINTK(PROBE,ERR, Error enabling wake\n);
+   e100_suspend(pdev, PMSG_SUSPEND);
 }
 
 /* -- PCI Error Recovery infrastructure  -- */
@@ -2862,8 +2850,9 @@ static struct pci_driver e100_driver = {
.id_table = e100_id_table,
.probe =e100_probe,
.remove =   __devexit_p(e100_remove),
-#ifdef CONFIG_PM
+   /* Power Management hooks */
.suspend =  e100_suspend,
+#ifdef CONFIG_PM
.resume =   e100_resume,
 #endif
.shutdown = e100_shutdown,



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


Re: [PATCH] tcp: set congestion default through Kconfig

2006-09-19 Thread Stephen Hemminger
On Tue, 19 Sep 2006 09:10:37 -0700 (PDT)
David Miller [EMAIL PROTECTED] wrote:

 From: Hagen Paul Pfeifer [EMAIL PROTECTED]
 Date: Tue, 19 Sep 2006 14:35:35 +0200
 
  BTW: BIC is sometimes to aggressive in comparison to standard tcp
  behaviour (e.g. in short RTT environments) - this is an known
  issue. Why not cubic as the default one?
 
 We may change over to CUBIC as the default in 2.6.19, I wanted
 CUBIC to sit around in the tree for a while in case some major
 issues came up first.

I was going to do this for 2.6.19 as well, but wanted more discussion
and also do it as a separate step from the config changes.

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


[PATCH] ethtool: e1000: fix a typo

2006-09-19 Thread Auke Kok
From: Auke Kok [EMAIL PROTECTED]

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

 e1000.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/e1000.c b/e1000.c
index 6de27ca..6741323 100644
--- a/e1000.c
+++ b/e1000.c
@@ -372,7 +372,7 @@ e1000_dump_regs(struct ethtool_drvinfo *
  Descriptor minimum threshold size: %s\n
  Broadcast accept mode: %s\n
  VLAN filter:   %s\n
- Cononical form indicator:  %s\n
+ Canonical form indicator:  %s\n
  Discard pause frames:  %s\n
  Pass MAC control frames:   %s\n,
reg,

-
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: [Bugme-new] [Bug 7159] New: No networking on a machine with Ethernet Pro 100 and Realtek 8139

2006-09-19 Thread Adam C Powell IV
Hello again,

It seems nobody received the message below; likely because the SMTP
server at work refused to forward a message from [EMAIL PROTECTED] .
Sorry about the delay.

On Sun, 2006-09-17 at 15:12 -0400, Adam C Powell IV wrote:
 Hello, and apologies for the reply delay.  (This is a production
 machine, and I haven't been able to experiment until today, though I
 should have time Tuesday morning to try some things if needed.)
 
 On Thu, 2006-09-14 at 11:53 -0700, Andrew Morton wrote:
  (Switching from bugzilla to email - please retain all Cc's)
  
  On Thu, 14 Sep 2006 11:04:03 -0700
  [EMAIL PROTECTED] wrote:
  
   http://bugzilla.kernel.org/show_bug.cgi?id=7159
   
  Summary: No networking on a machine with Ethernet Pro 100 and
   Realtek 8139
   Kernel Version: 2.6.16, 2.6.17, 2.6.18-rc6
   Status: NEW
 Severity: normal
Owner: [EMAIL PROTECTED]
Submitter: [EMAIL PROTECTED]
   
   
   Most recent kernel where this bug did not occur: 2.6.8
   Distribution: Debian
   Hardware Environment: Dual-PIII, Ethernet Pro 100 and Realtek 8139 PCI 
   interfaces
   Software Environment: Debian Etch (Testing)
   Problem Description: The network is not reachable, though the kernel does 
   seem
   to sense line presence on both interfaces.
   
   On boot, udev/discover loads e100, 8139cp and 8139too.  /etc/modules does 
   not
   have any network modules (needs eepro100 for 2.6.8, but I removed it, no
   change).  The relevant lspci listings
   are:
   
   00:09.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 
   100] (rev 05)
   00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
   RTL-8139/8139C/8139C+ (rev 10)
   
   Both interfaces work fine under 2.6.8 as long as eepro100 is loaded.
   
   More information (lspci -v, /proc/interrupts, /proc/ioports) can be found 
   at the
   Debian bug: http://bugs.debian.org/386972
   
   Steps to reproduce: Boot, try to use network.
   
  
  This is all a bit peculiar.  I'd be assuming that you're not getting
  any interrupts through for those NICs.
  
  Could you please check /proc/interrupts, see if the interrupt counts
  related to the NICs can be made to increase?
 
 Can't do it.  Connecting/disconnecting, ping from inside and out,
 nothing increments the interrupt counts.
 
  Also, the full `dmesg -s 100' output might help.
  
  We might also get some interesting info if you can compile your own kernel,
  build thsoe net drivers into vmlinux, capture the dmesg output.
  
  If it _is_ an IRQ problem then you might find that fiddling with ACPI
  helps: disable it in config or boot with `acpi=off', see if that helps.
 
 Yes!  The network works just fine now.
 
  Also
  try booting with the `pci=routeirq' option.
 
 By itself, this does not cure the network problem.  But all of my GNOME
 applets work with this; without it, the panel hangs after opening a few
 of them.  Different few every time, so it's hard to peg which one is the
 problem.
 
 With both acpi=off and pci=routeirq, the network works and GNOME applets
 work.  Hooray!
 
 Not so fast.  The machine hung completely once, then the next two boots,
 everything in X hung except the cursor.  I was able to ssh in, and grab
 interrupts and dmesg.
 
 Output of dmesg -s 100 and cat /proc/interrupts is at
 http://lyre.mit.edu/~powell/temp/ (oops, I had done ifdown eth0; ifdown
 eth1 before catching interrupts-acpi=off; that's why those are absent.)
 
  There are various options described under acpi= and pci= in
  Documentation/kernel-parameters.txt which it would be useful for you to
  experiment with.
 
 I think the acpi=off boot option did the trick.  The config is Debian
 stock 2.6.17-2-686 with 'enter' at all new questions in make oldconfig.
 This problem is also in the Debian stock 2.6.17 and 2.6.16 kernels, so I
 suspect a different .config might clear it up.
 
 Any suggestions there for a .config which will work with ACPI and
 non-ACPI machines?  Debian stock 2.6.8 seems fine (but of course is
 missing the fancy new features).
 
 The X apps hang is a separate problem.  I'll pursue it with the Debian
 people before opening a separate bug.  Feel free to close this one.
 
 Thank you again.
 
 -Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe!
http://www.take6.com/albums/greatesthits.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


[PATCH] [PATCH] ethtool: add ixgb register dump support

2006-09-19 Thread Auke Kok
From: Nicholas Nunley [EMAIL PROTECTED]

This adds support for dumping ixgb registers in readable format.

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

 Makefile.am|4 +-
 ethtool-util.h |3 +
 ethtool.c  |2 +
 ixgb.c |  147 
 4 files changed, 154 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cf4ebc5..c78eecf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,8 @@ EXTRA_DIST = ethtool.8 ethtool.spec.in a
 sbin_PROGRAMS = ethtool
 ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h  \
  amd8111e.c de2104x.c e100.c e1000.c   \
- fec_8xx.c ibm_emac.c natsemi.c pcnet32.c  \
- realtek.c tg3.c skge.c
+ fec_8xx.c ibm_emac.c ixgb.c natsemi.c \
+ pcnet32.c realtek.c tg3.c skge.c
 
 dist-hook:
cp $(top_srcdir)/ethtool.spec $(distdir)
diff --git a/ethtool-util.h b/ethtool-util.h
index 52c43bf..0e6fce2 100644
--- a/ethtool-util.h
+++ b/ethtool-util.h
@@ -42,6 +42,9 @@ int fec_8xx_dump_regs(struct ethtool_drv
 /* PowerPC 4xx on-chip Ethernet controller */
 int ibm_emac_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs 
*regs);
 
+/* Intel(R) PRO/10GBe Gigabit Adapter Family */
+int ixgb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+
 /* Broadcom Tigon3 Ethernet controller */
 int tg3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
diff --git a/ethtool.c b/ethtool.c
index 87e22ab..02b9fb7 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -10,6 +10,7 @@
  * ETHTOOL_PHYS_ID support by Chris Leech [EMAIL PROTECTED]
  * e1000 support by Scott Feldman [EMAIL PROTECTED]
  * e100 support by Wen Tao [EMAIL PROTECTED]
+ * ixgb support by Nicholas Nunley [EMAIL PROTECTED]
  * amd8111e support by Reeja John [EMAIL PROTECTED]
  * long arguments by Andi Kleen.
  *
@@ -937,6 +938,7 @@ static struct {
{ r8169, realtek_dump_regs },
{ de2104x, de2104x_dump_regs },
{ e1000, e1000_dump_regs },
+   { ixgb, ixgb_dump_regs },
{ natsemi, natsemi_dump_regs },
{ e100, e100_dump_regs },
{ amd8111e, amd8111e_dump_regs },
diff --git a/ixgb.c b/ixgb.c
new file mode 100644
index 000..06b4da2
--- /dev/null
+++ b/ixgb.c
@@ -0,0 +1,147 @@
+/* Copyright (c) 2006 Intel Corporation */
+#include stdio.h
+#include ethtool-util.h
+
+/* CTRL0 Bit Masks */
+#define IXGB_CTRL0_LRST   0x0008
+#define IXGB_CTRL0_VME0x4000
+
+/* STATUS Bit Masks */
+#define IXGB_STATUS_LU0x0002
+#define IXGB_STATUS_BUS64 0x1000
+#define IXGB_STATUS_PCIX_MODE 0x2000
+#define IXGB_STATUS_PCIX_SPD_100  0x4000
+#define IXGB_STATUS_PCIX_SPD_133  0x8000
+
+/* RCTL Bit Masks */
+#define IXGB_RCTL_RXEN0x0002
+#define IXGB_RCTL_SBP 0x0004
+#define IXGB_RCTL_UPE 0x0008
+#define IXGB_RCTL_MPE 0x0010
+#define IXGB_RCTL_RDMTS_MASK  0x0300
+#define IXGB_RCTL_RDMTS_1_2   0x
+#define IXGB_RCTL_RDMTS_1_4   0x0100
+#define IXGB_RCTL_RDMTS_1_8   0x0200
+#define IXGB_RCTL_BAM 0x8000
+#define IXGB_RCTL_BSIZE_MASK  0x0003
+#define IXGB_RCTL_BSIZE_4096  0x0001
+#define IXGB_RCTL_BSIZE_8192  0x0002
+#define IXGB_RCTL_BSIZE_16384 0x0003
+#define IXGB_RCTL_VFE 0x0004
+#define IXGB_RCTL_CFIEN   0x0008
+
+/* TCTL Bit Masks */
+#define IXGB_TCTL_TXEN0x0002
+
+/* RAH Bit Masks */
+#define IXGB_RAH_ASEL_DEST0x
+#define IXGB_RAH_ASEL_SRC 0x0001
+#define IXGB_RAH_AV   0x8000
+
+int
+ixgb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+   u32 *regs_buff = (u32 *)regs-data;
+   u8 version = (u8)(regs-version  24);
+   u32 reg;
+
+   if (version != 1)
+   return -1;
+   fprintf(stdout, MAC Registers\n);
+   fprintf(stdout, -\n);
+
+   /* Device control register */
+   reg = regs_buff[0];
+   fprintf(stdout,
+   0x0: CTRL0 (Device control register) 0x%08X\n
+ Link reset:%s\n
+ VLAN mode: %s\n,
+   reg,
+   reg  IXGB_CTRL0_LRST   ? reset: normal,
+   reg  IXGB_CTRL0_VME? enabled  : disabled);
+
+   /* Device status register */
+   reg = regs_buff[2];
+   fprintf(stdout,
+   0x00010: STATUS (Device status register) 0x%08X\n
+ Link up:   %s\n
+ Bus type:  %s\n
+ Bus speed: %s\n
+ Bus width: %s\n,
+   

Re: Fw: [PATCH] Remove powerpc specific parts of 3c509 driver

2006-09-19 Thread Linas Vepstas
On Tue, Sep 19, 2006 at 02:54:33PM +1000, Stephen Rothwell wrote:
 
 On powerpc and ppc, insl_ns and insl are identical as are outsl_ns and
 outsl, so remove the conditional use of insl_ns and outsl_ns.

The rest of this patch might indeed be correct, but the above comment 
bothers me. The ns versions of routines are supposed to be
non-byte-swapped versions of the insl/outsl routines (which would
byte-swap on big-endian archs such as powerpc.)

 diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
 index cbdae54..add6381 100644
 --- a/drivers/net/3c509.c
 +++ b/drivers/net/3c509.c
 @@ -879,11 +879,7 @@ #endif
   outw(skb-len, ioaddr + TX_FIFO);
   outw(0x00, ioaddr + TX_FIFO);
   /* ... and the packet rounded to a doubleword. */
 -#ifdef  __powerpc__
 - outsl_ns(ioaddr + TX_FIFO, skb-data, (skb-len + 3)  2);
 -#else
   outsl(ioaddr + TX_FIFO, skb-data, (skb-len + 3)  2);
 -#endif

Dohh, a hack like this to work around some possbile byte-swapping
bug should never have been done in the first place :-(

However, I presume someone added the  __powerpc__ define here
because they picked up a 3c509 at a garage sale, stuck it in 
a powerpc, found out it didn't work due to a byte-swapping bug,
and then patched it as above. I'm disturbed that somehow 
outsl_ns() became identical to outsl() at some point, presumably
breaking this patch.

--linas

-
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] ethtool: e1000: fix a typo

2006-09-19 Thread Jeff Garzik

Auke Kok wrote:

From: Auke Kok [EMAIL PROTECTED]

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

 e1000.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/e1000.c b/e1000.c
index 6de27ca..6741323 100644
--- a/e1000.c
+++ b/e1000.c
@@ -372,7 +372,7 @@ e1000_dump_regs(struct ethtool_drvinfo *
  Descriptor minimum threshold size: %s\n
  Broadcast accept mode: %s\n
  VLAN filter:   %s\n
- Cononical form indicator:  %s\n
+ Canonical form indicator:  %s\n


I had already applied this, but forgotten to push it out to the public 
repository.  Pushed.


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: [REVISED] [PATCH] ethtool v4: add autoneg advertise feature

2006-09-19 Thread Jeff Garzik

Jeff Kirsher wrote:

On 9/5/06, Jeff Kirsher [EMAIL PROTECTED] wrote:


adds the ability to change the advertised speed and duplex for a 
network interface.  Previously, a network interface was only able to 
advertise all supported speed's and duplex's, or one individual speed 
and duplex.  The feature allows the user to choose which supported 
speed's and duplex's to advertise by using the hex value.


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

---


This patch can be pull from the following location:

git pull git://lost.foo-projects.org/~jtkirshe/ethtool e1000


pulled


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


Re: [PATCH] [PATCH] ethtool: add ixgb register dump support

2006-09-19 Thread Jeff Garzik

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 05/23] e1000: rename flow control symbols

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -90,15 +90,6 @@ typedef enum {
 e1000_100_full = 3
 } e1000_speed_duplex_type;
 
-/* Flow Control Settings */

-typedef enum {
-e1000_fc_none = 0,
-e1000_fc_rx_pause = 1,
-e1000_fc_tx_pause = 2,
-e1000_fc_full = 3,
-e1000_fc_default = 0xFF
-} e1000_fc_type;
-
 struct e1000_shadow_ram {
 uint16_teeprom_word;
 boolean_t   modified;
@@ -1376,7 +1367,7 @@ struct e1000_hw {
 struct e1000_shadow_ram *eeprom_shadow_ram;
 uint32_t flash_bank_size;
 uint32_t flash_base_addr;
-e1000_fc_type fc;
+uint32_t fc;
 e1000_bus_speed bus_speed;
 e1000_bus_width bus_width;
 e1000_bus_type bus_type;
@@ -1930,6 +1921,13 @@ struct e1000_hw {
 #define E1000_FCRTL_RTL  0xFFF8 /* Mask Bits[15:3] for RTL */
 #define E1000_FCRTL_XONE 0x8000 /* Enable XON frame transmission */
 
+/* Flow Control Settings */

+#define E1000_FC_NONE 0
+#define E1000_FC_RX_PAUSE 1
+#define E1000_FC_TX_PAUSE 2
+#define E1000_FC_FULL 3
+#define E1000_FC_DEFAULT  0xFF



NAK.  Goes from enum to #define, which loses type information and 
obfuscates things when inside a debugger (or other tool knowledgable of 
source code symbols).


-
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 03/23] e100: Add debugging code for cb cleaning and csum failures.

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

Refine cb cleaning debug printout and print out all cleaned cbs' status. Add
debug flag for EEPROM csum failures that were overridden by the user.

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


ACK patch, NAK description:  tainting is far more than a debug flag.


-
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: set congestion default through Kconfig

2006-09-19 Thread David Miller

Actually, I take that back:

net/ipv4/sysctl_net_ipv4.c: In function 
$,1rx(Btcp_congestion_default$,1ry(B:
net/ipv4/sysctl_net_ipv4.c:134: error: syntax error before $,1rx(B}$,1ry(B 
token
net/ipv4/sysctl_net_ipv4.c: At top level:
net/ipv4/sysctl_net_ipv4.c:136: warning: initialization from incompatible 
pointer type

I'll fix this up, but I'm seeing a very disturbing pattern lately
of very clueful people posting patches without typing make.

Is this too much to ask these days?  This costs me an enormous
amount of time, to review someone's patch and verify it's logical
correctness, only to check it in and find out that it doesn't
even build.  That, frankly, is unacceptable.
-
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 08/23] e1000: add multicast stats counters

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

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

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

diff --git a/drivers/net/e1000/e1000_ethtool.c 
b/drivers/net/e1000/e1000_ethtool.c
index a954746..0d329d6 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -60,6 +60,10 @@ static const struct e1000_stats e1000_gs
{ tx_packets, E1000_STAT(net_stats.tx_packets) },
{ rx_bytes, E1000_STAT(net_stats.rx_bytes) },
{ tx_bytes, E1000_STAT(net_stats.tx_bytes) },
+   { rx_broadcast, E1000_STAT(stats.bprc) },
+   { tx_broadcast, E1000_STAT(stats.bptc) },
+   { rx_multicast, E1000_STAT(stats.mprc) },
+   { tx_multicast, E1000_STAT(stats.mptc) },
{ rx_errors, E1000_STAT(net_stats.rx_errors) },
{ tx_errors, E1000_STAT(net_stats.tx_errors) },
{ tx_dropped, E1000_STAT(net_stats.tx_dropped) },


NAK -- you also need to remove the standard net stats, which are 
exported elsewhere



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


Re: [PATCH 07/23] e1000: remove unused code and make symbols static

2006-09-19 Thread Jeff Garzik

ACK patches 6-7

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


Re: [PATCH] tcp: set congestion default through Kconfig

2006-09-19 Thread David Miller
From: Stephen Hemminger [EMAIL PROTECTED]
Date: Mon, 18 Sep 2006 21:41:04 -0700

 Bert's attempt was noble
 It showed your desire for the truth
 A simple path exists
 
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

Looks good, 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 13/23] e1000: gather hardware bit tweaks.

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

Several hardware bits were set all over the driver and have been
consolidated into a single function.



diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 9422864..a143b49 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -61,6 +61,7 @@ static int32_t e1000_id_led_init(struct 
 static int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, uint32_t cnf_base_addr, uint32_t cnf_size);

 static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
 static void e1000_init_rx_addrs(struct e1000_hw *hw);
+static void e1000_initialize_hardware_bits(struct e1000_hw *hw);
 static boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw);
 static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
 static int32_t e1000_mng_enable_host_if(struct e1000_hw *hw);
@@ -716,6 +717,110 @@ e1000_reset_hw(struct e1000_hw *hw)
 }
 
 /**

+ *
+ * Initialize a number of hardware-dependent bits
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ */
+static void
+e1000_initialize_hardware_bits(struct e1000_hw *hw)
+{
+if ((hw-mac_type = e1000_82571)  (!hw-initialize_hw_bits_disable)) {
+/* Settings common to all silicon */
+uint32_t reg_ctrl, reg_ctrl_ext;
+uint32_t reg_tarc0, reg_tarc1;
+uint32_t reg_tctl;
+uint32_t reg_txdctl, reg_txdctl1;
+
+reg_tarc0 = E1000_READ_REG(hw, TARC0);
+reg_tarc0 = ~0x7800;   /* Clear bits 30, 29, 28, and 27 */
+
+reg_txdctl = E1000_READ_REG(hw, TXDCTL);
+reg_txdctl |= E1000_TXDCTL_COUNT_DESC;   /* Set bit 22 */
+E1000_WRITE_REG(hw, TXDCTL, reg_txdctl);
+
+reg_txdctl1 = E1000_READ_REG(hw, TXDCTL1);
+reg_txdctl1 |= E1000_TXDCTL_COUNT_DESC;  /* Set bit 22 */
+E1000_WRITE_REG(hw, TXDCTL1, reg_txdctl1);
+
+switch (hw-mac_type) {
+case e1000_82571:
+case e1000_82572:
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+reg_tctl = E1000_READ_REG(hw, TCTL);
+
+/* Set the phy Tx compatible mode bits */
+reg_tarc1 = ~0x6000;   /* Clear bits 30 and 29 */
+
+reg_tarc0 |= 0x0780;/* Set TARC0 bits 23-26 */
+reg_tarc1 |= 0x0700;/* Set TARC1 bits 24-26 */
+
+if (reg_tctl  E1000_TCTL_MULR)
+reg_tarc1 = ~0x1000;   /* Clear bit 28 if MULR is 1b 
*/
+else
+reg_tarc1 |= 0x1000;/* Set bit 28 if MULR is 0b */
+
+E1000_WRITE_REG(hw, TARC1, reg_tarc1);
+break;
+case e1000_82573:
+reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+reg_ctrl = E1000_READ_REG(hw, CTRL);
+
+reg_ctrl_ext = ~0x0080;/* Clear bit 23 */
+reg_ctrl_ext |= 0x0040; /* Set bit 22 */
+reg_ctrl = ~0x2000;/* Clear bit 29 */
+
+E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
+E1000_WRITE_REG(hw, CTRL, reg_ctrl);
+break;
+case e1000_80003es2lan:
+if ((hw-media_type == e1000_media_type_fiber) ||
+(hw-media_type == e1000_media_type_internal_serdes)) {
+reg_tarc0 = ~0x0010;   /* Clear bit 20 */
+}
+
+reg_tctl = E1000_READ_REG(hw, TCTL);
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+if (reg_tctl  E1000_TCTL_MULR)
+reg_tarc1 = ~0x1000;   /* Clear bit 28 if MULR is 1b 
*/
+else
+reg_tarc1 |= 0x1000;/* Set bit 28 if MULR is 0b */
+
+E1000_WRITE_REG(hw, TARC1, reg_tarc1);
+break;
+case e1000_ich8lan:
+if ((hw-revision_id  3) ||
+((hw-device_id != E1000_DEV_ID_ICH8_IGP_M_AMT) 
+ (hw-device_id != E1000_DEV_ID_ICH8_IGP_M)))
+reg_tarc0 |= 0x3000;/* Set TARC0 bits 29 and 28 */
+reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+reg_ctrl_ext |= 0x0040; /* Set bit 22 */
+E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
+
+reg_tarc0 |= 0x0d80;/* Set TARC0 bits 23, 24, 26, 27 */
+
+reg_tarc1 = E1000_READ_REG(hw, TARC1);
+reg_tctl = E1000_READ_REG(hw, TCTL);
+
+if (reg_tctl  E1000_TCTL_MULR)
+reg_tarc1 = ~0x1000;   /* Clear bit 28 if MULR is 1b 
*/
+else
+reg_tarc1 |= 0x1000;/* Set bit 28 if MULR is 0b */
+
+reg_tarc1 |= 0x4500;/* Set bit 24, 26 

Re: [PATCH 11/23] e1000: Jumbo frames fixes for 82573

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

Disable jumbo frames for 82573L alltogether and when ASPM is enabled
since the hardware has problems with it. For the NICs that do support
this in the 82573 series we set ERT_2048 to attempt to receive as much
traffic as early as we can.

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

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index e81aa03..2ecec51 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3138,11 +3138,13 @@ e1000_change_mtu(struct net_device *netd
}
break;
case e1000_82573:
-   /* only enable jumbo frames if ASPM is disabled completely
-* this means both bits must be zero in 0x1A bits 3:2 */
+   /* Jumbo Frames not supported if:
+* - this is not an 82573L device
+* - ASPM is enabled in any way (0x1A bits 3:2) */
e1000_read_eeprom(adapter-hw, EEPROM_INIT_3GIO_3, 1,
  eeprom_data);
-   if (eeprom_data  EEPROM_WORD1A_ASPM_MASK) {
+   if ((adapter-hw.device_id != E1000_DEV_ID_82573L) ||
+   (eeprom_data  EEPROM_WORD1A_ASPM_MASK)) {
if (max_frame  MAXIMUM_ETHERNET_FRAME_SIZE) {
DPRINTK(PROBE, ERR,
Jumbo Frames not supported.\n);


NAK.  at probe time, set a jumbo-frames-enabled bit, then test it in 
e1000_change_mtu().


Don't include all this chip-checking code into the change_mtu function.


-
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: set congestion default through Kconfig

2006-09-19 Thread David Miller

Ok, I really give up, after adding the missing semicolon I now
get this:

net/ipv4/sysctl_net_ipv4.c:136: warning: initialization from incompatible 
pointer type

This is getting rediculious.

Folks, don't post patches which are not request for comments
explicitly in the subject line without testing the build, ever!

-
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] make some netfilter globals __read_mostly

2006-09-19 Thread Brian Haley

Make some netfilter globals __read_mostly at the request of Patrick McHardy.

Signed-off-by: Brian Haley [EMAIL PROTECTED]
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index aa45917..2370245 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -64,17 +64,17 @@ atomic_t ip_conntrack_count = ATOMIC_INI
 
 void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL;
 LIST_HEAD(ip_conntrack_expect_list);
-struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO];
+struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO] __read_mostly;
 static LIST_HEAD(helpers);
 unsigned int ip_conntrack_htable_size = 0;
 int ip_conntrack_max;
-struct list_head *ip_conntrack_hash;
+struct list_head *ip_conntrack_hash __read_mostly;
 static kmem_cache_t *ip_conntrack_cachep __read_mostly;
 static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly;
 struct ip_conntrack ip_conntrack_untracked;
 unsigned int ip_ct_log_invalid;
 static LIST_HEAD(unconfirmed);
-static int ip_conntrack_vmalloc;
+static int ip_conntrack_vmalloc __read_mostly;
 
 static unsigned int ip_conntrack_next_id;
 static unsigned int ip_conntrack_expect_next_id;
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 276a964..de680e5 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -52,15 +52,15 @@ struct ipq_queue_entry {
 
 typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long);
 
-static unsigned char copy_mode = IPQ_COPY_NONE;
+static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE;
 static unsigned int queue_maxlen = IPQ_QMAX_DEFAULT;
 static DEFINE_RWLOCK(queue_lock);
-static int peer_pid;
-static unsigned int copy_range;
+static int peer_pid __read_mostly;
+static unsigned int copy_range __read_mostly;
 static unsigned int queue_total;
 static unsigned int queue_dropped = 0;
 static unsigned int queue_user_dropped = 0;
-static struct sock *ipqnl;
+static struct sock *ipqnl __read_mostly;
 static LIST_HEAD(queue_list);
 static DEFINE_MUTEX(ipqnl_mutex);
 
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index c01c126..c74d1cc 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -56,15 +56,15 @@ struct ipq_queue_entry {
 
 typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long);
 
-static unsigned char copy_mode = IPQ_COPY_NONE;
+static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE;
 static unsigned int queue_maxlen = IPQ_QMAX_DEFAULT;
 static DEFINE_RWLOCK(queue_lock);
-static int peer_pid;
-static unsigned int copy_range;
+static int peer_pid __read_mostly;
+static unsigned int copy_range __read_mostly;
 static unsigned int queue_total;
 static unsigned int queue_dropped = 0;
 static unsigned int queue_user_dropped = 0;
-static struct sock *ipqnl;
+static struct sock *ipqnl __read_mostly;
 static LIST_HEAD(queue_list);
 static DEFINE_MUTEX(ipqnl_mutex);
 
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 8f22619..d50c52d 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -74,17 +74,17 @@ atomic_t nf_conntrack_count = ATOMIC_INI
 
 void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL;
 LIST_HEAD(nf_conntrack_expect_list);
-struct nf_conntrack_protocol **nf_ct_protos[PF_MAX];
-struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX];
+struct nf_conntrack_protocol **nf_ct_protos[PF_MAX] __read_mostly;
+struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX] __read_mostly;
 static LIST_HEAD(helpers);
 unsigned int nf_conntrack_htable_size = 0;
 int nf_conntrack_max;
-struct list_head *nf_conntrack_hash;
-static kmem_cache_t *nf_conntrack_expect_cachep;
+struct list_head *nf_conntrack_hash __read_mostly;
+static kmem_cache_t *nf_conntrack_expect_cachep __read_mostly;
 struct nf_conn nf_conntrack_untracked;
 unsigned int nf_ct_log_invalid;
 static LIST_HEAD(unconfirmed);
-static int nf_conntrack_vmalloc;
+static int nf_conntrack_vmalloc __read_mostly;
 
 static unsigned int nf_conntrack_next_id;
 static unsigned int nf_conntrack_expect_next_id;


Re: [PATCH 18/23] e1000: revert 'e1000: Remove 0x1000 as supported device'

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher,
673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000
from the list of supported devices. A fix was submitted for the original
issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a).

This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and
re-enables 82542rev3 chips completely.

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

 0 files changed, 0 insertions(+), 0 deletions(-)


null patch


-
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 17/23] e1000: driver state fixes (race fix)

2006-09-19 Thread Jeff Garzik

ACK

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


Re: [PATCH 14/23] e1000: handle manageability for pci-e adapters at PHY powerdown

2006-09-19 Thread Jeff Garzik

Kok, Auke wrote:

When powering down the PHY (if WoL is disabled) we should only check
copper PHY's and handle PCI-E adapters differently.

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

 drivers/net/e1000/e1000_main.c |   41 +++-
 1 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 09f6662..9c41a44 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -512,25 +512,48 @@ void e1000_power_up_phy(struct e1000_ada
 
 static void e1000_power_down_phy(struct e1000_adapter *adapter)

 {
-   boolean_t mng_mode_enabled = (adapter-hw.mac_type = e1000_82571) 
- e1000_check_mng_mode(adapter-hw);
-   /* Power down the PHY so no link is implied when interface is down
-* The PHY cannot be powered down if any of the following is TRUE
+   /* Power down the PHY so no link is implied when interface is down *
+* The PHY cannot be powered down if any of the following is TRUE *
 * (a) WoL is enabled
 * (b) AMT is active
 * (c) SoL/IDER session is active */
if (!adapter-wol  adapter-hw.mac_type = e1000_82540 
-   adapter-hw.mac_type != e1000_ich8lan 
-   adapter-hw.media_type == e1000_media_type_copper 
-   !(E1000_READ_REG(adapter-hw, MANC)  E1000_MANC_SMBUS_EN) 
-   !mng_mode_enabled 
-   !e1000_check_phy_reset_block(adapter-hw)) {
+  adapter-hw.media_type == e1000_media_type_copper) {
uint16_t mii_reg = 0;
+
+   switch (adapter-hw.mac_type) {
+   case e1000_82540:
+   case e1000_82545:
+   case e1000_82545_rev_3:
+   case e1000_82546:
+   case e1000_82546_rev_3:
+   case e1000_82541:
+   case e1000_82541_rev_2:
+   case e1000_82547:
+   case e1000_82547_rev_2:
+   if (E1000_READ_REG(adapter-hw, MANC) 
+   E1000_MANC_SMBUS_EN)
+   goto out;
+   break;
+   case e1000_82571:
+   case e1000_82572:
+   case e1000_82573:
+   case e1000_80003es2lan:
+   case e1000_ich8lan:
+   if (e1000_check_mng_mode(adapter-hw) ||
+   e1000_check_phy_reset_block(adapter-hw))
+   goto out;
+   break;
+   default:
+   goto out;
+   }
e1000_read_phy_reg(adapter-hw, PHY_CTRL, mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
e1000_write_phy_reg(adapter-hw, PHY_CTRL, mii_reg);
mdelay(1);


NAK.  another obvious case where you should be testing a single feature 
bit, rather than adding a huge switch statement.



-
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 16/23] e1000: reduce RAR entries available for ICH8

2006-09-19 Thread Jeff Garzik

ACK patches 15-16

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


Re: Fw: [PATCH] Remove powerpc specific parts of 3c509 driver

2006-09-19 Thread Linas Vepstas
On Tue, Sep 19, 2006 at 08:52:18PM +0200, Matt Sealey wrote:
[...]
 
 Linas Vepstas wrote:
 On Tue, Sep 19, 2006 at 02:54:33PM +1000, Stephen Rothwell wrote:
 On powerpc and ppc, insl_ns and insl are identical as are outsl_ns and
 outsl, so remove the conditional use of insl_ns and outsl_ns.
 
 The rest of this patch might indeed be correct, but the above comment 
 bothers me. The ns versions of routines are supposed to be
 non-byte-swapped versions of the insl/outsl routines (which would

Never mind. Silly me don't know my history. 

asm-powerpc/io.h clearly states

 * The *_ns versions below don't do byte-swapping.
 * Neither do the standard versions now, these are just here
 * for older code.

Seems that the byteswapping machanism was changed a while ago, 
and no longer handled in this way any more.

--linas
-
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 23/23] e100, e1000, ixgb: increment version numbers

2006-09-19 Thread Jeff Garzik

ACK patches 21-23

-
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 12/23] e1000: Maybe stop TX if not enough free descriptors

2006-09-19 Thread Stephen Hemminger
My preference would be for drivers not to use LLTX (except loopback) and just
use the dev-xmit_lock via netif_tx_lock if possible.  Something like this for 
e1000.

Subject: [PATCH] e1000 no lltx

Get rid of lockless transmit for e1000. Use netif_tx_lock instead
of having to do locking in device. For NAPI this is trivial but
for the non-NAPI case it means scheduling a tasklet to do Tx
cleanup

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

---

 drivers/net/e1000/e1000.h  |7 +++--
 drivers/net/e1000/e1000_main.c |   53 ++--
 2 files changed, 33 insertions(+), 27 deletions(-)

87a7c62864818350ebb7da73f26e1dc49c5eb2e5
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 98afa9c..9de6519 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -190,7 +190,6 @@ struct e1000_tx_ring {
/* array of buffer information structs */
struct e1000_buffer *buffer_info;
 
-   spinlock_t tx_lock;
uint16_t tdh;
uint16_t tdt;
boolean_t last_tx_tso;
@@ -251,9 +250,8 @@ struct e1000_adapter {
uint16_t link_speed;
uint16_t link_duplex;
spinlock_t stats_lock;
-#ifdef CONFIG_E1000_NAPI
spinlock_t tx_queue_lock;
-#endif
+
atomic_t irq_sem;
struct work_struct reset_task;
uint8_t fc_autoneg;
@@ -263,6 +261,9 @@ struct e1000_adapter {
 
/* TX */
struct e1000_tx_ring *tx_ring;  /* One per active queue */
+#ifndef CONFIG_E1000_NAPI
+   struct tasklet_struct tx_tasklet;
+#endif
unsigned long tx_queue_len;
uint32_t txd_cmd;
uint32_t tx_int_delay;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index acf818b..8eb38a7 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -158,6 +158,7 @@ static boolean_t e1000_clean_rx_irq_ps(s
struct e1000_rx_ring *rx_ring,
int *work_done, int work_to_do);
 #else
+static void e1000_tx_tasklet(unsigned long arg);
 static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter,
 struct e1000_rx_ring *rx_ring);
 static boolean_t e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
@@ -811,8 +812,6 @@ e1000_probe(struct pci_dev *pdev,
if (pci_using_dac)
netdev-features |= NETIF_F_HIGHDMA;
 
-   netdev-features |= NETIF_F_LLTX;
-
adapter-en_mng_pt = e1000_enable_mng_pass_thru(adapter-hw);
 
/* initialize eeprom parameters */
@@ -1155,8 +1154,11 @@ e1000_sw_init(struct e1000_adapter *adap
dev_hold(adapter-polling_netdev[i]);
set_bit(__LINK_STATE_START, adapter-polling_netdev[i].state);
}
-   spin_lock_init(adapter-tx_queue_lock);
+#else
+   adapter-tx_tasklet.func = e1000_tx_tasklet;
+   adapter-tx_tasklet.data = (unsigned long) adapter;
 #endif
+   spin_lock_init(adapter-tx_queue_lock);
 
atomic_set(adapter-irq_sem, 1);
spin_lock_init(adapter-stats_lock);
@@ -1407,7 +1409,6 @@ setup_tx_desc_die:
 
txdr-next_to_use = 0;
txdr-next_to_clean = 0;
-   spin_lock_init(txdr-tx_lock);
 
return 0;
 }
@@ -1991,6 +1992,23 @@ e1000_clean_tx_ring(struct e1000_adapter
writel(0, adapter-hw.hw_addr + tx_ring-tdt);
 }
 
+#ifndef CONFIG_E1000_NAPI
+static void
+e1000_tx_tasklet(unsigned long arg)
+{
+   struct e1000_adapter *adapter = (struct e1000_adapter *) arg;
+   int i;
+
+   if (!spin_trylock(adapter-tx_queue_lock))
+   return;
+
+   for (i = 0; i  adapter-num_tx_queues; i++)
+   e1000_clean_tx_irq(adapter, adapter-tx_ring);
+
+   spin_unlock(adapter-tx_queue_lock);
+}
+#endif
+
 /**
  * e1000_clean_all_tx_rings - Free Tx Buffers for all queues
  * @adapter: board private structure
@@ -2902,7 +2920,6 @@ e1000_xmit_frame(struct sk_buff *skb, st
unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
unsigned int tx_flags = 0;
unsigned int len = skb-len;
-   unsigned long flags;
unsigned int nr_frags = 0;
unsigned int mss = 0;
int count = 0;
@@ -2996,18 +3013,10 @@ e1000_xmit_frame(struct sk_buff *skb, st
(adapter-hw.mac_type == e1000_82573))
e1000_transfer_dhcp_info(adapter, skb);
 
-   local_irq_save(flags);
-   if (!spin_trylock(tx_ring-tx_lock)) {
-   /* Collision - tell upper layer to requeue */
-   local_irq_restore(flags);
-   return NETDEV_TX_LOCKED;
-   }
-
/* need: count + 2 desc gap to keep tail from touching
 * head, otherwise try next time */
if (unlikely(E1000_DESC_UNUSED(tx_ring)  count + 2)) {
netif_stop_queue(netdev);
-   spin_unlock_irqrestore(tx_ring-tx_lock, flags);
return NETDEV_TX_BUSY;
}
 
@@ -3015,7 +3024,6 @@ 

Re: [PATCH 2/3][ATM]: [he] don't hold the device lock when upcalling

2006-09-19 Thread David Miller
From: chas williams - CONTRACTOR [EMAIL PROTECTED]
Date: Sat, 16 Sep 2006 20:19:02 -0400

 please consider for 2.6.18 -- thanks!
 
 [ATM]: [he] don't hold the device lock when upcalling
 
 This can create a deadlock/lock ordering problem with other layers that
 want to use the transmit (or other) path of the card at that time.
 
 Signed-off-by: Chas Williams [EMAIL PROTECTED]

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


Re: [XFRM]: Fix wildcard as tunnel source

2006-09-19 Thread David Miller
From: Patrick McHardy [EMAIL PROTECTED]
Date: Mon, 18 Sep 2006 11:43:49 +0200

 D'oh. Fixed patch attached.

Looks good Patrick, applied.

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


Re: [PATCH 3/3][ATM]: potential NULL pointer dereference in clip_mkip()

2006-09-19 Thread David Miller
From: chas williams - CONTRACTOR [EMAIL PROTECTED]
Date: Sat, 16 Sep 2006 20:19:21 -0400

 please consider for 2.6.18 -- thanks!
 
 [ATM]: potential NULL pointer dereference in clip_mkip()
 
 http://article.gmane.org/gmane.linux.kernel/445717
 
 When re-processing received data, a struct sk_buff pointer skb may be
 dereferenced after a free operation.
 
 From: Frederik Deweerdt [EMAIL PROTECTED]
 Signed-off-by: Chas Williams [EMAIL PROTECTED]

Hideaki YOSHIFUJI posted a better version of the fix which is
already in Linus's tree.

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


Re: [PATCH 04/23] e100: rework WoL and shutdown handling

2006-09-19 Thread Auke Kok

Jeff Garzik wrote:

Kok, Auke wrote:

Unify our shutdown/suspend/resume code and make it similar to e1000:
e1000_shutdown now calls suspend which does the exact same thing on
shutdown except saving PCI config state on suspend. WoL setup code
is now also more simple and works even when CONFIG_PM is not set, which
was previously broken.

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


Why does e100_suspend() need to exist even when CONFIG_PM is disabled?

WoL is fundamentally power management.


same as e1000_suspend: we're consolidating shutdown code making 2 different 
codepaths exactly the same.


e100_shutdown calls e100_suspend() in case of a normal powerdown.

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


Re: [PATCH 1/3] sky2: tx pause bug fix

2006-09-19 Thread Stephen Hemminger
On Mon, 11 Sep 2006 11:35:11 +1000
Andrew Hall [EMAIL PROTECTED] wrote:

 Stephen,
 
 After some serious testing, this patch seems to fix the lockup issue 
 completely. I manually applied these changes against the 2.6.17.13 release.

Any more problems?
-
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 04/23] e100: rework WoL and shutdown handling

2006-09-19 Thread Jeff Garzik

Auke Kok wrote:

Jeff Garzik wrote:

Kok, Auke wrote:

Unify our shutdown/suspend/resume code and make it similar to e1000:
e1000_shutdown now calls suspend which does the exact same thing on
shutdown except saving PCI config state on suspend. WoL setup code
is now also more simple and works even when CONFIG_PM is not set, which
was previously broken.

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


Why does e100_suspend() need to exist even when CONFIG_PM is disabled?

WoL is fundamentally power management.


same as e1000_suspend: we're consolidating shutdown code making 2 
different codepaths exactly the same.


e100_shutdown calls e100_suspend() in case of a normal powerdown.


OK, well you don't need to list it in the pci_driver struct then...


-
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] tcp: set congestion default through Kconfig (v2)

2006-09-19 Thread Stephen Hemminger
Bert's attempt was noble
It showed your desire for the truth
A simple path existed

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/ipv4/Kconfig   |   39 +--
 net/ipv4/sysctl_net_ipv4.c |6 ++
 net/ipv4/tcp_cong.c|2 +-
 3 files changed, 44 insertions(+), 3 deletions(-)

--- net-2.6.19.orig/net/ipv4/Kconfig2006-09-19 13:11:09.0 -0700
+++ net-2.6.19/net/ipv4/Kconfig 2006-09-19 13:20:45.0 -0700
@@ -573,12 +573,47 @@
loss packets.
See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf
 
+choice
+   prompt Default TCP congestion control
+   default DEFAULT_BIC
+   help
+ Select the TCP congestion control that will be used by default
+ for all connections.
+
+   config DEFAULT_BIC
+   bool Bic if TCP_CONG_BIC=y
+
+   config DEFAULT_CUBIC
+   bool Cubic if TCP_CONG_CUBIC=y
+
+   config DEFAULT_HTCP
+   bool Htcp if TCP_CONG_HTCP=y
+
+   config DEFAULT_VEGAS
+   bool Vegas if TCP_CONG_VEGAS=y
+
+   config DEFAULT_WESTWOOD
+   bool Westwood if TCP_CONG_WESTWOOD=y
+
+   config DEFAULT_RENO
+   bool Reno
+
+endchoice
+
 endmenu
 
-config TCP_CONG_BIC
-   tristate
+config DEFAULT_BIC
depends on !TCP_CONG_ADVANCED
default y
 
+config DEFAULT_TCP_CONG
+   string
+   default bic if DEFAULT_BIC
+   default cubic if DEFAULT_CUBIC
+   default htcp if DEFAULT_HTCP
+   default vegas if DEFAULT_VEGAS
+   default westwood if DEFAULT_WESTWOOD
+   default reno if DEFAULT_RENO
+
 source net/ipv4/ipvs/Kconfig
 
--- net-2.6.19.orig/net/ipv4/sysctl_net_ipv4.c  2006-09-19 13:11:09.0 
-0700
+++ net-2.6.19/net/ipv4/sysctl_net_ipv4.c   2006-09-19 13:37:04.0 
-0700
@@ -129,6 +129,12 @@
return ret;
 }
 
+static int __init tcp_congestion_default(void)
+{
+   return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
+}
+
+late_initcall(tcp_congestion_default);
 
 ctl_table ipv4_table[] = {
 {
--- net-2.6.19.orig/net/ipv4/tcp_cong.c 2006-09-19 13:11:09.0 -0700
+++ net-2.6.19/net/ipv4/tcp_cong.c  2006-09-19 13:20:45.0 -0700
@@ -48,7 +48,7 @@
printk(KERN_NOTICE TCP %s already registered\n, ca-name);
ret = -EEXIST;
} else {
-   list_add_rcu(ca-list, tcp_cong_list);
+   list_add_tail_rcu(ca-list, tcp_cong_list);
printk(KERN_INFO TCP %s registered\n, ca-name);
}
spin_unlock(tcp_cong_list_lock);
-
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 18/23] e1000: revert 'e1000: Remove 0x1000 as supported device'

2006-09-19 Thread Auke Kok

Jeff Garzik wrote:

Kok, Auke wrote:

The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher,
673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000
from the list of supported devices. A fix was submitted for the original
issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a).

This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and
re-enables 82542rev3 chips completely.

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

 0 files changed, 0 insertions(+), 0 deletions(-)


null patch


hmm, it should look like this:


---

e1000: revert 'e1000: Remove 0x1000 as supported device'

The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher,
673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000
from the list of supported devices. A fix was submitted for the original
issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a).

This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and
re-enables 82542rev3 chips completely.

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

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 1d7c999..a8d724e 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -48,6 +48,7 @@ static char e1000_copyright[] = Copyrig
  *   {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
  */
 static struct pci_device_id e1000_pci_tbl[] = {
+   INTEL_E1000_ETHERNET_DEVICE(0x1000),
INTEL_E1000_ETHERNET_DEVICE(0x1001),
INTEL_E1000_ETHERNET_DEVICE(0x1004),
INTEL_E1000_ETHERNET_DEVICE(0x1008),
-
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 18/23] e1000: revert 'e1000: Remove 0x1000 as supported device'

2006-09-19 Thread Jeff Garzik

Auke Kok wrote:

Jeff Garzik wrote:

Kok, Auke wrote:

The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher,
673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 
8086:1000

from the list of supported devices. A fix was submitted for the original
issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a).

This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and
re-enables 82542rev3 chips completely.

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

 0 files changed, 0 insertions(+), 0 deletions(-)


null patch


hmm, it should look like this:


---

e1000: revert 'e1000: Remove 0x1000 as supported device'

The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher,
673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000
from the list of supported devices. A fix was submitted for the original
issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a).

This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and
re-enables 82542rev3 chips completely.

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

diff --git a/drivers/net/e1000/e1000_main.c 
b/drivers/net/e1000/e1000_main.c

index 1d7c999..a8d724e 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -48,6 +48,7 @@ static char e1000_copyright[] = Copyrig
  *   {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
  */
 static struct pci_device_id e1000_pci_tbl[] = {
+   INTEL_E1000_ETHERNET_DEVICE(0x1000),


This specific change is already in #upstream...


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


Re: [PATCH 12/23] e1000: Maybe stop TX if not enough free descriptors

2006-09-19 Thread Jeff Garzik
looks OK except for the tasklet, which may starve if the lock is being 
held upon entry



-
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 12/23] e1000: Maybe stop TX if not enough free descriptors

2006-09-19 Thread Stephen Hemminger
On Tue, 19 Sep 2006 16:45:06 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:

 looks OK except for the tasklet, which may starve if the lock is being 
 held upon entry
 
 

Why would the tasklet starve anymore than NAPI?
Worst case, the transmitters fill the ring completely and have to
wait for the tasklet to clean up.

Maybe it would be better to always to Tx cleanup in tasklet even with
NAPI. Then the NAPI poll flow control would be used only for Rx.
As it stands, if receiver gets swamped, the poll doesn't get run often,
so the transmitter cleanup doesn't get run. A tasklet has the advantage
of eliminating the need for adapter-tx_queue_lock as well.



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


Re: [PATCH 00/23] e100, e1000, ixgb updates

2006-09-19 Thread Auke Kok

Jeff Garzik wrote:

FYI, note that I killed some OS wrappers from osdep.h in e1000 and ixgb


excellent, I am ashamed I didn't get to that myself yet :)

Thanks!

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


[PATCH] sky2: process tx pause frames.

2006-09-19 Thread Stephen Hemminger
This patch already is in 2.6.17 stable, but the bigger version was pushed
off till 2.6.19. Here is a less intrusive version that needs to go into 2.6.18
(or I'll end up sending it for 2.6.18.1). The driver was telling the
GMAC to flush (not process) pause frames. Manually disabling pause wasn't
working because of problems in the setup.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

--- linux-2.6.orig/drivers/net/sky2.h   2006-07-13 12:50:52.0 -0700
+++ linux-2.6/drivers/net/sky2.h2006-09-19 14:09:21.0 -0700
@@ -1566,7 +1566,7 @@
 
GMR_FS_ANY_ERR  = GMR_FS_RX_FF_OV | GMR_FS_CRC_ERR |
  GMR_FS_FRAGMENT | GMR_FS_LONG_ERR |
- GMR_FS_MII_ERR | GMR_FS_BAD_FC | GMR_FS_GOOD_FC |
+ GMR_FS_MII_ERR | GMR_FS_BAD_FC |
  GMR_FS_UN_SIZE | GMR_FS_JABBER,
 };
 
-
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: set congestion default through Kconfig (v2)

2006-09-19 Thread David Miller
From: Stephen Hemminger [EMAIL PROTECTED]
Date: Tue, 19 Sep 2006 13:41:32 -0700

 Bert's attempt was noble
 It showed your desire for the truth
 A simple path existed
 
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

Applied, but...

net/ipv4/Kconfig:607:warning: defaults for choice values not supported

Hmmm...
-
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] tcp: simpler bic default

2006-09-19 Thread Stephen Hemminger
New tcp default config
means we can eliminate the hack
that was used previous

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

--- net-2.6.19.orig/net/ipv4/Kconfig2006-09-19 14:27:58.0 -0700
+++ net-2.6.19/net/ipv4/Kconfig 2006-09-19 14:28:17.0 -0700
@@ -602,10 +602,6 @@
 
 endmenu
 
-config DEFAULT_BIC
-   depends on !TCP_CONG_ADVANCED
-   default y
-
 config DEFAULT_TCP_CONG
string
default bic if DEFAULT_BIC
@@ -614,6 +610,7 @@
default vegas if DEFAULT_VEGAS
default westwood if DEFAULT_WESTWOOD
default reno if DEFAULT_RENO
+   default bic
 
 source net/ipv4/ipvs/Kconfig
 
-
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 03/23] e100: Add debugging code for cb cleaning and csum failures.

2006-09-19 Thread Dave Jones
On Tue, Sep 19, 2006 at 10:28:38AM -0700, Kok, Auke wrote:
  
  Refine cb cleaning debug printout and print out all cleaned cbs' status. Add
  debug flag for EEPROM csum failures that were overridden by the user.
  
  Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]
  Signed-off-by: Auke Kok [EMAIL PROTECTED]
  ---
  
   drivers/net/e100.c |9 ++---
   1 files changed, 6 insertions(+), 3 deletions(-)
  
  diff --git a/drivers/net/e100.c b/drivers/net/e100.c
  index ab0868c..ae93c62 100644
  --- a/drivers/net/e100.c
  +++ b/drivers/net/e100.c
  @@ -761,6 +761,8 @@ static int e100_eeprom_load(struct nic *
   DPRINTK(PROBE, ERR, EEPROM corrupted\n);
   if (!eeprom_bad_csum_allow)
   return -EAGAIN;
  +else
  +add_taint(TAINT_MACHINE_CHECK);

I object to this flag being abused this way.
A corrupt EEPROM on a network card has _nothing_ to do with
a CPU machine check exception.

Dave

-
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: set congestion default through Kconfig (v2)

2006-09-19 Thread bert hubert
On Tue, Sep 19, 2006 at 02:20:07PM -0700, David Miller wrote:

  Bert's attempt was noble
  It showed your desire for the truth

It was also crap :-)

 Applied, but...
 net/ipv4/Kconfig:607:warning: defaults for choice values not supported

It does appear to do the right thing in all cases I throw against it, but
this warning is sure to generate noise.

It probably means CONFIG_BIC is both available in the menu, and set as a
separate option, and that this does not set the menu to CONFIG_BIC. This is
not a big deal however as the menu is not shown at all whenever line 607
applies.


-- 
http://www.PowerDNS.com  Open source, database driven DNS Software 
http://netherlabs.nl  Open and Closed source services
-
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 03/23] e100: Add debugging code for cb cleaning and csum failures.

2006-09-19 Thread Jeff Garzik

Dave Jones wrote:

On Tue, Sep 19, 2006 at 10:28:38AM -0700, Kok, Auke wrote:
  
  Refine cb cleaning debug printout and print out all cleaned cbs' status. Add

  debug flag for EEPROM csum failures that were overridden by the user.
  
  Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED]

  Signed-off-by: Auke Kok [EMAIL PROTECTED]
  ---
  
   drivers/net/e100.c |9 ++---

   1 files changed, 6 insertions(+), 3 deletions(-)
  
  diff --git a/drivers/net/e100.c b/drivers/net/e100.c

  index ab0868c..ae93c62 100644
  --- a/drivers/net/e100.c
  +++ b/drivers/net/e100.c
  @@ -761,6 +761,8 @@ static int e100_eeprom_load(struct nic *
DPRINTK(PROBE, ERR, EEPROM corrupted\n);
if (!eeprom_bad_csum_allow)
return -EAGAIN;
  + else
  + add_taint(TAINT_MACHINE_CHECK);

I object to this flag being abused this way.
A corrupt EEPROM on a network card has _nothing_ to do with
a CPU machine check exception.


Fair enough.  Better suggestions?

I think it's fair to set _some_ taint flag, perhaps a new one, on a 
known corrupted firmware.  But if others disagree, I'll follow the 
consensus here.


Jeff, not having a strong opinion in this case



-
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 04/23] e100: rework WoL and shutdown handling

2006-09-19 Thread Auke Kok

Jeff Garzik wrote:

Kok, Auke wrote:

Unify our shutdown/suspend/resume code and make it similar to e1000:
e1000_shutdown now calls suspend which does the exact same thing on
shutdown except saving PCI config state on suspend. WoL setup code
is now also more simple and works even when CONFIG_PM is not set, which
was previously broken.

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


Why does e100_suspend() need to exist even when CONFIG_PM is disabled?

WoL is fundamentally power management.


okay, I'll fix this for e1000 as well, where we have the same code flow.

Thanks.

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


Re: [PATCH] tcp: simpler bic default

2006-09-19 Thread bert hubert
On Tue, Sep 19, 2006 at 02:32:09PM -0700, Stephen Hemminger wrote:
 Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

# CONFIG_TCP_CONG_ADVANCED is not set
# CONFIG_DEFAULT_BIC is not set
# CONFIG_DEFAULT_CUBIC is not set
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG=bic

There is no bic in the kernel now - will this do the right thing?

-- 
http://www.PowerDNS.com  Open source, database driven DNS Software 
http://netherlabs.nl  Open and Closed source services
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >