Re: 2.6.15-rc5-mm2
On Sun, Dec 11, 2005 at 08:35:08PM -0800, David S. Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Sun, 11 Dec 2005 18:39:32 -0800 Odd net behaviour with Dave's net-2.6.16 tree. ... - i cannot login with xdm, as soon as i login, the X server restarts. Login with startx works (.xinitrc is a symlink to .xsession) It works fine with 2.6.15-rc5-mm1. If you need any log please ask. - there is a warning when pinging an inexistent ip (it works fine with 2.6.15-rc5-mm1 too) 32-bit x86 ping binary running on an x86_64 system? That might be a clue for the second bug. The first one is mysterious without some more info. Can you retest for the ping bug after reverting the following patch? it fixes the ping bug and i cannot reproduce the xdm bug with the patch reverted. Is it possible that the patch touch something in the unix stream code ? It could explain why it fixes the xdm code. Thanks, Benoit Thanks. diff-tree 07dda0399dded840d4d1fde39d1cbb0b37123606 (from 2fbe0a2c52cafa9e6533d0a1747617a46bf8bac6) Author: Benjamin LaHaise [EMAIL PROTECTED] Date: Sun Dec 11 17:28:15 2005 -0800 [NET]: Avoid atomic xchg() for non-error case It also looks like there were 2 places where the test on sk_err was missing from the event wait logic (in sk_stream_wait_connect and sk_stream_wait_memory), while the rest of the sock_error() users look to be doing the right thing. This version of the patch fixes those, and cleans up a few places that were testing -sk_err directly. Signed-off-by: Benjamin LaHaise [EMAIL PROTECTED] Signed-off-by: David S. Miller [EMAIL PROTECTED] -- powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.15-rc5-mm2
On Mon, Dec 12, 2005 at 09:59:31AM +0100, Benoit Boissinot wrote: On Sun, Dec 11, 2005 at 08:35:08PM -0800, David S. Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Sun, 11 Dec 2005 18:39:32 -0800 Odd net behaviour with Dave's net-2.6.16 tree. ... - i cannot login with xdm, as soon as i login, the X server restarts. Login with startx works (.xinitrc is a symlink to .xsession) It works fine with 2.6.15-rc5-mm1. If you need any log please ask. - there is a warning when pinging an inexistent ip (it works fine with 2.6.15-rc5-mm1 too) 32-bit x86 ping binary running on an x86_64 system? That might be a clue for the second bug. The first one is mysterious without some more info. Can you retest for the ping bug after reverting the following patch? it fixes the ping bug and i cannot reproduce the xdm bug with the patch reverted. Is it possible that the patch touch something in the unix stream code ? It could explain why it fixes the xdm code. Btw both are 32-bit system (pentium-m and athlon xp). -- powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.15-rc5-mm2
On Sun, Dec 11, 2005 at 08:35:08PM -0800, David S. Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Sun, 11 Dec 2005 18:39:32 -0800 Odd net behaviour with Dave's net-2.6.16 tree. ... - i cannot login with xdm, as soon as i login, the X server restarts. Login with startx works (.xinitrc is a symlink to .xsession) It works fine with 2.6.15-rc5-mm1. If you need any log please ask. - there is a warning when pinging an inexistent ip (it works fine with 2.6.15-rc5-mm1 too) 32-bit x86 ping binary running on an x86_64 system? That might be a clue for the second bug. The first one is mysterious without some more info. Can you retest for the ping bug after reverting the following patch? Thanks. diff-tree 07dda0399dded840d4d1fde39d1cbb0b37123606 (from 2fbe0a2c52cafa9e6533d0a1747617a46bf8bac6) Author: Benjamin LaHaise [EMAIL PROTECTED] Date: Sun Dec 11 17:28:15 2005 -0800 [NET]: Avoid atomic xchg() for non-error case It also looks like there were 2 places where the test on sk_err was missing from the event wait logic (in sk_stream_wait_connect and sk_stream_wait_memory), while the rest of the sock_error() users look to be doing the right thing. This version of the patch fixes those, and cleans up a few places that were testing -sk_err directly. Signed-off-by: Benjamin LaHaise [EMAIL PROTECTED] Signed-off-by: David S. Miller [EMAIL PROTECTED] diff --git a/include/net/sock.h b/include/net/sock.h index 982b4ec..6036340 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1166,8 +1166,11 @@ static inline int sock_queue_err_skb(str static inline int sock_error(struct sock *sk) { - int err = xchg(sk-sk_err, 0); - return -err; + int err; + if (likely(!sk-sk_err)) + return 0; + err = xchg(sk-sk_err, 0); + return unlikely(-err); the 'return unlikely(-err)' isn't in gitweb (http://kernel.org/git/?p=linux/kernel/git/davem/net-2.6.16.git;a=commit;h=eaa9fba6511857dd2dc6f7f99a4564148c238081) changing it to 'return -err' makes ping and xdm happy again. (i don't understand how the unlikely can make a performance difference). Anyway, since i'm using gcc-4 (tested with 4.0.2 and 4.1-beta) maybe it is a gcc bug. I'm currently rebuilding my kernel with gcc-3.4. regards, Benoit -- powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.15-rc5-mm2
On Mon, Dec 12, 2005 at 02:04:18PM +0100, Benoit Boissinot wrote: On Sun, Dec 11, 2005 at 08:35:08PM -0800, David S. Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Sun, 11 Dec 2005 18:39:32 -0800 Odd net behaviour with Dave's net-2.6.16 tree. ... - i cannot login with xdm, as soon as i login, the X server restarts. Login with startx works (.xinitrc is a symlink to .xsession) It works fine with 2.6.15-rc5-mm1. If you need any log please ask. - there is a warning when pinging an inexistent ip (it works fine with 2.6.15-rc5-mm1 too) [snip] diff --git a/include/net/sock.h b/include/net/sock.h index 982b4ec..6036340 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1166,8 +1166,11 @@ static inline int sock_queue_err_skb(str static inline int sock_error(struct sock *sk) { - int err = xchg(sk-sk_err, 0); - return -err; + int err; + if (likely(!sk-sk_err)) + return 0; + err = xchg(sk-sk_err, 0); + return unlikely(-err); the 'return unlikely(-err)' isn't in gitweb (http://kernel.org/git/?p=linux/kernel/git/davem/net-2.6.16.git;a=commit;h=eaa9fba6511857dd2dc6f7f99a4564148c238081) changing it to 'return -err' makes ping and xdm happy again. (i don't understand how the unlikely can make a performance difference). Anyway, since i'm using gcc-4 (tested with 4.0.2 and 4.1-beta) maybe it is a gcc bug. I'm currently rebuilding my kernel with gcc-3.4. The bug appears with gcc-3.4 too. thanks, Benoit -- powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS - To unsubscribe from this list: send 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: make reno default for mortals
On 12/12/05, David S. Miller [EMAIL PROTECTED] wrote: From: David S. Miller [EMAIL PROTECTED] Date: Tue, 06 Dec 2005 21:08:27 -0800 (PST) Then we shouldn't be changing BIC, but instead make a new tcp_cubic.c :-) As I mentioned in my net-2.6.16 rebase posting tonight, I took care of this. Great, soon the DCCP club band (growing, whee!) will join the anti-congestion brigade and add another algo to the tree, CCID2, TCP-Like congestion control for DCCP, courtesy of Andrea Bittau, the DCCPer of the month /McDonalds :-) - Arnaldo (happy clown 8-) ) - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
sky2 status?
Hi Stephen, Are you finding sky2 to be stable in your own testing? I have been watching the patches and your weblog, presumably the problems you found in 0.9 have been fixed in 0.10? I'm considering adding sky2 to Gentoo's upcoming 2.6.15 kernel releases. If I were to do this, would you be happy to spend some time debugging any issues that come up? If you know of outstanding bugs or would just prefer to spend more time testing it yourself first, then I understand and I'd probably leave it until 2.6.16. Thanks for your continued work on these drivers :) Daniel - To unsubscribe from this list: send 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: Resend [PATCH netdev-2.6 2/8] e1000: Performance Enhancements
jamal writes: Could the Robert/Jesse also verify this? I normally dont get excited by an extra kpps these days;- Hello! Here is a summary. It compares #12 and #125 prefetches with different load and with and without copybreak. cpybrk loadprefetch tput kpps --- N 2*single#12 1352 N 2*32k flows #12766 N 2*single#125 1314 N 2*32k flows #125 772 Y 2*single#12 1299 Y 2*32k flows #12702 Y 2*single#125 1296 Y 2*32k flows #125 686 According to this prefetch #1 and #2 seems to be a good start. Cheers. --ro All with dual 1.6 GHz Opteron 2.6.14 e1000 6.2.15 2*82546 GB Forwarding 64 byte pkts. A flow is 10 pkts. NO CPYBRK Prefetch #1 #2 Input 1173 + 1173 2 * 1 Flow Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5435647 0 4564565 0134 0 0 0 BRU eth1 1500 0 1 0 0 0 5434414 0 0 0 BRU eth2 1500 0 6101365 0 3898635 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 6100044 0 0 0 BRU Input 656 + 643 2 * 32k flows a 10 pkts Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5566332 0 4433865 0120 0 0 0 BRU eth1 1500 0 1 0 0 0 5565778 0 0 0 BRU eth2 1500 0 6248928 0 3751072 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 6248551 0 0 0 BRU - #1 #2 #5 1175 1175 Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5439795 0 4560349 0 94 0 0 0 BRU eth1 1500 0 1 0 0 0 5438330 0 0 0 BRU eth2 1500 0 5768135 0 4231865 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 5766814 0 0 0 BRU 657 643 Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5816372 0 4183865 0146 0 0 0 BRU eth1 1500 0 1 0 0 0 5815694 0 0 0 BRU eth2 1500 0 6080188 0 3919812 0 3 0 0 0 BRU eth3 1500 0 2 0 0 0 6079832 0 0 0 BRU CPYBRK #1 #2 Input 1174 1174 2 * 1 flows Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5562617 0 4437537 0102 0 0 0 BRU eth1 1500 0 1 0 0 0 5560294 0 0 0 BRU eth2 1500 0 5515229 0 4484771 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 5513780 0 0 0 BRU 658 642 2 * 32 kflows Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 4874916 0 5125284 0126 0 0 0 BRU eth1 1500 0 1 0 0 0 4874359 0 0 0 BRU eth2 1500 0 5958667 0 4041333 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 5958311 0 0 0 BRU #1 #2 #5 1175 1175 Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5534204 0 4465964 0105 0 0 0 BRU eth1 1500 0 1 0 0 0 5533079 0 0 0 BRU eth2 1500 0 5508999 0 4491001 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 5508278 0 0 0 BRU 651 641 Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flags eth0 1500 0 5589689 0 4410514 0128 0 0 0 BRU eth1 1500 0 1 0 0 0 5589129 0 0 0 BRU eth2 1500 0 5025655 0 4974345 0 3 0 0 0 BRU eth3 1500 0 1 0 0 0 5025298 0 0 0 BRU - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1][INET6]: Generalise tcp_v6_hash_connect
Hi David, Please consider pulling from: master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.16.git Later today I'll continue, chunking out the last changeset in my old dccpv6 tree, removing the TCP specific bits in ip_sockglue, making it deal with inet_connection_socks and not anymore with tcp_socks, i.e. not checking SOCK_STREAM, but a bit in inet_sock that will tell if the sock is a inet_connection_sock (DCCP (SOCK_DCCP), TCP (SOCK_STREAM), etc), moving sync_mss to inet_connection_sock::icsk_sync_mss, etc. Best Regards, - Arnaldo P.S.: /me itching to dive into SCTP to see how much code can be ditched using this brave new world of inet_connection_socks, etc :-) P.S/2: I'd be even more delighted if some SCTP guy could assess the potential for code sharing with TCP and DCCP using this stuff 8-) tree ee42f43bbd3664a2330b80c274114db19152e9a2 parent f85287378e45fe8dcbbab84e79d263133205f63c author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134402446 -0200 committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134402446 -0200 [INET6]: Generalise tcp_v6_hash_connect Renaming it to inet6_hash_connect, making it possible to ditch dccp_v6_hash_connect and share the same code with TCP instead. Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED] -- drivers/char/random.c |4 include/linux/random.h |4 include/net/ipv6.h |3 net/dccp/ipv6.c | 171 - net/ipv6/inet6_hashtables.c | 183 +++- net/ipv6/tcp_ipv6.c | 173 - 6 files changed, 190 insertions(+), 348 deletions(-) -- diff --git a/drivers/char/random.c b/drivers/char/random.c index 79b59d9..bdfdfd2 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1573,7 +1573,7 @@ u32 secure_ipv4_port_ephemeral(__u32 sad } #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport) +u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport) { struct keydata *keyptr = get_keyptr(); u32 hash[12]; @@ -1584,7 +1584,7 @@ u32 secure_tcpv6_port_ephemeral(const __ return twothirdsMD4Transform(daddr, hash); } -EXPORT_SYMBOL(secure_tcpv6_port_ephemeral); +EXPORT_SYMBOL(secure_ipv6_port_ephemeral); #endif #if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) diff --git a/include/linux/random.h b/include/linux/random.h index 01424a8..5d6456b 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -53,8 +53,8 @@ void generate_random_uuid(unsigned char extern __u32 secure_ip_id(__u32 daddr); extern u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); -extern u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, - __u16 dport); +extern u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, + __u16 dport); extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport); extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 8513761..e3d5d7b 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -527,6 +527,9 @@ extern int inet6_getname(struct socket * extern int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); +extern int inet6_hash_connect(struct inet_timewait_death_row *death_row, + struct sock *sk); + /* * reassembly.c */ diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 4d078f5..71bf04e 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -84,175 +84,6 @@ static __u32 dccp_v6_init_sequence(struc dh-dccph_sport); } -static int __dccp_v6_check_established(struct sock *sk, const __u16 lport, - struct inet_timewait_sock **twp) -{ - struct inet_sock *inet = inet_sk(sk); - const struct ipv6_pinfo *np = inet6_sk(sk); - const struct in6_addr *daddr = np-rcv_saddr; - const struct in6_addr *saddr = np-daddr; - const int dif = sk-sk_bound_dev_if; - const u32 ports = INET_COMBINED_PORTS(inet-dport, lport); - const unsigned int hash = inet6_ehashfn(daddr, inet-num, - saddr, inet-dport); - struct inet_ehash_bucket *head = inet_ehash_bucket(dccp_hashinfo, hash); - struct sock *sk2; - const struct hlist_node *node; - struct inet_timewait_sock *tw; - - prefetch(head-chain.first); - write_lock(head-lock); - - /* Check TIME-WAIT sockets first. */ - sk_for_each(sk2, node, (head + dccp_hashinfo.ehash_size)-chain) { - const struct inet6_timewait_sock *tw6 = inet6_twsk(sk2); - - tw = inet_twsk(sk2); - - if(*((__u32 *)(tw-tw_dport)) == ports - sk2-sk_family == PF_INET6 - ipv6_addr_equal(tw6-tw_v6_daddr, saddr) -
Re: [PATCH 5/9] isdn4linux: Siemens Gigaset drivers - tty interface
On Sun, 11 Dec 2005 19:20:38 +0100 Hansjoerg Lipp [EMAIL PROTECTED] wrote: From: Tilman Schmidt [EMAIL PROTECTED], Hansjoerg Lipp [EMAIL PROTECTED] This patch adds the tty interface to the gigaset module. The tty interface provides direct access to the AT command set of the Gigaset devices. Signed-off-by: Hansjoerg Lipp [EMAIL PROTECTED] Signed-off-by: Tilman Schmidt [EMAIL PROTECTED] --- +static struct tty_operations if_ops = { + .open = if_open, + .close =if_close, + .ioctl =if_ioctl, + .write =if_write, + .write_room = if_write_room, + .chars_in_buffer = if_chars_in_buffer, + .set_termios = if_set_termios, + .throttle = if_throttle, + .unthrottle = if_unthrottle, +#if 0 + .break_ctl =serial_break, +#endif + .tiocmget = if_tiocmget, + .tiocmset = if_tiocmset, +}; Missing .owner = THIS_MODULE - To unsubscribe from this list: send 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/9] isdn4linux: Siemens Gigaset drivers - common module
Since you are doing a indirect module based infrastructure. You need to handle module refcounting of gigaset_ops. - To unsubscribe from this list: send 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: Resend [PATCH netdev-2.6 2/8] e1000: Performance Enhancements
Ok, this makes things more interesting What worked for a XEON doesnt work the same way for an opteron. For me, the copybreak (in its capacity as adding extra cycles that make the prefetch look good) made things look good. Also, #125 gave a best answer. None of these were the case from Roberts results. Robert, what about just #1? Maybe thats the best compromise that would work for all. Also, I am really hoping that someone will test with older hardware where i claim to have seen prefetch causing problems. cheers, jamal On Mon, 2005-12-12 at 16:36 +0100, Robert Olsson wrote: jamal writes: Could the Robert/Jesse also verify this? I normally dont get excited by an extra kpps these days;- Hello! Here is a summary. It compares #12 and #125 prefetches with different load and with and without copybreak. cpybrk loadprefetch tput kpps --- N 2*single#12 1352 N 2*32k flows #12766 N 2*single#125 1314 N 2*32k flows #125 772 Y 2*single#12 1299 Y 2*32k flows #12702 Y 2*single#125 1296 Y 2*32k flows #125 686 According to this prefetch #1 and #2 seems to be a good start. Cheers. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] gianfar: add netpoll api support
On Mon, Dec 12, 2005 at 11:54:06AM -0700, Dale Farnsworth wrote: +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void gfar_netpoll(struct net_device *dev) +{ + struct gfar_private *priv = netdev_priv(dev); + + if (priv-einfo-device_flags FSL_GIANFAR_DEV_HAS_MULTI_INTR) { + disable_irq(priv-interruptReceive); + disable_irq(priv-interruptTransmit); + disable_irq(priv-interruptError); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptError); + enable_irq(priv-interruptTransmit); + enable_irq(priv-interruptReceive); + } else { + disable_irq(priv-interruptTransmit); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptTransmit); + } +} +#endif Do the multiple interrupts need to be disabled/enabled in that order? I'm presuming that is why you replicated the code for the tx interrupt and for calling gfar_interrupt. Of course, I'm not sure that doing it some other way would be any less ugly either... :-) I do not object to this patch. I'm just being curious. John -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: sky2 status?
Stephen Hemminger wrote: Yes 0.10 is relatively stable. All known problems have been fixed, but it hasn't been tested on a wide range of hardware, I only have three different boards; one is on Intel motherboard, one is on 1U VPN box, and also a dual-port PCI-X card. Ok, thats brill, thanks a lot! This will definately help with wider testing, I know there are a fair few Gentoo users out there with sky2 hardware :) I'll be in contact with any feedback I get. I'll release it within one or two days of the 2.6.15 release. Daniel - To unsubscribe from this list: send 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] gianfar: add netpoll api support
In article [EMAIL PROTECTED] you write: On Mon, Dec 12, 2005 at 11:54:06AM -0700, Dale Farnsworth wrote: +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void gfar_netpoll(struct net_device *dev) +{ + struct gfar_private *priv = netdev_priv(dev); + + if (priv-einfo-device_flags FSL_GIANFAR_DEV_HAS_MULTI_INTR) { + disable_irq(priv-interruptReceive); + disable_irq(priv-interruptTransmit); + disable_irq(priv-interruptError); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptError); + enable_irq(priv-interruptTransmit); + enable_irq(priv-interruptReceive); + } else { + disable_irq(priv-interruptTransmit); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptTransmit); + } +} +#endif Do the multiple interrupts need to be disabled/enabled in that order? I'm presuming that is why you replicated the code for the tx interrupt and for calling gfar_interrupt. Of course, I'm not sure that doing it some other way would be any less ugly either... :-) I do not object to this patch. I'm just being curious. I don't know that the order is critical. Maybe Kumar can comment. -Dale - To unsubscribe from this list: send 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: Resend [PATCH netdev-2.6 2/8] e1000: Performance Enhancements
jamal writes: Ok, this makes things more interesting What worked for a XEON doesnt work the same way for an opteron. For me, the copybreak (in its capacity as adding extra cycles that make the prefetch look good) made things look good. Also, #125 gave a best answer. None of these were the case from Roberts results. Robert, what about just #1? Maybe thats the best compromise that would work for all. I've tried that before with flow test and got contribution from #2 0 prefetch 756 kpps 1 prefetch 805 kpps (first) 2 prefetch 821 kpps (first two) 5 prefetch 803 kpps (all) Also, I am really hoping that someone will test with older hardware where i claim to have seen prefetch causing problems. We give this up for now unless you or somebody else has some very good idea how handle prefetching in generic way. I'll use #12 and you'll use #125 Intel uses #12345 etc Or do we all benefit from #12? Cheers. --ro - To unsubscribe from this list: send 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] cubic: pre-compute based on parameters
We can precompute a number of the cubic TCP factors because SRTT is a constant and most of the other parts come from module parameters. Given the history of simple math errors, this patch deserves extra special attention. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net-2.6.16.orig/net/ipv4/tcp_cubic.c +++ net-2.6.16/net/ipv4/tcp_cubic.c @@ -27,22 +27,28 @@ */ #defineBICTCP_HZ 10 /* BIC HZ 2^10 = 1024 */ +#define BICTCP_SRTT((HZ 3)/10) /* BIC is now RTT independent */ + static int fast_convergence = 1; static int max_increment = 16; static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ static int initial_ssthresh = 100; static int bic_scale = 41; static int tcp_friendliness = 1; +static u32 cube_rtt_scale; +static u32 beta_scale; +static u32 cube_scale; +static u64 cube_factor; module_param(fast_convergence, int, 0644); MODULE_PARM_DESC(fast_convergence, turn on/off fast convergence); module_param(max_increment, int, 0644); MODULE_PARM_DESC(max_increment, Limit on increment allowed during binary search); -module_param(beta, int, 0644); +module_param(beta, int, 0444); MODULE_PARM_DESC(beta, beta for multiplicative increase); module_param(initial_ssthresh, int, 0644); MODULE_PARM_DESC(initial_ssthresh, initial value of slow start threshold); -module_param(bic_scale, int, 0644); +module_param(bic_scale, int, 0444); MODULE_PARM_DESC(bic_scale, scale (scaled by 1024) value for bic function (bic_scale/1024)); module_param(tcp_friendliness, int, 0644); MODULE_PARM_DESC(tcp_friendliness, turn on/off tcp friendliness); @@ -151,56 +157,10 @@ static u32 cubic_root(u64 x) return (u32)end; } -static inline u32 bictcp_K(u32 dist, u32 srtt) +static inline u32 bictcp_K(u32 dist) { -u64 d64; -u32 d32; -u32 count; -u32 result; - -/* calculate the K for (wmax-cwnd) = c/rtt * K^3 - so K = cubic_root( (wmax-cwnd)*rtt/c ) - the unit of K is bictcp_HZ=2^10, not HZ - - c = bic_scale 10 - rtt = (tp-srtt 3 ) / HZ - - the following code has been designed and tested for - cwnd 1 million packets - RTT 100 seconds - HZ 1,000,00 (corresponding to 10 nano-second) - -*/ - -/* 1/c * 2^2*bictcp_HZ */ -d32 = (1 (10+2*BICTCP_HZ)) / bic_scale; -d64 = (__u64)d32; - -/* srtt * 2^count / HZ - 1) to get a better accuracy of the following d32, - the larger the count, the better the accuracy - 2) and avoid overflow of the following d64 - the larger the count, the high possibility of overflow - 3) so find a count between bictcp_hz-3 and bictcp_hz - count may be less than bictcp_HZ, - then d64 becomes 0. that is OK -*/ -d32 = srtt; -count = 0; -while (((d32 0x8000)==0) (count BICTCP_HZ)){ -d32 = d32 1; -count++; -} -d32 = d32 / HZ; - /* (wmax-cwnd) * (srtt3 / HZ) / c * 2^(3*bictcp_HZ) */ -d64 = (d64 * dist * d32) (count+3-BICTCP_HZ); - -/* cubic root */ -d64 = cubic_root(d64); - -result = (u32)d64; -return result; + return cubic_root((cube_factor * dist) (cube_scale + 3 - BICTCP_HZ)); } /* @@ -209,7 +169,7 @@ static inline u32 bictcp_K(u32 dist, u32 static inline void bictcp_update(struct bictcp *ca, u32 cwnd) { u64 d64; - u32 d32, t, srtt, bic_target, min_cnt, max_cnt; + u32 d32, t, bic_target, min_cnt, max_cnt; ca-ack_cnt++; /* count the number of ACKs */ @@ -220,7 +180,6 @@ static inline void bictcp_update(struct ca-last_cwnd = cwnd; ca-last_time = tcp_time_stamp; - srtt = (HZ 3)/10;/* use real time-based growth function */ if (ca-epoch_start == 0) { ca-epoch_start = tcp_time_stamp; /* record the beginning of an epoch */ @@ -231,7 +190,7 @@ static inline void bictcp_update(struct ca-bic_K = 0; ca-bic_origin_point = cwnd; } else { - ca-bic_K = bictcp_K(ca-last_max_cwnd-cwnd, srtt); + ca-bic_K = bictcp_K(ca-last_max_cwnd-cwnd); ca-bic_origin_point = ca-last_max_cwnd; } } @@ -260,8 +219,7 @@ static inline void bictcp_update(struct d32 = t - ca-bic_K; d64 = (u64)d32; -d32 = (bic_scale 3) * HZ / srtt;/* 1024*c/rtt */ -d64 = (d32 * d64 * d64 * d64) (10+3*BICTCP_HZ); /* c/rtt * (t-K)^3 */ +d64 = (cube_rtt_scale * d64 * d64 * d64) (10+3*BICTCP_HZ); /* c/rtt * (t-K)^3 */ d32 = (u32)d64; if (t ca-bic_K) /* below origin*/
Re: [PATCH] via-velocity: use NETIF_F_IP_CSUM (hardware only support IPv4)
John W. Linville wrote: From: John W. Linville [EMAIL PROTECTED] At least some versions of the via-velocity hardware only support checksumming IPv4 frames in hardware. However, the driver is currently setting the NETIF_F_HW_CSUM flag, which indicates support for more than just IPv4. This results in errors when trying to use IPv6 over via-velocity hardware. Signed-off-by: John W. Linville [EMAIL PROTECTED] --- This could be applied to the 'upstream-fixes' branch of netdev-2.6. drivers/net/via-velocity.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) applies-to: 75f680b437862b125cbce00709fcebf57f146b88 ff8c346c43e93afc171788123c77fb5624f61153 diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 82c6b75..c2d5907 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -791,7 +791,7 @@ static int __devinit velocity_found1(str #endif if (vptr-flags VELOCITY_FLAGS_TX_CSUM) { - dev-features |= NETIF_F_HW_CSUM; + dev-features |= NETIF_F_IP_CSUM; IP_CSUM means something different than simply ipv4-only. It also means that the hardware is quite dumb, and can only say checksum ok rather than here is the checksum. Since IP_CSUM means the latter, surely you need more code than just this? Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 01/20] sky2: don't die if we see chip rev 0xb5
applied 1-20 to upstream - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] 2.6.x net driver fixes
Please pull from 'upstream-fixes' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git to receive the following updates: drivers/net/pcnet32.c |5 - drivers/net/sk98lin/skge.c |4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) Olaf Hering: pcnet32: use MAC address from prom also on powerpc Stephen Hemminger: sk98lin: rx checksum offset not set diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index be31922..8f6cf8c 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -1251,12 +1251,7 @@ pcnet32_probe1(unsigned long ioaddr, int if (memcmp(promaddr, dev-dev_addr, 6) || !is_valid_ether_addr(dev-dev_addr)) { -#ifndef __powerpc__ if (is_valid_ether_addr(promaddr)) { -#else - if (!is_valid_ether_addr(dev-dev_addr) -is_valid_ether_addr(promaddr)) { -#endif if (pcnet32_debug NETIF_MSG_PROBE) { printk( warning: CSR address invalid,\n); printk(KERN_INFO using instead PROM address of); diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 00c5d7f..ae73439 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c @@ -818,7 +818,7 @@ uintptr_t VNextDescr; /* the virtual bus /* set the pointers right */ pDescr-VNextRxd = VNextDescr 0xULL; pDescr-pNextRxd = pNextDescr; - pDescr-TcpSumStarts = 0; + if (!IsTx) pDescr-TcpSumStarts = ETH_HLEN 16 | ETH_HLEN; /* advance one step */ pPrevDescr = pDescr; @@ -2169,7 +2169,7 @@ rx_start: } /* frame SK_COPY_TRESHOLD */ #ifdef USE_SK_RX_CHECKSUM - pMsg-csum = pRxd-TcpSums; + pMsg-csum = pRxd-TcpSums 0x; pMsg-ip_summed = CHECKSUM_HW; #else pMsg-ip_summed = CHECKSUM_NONE; - To unsubscribe from this list: send 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] via-velocity: use NETIF_F_IP_CSUM (hardware only support IPv4)
On Mon, Dec 12, 2005 at 03:29:44PM -0500, Jeff Garzik wrote: John W. Linville wrote: From: John W. Linville [EMAIL PROTECTED] At least some versions of the via-velocity hardware only support checksumming IPv4 frames in hardware. However, the driver is currently setting the NETIF_F_HW_CSUM flag, which indicates support for more than just IPv4. This results in errors when trying to use IPv6 over via-velocity hardware. IP_CSUM means something different than simply ipv4-only. It also means that the hardware is quite dumb, and can only say checksum ok rather than here is the checksum. Since IP_CSUM means the latter, surely you need more code than just this? Hmmm...this would seem contrary to the following references: http://www.uwsg.iu.edu/hypermail/linux/net/0302.3/0003.html http://efault.net/npat/docs_and_postings/net_device-features/net_device-features.txt http://www.oreilly.com/catalog/linuxdrive3/book/ch17.pdf And the comment in this snippet from tg3.c: /* Tigon3 can do ipv4 only... and some chips have buggy * checksumming. */ if ((tp-tg3_flags TG3_FLAG_BROKEN_CHECKSUMS) == 0) { dev-features |= NETIF_F_SG | NETIF_F_IP_CSUM; tp-tg3_flags |= TG3_FLAG_RX_CHECKSUMS; } else tp-tg3_flags = ~TG3_FLAG_RX_CHECKSUMS; As well as the testimony of my user: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=173760 Since the flag in question seems to be related exclusively to transmission of frames, would a checksum ok even make sense? Can you direct me to an example of the type of code that would seem to be missing? John -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.15-rc5-mm2
From: Benoit Boissinot [EMAIL PROTECTED] Date: Mon, 12 Dec 2005 14:04:18 +0100 the 'return unlikely(-err)' isn't in gitweb (http://kernel.org/git/?p=linux/kernel/git/davem/net-2.6.16.git;a=commit;h=eaa9fba6511857dd2dc6f7f99a4564148c238081) changing it to 'return -err' makes ping and xdm happy again. (i don't understand how the unlikely can make a performance difference). Yes, I removed this while rebasing the tree. Anyway, since i'm using gcc-4 (tested with 4.0.2 and 4.1-beta) maybe it is a gcc bug. I'm currently rebuilding my kernel with gcc-3.4. Thanks for testing, good to know it's fixed now. I think that unlikely() in the return statement was just a brain fart on Ben's part. :-) - To unsubscribe from this list: send 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/1][INET6]: Generalise tcp_v6_hash_connect
Patch applied, thanks Arnaldo. - To unsubscribe from this list: send 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] cubic: pre-compute based on parameters
From: Stephen Hemminger [EMAIL PROTECTED] Date: Mon, 12 Dec 2005 12:03:22 -0800 -d32 = d32 / HZ; - /* (wmax-cwnd) * (srtt3 / HZ) / c * 2^(3*bictcp_HZ) */ -d64 = (d64 * dist * d32) (count+3-BICTCP_HZ); - -/* cubic root */ -d64 = cubic_root(d64); - -result = (u32)d64; -return result; + return cubic_root((cube_factor * dist) (cube_scale + 3 - BICTCP_HZ)); ... + while ( !(d32 0x8000) (cube_scale BICTCP_HZ)){ + d32 = d32 1; + ++cube_scale; + } + cube_factor = d64 * d32 / HZ; + I don't think this transformation is equivalent. In the old code only the d32 is scaled by HZ. So in the old code we're saying something like: d64 = (d64 * dist * (d32 / HZ)) (count + 3 - BICTCP_HZ); whereas the new code looks like: d64 = (((d64 * d32) / HZ) * dist) (count + 3 - BICTCP_HZ); Is that really equivalent? - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2][TCP]: Move the TCPF_ enum to tcp_states.h
Hi David, Please consider pulling from: master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.16.git With these two my old DCCPv6 tree finally gets completely submitted, whee! :-) Now to do new work :-) Best Regards, - Arnaldo tree 43548c6bc8d43ef3dbf077d32ee4b495c46b4a78 parent 0c54986a2b9abe6295ccac354924f563fd5dfc9c author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134427004 -0200 committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134427004 -0200 [TCP]: Move the TCPF_ enum to tcp_states.h Upcoming patches will make, for instance, ip_sockglue.c need just this enum and not all of tcp.h. Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED] -- linux/tcp.h | 16 net/tcp_states.h | 16 2 files changed, 16 insertions(+), 16 deletions(-) -- diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 4e14340..da38eea 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -55,22 +55,6 @@ struct tcphdr { __u16 urg_ptr; }; -#define TCP_ACTION_FIN (1 7) - -enum { - TCPF_ESTABLISHED = (1 1), - TCPF_SYN_SENT = (1 2), - TCPF_SYN_RECV = (1 3), - TCPF_FIN_WAIT1 = (1 4), - TCPF_FIN_WAIT2 = (1 5), - TCPF_TIME_WAIT = (1 6), - TCPF_CLOSE = (1 7), - TCPF_CLOSE_WAIT = (1 8), - TCPF_LAST_ACK = (1 9), - TCPF_LISTEN= (1 10), - TCPF_CLOSING = (1 11) -}; - /* * The union cast uses a gcc extension to avoid aliasing problems * (union is compatible to any of its members) diff --git a/include/net/tcp_states.h b/include/net/tcp_states.h index b9d4176..b0b6459 100644 --- a/include/net/tcp_states.h +++ b/include/net/tcp_states.h @@ -31,4 +31,20 @@ enum { #define TCP_STATE_MASK 0xF +#define TCP_ACTION_FIN (1 7) + +enum { + TCPF_ESTABLISHED = (1 1), + TCPF_SYN_SENT = (1 2), + TCPF_SYN_RECV = (1 3), + TCPF_FIN_WAIT1 = (1 4), + TCPF_FIN_WAIT2 = (1 5), + TCPF_TIME_WAIT = (1 6), + TCPF_CLOSE = (1 7), + TCPF_CLOSE_WAIT = (1 8), + TCPF_LAST_ACK = (1 9), + TCPF_LISTEN = (1 10), + TCPF_CLOSING = (1 11) +}; + #endif /* _LINUX_TCP_STATES_H */
[PATCH 2/2][IP_SOCKGLUE]: Remove most of the tcp specific calls
Hi David, Please consider pulling from: master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.16.git Best Regards, - Arnaldo tree 99f9e56a48a5a7a783875df630e84c91fd06488a parent 793a36f474b6d9991f6c1c218041e350cda57195 author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134430852 -0200 committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1134430852 -0200 [IP_SOCKGLUE]: Remove most of the tcp specific calls As DCCP needs to be called in the same spots. Now we have a member in inet_sock (is_icsk), set at sock creation time from struct inet_protosw-flags (if INET_PROTOSW_ICSK is set, like for TCP and DCCP) to see if a struct sock instance is a inet_connection_sock for places like the ones in ip_sockglue.c (v4 and v6) where we previously were looking if sk_type was SOCK_STREAM, that is insufficient because we now use the same code for DCCP, that has sk_type SOCK_DCCP. Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED] -- include/linux/dccp.h |4 include/linux/ip.h |1 + include/linux/tcp.h|3 +-- include/net/inet_connection_sock.h |6 +- include/net/protocol.h |1 + net/dccp/diag.c|2 +- net/dccp/input.c |2 +- net/dccp/ipv4.c| 12 +++- net/dccp/ipv6.c| 26 ++ net/dccp/output.c |7 --- net/dccp/proto.c |2 +- net/ipv4/af_inet.c |4 +++- net/ipv4/ip_sockglue.c | 13 ++--- net/ipv4/tcp.c |2 +- net/ipv4/tcp_input.c | 10 -- net/ipv4/tcp_ipv4.c| 12 ++-- net/ipv4/tcp_output.c | 18 ++ net/ipv6/af_inet6.c|1 + net/ipv6/ipv6_sockglue.c | 24 +--- net/ipv6/tcp_ipv6.c| 30 +- 20 files changed, 97 insertions(+), 83 deletions(-) -- diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 71fab43..d0bdb49 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -408,8 +408,6 @@ struct dccp_ackvec; * @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss * @dccps_timestamp_time - time of latest TIMESTAMP option * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option - * @dccps_ext_header_len - network protocol overhead (IP/IPv6 options) - * @dccps_pmtu_cookie - Last pmtu seen by socket * @dccps_packet_size - Set thru setsockopt * @dccps_role - Role of this sock, one of %dccp_role * @dccps_ndp_count - number of Non Data Packets since last data packet @@ -434,8 +432,6 @@ struct dccp_sock { __u32dccps_timestamp_echo; __u32dccps_packet_size; unsigned long dccps_ndp_count; - __u16dccps_ext_header_len; - __u32dccps_pmtu_cookie; __u32dccps_mss_cache; struct dccp_options dccps_options; struct dccp_ackvec *dccps_hc_rx_ackvec; diff --git a/include/linux/ip.h b/include/linux/ip.h index 5a560da..6ccc596 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -155,6 +155,7 @@ struct inet_sock { __u8 mc_ttl; /* Multicasting TTL */ __u8 pmtudisc; unsigned recverr : 1, +is_icsk : 1, /* inet_connection_sock? */ freebind : 1, hdrincl : 1, mc_loop : 1; diff --git a/include/linux/tcp.h b/include/linux/tcp.h index da38eea..f2bb239 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -238,10 +238,9 @@ struct tcp_sock { __u32 snd_wl1; /* Sequence for window update */ __u32 snd_wnd; /* The window we expect to receive */ __u32 max_window; /* Maximal window ever seen from peer */ - __u32 pmtu_cookie; /* Last pmtu seen by socket */ __u32 mss_cache; /* Cached effective mss, not including SACKS */ __u16 xmit_size_goal; /* Goal for segmenting output packets */ - __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ + /* XXX Two bytes hole, try to pack */ __u32 window_clamp; /* Maximal window to advertise */ __u32 rcv_ssthresh; /* Current window clamp */ diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index e50e2b8..9188896 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -60,6 +60,7 @@ struct inet_connection_sock_af_ops { * @icsk_timeout: Timeout * @icsk_retransmit_timer: Resend (no ack) * @icsk_rto: Retransmit timeout + * @icsk_pmtu_cookie Last pmtu seen by socket * @icsk_ca_ops Pluggable congestion control hook * @icsk_af_ops Operations which are AF_INET{4,6} specific * @icsk_ca_state: Congestion control state @@ -68,6 +69,7 @@ struct inet_connection_sock_af_ops { *
[PATCH] natsemi: NAPI support
This patch against 2.6.14 converts the natsemi driver to use NAPI. It was originally based on one written by Harald Welte, though it has since been modified quite a bit, most extensively in order to remove the ability to disable NAPI since none of the other drivers seem to provide that functionality any more. Signed-off-by: Mark Brown [EMAIL PROTECTED] --- This revision of the patch: - Doesn't sleep with the device spinlock held in suspend(). - Improves the synchronisation between poll() and the shutdown paths. --- linux-2.6.14/drivers/net/natsemi.c.orig 2005-11-29 19:29:12.0 + +++ linux/drivers/net/natsemi.c 2005-12-11 14:55:48.0 + @@ -3,6 +3,7 @@ Written/copyright 1999-2001 by Donald Becker. Portions copyright (c) 2001,2002 Sun Microsystems ([EMAIL PROTECTED]) Portions copyright 2001,2002 Manfred Spraul ([EMAIL PROTECTED]) + Portions copyright 2004 Harald Welte [EMAIL PROTECTED] This software may be used and distributed according to the terms of the GNU General Public License (GPL), incorporated herein by reference. @@ -135,8 +136,6 @@ TODO: * big endian support with CFG:BEM instead of cpu_to_le32 - * support for an external PHY - * NAPI */ #include linux/config.h @@ -160,6 +159,7 @@ #include linux/mii.h #include linux/crc32.h #include linux/bitops.h +#include linux/prefetch.h #include asm/processor.h /* Processor type for cache alignment. */ #include asm/io.h #include asm/irq.h @@ -183,8 +183,6 @@ NETIF_MSG_TX_ERR) static int debug = -1; -/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ -static int max_interrupt_work = 20; static int mtu; /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). @@ -251,14 +249,11 @@ MODULE_AUTHOR(Donald Becker [EMAIL PROTECTED] MODULE_DESCRIPTION(National Semiconductor DP8381x series PCI Ethernet driver); MODULE_LICENSE(GPL); -module_param(max_interrupt_work, int, 0); module_param(mtu, int, 0); module_param(debug, int, 0); module_param(rx_copybreak, int, 0); module_param_array(options, int, NULL, 0); module_param_array(full_duplex, int, NULL, 0); -MODULE_PARM_DESC(max_interrupt_work, - DP8381x maximum events handled per interrupt); MODULE_PARM_DESC(mtu, DP8381x MTU (all boards)); MODULE_PARM_DESC(debug, DP8381x default debug level); MODULE_PARM_DESC(rx_copybreak, @@ -691,6 +686,8 @@ struct netdev_private { /* Based on MTU+slack. */ unsigned int rx_buf_sz; int oom; + /* Interrupt status */ + u32 intr_status; /* Do not touch the nic registers */ int hands_off; /* external phy that is used: only valid if dev-if_port != PORT_TP */ @@ -748,7 +745,8 @@ static void init_registers(struct net_de static int start_tx(struct sk_buff *skb, struct net_device *dev); static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); static void netdev_error(struct net_device *dev, int intr_status); -static void netdev_rx(struct net_device *dev); +static int natsemi_poll(struct net_device *dev, int *budget); +static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do); static void netdev_tx_done(struct net_device *dev); static int natsemi_change_mtu(struct net_device *dev, int new_mtu); #ifdef CONFIG_NET_POLL_CONTROLLER @@ -776,6 +774,18 @@ static inline void __iomem *ns_ioaddr(st return (void __iomem *) dev-base_addr; } +static inline void natsemi_irq_enable(struct net_device *dev) +{ + writel(1, ns_ioaddr(dev) + IntrEnable); + readl(ns_ioaddr(dev) + IntrEnable); +} + +static inline void natsemi_irq_disable(struct net_device *dev) +{ + writel(0, ns_ioaddr(dev) + IntrEnable); + readl(ns_ioaddr(dev) + IntrEnable); +} + static void move_int_phy(struct net_device *dev, int addr) { struct netdev_private *np = netdev_priv(dev); @@ -879,6 +889,7 @@ static int __devinit natsemi_probe1 (str spin_lock_init(np-lock); np-msg_enable = (debug = 0) ? (1debug)-1 : NATSEMI_DEF_MSG; np-hands_off = 0; + np-intr_status = 0; /* Initial port: * - If the nic was configured to use an external phy and if find_mii @@ -932,6 +943,9 @@ static int __devinit natsemi_probe1 (str dev-do_ioctl = netdev_ioctl; dev-tx_timeout = tx_timeout; dev-watchdog_timeo = TX_TIMEOUT; + dev-poll = natsemi_poll; + dev-weight = 64; + #ifdef CONFIG_NET_POLL_CONTROLLER dev-poll_controller = natsemi_poll_controller; #endif @@ -2158,68 +2172,92 @@ static void netdev_tx_done(struct net_de } } -/* The interrupt handler does all of the Rx thread work and cleans up - after the Tx thread. */ +/* The interrupt handler doesn't actually handle interrupts itself, it + * schedules a NAPI poll if there is anything to do. */ static irqreturn_t intr_handler(int irq, void
Re: [PATCH] natsemi: NAPI support
Mark Brown wrote: This patch against 2.6.14 converts the natsemi driver to use NAPI. It was originally based on one written by Harald Welte, though it has since been modified quite a bit, most extensively in order to remove the ability to disable NAPI since none of the other drivers seem to provide that functionality any more. Signed-off-by: Mark Brown [EMAIL PROTECTED] Was it updated per the comments you received on the first posting? Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] gianfar: add netpoll api support
On Dec 12, 2005, at 13:41, Dale Farnsworth wrote: In article [EMAIL PROTECTED] you write: On Mon, Dec 12, 2005 at 11:54:06AM -0700, Dale Farnsworth wrote: +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void gfar_netpoll(struct net_device *dev) +{ + struct gfar_private *priv = netdev_priv(dev); + + if (priv-einfo-device_flags FSL_GIANFAR_DEV_HAS_MULTI_INTR) { + disable_irq(priv-interruptReceive); + disable_irq(priv-interruptTransmit); + disable_irq(priv-interruptError); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptError); + enable_irq(priv-interruptTransmit); + enable_irq(priv-interruptReceive); + } else { + disable_irq(priv-interruptTransmit); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptTransmit); + } +} +#endif Do the multiple interrupts need to be disabled/enabled in that order? I'm presuming that is why you replicated the code for the tx interrupt and for calling gfar_interrupt. Of course, I'm not sure that doing it some other way would be any less ugly either... :-) I do not object to this patch. I'm just being curious. I don't know that the order is critical. Maybe Kumar can comment. I certainly doubt it is. However, wouldn't it have simpler to mask the bits in the IMASK register? - To unsubscribe from this list: send 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] is_valid_ether_addr() returns true for FF:FF:FF:FF:FF:FF
David S. Miller wrote: From: Michael Ellerman [EMAIL PROTECTED] Date: Mon, 12 Dec 2005 18:56:49 -0600 Since a5fe736eaf9bae1b45317313de04b564441b94f2 (2.6.13-rc1 ish), is_valid_ether_addr() has been broken, because its assumption that FF:FF:FF:FF:FF:FF is a multicast address is wrong. Ouch. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] Good catch, patch applied. Fix this, and you break wireless. We need to split up definitions, otherwise you fix one code to break another. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] is_valid_ether_addr() returns true for FF:FF:FF:FF:FF:FF
From: Jeff Garzik [EMAIL PROTECTED] Date: Mon, 12 Dec 2005 20:26:43 -0500 David S. Miller wrote: Good catch, patch applied. Fix this, and you break wireless. We need to split up definitions, otherwise you fix one code to break another. Ok, I'll back it out of my tree and let you guys work it out :-) - To unsubscribe from this list: send 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] is_valid_ether_addr() returns true for FF:FF:FF:FF:FF:FF
On Mon, 12 Dec 2005 19:26, Jeff Garzik wrote: David S. Miller wrote: From: Michael Ellerman [EMAIL PROTECTED] Date: Mon, 12 Dec 2005 18:56:49 -0600 Since a5fe736eaf9bae1b45317313de04b564441b94f2 (2.6.13-rc1 ish), is_valid_ether_addr() has been broken, because its assumption that FF:FF:FF:FF:FF:FF is a multicast address is wrong. Ouch. Signed-off-by: Michael Ellerman [EMAIL PROTECTED] Good catch, patch applied. Fix this, and you break wireless. We need to split up definitions, otherwise you fix one code to break another. Crud. It looks like most callers are using it to mean is this a valid address for the piece of hardware I'm driving - perhaps it should become is_valid_nic_addr() ?? cheers -- Michael Ellerman IBM OzLabs email: michael:ellerman.id.au inmsg: mpe:jabber.org wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person pgpUSoaUvk30d.pgp Description: PGP signature
[2.6 patch] kill drivers/net/irda/sir_core.c
EXPORT_SYMBOL's do nowadays belong to the files where the actual functions are. Moving the module_init/module_exit to the file with the actual functions has the advantage of saving a few bytes due to the removal of two functions. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Acked-by: Jean Tourrilhes [EMAIL PROTECTED] --- This patch was already sent on: - 21 Nov 2005 drivers/net/irda/Makefile |2 - drivers/net/irda/sir-dev.h |2 - drivers/net/irda/sir_core.c| 56 - drivers/net/irda/sir_dev.c | 10 + drivers/net/irda/sir_dongle.c |2 + drivers/net/irda/sir_kthread.c | 11 +- 6 files changed, 21 insertions(+), 62 deletions(-) --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/Makefile.old 2005-11-20 20:22:17.0 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/net/irda/Makefile 2005-11-20 20:22:24.0 +0100 @@ -45,4 +45,4 @@ obj-$(CONFIG_MA600_DONGLE) += ma600-sir.o # The SIR helper module -sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o +sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir-dev.h.old2005-11-20 20:18:25.0 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir-dev.h2005-11-20 20:18:37.0 +0100 @@ -133,8 +133,6 @@ extern void sirdev_enable_rx(struct sir_dev *dev); extern int sirdev_schedule_request(struct sir_dev *dev, int state, unsigned param); -extern int __init irda_thread_create(void); -extern void __exit irda_thread_join(void); /* inline helpers */ --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_kthread.c.old 2005-11-20 20:18:47.0 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_kthread.c2005-11-20 20:42:21.0 +0100 @@ -466,7 +466,7 @@ return 0; } -int __init irda_thread_create(void) +static int __init irda_thread_create(void) { struct completion startup; int pid; @@ -488,7 +488,7 @@ return 0; } -void __exit irda_thread_join(void) +static void __exit irda_thread_join(void) { if (irda_rq_queue.thread) { flush_irda_queue(); @@ -499,3 +499,10 @@ } } +module_init(irda_thread_create); +module_exit(irda_thread_join); + +MODULE_AUTHOR(Martin Diehl [EMAIL PROTECTED]); +MODULE_DESCRIPTION(IrDA SIR core); +MODULE_LICENSE(GPL); + --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_dongle.c.old 2005-11-20 20:21:23.0 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_dongle.c 2005-11-20 20:22:02.0 +0100 @@ -50,6 +50,7 @@ up(dongle_list_lock); return 0; } +EXPORT_SYMBOL(irda_register_dongle); int irda_unregister_dongle(struct dongle_driver *drv) { @@ -58,6 +59,7 @@ up(dongle_list_lock); return 0; } +EXPORT_SYMBOL(irda_unregister_dongle); int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type) { --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_dev.c.old2005-11-20 20:22:37.0 +0100 +++ linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_dev.c2005-11-20 20:24:00.0 +0100 @@ -60,6 +60,7 @@ up(dev-fsm.sem); return err; } +EXPORT_SYMBOL(sirdev_set_dongle); /* used by dongle drivers for dongle programming */ @@ -94,6 +95,7 @@ spin_unlock_irqrestore(dev-tx_lock, flags); return ret; } +EXPORT_SYMBOL(sirdev_raw_write); /* seems some dongle drivers may need this */ @@ -116,6 +118,7 @@ return count; } +EXPORT_SYMBOL(sirdev_raw_read); int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts) { @@ -124,7 +127,8 @@ ret = dev-drv-set_dtr_rts(dev, dtr, rts); return ret; } - +EXPORT_SYMBOL(sirdev_set_dtr_rts); + /**/ /* called from client driver - likely with bh-context - to indicate @@ -227,6 +231,7 @@ done: spin_unlock_irqrestore(dev-tx_lock, flags); } +EXPORT_SYMBOL(sirdev_write_complete); /* called from client driver - likely with bh-context - to give us * some more received bytes. We put them into the rx-buffer, @@ -279,6 +284,7 @@ return 0; } +EXPORT_SYMBOL(sirdev_receive); /**/ @@ -641,6 +647,7 @@ out: return NULL; } +EXPORT_SYMBOL(sirdev_get_instance); int sirdev_put_instance(struct sir_dev *dev) { @@ -673,4 +680,5 @@ return 0; } +EXPORT_SYMBOL(sirdev_put_instance); --- linux-2.6.15-rc1-mm2-full/drivers/net/irda/sir_core.c 2005-11-20 20:24:09.0 +0100 +++ /dev/null 2005-11-08 19:07:57.0 +0100 @@ -1,56 +0,0 @@ -/* - * - * sir_core.c: module core for irda-sir abstraction layer - * - * Copyright (c) 2002 Martin Diehl - * - * This program is free software; you can redistribute it and/or - * modify
Re: [PATCH 1/5] spider_net: fix Kconfig after BPA-CELL rename
Utz Bacher wrote: We changed the name of the Kconfig symbols along with the move to arch/powerpc. This one hunk got lost during the conversion. From: Jens Osterkamp [EMAIL PROTECTED] Cc: netdev@vger.kernel.org Signed-off-by: Arnd Bergmann [EMAIL PROTECTED] Signed-off-by: Utz Bacher [EMAIL PROTECTED] patches OK, but don't seem to apply to latest: [EMAIL PROTECTED] netdev-2.6]$ git-applymbox /g/tmp/mbox ~/info/signoff.txt 4 patch(es) to process. Applying 'spider_net: fix Kconfig after BPA-CELL rename' fatal: corrupt patch at line 6 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] gianfar: add netpoll api support
On Tue, Dec 13, 2005 at 12:43:28AM +, Andy Fleming wrote: On Mon, Dec 12, 2005 at 11:54:06AM -0700, Dale Farnsworth wrote: +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void gfar_netpoll(struct net_device *dev) +{ + struct gfar_private *priv = netdev_priv(dev); + + if (priv-einfo-device_flags FSL_GIANFAR_DEV_HAS_MULTI_INTR) { + disable_irq(priv-interruptReceive); + disable_irq(priv-interruptTransmit); + disable_irq(priv-interruptError); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptError); + enable_irq(priv-interruptTransmit); + enable_irq(priv-interruptReceive); + } else { + disable_irq(priv-interruptTransmit); + gfar_interrupt(priv-interruptTransmit, dev, NULL); + enable_irq(priv-interruptTransmit); + } +} +#endif However, wouldn't it have simpler to mask the bits in the IMASK register? Hmm. I think we need to ensure that we're not currently executing one of the interrupt handlers and I don't see any simpler way than calling disable_irq() for each one. -Dale - To unsubscribe from this list: send 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: Resend [PATCH netdev-2.6 1/8] e1000: Fixes for 8357x
Jeff Kirsher wrote: e1000 driver update Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] 1. Fixes for 8257x - TSO workaround - Fixes eeprom version reporting - Fix loopback test - Fix for WOL applied patch 1 - To unsubscribe from this list: send 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: Resend [PATCH netdev-2.6 2/8] e1000: Performance Enhancements
Jeff Kirsher wrote: e1000 driver update Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] 2. Performance Enhancements - aggressive prefetch of rx_desc and skb-data just like we do for 10gig - align the prefetches to a dword to help speed them up - copybreak for packets 256 bytes, ideally we would like to modify ethtool to allow this value to be changed, helps small MTU, many reassemblies case - Fix RX buffer size changes - Fixed Jumbo frames and memory allocation rejected patches 2-8, since prefetch is still apparently under discussinon and tuning. It sounds like there are some interesting copybreak suggestions (applicable not just to e1000), and that 2 prefetches is the e1000 sweet spot...? 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
Fw: 2.6.15-rc5 gre tunnel checksum error
The hw checksum checking code is new since 2.6.14. Could someone check it please? Or is Paul's hardware broken? Begin forwarded message: Date: Mon, 12 Dec 2005 01:17:59 + From: Paul Erkkila [EMAIL PROTECTED] To: linux-net@vger.kernel.org, Linux Kernel Mailing List linux-kernel@vger.kernel.org Subject: 2.6.15-rc5 gre tunnel checksum error I'm getting this traceback from 2.6.15-rc5. - no skge driver in this box - 02:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller (LOM) - 03:01.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang] - 03:04.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) - just seems to be ping that causes it - the checksums look ok with tethereal tunnel0: hw csum failure. [c03733cf] __skb_checksum_complete+0x67/0x6d [c03cd50f] icmp_error+0xbb/0x1c1 [c03d36ce] ipt_do_table+0x2f2/0x4f0 [c03718dc] skb_checksum+0x4e/0x2c2 [c03ca33c] ip_conntrack_in+0x117/0x395 [c03d9f33] ipt_hook+0x37/0x3c [c03882cc] nf_iterate+0x58/0xa8 [c039177a] ip_rcv_finish+0x0/0x2ba [c0388387] nf_hook_slow+0x6b/0x134 [c039177a] ip_rcv_finish+0x0/0x2ba [c03913ba] ip_rcv+0x1d0/0x590 [c039177a] ip_rcv_finish+0x0/0x2ba [c03763ba] netif_receive_skb+0x1d0/0x23e [c03764aa] process_backlog+0x82/0x109 [c03765c0] net_rx_action+0x8f/0x16a [c0126517] __do_softirq+0x6b/0xd8 [c01265b6] do_softirq+0x32/0x34 [c0104ee2] do_IRQ+0x1e/0x24 [c0103756] common_interrupt+0x1a/0x20 [c0100d6c] default_idle+0x2e/0x52 [c0100e09] cpu_idle+0x65/0x73 [c055a945] start_kernel+0x180/0x1bc [c055a32a] unknown_bootoption+0x0/0x1e0 -pee - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: 2.6.15-rc5 gre tunnel checksum error
On Mon, Dec 12, 2005 at 09:13:24PM -0800, Andrew Morton wrote: The hw checksum checking code is new since 2.6.14. Could someone check it please? Or is Paul's hardware broken? Thanks I'll take a look. At least we can be sure that it's not the remote end :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: 2.6.15-rc5 gre tunnel checksum error
On Mon, Dec 12, 2005 at 09:13:24PM -0800, Andrew Morton wrote: - no skge driver in this box - 02:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller (LOM) - 03:01.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang] - 03:04.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) Which one of these is actually carrying the tunnel traffic? tunnel0: hw csum failure. What sort of a tunnel is this? If it's GRE please include any options that you have set. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: 2.6.15-rc5 gre tunnel checksum error
Herbert Xu wrote: Which one of these is actually carrying the tunnel traffic? # ethtool -i eth1 driver: 3c59x version: LK1.1.19 firmware-version: bus-info: :03:01.0 tunnel0: hw csum failure. What sort of a tunnel is this? If it's GRE please include any options that you have set. GRE tunnel. ip tunnel: tunnel0: gre/ip remote xx.xx.xx.xx local xx.xx.xx.xx ttl 255 key xx.xx.xx.xx Checksum in received packet is required. Checksum output packets. I've also tried it w/o the csum options, it does not appear to make a difference. # ip -V ip utility, iproute2-ss050310 -pee - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 1/3] s390: some minor qeth driver fixes
[patch 1/3] s390: some minor qeth driver fixes From: Frank Pavlic [EMAIL PROTECTED] - let's have just one function for both ,input and output queue to check qdio errors - add /proc/s390dbf/qeth_qerr entries for outbound processing - check removed for layer2 device in qeth_add_multicast_ipv6 - NULL pointer dereference with bonding and VLAN device fixed - minimum length check for portname fixed Signed-off-by: Frank Pavlic [EMAIL PROTECTED] diffstat: qeth_main.c | 42 +- qeth_sys.c |6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff -Naupr linux-orig/drivers/s390/net/qeth_main.c linux-patched/drivers/s390/net/qeth_main.c --- linux-orig/drivers/s390/net/qeth_main.c 2005-12-12 17:33:48.0 +0100 +++ linux-patched/drivers/s390/net/qeth_main.c 2005-12-12 17:46:31.0 +0100 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.246 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -72,7 +72,7 @@ #include qeth_eddp.h #include qeth_tso.h -#define VERSION_QETH_C $Revision: 1.242 $ +#define VERSION_QETH_C $Revision: 1.246 $ static const char *version = qeth S/390 OSA-Express driver; /** @@ -2203,24 +2203,21 @@ qeth_ulp_setup(struct qeth_card *card) } static inline int -qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, -unsigned int qdio_error, -unsigned int siga_error) +qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, + unsigned int siga_error, const char *dbftext) { - int rc = 0; - if (qdio_error || siga_error) { - QETH_DBF_TEXT(trace, 2, qdinerr); - QETH_DBF_TEXT(qerr, 2, qdinerr); + QETH_DBF_TEXT(trace, 2, dbftext); + QETH_DBF_TEXT(qerr, 2, dbftext); QETH_DBF_TEXT_(qerr, 2, F15=%02X, - buf-buffer-element[15].flags 0xff); + buf-element[15].flags 0xff); QETH_DBF_TEXT_(qerr, 2, F14=%02X, - buf-buffer-element[14].flags 0xff); + buf-element[14].flags 0xff); QETH_DBF_TEXT_(qerr, 2, qerr=%X, qdio_error); QETH_DBF_TEXT_(qerr, 2, serr=%X, siga_error); - rc = 1; + return 1; } - return rc; + return 0; } static inline struct sk_buff * @@ -2769,8 +2766,9 @@ qeth_qdio_input_handler(struct ccw_devic for (i = first_element; i (first_element + count); ++i) { index = i % QDIO_MAX_BUFFERS_PER_Q; buffer = card-qdio.in_q-bufs[index]; - if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) - qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) + if (!((status QDIO_STATUS_LOOK_FOR_ERROR) + qeth_check_qdio_errors(buffer-buffer, +qdio_err, siga_err,qinerr))) qeth_process_inbound_buffer(card, buffer, index); /* clear buffer and give back to hardware */ qeth_put_buffer_pool_entry(card, buffer-pool_entry); @@ -2785,12 +2783,13 @@ qeth_qdio_input_handler(struct ccw_devic static inline int qeth_handle_send_error(struct qeth_card *card, struct qeth_qdio_out_buffer *buffer, - int qdio_err, int siga_err) + unsigned int qdio_err, unsigned int siga_err) { int sbalf15 = buffer-buffer-element[15].flags 0xff; int cc = siga_err 3; QETH_DBF_TEXT(trace, 6, hdsnderr); + qeth_check_qdio_errors(buffer-buffer, qdio_err, siga_err, qouterr); switch (cc) { case 0: if (qdio_err){ @@ -3047,7 +3046,8 @@ qeth_qdio_output_handler(struct ccw_devi for(i = first_element; i (first_element + count); ++i){ buffer = queue-bufs[i % QDIO_MAX_BUFFERS_PER_Q]; /*we only handle the KICK_IT error by doing a recovery */ - if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) + if (qeth_handle_send_error(card, buffer, + qdio_error, siga_error) == QETH_SEND_ERROR_KICK_IT){ netif_stop_queue(card-dev); qeth_schedule_recovery(card); @@ -3289,7 +3289,6 @@ qeth_init_qdio_info(struct qeth_card *ca card-qdio.in_buf_pool.buf_count = card-qdio.init_pool.buf_count; INIT_LIST_HEAD(card-qdio.in_buf_pool.entry_list); INIT_LIST_HEAD(card-qdio.init_pool.entry_list); - /* outbound */ } static int @@ -3731,6 +3730,9 @@ qeth_verify_vlan_dev(struct net_device *
[patch 3/3] s390: remove redundant and useless code in qeth
[patch 3/3] s390: remove redundant and useless code in qeth From: Frank Pavlic [EMAIL PROTECTED] - remove redundant and useless code in qeth for procfs operations. - update Revision numbers Signed-off-by: Frank Pavlic [EMAIL PROTECTED] diffstat: qeth_main.c |6 - qeth_mpc.c |2 qeth_mpc.h |2 qeth_proc.c | 250 ++-- qeth_sys.c |4 qeth_tso.h |4 6 files changed, 38 insertions(+), 230 deletions(-) diff -Naupr linux-orig/drivers/s390/net/qeth_main.c linux-patched/drivers/s390/net/qeth_main.c --- linux-orig/drivers/s390/net/qeth_main.c 2005-12-12 19:01:34.0 +0100 +++ linux-patched/drivers/s390/net/qeth_main.c 2005-12-12 19:13:30.0 +0100 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.246 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic ([EMAIL PROTECTED]) and * Thomas Spatzier [EMAIL PROTECTED] * - *$Revision: 1.242 $$Date: 2005/05/04 20:19:18 $ + *$Revision: 1.251 $$Date: 2005/05/04 20:19:18 $ * * 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 @@ -72,7 +72,7 @@ #include qeth_eddp.h #include qeth_tso.h -#define VERSION_QETH_C $Revision: 1.246 $ +#define VERSION_QETH_C $Revision: 1.251 $ static const char *version = qeth S/390 OSA-Express driver; /** diff -Naupr linux-orig/drivers/s390/net/qeth_mpc.c linux-patched/drivers/s390/net/qeth_mpc.c --- linux-orig/drivers/s390/net/qeth_mpc.c 2005-12-12 17:33:48.0 +0100 +++ linux-patched/drivers/s390/net/qeth_mpc.c 2005-12-12 19:13:41.0 +0100 @@ -11,7 +11,7 @@ #include asm/cio.h #include qeth_mpc.h -const char *VERSION_QETH_MPC_C = $Revision: 1.12 $; +const char *VERSION_QETH_MPC_C = $Revision: 1.13 $; unsigned char IDX_ACTIVATE_READ[]={ 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, diff -Naupr linux-orig/drivers/s390/net/qeth_mpc.h linux-patched/drivers/s390/net/qeth_mpc.h --- linux-orig/drivers/s390/net/qeth_mpc.h 2005-12-12 19:01:34.0 +0100 +++ linux-patched/drivers/s390/net/qeth_mpc.h 2005-12-12 19:13:54.0 +0100 @@ -14,7 +14,7 @@ #include asm/qeth.h -#define VERSION_QETH_MPC_H $Revision: 1.44 $ +#define VERSION_QETH_MPC_H $Revision: 1.46 $ extern const char *VERSION_QETH_MPC_C; diff -Naupr linux-orig/drivers/s390/net/qeth_proc.c linux-patched/drivers/s390/net/qeth_proc.c --- linux-orig/drivers/s390/net/qeth_proc.c 2005-12-12 17:33:48.0 +0100 +++ linux-patched/drivers/s390/net/qeth_proc.c 2005-12-12 19:03:53.0 +0100 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $) + * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to procfs. @@ -21,7 +21,7 @@ #include qeth_mpc.h #include qeth_fs.h -const char *VERSION_QETH_PROC_C = $Revision: 1.13 $; +const char *VERSION_QETH_PROC_C = $Revision: 1.16 $; /* /proc/qeth */ #define QETH_PROCFILE_NAME qeth @@ -30,30 +30,26 @@ static struct proc_dir_entry *qeth_procf static int qeth_procfile_seq_match(struct device *dev, void *data) { - return 1; + return(dev ? 1 : 0); } static void * qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) { - struct device *dev; - loff_t nr; - + struct device *dev = NULL; + loff_t nr = 0; + down_read(qeth_ccwgroup_driver.driver.bus-subsys.rwsem); - - nr = *offset; - if (nr == 0) + if (*offset == 0) return SEQ_START_TOKEN; - - dev = driver_find_device(qeth_ccwgroup_driver.driver, NULL, -NULL, qeth_procfile_seq_match); - - /* get card at pos *offset */ - nr = *offset; - while (nr-- 1 dev) + while (1) { dev = driver_find_device(qeth_ccwgroup_driver.driver, dev, NULL, qeth_procfile_seq_match); - return (void *) dev; + if (++nr == *offset) + break; + put_device(dev); + } + return dev; } static void @@ -66,19 +62,14 @@ static void * qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) { struct device *prev, *next; - - if (it == SEQ_START_TOKEN) { - next = driver_find_device(qeth_ccwgroup_driver.driver, - NULL, NULL, qeth_procfile_seq_match); - if (next) - (*offset)++; - return (void *) next; - } - prev = (struct device *) it; + + if (it == SEQ_START_TOKEN)
[patch 2/3] s390: minor qeth network driver fixes
[patch 2/3] s390: minor qeth network driver fixes From: Frank Pavlic [EMAIL PROTECTED] - use netif_carrier_on/off calls to tell network stack link carrier state - fix possible kfree on NULL - PDU_LEN2 is at offset 0x29 otherwise OSN chpid won't initialize Signed-off-by: Frank Pavlic [EMAIL PROTECTED] diffstat: qeth_eddp.c |3 ++- qeth_main.c | 17 +++-- qeth_mpc.h |2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff -Naupr linux-orig/drivers/s390/net/qeth_eddp.c linux-patched/drivers/s390/net/qeth_eddp.c --- linux-orig/drivers/s390/net/qeth_eddp.c 2005-12-12 17:33:48.0 +0100 +++ linux-patched/drivers/s390/net/qeth_eddp.c 2005-12-12 18:56:23.0 +0100 @@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_ for (i = 0; i ctx-num_pages; ++i) free_page((unsigned long)ctx-pages[i]); kfree(ctx-pages); - kfree(ctx-elements); + if (ctx-elements != NULL) + kfree(ctx-elements); kfree(ctx); } diff -Naupr linux-orig/drivers/s390/net/qeth_main.c linux-patched/drivers/s390/net/qeth_main.c --- linux-orig/drivers/s390/net/qeth_main.c 2005-12-12 18:15:36.0 +0100 +++ linux-patched/drivers/s390/net/qeth_main.c 2005-12-12 18:56:23.0 +0100 @@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_devic QETH_DBF_TEXT(setup, 3, setoffl); QETH_DBF_HEX(setup, 3, card, sizeof(void *)); - + + netif_carrier_off(card-dev); recover_flag = card-state; if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ PRINT_WARN(Stopping card %s interrupted by user!\n, @@ -1020,7 +1021,6 @@ void qeth_schedule_recovery(struct qeth_card *card) { QETH_DBF_TEXT(trace,2,startrec); - if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) schedule_work(card-kernel_thread_starter); } @@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *ca IP address reset.\n, QETH_CARD_IFNAME(card), card-info.chpid); - netif_carrier_on(card-dev); qeth_schedule_recovery(card); return NULL; case IPA_CMD_MODCCID: @@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card * { u16 s1, s2; -QETH_DBF_TEXT(trace,4,osndipa); + QETH_DBF_TEXT(trace,4,osndipa); qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); @@ -3809,10 +3808,8 @@ qeth_open(struct net_device *dev) card-data.state = CH_STATE_UP; card-state = CARD_STATE_UP; - if (!card-lan_online){ - if (netif_carrier_ok(dev)) - netif_carrier_off(dev); - } + if (!card-lan_online netif_carrier_ok(dev)) + netif_carrier_off(dev); return 0; } @@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device QETH_DBF_TEXT_(setup, 2, 6err%d, rc); goto out_remove; } -/*maybe it was set offline without ifconfig down - * we can also use this state for recovery purposes*/ + netif_carrier_on(card-dev); + qeth_set_allowed_threads(card, 0x, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card, recovery_mode); diff -Naupr linux-orig/drivers/s390/net/qeth_mpc.h linux-patched/drivers/s390/net/qeth_mpc.h --- linux-orig/drivers/s390/net/qeth_mpc.h 2005-12-12 17:33:48.0 +0100 +++ linux-patched/drivers/s390/net/qeth_mpc.h 2005-12-12 18:56:23.0 +0100 @@ -21,7 +21,7 @@ extern const char *VERSION_QETH_MPC_C; #define IPA_PDU_HEADER_SIZE0x40 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) -#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a) +#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29) #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) extern unsigned char IPA_PDU_HEADER[]; - To unsubscribe from this list: send 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: [stable] [PATCH] [NETLINK]: Fix processing of fib_lookup netlink messages
On Thu, Dec 01, 2005 at 11:05:12PM +0100, Thomas Graf wrote: The receive path for fib_lookup netlink messages is lacking sanity checks for header and payload and is thus vulnerable to malformed netlink messages causing illegal memory references. Signed-off-by: Thomas Graf [EMAIL PROTECTED] Queued to -stable. thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html