From owner-stp@oss.sgi.com Tue Aug 1 15:49:12 2000 Received: by oss.sgi.com id ; Tue, 1 Aug 2000 15:49:03 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:30273 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 1 Aug 2000 15:48:32 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id PAA07852 for ; Tue, 1 Aug 2000 15:53:55 -0700 (PDT) mail_from (aman@engr.sgi.com) Received: from lhotse.engr.sgi.com ([163.154.35.41]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id PAA59271 for ; Tue, 1 Aug 2000 15:47:31 -0700 (PDT) Received: from engr.sgi.com (localhost [127.0.0.1]) by lhotse.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id PAA74122 for ; Tue, 1 Aug 2000 15:45:48 -0700 (PDT) Message-ID: <3987531C.7877DA7A@engr.sgi.com> Date: Tue, 01 Aug 2000 15:45:48 -0700 From: Aman Singla Organization: SGI X-Mailer: Mozilla 4.74b2C-SGI [en] (X11; I; IRIX 6.5-ALPHA-1286569120 IP32) X-Accept-Language: en MIME-Version: 1.0 To: stp@oss.sgi.com Subject: [Fwd: STP patch for 2.4.0-test5] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-stp@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;stp-outgoing A patch from Pekka. :a -------- Original Message -------- Subject: STP patch for 2.4.0-test5 Date: Tue, 1 Aug 2000 19:37:04 +0200 (CEST) From: Pekka Pietikainen Reply-To: Pekka Pietikainen To: aman@cthulhu.engr.sgi.com Hi I took another shot at porting STP to the latest kernel, and found the original problem, sendmsg was pointing at sock_no_fcntl and recvmsg to sendmsg, which "might" have caused some problems ;) Here's a patch on top of 2.4.0-test5 + stp-0.32-2.3.99pre2 that actually works... diff -urN 1/include/linux/if_ether.h 2/include/linux/if_ether.h --- 1/include/linux/if_ether.h Tue Aug 1 20:41:38 2000 +++ 2/include/linux/if_ether.h Tue Aug 1 18:25:42 2000 @@ -58,6 +58,7 @@ #define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ #define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ #define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ +#define ETH_P_STP 0x8183 /* STP over 802.3 */ /* * Non DIX types. Won't clash for 1500 types. diff -urN 1/net/Makefile 2/net/Makefile --- 1/net/Makefile Tue Aug 1 20:41:38 2000 +++ 2/net/Makefile Tue Aug 1 18:26:55 2000 @@ -10,7 +10,7 @@ MOD_SUB_DIRS := ipv4 ALL_SUB_DIRS := 802 ax25 bridge core ethernet ipv4 ipv6 ipx unix appletalk \ netrom rose lapb x25 wanrouter netlink sched packet sunrpc \ - econet irda decnet atm khttpd ipv4/netfilter ipv6/netfilter + econet irda decnet atm khttpd ipv4/netfilter ipv6/netfilter stp SUB_DIRS := core ethernet MOD_LIST_NAME := NET_MISC_MODULES diff -urN 1/net/ipv4/proc.c 2/net/ipv4/proc.c --- 1/net/ipv4/proc.c Tue Aug 1 20:41:38 2000 +++ 2/net/ipv4/proc.c Tue Aug 1 18:52:15 2000 @@ -80,6 +80,15 @@ fold_prot_inuse(&raw_prot)); len += sprintf(buffer+len, "FRAG: inuse %d memory %d\n", ip_frag_nqueues, atomic_read(&ip_frag_mem)); +#if defined(CONFIG_STP) || defined(CONFIG_STP_MODULE) +{ + extern struct proto* stp_prot_ptr; + + if (stp_prot_ptr) + len += sprintf(buffer+len, "STP: inuse %d\n", + fold_prot_inuse(stp_prot_ptr)); +} +#endif if (offset >= len) { *start = buffer; diff -urN 1/net/stp/core/stp_inet.c 2/net/stp/core/stp_inet.c --- 1/net/stp/core/stp_inet.c Tue Aug 1 20:41:38 2000 +++ 2/net/stp/core/stp_inet.c Tue Aug 1 20:21:15 2000 @@ -247,7 +247,7 @@ sk->sport = htons(sk->num); sk_dst_reset(sk); sk->prot->hash(sk); - sk->socket->flags |= SO_ACCEPTCON; + sk->socket->flags |= __SO_ACCEPTCON; sk->write_space = stp_inet_nop_write_space; } sk->max_ack_backlog = backlog; @@ -274,7 +274,7 @@ lock_sock(sk); err = -EINVAL; - if ((sock->state != SS_UNCONNECTED) || (!(sock->flags & SO_ACCEPTCON)) || (sk->state != TCP_LISTEN)) + if ((sock->state != SS_UNCONNECTED) || (!(sock->flags & __SO_ACCEPTCON)) || (sk->state != TCP_LISTEN)) goto out; /* assumption: should be able to call prot->accept multiple @@ -533,24 +533,23 @@ } struct proto_ops stp_inet_ops = { - PF_INET, + family: PF_INET, - stp_inet_release, - stp_inet_bind, - stp_inet_stream_connect, - sock_no_socketpair, - stp_inet_accept, - inet_getname, - stp_inet_poll, - inet_ioctl, - stp_inet_listen, - inet_shutdown, - inet_setsockopt, - inet_getsockopt, - sock_no_fcntl, - inet_sendmsg, - inet_recvmsg, - stp_inet_mmap + release: stp_inet_release, + bind: stp_inet_bind, + connect: stp_inet_stream_connect, + socketpair: sock_no_socketpair, + accept: stp_inet_accept, + getname: inet_getname, + poll: stp_inet_poll, + ioctl: inet_ioctl, + listen: stp_inet_listen, + shutdown: inet_shutdown, + setsockopt: inet_setsockopt, + getsockopt: inet_getsockopt, + sendmsg: inet_sendmsg, + recvmsg: inet_recvmsg, + mmap: stp_inet_mmap }; diff -urN 1/net/stp/core/stp_timers.h 2/net/stp/core/stp_timers.h --- 1/net/stp/core/stp_timers.h Tue Aug 1 20:41:38 2000 +++ 2/net/stp/core/stp_timers.h Tue Aug 1 19:25:55 2000 @@ -53,19 +53,17 @@ { \ struct sock* sk = p->_sock; \ \ - spin_lock_bh(&sk->timer_lock); \ if (!when) { \ if (del_timer(&p->_timer)) \ sock_put(sk); \ p->_timer.data = 0; \ } else { \ - if (!p->_timer.prev) { \ + if (!timer_pending(&p->_timer)) { \ p->_timer.data = (unsigned long)p; \ sock_hold(sk); \ } \ mod_timer(&p->_timer, jiffies+when); \ } \ - spin_unlock_bh(&sk->timer_lock); \ } #define DEFINE_STP_TIMEOUT_FUNCTION(_func, _desctype, _varname, _sock, _timer, _fsm_func_call) \ @@ -86,13 +84,11 @@ /* reschedule for later - only if no one added/deleted the timer \ * between it going off and getting here \ */ \ - spin_lock_bh(&sk->timer_lock); \ - if ((!_varname->_timer.prev) && _varname->_timer.data) { \ + if (!timer_pending(&_varname->_timer) && _varname->_timer.data) { \ _varname->_timer.expires = jiffies + STP_TIMEOUT_RESCHEDULE; \ add_timer(&_varname->_timer); \ sock_hold(sk); \ } \ - spin_unlock_bh(&sk->timer_lock); \ } \ bh_unlock_sock(sk); \ sock_put(sk); \ From owner-stp@oss.sgi.com Thu Aug 3 13:06:49 2000 Received: by oss.sgi.com id ; Thu, 3 Aug 2000 13:06:39 -0700 Received: from tonnant.concentric.net ([207.155.248.72]:47565 "EHLO tonnant.cnchost.com") by oss.sgi.com with ESMTP id ; Thu, 3 Aug 2000 13:06:18 -0700 Received: from atheros.com (w113.z208176024.sjc-ca.dsl.cnc.net [208.176.24.113]) by tonnant.cnchost.com id QAA05376; Thu, 3 Aug 2000 16:05:47 -0400 (EDT) [ConcentricHost SMTP Relay 1.8] Message-ID: <3989D04C.C526938D@atheros.com> Date: Thu, 03 Aug 2000 13:04:28 -0700 From: Aman Singla Organization: Atheros Communications X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.3.99-pre9 i686) X-Accept-Language: en MIME-Version: 1.0 To: "ryan.tecco" CC: stp@oss.sgi.com Subject: Re: Volunteer? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-stp@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;stp-outgoing Hi Ryan- Thanks for your email. I'm not working for SGI anymore, and as such my future involvement with STP would be rather passive.I'm forwarding your request to the stp mailing list (stp@oss.sgi.com) which I encourage you too to join. There are quite a few people interested in and developing various aspects of the ST protocol on that list. I'll be more than glad to answer any questions or provide any insights based on my experience with STP. thanks, :a "ryan.tecco" wrote: > > Hello, > I am interested in getting involved with the STP/Linux > project, as a coder, or as a tester. My interest in this > is corporate, since my company is developing a system that > would benefit from this technology (we support both Irix and > Linux as virtual-reality software company), but there's alot > of personal fascination with this sort of thing. If there's > anything that I could do to help, or if you'd like to talk > with me more, don't hesitate to reply. > > Thanks, > rt > > -- > ---------------- > ryan.tecco > > "Everything is controlled by a small > evil group to which, unfortunately, > no one we know belongs." From owner-stp@oss.sgi.com Fri Aug 4 07:50:40 2000 Received: by oss.sgi.com id ; Fri, 4 Aug 2000 07:50:30 -0700 Received: from smtp1.cern.ch ([137.138.128.38]:32014 "EHLO smtp1.cern.ch") by oss.sgi.com with ESMTP id ; Fri, 4 Aug 2000 07:50:00 -0700 Received: from lxplus003.cern.ch (IDENT:root@lxplus003.cern.ch [137.138.161.124]) by smtp1.cern.ch (8.9.3/8.9.3) with ESMTP id QAA17254 for ; Fri, 4 Aug 2000 16:49:28 +0200 (MET DST) Received: from localhost (ppieta@localhost) by lxplus003.cern.ch (8.9.3/8.9.3) with SMTP id QAA05526 for ; Fri, 4 Aug 2000 16:49:27 +0200 X-Authentication-Warning: lxplus003.cern.ch: ppieta owned process doing -bs Date: Fri, 4 Aug 2000 16:49:27 +0200 (CEST) From: Pekka Pietikainen X-Sender: ppieta@lxplus003.cern.ch To: stp@oss.sgi.com Subject: libst problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-stp@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;stp-outgoing Hi I've been trying to get the libst test programs working, but it appears it fails when it tries to mmap the socket this fails with a ENODEV. Looking at the ST code it appears like mmap() is only functional in the OS bypass case, so I defined _STP_ASSIST_FIRMWARE_ and _LIBST_ASSIST_FIRMWARE_ in the modified acenic driver. However, it seems like my acenic boards refuse to run that firmware (eth0: Firmware not running). They are 512k models, which might explain it if the modified firmware is too big, but it could be that the firmware in 0.32a was somehow corrupted. Any ideas? From owner-stp@oss.sgi.com Fri Aug 4 14:06:03 2000 Received: by oss.sgi.com id ; Fri, 4 Aug 2000 14:05:53 -0700 Received: from c017-h021.c017.sfo.cp.net ([209.228.12.235]:34520 "HELO c017.sfo.cp.net") by oss.sgi.com with SMTP id ; Fri, 4 Aug 2000 14:05:45 -0700 Received: (cpmta 16982 invoked from network); 4 Aug 2000 14:04:14 -0700 Received: from adsl-pool24-84.detroit.mi.ameritech.net (HELO ?10.0.0.3?) (64.108.57.84) by smtp.neochi.com with SMTP; 4 Aug 2000 14:04:14 -0700 X-Sent: 4 Aug 2000 21:04:14 GMT Date: Fri, 4 Aug 2000 13:04:36 -0400 (EDT) From: "ryan.tecco" X-Sender: rtecco@localhost.localdomain To: stp@oss.sgi.com Subject: 3Com 10/100 Cards Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-stp@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;stp-outgoing Is anyone writing drivers for any 3Com 10/100mbps cards? If not, I suppose, I'll begin... Let me know either way. rt -- ---------------- ryan.tecco "Everything is controlled by a small evil group to which, unfortunately, no one we know belongs."