* Re: 2.6.16-rc1-mm4: ACX=y, ACX_USB=n compile error
From: Gabriel C. @ 2006-01-31 18:34 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: linux-kernel, John W. Linville, Adrian Bunk, netdev
In-Reply-To: <200601311658.09423.vda@ilport.com.ua>
On Tue, 31 Jan 2006 16:58:09 +0200
Denis Vlasenko <vda@ilport.com.ua> wrote:
> On Tuesday 31 January 2006 16:54, John W. Linville wrote:
> > On Tue, Jan 31, 2006 at 02:16:05PM +0200, Denis Vlasenko wrote:
> >
> > > CONFIG_ACX=y
> > > # CONFIG_ACX_PCI is not set
> > > # CONFIG_ACX_USB is not set
> > >
> > > This won't fly. You must select at least one.
> > >
> > > Attached patch will check for this and #error out.
> > > Andrew, do not apply to -mm, I'll send you bigger update today.
> >
> > Is there any way to move this into a Kconfig file? That seems nicer
> > than having #ifdefs in source code to check for a configuration
> > error.
>
> Can't think of any at the moment.
> --
> vda
>
I'm not a kernel hacker :-) and mabye I'm wrong but why not auto select
ACX_{PCI,USB} ?
Gabriel
^ permalink raw reply
* Re: 2.6.16-rc1-mm4: ACX=y, ACX_USB=n compile error
From: Carlos Martín @ 2006-01-31 18:59 UTC (permalink / raw)
To: Gabriel C.
Cc: Denis Vlasenko, linux-kernel, John W. Linville, Adrian Bunk,
netdev
In-Reply-To: <20060131193443.5822661b@zwerg>
On Tuesday 31 January 2006 19:34, Gabriel C. wrote:
>
> I'm not a kernel hacker :-) and mabye I'm wrong but why not auto select
> ACX_{PCI,USB} ?
They can still be both unselected, and that's where the problem lies.
Would it work if you added '&& (ACX_USB || ACX_PCI)' to the end of the
'depends' line, or would that just make it unselectable?
cmn
--
Carlos Martín http://www.cmartin.tk
"Erdbeben? Sicherlich etwas, das mit Erdberen zu tun hat." -- me, paraphrased
^ permalink raw reply
* Re: 2.6.16-rc1-mm4: ACX=y, ACX_USB=n compile error
From: Adrian Bunk @ 2006-01-31 22:16 UTC (permalink / raw)
To: Denis Vlasenko
Cc: John W. Linville, Gabriel C., da.crew, linux-kernel, netdev
In-Reply-To: <200601311658.09423.vda@ilport.com.ua>
On Tue, Jan 31, 2006 at 04:58:09PM +0200, Denis Vlasenko wrote:
> On Tuesday 31 January 2006 16:54, John W. Linville wrote:
> > On Tue, Jan 31, 2006 at 02:16:05PM +0200, Denis Vlasenko wrote:
> >
> > > CONFIG_ACX=y
> > > # CONFIG_ACX_PCI is not set
> > > # CONFIG_ACX_USB is not set
> > >
> > > This won't fly. You must select at least one.
> > >
> > > Attached patch will check for this and #error out.
> > > Andrew, do not apply to -mm, I'll send you bigger update today.
> >
> > Is there any way to move this into a Kconfig file? That seems nicer
> > than having #ifdefs in source code to check for a configuration error.
>
> Can't think of any at the moment.
There are two possible solutions ("offer" means "is user visible"):
- only offer ACX and always build ACX_PCI/ACX_USB depending on the
availability of PCI/USB
- only offer ACX_PCI and ACX_USB which select ACX
If you tell me which you prefer I can send a patch.
> vda
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* [GIT PULL] bcm43xx: Update B6PHY initialization
From: Danny van Dyk @ 2006-02-01 0:06 UTC (permalink / raw)
To: John W. Linville, netdev-u79uwXL29TY76Z2rM5mHXA,
bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi John,
I'm slowly trying to get accustomed to git, so I'll try a short patch
as a first step. So please
git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
I hope I did set up everything correctly :-)
Danny
- --
Danny van Dyk <kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Gentoo/AMD64 Project, Gentoo Scientific Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD3/traVNL8NrtU6IRAnt1AJ9AL8PZyOQKcqX0PvoHJt83P1PGWgCgoKap
Ye/hY6nu6Cs8dkt4HmaWqiw=
=rbQh
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: [GIT PULL] bcm43xx: Update B6PHY initialization
From: Jeff Garzik @ 2006-02-01 0:21 UTC (permalink / raw)
To: Danny van Dyk
Cc: John W. Linville, netdev-u79uwXL29TY76Z2rM5mHXA,
bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
In-Reply-To: <43DFFB6C.9050907-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
On Wed, Feb 01, 2006 at 01:06:04AM +0100, Danny van Dyk wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi John,
>
> I'm slowly trying to get accustomed to git, so I'll try a short patch
> as a first step. So please
>
> git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
Your git pull email needs to include a summary of included changesets,
and a patch for others to review.
Jeff
^ permalink raw reply
* [RFC] Poor Network Performance with e1000 on 2.6.14.3
From: Ashutosh Naik @ 2006-02-01 5:17 UTC (permalink / raw)
To: linux-kernel, netdev, linux-net, Andrew Morton, jgarzik
Cc: john.ronciak, ganesh.venkatesan, cramerj
[-- Attachment #1: Type: text/plain, Size: 955 bytes --]
My configuration is two Dell Optiplex PCs ( /proc/cpuinfo attached)
connected back to back.. I am using the vanilla 2.6.14.3 kernel, and
using the e1000 driver for the onboard Intel PRO 1000 Ethernet Card on
both machines. I am performing both Full and Half Duplex Data
Transfer and the figures which I am getting are abysmal..
Full Duplex Data Transfer ( Both send and receive )
Ettcp Send - 55167.45 KB/sec
Ettcp Receive - 54902.49 KB/sec
Total Throughput ~ 110MB/sec
CPU IDLE - 55 percent
Half Duplex Data Transfer ( Sending from one host to another )
Total Throughput = 103 MB/Sec
CPU IDLE - 65 percent
Now, I assume that on Gigabit ethernet, I should be getting Line Rate,
which is around 220 MBps. Even the CPU is not getting max-ed out here
and I am at a loss to understand this behaviour.
Please find the ethtool dump, and the ettcp send and receive dumps for
both full and half duplex transfers
Regards,
Ashutosh
[-- Attachment #2: ettcp-recv-full-duplex.txt --]
[-- Type: text/plain, Size: 618 bytes --]
[root@kir9060 root]# ettcp -s -r
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001 tcp
nttcp-r: socket
ttcp-r: accept from 192.168.80.15
User: 2249 Nice: 58 System 1694 Idle:111197 Params:4
User: 2278 Nice: 58 System 2250 Idle:114639 Params:4
User_diff: 29 Nice_diff: 0 System_diff: 556 Idle_diff:3442 Tot:4027
User: 0.720139 System: 13.806804 Nice 0.000000 Idle:85.473057
nttcp-r: Buflen:8192 SysLoad:13.81% 3373203456 bytes 60.00secs =54902.49 KB/sec
nttcp-r: 627033 I/O calls, msec/call = 0.10, calls/sec = 10450.57
nttcp-r: 0.2user 6.9sys 1:00real 12% 0i+0d 0maxrss 0+15pf 448574+141csw
[-- Attachment #3: ettcp-send-full-duplex.txt --]
[-- Type: text/plain, Size: 642 bytes --]
[root@kir9060 root]# ettcp -s -t -i 60 -l 65536 192.168.80.15
ttcp-t: buflen=65536, nbuf=2048, align=16384/0, port=5001 tcp -> 192.168.80.15nttcp-t: socket
nttcp-t: connect
User: 2249 Nice: 58 System 1673 Idle:110852 Params:4
User: 2275 Nice: 58 System 2206 Idle:114417 Params:4
User_diff: 26 Nice_diff: 0 System_diff: 533 Idle_diff:3565 Tot:4124
User: 0.630456 System: 12.924345 Nice 0.000000 Idle:86.445199
nttcp-t: Buflen:65536 SysLoad:12.92% 3389521920 bytes 60.00secs =55167.45 KB/secnttcp-t: 51720 I/O calls, msec/call = 1.19, calls/sec = 861.99
nttcp-t: 0.0user 2.5sys 1:00real 4% 0i+0d 0maxrss 0+27pf 51415+35csw
[-- Attachment #4: ettcp-half-dup.txt --]
[-- Type: text/plain, Size: 639 bytes --]
[root@kir9060 root]# ettcp -s -t -i 60 -l 65536 192.168.80.15
ttcp-t: buflen=65536, nbuf=2048, align=16384/0, port=5001 tcp -> 192.168.80.15nttcp-t: socket
nttcp-t: connect
User: 2337 Nice: 58 System 2590 Idle:134970 Params:4
User: 2344 Nice: 58 System 2906 Idle:139352 Params:4
User_diff: 7 Nice_diff: 0 System_diff: 316 Idle_diff:4382 Tot:4705
User: 0.148778 System: 6.716259 Nice 0.000000 Idle:93.134963
nttcp-t: Buflen:65536 SysLoad:6.72% 6341132288 bytes 60.00secs =103207.73 KB/secnttcp-t: 96758 I/O calls, msec/call = 0.63, calls/sec = 1612.62
nttcp-t: 0.0user 3.2sys 1:00real 5% 0i+0d 0maxrss 0+27pf 96136+2csw
[-- Attachment #5: cpuinfo.txt --]
[-- Type: text/plain, Size: 439 bytes --]
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2793.594
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5593.94
[-- Attachment #6: ethtool.txt --]
[-- Type: text/plain, Size: 605 bytes --]
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
^ permalink raw reply
* Re: 2.6.16-rc1-mm4: ACX=y, ACX_USB=n compile error
From: Denis Vlasenko @ 2006-02-01 6:57 UTC (permalink / raw)
To: Adrian Bunk; +Cc: John W. Linville, Gabriel C., da.crew, linux-kernel, netdev
In-Reply-To: <20060131221637.GJ3986@stusta.de>
On Wednesday 01 February 2006 00:16, Adrian Bunk wrote:
> > > > CONFIG_ACX=y
> > > > # CONFIG_ACX_PCI is not set
> > > > # CONFIG_ACX_USB is not set
> > > >
> > > > This won't fly. You must select at least one.
> > > >
> > > > Attached patch will check for this and #error out.
> > > > Andrew, do not apply to -mm, I'll send you bigger update today.
> > >
> > > Is there any way to move this into a Kconfig file? That seems nicer
> > > than having #ifdefs in source code to check for a configuration error.
> >
> > Can't think of any at the moment.
>
> There are two possible solutions ("offer" means "is user visible"):
> - only offer ACX and always build ACX_PCI/ACX_USB depending on the
> availability of PCI/USB
> - only offer ACX_PCI and ACX_USB which select ACX
>
> If you tell me which you prefer I can send a patch.
Second one sounds okay to me.
--
vda
^ permalink raw reply
* Re: [PATCH] TNETW1450: successful device initialization
From: Denis Vlasenko @ 2006-02-01 9:20 UTC (permalink / raw)
To: andi; +Cc: acx100-devel, netdev
In-Reply-To: <20060201085205.GA9315@rhlx01.fht-esslingen.de>
On Wednesday 01 February 2006 10:52, Andreas Mohr wrote:
> Hi all,
>
> - add initial support for new TNETW1450 USB chip (available on the market since
> June or so): successful firmware booting, driver initialization working up to
> a working iwconfig. Any network traffic whatsoever NOT working yet.
> VERY EXPERIMENTAL! (especially since TNETW1450 sometimes uses enhanced,
> longer structs for some IEs)
> - add a ton of different TNETW1450 USB device VID/PID combinations; it's
> highly likely that there will be many more TNETW1450 devices in the future...
> - add many more firmware command IEs
> - firmware upload cleanup (rename variables to better names, unify the various
> firmware upload implementations, ...)
> - add FIXME comment to remind about semaphore -> mutex conversion
Applied, mega thanks!
Do you have a "HOWTO sniff USB under Windows" or URL to it?
May be helpful for other potential developers.
> The TNETW1450 firmware image is currently called acx111usbcRR, with RR being
> the currently used radio ID 0x1b ("1b"): acx111usbc1b.
Patch actually says "tiacx..." which is what you obviously intended.
> NOTE that DWL-120+ firmware image - due to unified firmware name creation -
> now has a different name, too:
> acx100usbc0d! (Denis, simply revert it if you're offended by this change).
No objections, only changed that to _uppercase_ hex radio id
("tiacx111usbc1D") in order to match PCI firmware name convention.
> Total driver size increase: less than 2kB!
Wonderful
> ACX100 mini-PCI, DWL-120+ and TNETW1450 are all still working as before.
--
vda
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply
* Re: [PATCH] TNETW1450: successful device initialization
From: Andreas Mohr @ 2006-02-01 9:29 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: andi, acx100-devel, netdev
In-Reply-To: <200602011120.15686.vda@ilport.com.ua>
Hi,
[noted that you CC'd netdev; I'd been wondering whether I should do that -
should really have done it myself...]
On Wed, Feb 01, 2006 at 11:20:15AM +0200, Denis Vlasenko wrote:
> Applied, mega thanks!
>
> Do you have a "HOWTO sniff USB under Windows" or URL to it?
> May be helpful for other potential developers.
There's a page on the internet listing many different USB sniffers for
Windows. I don't have the URL handy right now, though, sorry.
> > The TNETW1450 firmware image is currently called acx111usbcRR, with RR being
> > the currently used radio ID 0x1b ("1b"): acx111usbc1b.
>
> Patch actually says "tiacx..." which is what you obviously intended.
Uh, right.
> > NOTE that DWL-120+ firmware image - due to unified firmware name creation -
> > now has a different name, too:
> > acx100usbc0d! (Denis, simply revert it if you're offended by this change).
>
> No objections, only changed that to _uppercase_ hex radio id
> ("tiacx111usbc1D") in order to match PCI firmware name convention.
Doh! I really wonder how that managed to escape me. Thanks for catching it!
> > Total driver size increase: less than 2kB!
>
> Wonderful
I'm still expecting this to go up to perhaps 6kB increase, though.
Andreas Mohr
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply
* Re: [GIT PULL] bcm43xx: Update B6PHY initialization
From: Danny van Dyk @ 2006-02-01 9:51 UTC (permalink / raw)
To: John W. Linville
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
In-Reply-To: <20060201002101.GA8306-oTNwCEtKUwI/11+TDStg7g@public.gmane.org>
John, please
git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
which will provide this changeset:
Danny van Dyk:
[bcm43xx] Sync bcm43xx_phy_initb6() with specs
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
index f5e7a6a..d90f207 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
@@ -947,7 +947,7 @@ static void bcm43xx_phy_initb6(struct bc
bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
if ((bcm->current_core->radio->manufact == 0x17F) &&
(bcm->current_core->radio->version == 0x2050) &&
- (bcm->current_core->radio->revision == 2)) {
+ (bcm->current_core->radio->revision <= 2)) {
bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
bcm43xx_radio_write16(bcm, 0x005A, 0x0070);
bcm43xx_radio_write16(bcm, 0x005B, 0x007B);
@@ -984,10 +984,15 @@ static void bcm43xx_phy_initb6(struct bc
bcm43xx_write16(bcm, 0x03E4, 0x0009);
if (phy->type == BCM43xx_PHYTYPE_B) {
bcm43xx_write16(bcm, 0x03E6, 0x8140);
- bcm43xx_phy_write(bcm, 0x0016, 0x5410);
- bcm43xx_phy_write(bcm, 0x0017, 0xA820);
- bcm43xx_phy_write(bcm, 0x0007, 0x0062);
- TODO();//TODO: calibrate stuff.
+ bcm43xx_phy_write(bcm, 0x0016, 0x0410);
+ bcm43xx_phy_write(bcm, 0x0017, 0x0820);
+ bcm43xx_phy_write(bcm, 0x0062, 0x0007);
+ (void) bcm43xx_radio_calibrationvalue(bcm);
+ bcm43xx_phy_lo_b_measure(bcm);
+ if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) {
+ bcm43xx_calc_nrssi_slope(bcm);
+ bcm43xx_calc_nrssi_threshold(bcm);
+ }
bcm43xx_phy_init_pctl(bcm);
} else
bcm43xx_write16(bcm, 0x03E6, 0x0);
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
index 5ce6ace..3901aa9 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
@@ -1184,7 +1184,7 @@ int bcm43xx_radio_set_interference_mitig
return 0;
}
-static u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
+u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
{
u16 reg, index, ret;
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
b/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
index 89fe292..a5d2e10 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
@@ -89,5 +89,6 @@ void bcm43xx_nrssi_hw_update(struct bcm4
void bcm43xx_nrssi_mem_update(struct bcm43xx_private *bcm);
void bcm43xx_radio_set_tx_iq(struct bcm43xx_private *bcm);
+u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm);
#endif /* BCM43xx_RADIO_H_ */
--
Danny van Dyk <kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Gentoo/AMD64 Project, Gentoo Scientific Project
--
Danny van Dyk <kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Gentoo/AMD64 Project, Gentoo Scientific Project
^ permalink raw reply related
* Re: [PATCH] TNETW1450: successful device initialization
From: Denis Vlasenko @ 2006-02-01 9:55 UTC (permalink / raw)
To: Jean-Baptiste Note; +Cc: netdev, acx100-devel, andi
In-Reply-To: <1138786708.26656.4.camel@curcuma.ens.fr>
On Wednesday 01 February 2006 11:38, Jean-Baptiste Note wrote:
> Hi Denis,
>
> > Do you have a "HOWTO sniff USB under Windows" or URL to it?
> > May be helpful for other potential developers.
> >
>
> One page which I found very usefull for prism54softmac USB sniffing
> under windows is this one :
>
> http://benoit.papillault.free.fr/usbsnoop/
>
> Another very good way to snoop the USB frames is under linux if your
> driver happens to run under ndiswrapper (which is often the case),
> either by savage printk's, or by using the USB snooping facilities from
> Pete Zaitcev.
Added to acx README, thanks!
--
vda
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply
* Re: [lock validator] inet6_destroy_sock(): soft-safe -> soft-unsafe lock dependency
From: Herbert Xu @ 2006-02-01 10:42 UTC (permalink / raw)
To: Ingo Molnar; +Cc: davem, linux-kernel, netdev, YOSHIFUJI Hideaki
In-Reply-To: <20060131212432.GA18812@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On Tue, Jan 31, 2006 at 10:24:32PM +0100, Ingo Molnar wrote:
>
> [<c04de9e8>] _write_lock+0x8/0x10
> [<c0499015>] inet6_destroy_sock+0x25/0x100
> [<c04b8672>] tcp_v6_destroy_sock+0x12/0x20
> [<c046bbda>] inet_csk_destroy_sock+0x4a/0x150
> [<c047625c>] tcp_rcv_state_process+0xd4c/0xdd0
> [<c047d8e9>] tcp_v4_do_rcv+0xa9/0x340
> [<c047eabb>] tcp_v4_rcv+0x8eb/0x9d0
OK this is definitely broken. We should never touch the dst lock in
softirq context. Since inet6_destroy_sock may be called from that
context due to the asynchronous nature of sockets, we can't take the
lock there.
In fact this sk_dst_reset is totally redundant since all IPv6 sockets
use inet_sock_destruct as their socket destructor which always cleans
up the dst anyway. So the solution is to simply remove the call.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: inet6-destroy-sock-should-not-reset-dst --]
[-- Type: text/plain, Size: 369 bytes --]
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -369,12 +369,6 @@ int inet6_destroy_sock(struct sock *sk)
struct sk_buff *skb;
struct ipv6_txoptions *opt;
- /*
- * Release destination entry
- */
-
- sk_dst_reset(sk);
-
/* Release rx options */
if ((skb = xchg(&np->pktoptions, NULL)) != NULL)
^ permalink raw reply
* [RFC] Backward compatibility and WAN netdev configuration
From: Krzysztof Halasa @ 2006-02-01 10:50 UTC (permalink / raw)
To: netdev, lkml
Hi,
I'm considering some changes/additions to my generic HDLC (WAN) code.
What do you think about:
a) Currently it consists of mid-layer WAN protocols single module (Cisco
HDLC, FR etc.) + low-level hardware HDLC card driver (C101, N2, PCI200SYN
etc.). I'm thinking about splitting the protocol module into separate
modules - it would make them independent, users would be able to
load, say, FR without PPP or X.25 and underlying syncppp, lapb etc.
From the technical POV it would be superior to current code but it
would require sysadmins to change modprobe.conf, add another modprobe
or something like that. Not a real problem but the upgrade can't be
automatic.
b) I'm currently using a dedicated "sethdlc" tool for configuring WAN
devices (both physical parameters like clocking, speeds etc. and
protocol parameters/selection). It uses ioctl(). I'm thinking about
switching configuration interface to sysfs. That would render the
old ioctl interface obsolete.
It would mean much better flexibility, and (when the HDLC ioctl
interface is removed in a year or so) would simplify the code.
I'm not sure about using sysfs for net device configuration, though.
Of course, it would make sysfs mandatory for generic HDLC users.
I'd aim at making changes to ~ 2.6.18.
Opinions?
--
Krzysztof Halasa
^ permalink raw reply
* Re: [lock validator] inet6_destroy_sock(): soft-safe -> soft-unsafe lock dependency
From: Ingo Molnar @ 2006-02-01 11:13 UTC (permalink / raw)
To: Herbert Xu; +Cc: davem, linux-kernel, netdev, YOSHIFUJI Hideaki
In-Reply-To: <20060201104214.GA9085@gondor.apana.org.au>
* Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, Jan 31, 2006 at 10:24:32PM +0100, Ingo Molnar wrote:
> >
> > [<c04de9e8>] _write_lock+0x8/0x10
> > [<c0499015>] inet6_destroy_sock+0x25/0x100
> > [<c04b8672>] tcp_v6_destroy_sock+0x12/0x20
> > [<c046bbda>] inet_csk_destroy_sock+0x4a/0x150
> > [<c047625c>] tcp_rcv_state_process+0xd4c/0xdd0
> > [<c047d8e9>] tcp_v4_do_rcv+0xa9/0x340
> > [<c047eabb>] tcp_v4_rcv+0x8eb/0x9d0
>
> OK this is definitely broken. We should never touch the dst lock in
> softirq context. Since inet6_destroy_sock may be called from that
> context due to the asynchronous nature of sockets, we can't take the
> lock there.
>
> In fact this sk_dst_reset is totally redundant since all IPv6 sockets
> use inet_sock_destruct as their socket destructor which always cleans
> up the dst anyway. So the solution is to simply remove the call.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
cool - i've booted your patch and will have results later today [it's
looking good so far, after 10 minutes of uptime ;)]
btw., this codepath took some time to trigger, and i'm not sure why:
maybe because i dont have any true ipv6 traffic? (In fact i dont have
CONFIG_IPV6 enabled at all in this kernel config - so this codepath must
be an effect of ipv4/ipv6 unification?) I guess i should run the ipv6
testsuite to expose all the important codepaths to the validator? [Would
you have any suggestions for me how to do that quickly & easily?]
another thing: could you add the string 'lock validator' somewhere into
the changelog, so that we can grep for such things later on? One reason
for that is to strenghten my future arguments for mainline inclusion
;-), but there's another argument as well:
the lock validator finds _all_ hidden deadlocks [no matter how obscure,
interdependent or unlikely they are, as long as the affected codepath is
triggered at least once], and thus the resulting bug statistics and
characteristics will be an excellent (and one-time) opportunity to
objectively judge the absolute code quality (and defect rate) of the
Linux kernel, for an important category of hard-to-find bugs. (Maybe the
results can even be extrapolated to other, similarly hard-to-find bug
categories.)
in other words, the lock validator is building a runtime set of formal
"locking requirements", and is automatically proving (and maintaining
the proof) that all locking activity within the kernel meets those
requirements, mathematically. It thus enables us to achieve a hard
ceiling of 100% correctness that we can rarely achieve in complex code
as the kernel. We should minimize the changeset entropy introduced and
preserve this historic information.
Ingo
^ permalink raw reply
* Re: [RFC] Poor Network Performance with e1000 on 2.6.14.3
From: Ashutosh Naik @ 2006-02-01 12:19 UTC (permalink / raw)
To: Ben Greear, linux-kernel, netdev, linux-net, Andrew Morton,
jgarzik
In-Reply-To: <43E04712.6080108@candelatech.com>
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
On 2/1/06, Ben Greear <greearb@candelatech.com> wrote:
> Ashutosh Naik wrote:
> > Now, I assume that on Gigabit ethernet, I should be getting Line Rate,
> > which is around 220 MBps. Even the CPU is not getting max-ed out here
> > and I am at a loss to understand this behaviour.
>
> Make sure you are running 64-bit 100+Mhz PCI, otherwise you will not
> get line speed. ethtool -d [device]
> may get that info for you.
Thanks for that Ben. I now used a 64 bit,133 MHz PCI-X on both
machines and I got around 180 MBps, (86259.48 + 95164.90 ), which is
still a decent way away from Line speed. I think PCI is not a
bottleneck now, although I could be wrong. What could I be missing,
and has anybody seen line speed ( 220 MBps ) with e1000 ?
Regards and Thanks
Ashutosh
ps - Attaching my ettcp log
[-- Attachment #2: log.txt --]
[-- Type: text/plain, Size: 1224 bytes --]
[root@localhost ~]# ettcp -s -t -i 300ttcp-r: accept from 192.168.90.100
User: 17553 Nice: 0 System 8885 Idle:737051 Params:4
ttcp-t: buflen=65536, nbuf=2048, align=16384/0, port=5001 tcp -> 192.168.90.10
0
nttcp-t: socket
nttcp-t: connect
User: 17555 Nice: 0 System 8892 Idle:737076 Params:4
^[
User: 19818 Nice: 0 System 14716 Idle:747604 Params:4
User_diff: 2265 Nice_diff: 0 System_diff: 5831 Idle_diff:10553 Tot:18649
User: 12.145423 System: 31.267092 Nice 0.000000 Idle:56.587485
nttcp-r: Buflen:65536 SysLoad:31.27% 29232070656 bytes 299.97secs =95164.90 KB/s
ec
nttcp-r: 699884 I/O calls, msec/call = 0.44, calls/sec = 2333.15
nttcp-r: 0.2user 32.6sys 4:59real 10% 0i+0d 0maxrss 0+30pf 691228+3947csw
User: 19834 Nice: 0 System 14722 Idle:747623 Params:4
User_diff: 2279 Nice_diff: 0 System_diff: 5830 Idle_diff:10547 Tot:18656
User: 12.215909 System: 31.250000 Nice 0.000000 Idle:56.534091
nttcp-t: Buflen:65536 SysLoad:31.25% 26499153920 bytes 300.00secs =86259.48 KB/s
ec
nttcp-t: 404345 I/O calls, msec/call = 0.76, calls/sec = 1347.80
nttcp-t: 0.2user 44.9sys 5:00real 15% 0i+0d 0maxrss 0+30pf 374765+1306csw
[1]+ Done ettcp -s -r -l 65536
^ permalink raw reply
* Re: 2.6.14.3 and page allocation failures..
From: Sai Bathina @ 2006-02-01 13:35 UTC (permalink / raw)
To: Brandeburg, Jesse; +Cc: e1000-devel, netdev
In-Reply-To: <C925F8B43D79CC49ACD0601FB68FF50C06909DA8@orsmsx408>
Thanks for the post:
Here's the /proc/slabinfo output:
slabinfo - version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab>
<pagesperslab> : tunables <limit> <batchcount> <sharedfactor> :
slabdata <activ
e_slabs> <num_slabs> <sharedavail>
ip_conntrack_syn 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
ip_fib_alias 9 113 32 113 1 : tunables 120 60
8 : slabdata 1 1 0
ip_fib_hash 9 113 32 113 1 : tunables 120 60
8 : slabdata 1 1 0
rpc_buffers 8 8 2048 2 1 : tunables 24 12
8 : slabdata 4 4 0
rpc_tasks 8 15 256 15 1 : tunables 120 60
8 : slabdata 1 1 0
rpc_inode_cache 0 0 512 7 1 : tunables 54 27
8 : slabdata 0 0 0
bridge_fdb_cache 4 59 64 59 1 : tunables 120 60
8 : slabdata 1 1 0
UNIX 7 7 512 7 1 : tunables 54 27
8 : slabdata 1 1 0
ipt_hashlimit 0 0 40 92 1 : tunables 120 60
8 : slabdata 0 0 0
ip_tproxy 0 0 128 30 1 : tunables 120 60
8 : slabdata 0 0 0
ip_conntrack_expect 0 0 96 40 1 : tunables 120
60 8 : slabdata 0 0 0
ip_conntrack 1 16 248 16 1 : tunables 120 60
8 : slabdata 1 1 0
tcp_bind_bucket 1 203 16 203 1 : tunables 120 60
8 : slabdata 1 1 0
inet_peer_cache 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
ip_dst_cache 0 0 256 15 1 : tunables 120 60
8 : slabdata 0 0 0
arp_cache 0 0 256 15 1 : tunables 120 60
8 : slabdata 0 0 0
RAW 3 7 512 7 1 : tunables 54 27
8 : slabdata 1 1 0
UDP 0 0 512 7 1 : tunables 54 27
8 : slabdata 0 0 0
tw_sock_TCP 0 0 128 30 1 : tunables 120 60
8 : slabdata 0 0 0
request_sock_TCP 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
TCP 4 7 1152 7 2 : tunables 24 12
8 : slabdata 1 1 0
cfq_ioc_pool 0 0 48 78 1 : tunables 120 60
8 : slabdata 0 0 0
cfq_pool 0 0 96 40 1 : tunables 120 60
8 : slabdata 0 0 0
crq_pool 0 0 48 78 1 : tunables 120 60
8 : slabdata 0 0 0
deadline_drq 0 0 52 72 1 : tunables 120 60
8 : slabdata 0 0 0
as_arq 12 59 64 59 1 : tunables 120 60
8 : slabdata 1 1 0
mqueue_inode_cache 1 6 640 6 1 : tunables 54 27
8 : slabdata 1 1 0
nfs_write_data 36 42 512 7 1 : tunables 54 27
8 : slabdata 6 6 0
nfs_read_data 32 35 512 7 1 : tunables 54 27
8 : slabdata 5 5 0
nfs_inode_cache 0 0 668 6 1 : tunables 54 27
8 : slabdata 0 0 0
nfs_page 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
ext2_inode_cache 649 816 492 8 1 : tunables 54 27
8 : slabdata 102 102 0
dnotify_cache 0 0 20 169 1 : tunables 120 60
8 : slabdata 0 0 0
eventpoll_pwq 0 0 36 101 1 : tunables 120 60
8 : slabdata 0 0 0
eventpoll_epi 0 0 128 30 1 : tunables 120 60
8 : slabdata 0 0 0
inotify_event_cache 0 0 28 127 1 : tunables 120
60 8 : slabdata 0 0 0
inotify_watch_cache 0 0 36 101 1 : tunables 120
60 8 : slabdata 0 0 0
kioctx 0 0 256 15 1 : tunables 120 60
8 : slabdata 0 0 0
kiocb 0 0 128 30 1 : tunables 120 60
8 : slabdata 0 0 0
fasync_cache 0 0 16 203 1 : tunables 120 60
8 : slabdata 0 0 0
shmem_inode_cache 3 8 476 8 1 : tunables 54 27
8 : slabdata 1 1 0
posix_timers_cache 0 0 104 37 1 : tunables 120 60
8 : slabdata 0 0 0
uid_cache 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
sgpool-128 32 32 2048 2 1 : tunables 24 12
8 : slabdata 16 16 0
sgpool-64 32 32 1024 4 1 : tunables 54 27
8 : slabdata 8 8 0
sgpool-32 32 32 512 8 1 : tunables 54 27
8 : slabdata 4 4 0
sgpool-16 32 45 256 15 1 : tunables 120 60
8 : slabdata 3 3 0
sgpool-8 32 60 128 30 1 : tunables 120 60
8 : slabdata 2 2 0
blkdev_ioc 33 127 28 127 1 : tunables 120 60
8 : slabdata 1 1 0
blkdev_queue 26 27 412 9 1 : tunables 54 27
8 : slabdata 3 3 0
blkdev_requests 24 48 160 24 1 : tunables 120 60
8 : slabdata 2 2 0
biovec-(256) 256 256 3072 2 2 : tunables 24 12
8 : slabdata 128 128 0
biovec-128 256 260 1536 5 2 : tunables 24 12
8 : slabdata 52 52 0
biovec-64 256 260 768 5 1 : tunables 54 27
8 : slabdata 52 52 0
biovec-16 259 270 256 15 1 : tunables 120 60
8 : slabdata 18 18 0
biovec-4 256 295 64 59 1 : tunables 120 60
8 : slabdata 5 5 0
biovec-1 272 406 16 203 1 : tunables 120 60
8 : slabdata 2 2 0
bio 317 1170 128 30 1 : tunables 120 60
8 : slabdata 39 39 0
file_lock_cache 11 40 96 40 1 : tunables 120 60
8 : slabdata 1 1 0
sock_inode_cache 21 21 512 7 1 : tunables 54 27
8 : slabdata 3 3 0
skbuff_fclone_cache 0 0 384 10 1 : tunables 54
27 8 : slabdata 0 0 0
skbuff_head_cache 32955 32955 256 15 1 : tunables 120 60
8 : slabdata 2197 2197 0
proc_inode_cache 70 170 392 10 1 : tunables 54 27
8 : slabdata 17 17 0
sigqueue 8 26 148 26 1 : tunables 120 60
8 : slabdata 1 1 0
radix_tree_node 698 728 276 14 1 : tunables 54 27
8 : slabdata 52 52 0
bdev_cache 7 7 512 7 1 : tunables 54 27
8 : slabdata 1 1 0
sysfs_dir_cache 1202 1288 40 92 1 : tunables 120 60
8 : slabdata 14 14 0
mnt_cache 17 30 128 30 1 : tunables 120 60
8 : slabdata 1 1 0
inode_cache 340 340 376 10 1 : tunables 54 27
8 : slabdata 34 34 0
dentry_cache 1095 1701 144 27 1 : tunables 120 60
8 : slabdata 63 63 0
filp 390 495 256 15 1 : tunables 120 60
8 : slabdata 33 33 0
names_cache 12 12 4096 1 1 : tunables 24 12
8 : slabdata 12 12 0
idr_layer_cache 64 87 136 29 1 : tunables 120 60
8 : slabdata 3 3 0
buffer_head 900 1224 52 72 1 : tunables 120 60
8 : slabdata 17 17 0
mm_struct 48 48 640 6 1 : tunables 54 27
8 : slabdata 8 8 0
vm_area_struct 576 748 88 44 1 : tunables 120 60
8 : slabdata 17 17 0
fs_cache 59 59 64 59 1 : tunables 120 60
8 : slabdata 1 1 0
files_cache 56 56 512 7 1 : tunables 54 27
8 : slabdata 8 8 0
signal_cache 70 70 384 10 1 : tunables 54 27
8 : slabdata 7 7 0
sighand_cache 65 65 1408 5 2 : tunables 24 12
8 : slabdata 13 13 0
task_struct 66 66 1280 3 1 : tunables 24 12
8 : slabdata 22 22 0
anon_vma 367 406 16 203 1 : tunables 120 60
8 : slabdata 2 2 0
pgd 48 48 4096 1 1 : tunables 24 12
8 : slabdata 48 48 0
size-131072(DMA) 0 0 131072 1 32 : tunables 8 4
0 : slabdata 0 0 0
size-131072 0 0 131072 1 32 : tunables 8 4
0 : slabdata 0 0 0
size-65536(DMA) 0 0 65536 1 16 : tunables 8 4
0 : slabdata 0 0 0
size-65536 3 3 65536 1 16 : tunables 8 4
0 : slabdata 3 3 0
size-32768(DMA) 0 0 32768 1 8 : tunables 8 4
0 : slabdata 0 0 0
size-32768 0 0 32768 1 8 : tunables 8 4
0 : slabdata 0 0 0
size-16384(DMA) 0 0 16384 1 4 : tunables 8 4
0 : slabdata 0 0 0
size-16384 0 0 16384 1 4 : tunables 8 4
0 : slabdata 0 0 0
size-8192(DMA) 0 0 8192 1 2 : tunables 8 4
0 : slabdata 0 0 0
size-8192 58 58 8192 1 2 : tunables 8 4
0 : slabdata 58 58 0
size-4096(DMA) 0 0 4096 1 1 : tunables 24 12
8 : slabdata 0 0 0
size-4096 46 46 4096 1 1 : tunables 24 12
8 : slabdata 46 46 0
size-2048(DMA) 0 0 2048 2 1 : tunables 24 12
8 : slabdata 0 0 0
size-2048 33000 33000 2048 2 1 : tunables 24 12
8 : slabdata 16500 16500 24
size-1024(DMA) 0 0 1024 4 1 : tunables 54 27
8 : slabdata 0 0 0
size-1024 80 80 1024 4 1 : tunables 54 27
8 : slabdata 20 20 0
size-512(DMA) 0 0 512 8 1 : tunables 54 27
8 : slabdata 0 0 0
size-512 184 184 512 8 1 : tunables 54 27
8 : slabdata 23 23 0
size-256(DMA) 0 0 256 15 1 : tunables 120 60
8 : slabdata 0 0 0
size-256 120 120 256 15 1 : tunables 120 60
8 : slabdata 8 8 0
size-128(DMA) 0 0 128 30 1 : tunables 120 60
8 : slabdata 0 0 0
size-128 900 900 128 30 1 : tunables 120 60
8 : slabdata 30 30 0
size-64(DMA) 0 0 64 59 1 : tunables 120 60
8 : slabdata 0 0 0
size-32(DMA) 0 0 32 113 1 : tunables 120 60
8 : slabdata 0 0 0
size-64 82658 82718 64 59 1 : tunables 120 60
8 : slabdata 1402 1402 0
size-32 851 904 32 113 1 : tunables 120 60
8 : slabdata 8 8 0
kmem_cache 120 120 128 30 1 : tunables 120 60
8 : slabdata 4 4 0
On 1/31/06, Brandeburg, Jesse <jesse.brandeburg@intel.com> wrote:
> Sorry for the top post.
>
> You may want to post this to netdev@vger.kernel.org.
>
> We haven't heard any reports of e100 itself leaking. You need to run
> slabtop or send the output of /proc/slabinfo to see what slab entry is
> taking all the memory on your system.
>
> At this point some other component is suspect.
>
> Jesse
>
>
> > -----Original Message-----
> > From: e1000-devel-admin@lists.sourceforge.net [mailto:e1000-devel-
> > admin@lists.sourceforge.net] On Behalf Of Sai Bathina
> > Sent: Monday, January 30, 2006 4:03 PM
> > To: e1000-devel@lists.sourceforge.net
> > Subject: [E1000-devel] 2.6.14.3 and page allocation failures..
> >
> > Hi,
> > I am seeing page allocation errors and I have a snapshot of the
> > /var/log/messages.
> >
> > My Hardware configs are
> > Dell 650, using e100 driver(e100-3.4.14-k2-NAPI), driver from the
> kernel
> >
> > model name : Intel(R) Pentium(R) 4 CPU 2.40GHz cache size :
> > 512 KB
> >
> > total used free shared buffers cached
> > Mem: 255744 188400 67344 0 680
> 11064
> > -/+ buffers/cache: 176656 79088
> > Swap: 2097136 134740 1962396
> >
> >
> > Observed the failures immediately after running network traffic.
> > I am assuming that it has something to do with the e100 driver page
> > allocations here....I would appreciate if anyone can help me in
> > figuring out what is going wrong with this.
> >
> > Jan 30 22:46:59 : swapper: page allocation failure. order:0, mode:0x20
> > Jan 30 22:46:59 : [__alloc_pages+936/976] __alloc_pages+0x3a8/0x3d0
> > Jan 30 22:46:59 : [br_nf_forward_ip+264/296]
> br_nf_forward_ip+0x108/0x128
> > Jan 30 22:46:59 : [kmem_getpages+44/132] kmem_getpages+0x2c/0x84
> > Jan 30 22:46:59 : [cache_grow+163/316] cache_grow+0xa3/0x13c
> > Jan 30 22:46:59 : [cache_alloc_refill+415/488]
> > cache_alloc_refill+0x19f/0x1e8
> > Jan 30 22:46:59 : [skb_checksum+72/628] skb_checksum+0x48/0x274
> > Jan 30 22:46:59 : [kmem_cache_alloc+63/76] kmem_cache_alloc+0x3f/0x4c
> > Jan 30 22:47:00 : [ip_conntrack_alloc+133/280]
> > ip_conntrack_alloc+0x85/0x118
> > Jan 30 22:47:00 : [init_conntrack+48/348] init_conntrack+0x30/0x15c
> > Jan 30 22:47:00 : [rpc_get_inode+52/148] rpc_get_inode+0x34/0x94
> > Jan 30 22:47:00 : [ip_conntrack_in+317/824]
> ip_conntrack_in+0x13d/0x338
> > Jan 30 22:47:00 : [br_nf_pre_routing_finish+0/704]
> > br_nf_pre_routing_finish+0x0/0x2c0
> > Jan 30 22:47:00 : [nf_iterate+69/112] nf_iterate+0x45/0x70
> > Jan 30 22:47:00 : [br_nf_pre_routing_finish+0/704]
> > br_nf_pre_routing_finish+0x0/0x2c0
> > Jan 30 22:47:00 : [nf_hook_slow+100/260] nf_hook_slow+0x64/0x104
> > Jan 30 22:47:00 : [br_nf_pre_routing_finish+0/704]
> > br_nf_pre_routing_finish+0x0/0x2c0
> > Jan 30 22:47:00 : [br_handle_frame_finish+0/220]
> > br_handle_frame_finish+0x0/0xdc
> > Jan 30 22:47:00 : [br_nf_pre_routing+907/948]
> > br_nf_pre_routing+0x38b/0x3b4
> > Jan 30 22:47:00 : [br_nf_pre_routing_finish+0/704]
> > br_nf_pre_routing_finish+0x0/0x2c0
> > Jan 30 22:47:00 : [br_handle_frame_finish+0/220]
> > br_handle_frame_finish+0x0/0xdc
> > Jan 30 22:47:00 : [nf_iterate+69/112] nf_iterate+0x45/0x70
> > Jan 30 22:47:00 : [br_handle_frame_finish+0/220]
> > br_handle_frame_finish+0x0/0xdc
> > Jan 30 22:47:00 : [nf_hook_slow+100/260] nf_hook_slow+0x64/0x104
> > Jan 30 22:47:00 : [br_handle_frame_finish+0/220]
> > br_handle_frame_finish+0x0/0xdc
> > Jan 30 22:47:00 : [br_handle_frame+385/476]
> br_handle_frame+0x181/0x1dc
> > Jan 30 22:47:00 : [br_handle_frame_finish+0/220]
> > br_handle_frame_finish+0x0/0xdc
> > Jan 30 22:47:00 : [netif_receive_skb+322/576]
> > netif_receive_skb+0x142/0x240
> > Jan 30 22:47:00 : [pg0+273725344/1069114368] e100_poll+0x274/0x6bc
> [e100]
> > Jan 30 22:47:00 : [net_rx_action+128/296] net_rx_action+0x80/0x128
> > Jan 30 22:47:00 : [gcc2_compiled.+141/256] __do_softirq+0x8d/0x100
> > Jan 30 22:47:00 : [do_softirq+47/52] do_softirq+0x2f/0x34
> > Jan 30 22:47:00 : [irq_exit+52/64] irq_exit+0x34/0x40
> > Jan 30 22:47:00 : [gcc2_compiled.+32/40] do_IRQ+0x20/0x28
> > Jan 30 22:47:00 : [common_interrupt+26/32] common_interrupt+0x1a/0x20
> > Jan 30 22:47:00 : [default_idle+0/44] default_idle+0x0/0x2c
> > Jan 30 22:47:00 : [default_idle+35/44] default_idle+0x23/0x2c
> > Jan 30 22:47:00 : [cpu_idle+123/140] cpu_idle+0x7b/0x8c
> > Jan 30 22:47:00 : [rest_init+45/48] rest_init+0x2d/0x30
> > Jan 30 22:47:00 : [start_kernel+402/404] start_kernel+0x192/0x194
> > Jan 30 22:47:00 : Mem-info:
> > Jan 30 22:47:00 : DMA per-cpu:
> > Jan 30 22:47:00 : cpu 0 hot: low 2, high 6, batch 1 used:2
> > Jan 30 22:47:00 : cpu 0 cold: low 0, high 2, batch 1 used:0
> > Jan 30 22:47:00 : Normal per-cpu:
> > Jan 30 22:47:00 : cpu 0 hot: low 62, high 186, batch 31 used:92
> > Jan 30 22:47:00 : cpu 0 cold: low 0, high 62, batch 31 used:59
> > Jan 30 22:47:00 : HighMem per-cpu: empty
> > Jan 30 22:47:00 : Free pages: 1724kB (0kB HighMem)
> > Jan 30 22:47:00 : Active:42014 inactive:17287 dirty:18 writeback:0
> > unstable:0 free:431 slab:2213 mapped:57515 pagetables:162
> > Jan 30 22:47:00 : DMA free:1004kB min:124kB low:152kB high:184kB
> > active:5396kB inactive:5872kB present:16384kB pages_scanned:0
> > all_unreclaimable? no
> > Jan 30 22:47:00 : lowmem_reserve[]: 0 239 239
> > Jan 30 22:47:00 : Normal free:720kB min:1916kB low:2392kB high:2872kB
> > active:162660kB inactive:63276kB present:245696kB pages_scanned:0
> > all_unreclaimable? no
> > Jan 30 22:47:00 : lowmem_reserve[]: 0 0 0
> > Jan 30 22:47:00 : HighMem free:0kB min:128kB low:160kB high:192kB
> > active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable?
> > no
> > Jan 30 22:47:00 : lowmem_reserve[]: 0 0 0
> > Jan 30 22:47:00 : DMA: 1*4kB 1*8kB 0*16kB 1*32kB 1*64kB 1*128kB
> > 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1004kB
> > Jan 30 22:47:00 : Normal: 0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB
> > 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 720kB
> >
> > Jan 30 22:47:00 : HighMem: empty
> > Jan 30 22:47:00 : Swap cache: add 2750, delete 2255, find 199/211,
> race
> > 0+0
> > Jan 30 22:47:00 : Free swap = 2086600kB
> > Jan 30 22:47:00 : Total swap = 2097136kB
> > Jan 30 22:47:00 : Free swap: 2086600kB
> > Jan 30 22:47:00 : 65520 pages of RAM
> > Jan 30 22:47:00 : 0 pages of HIGHMEM
> > Jan 30 22:47:00 : 2608 reserved pages
> > Jan 30 22:47:00 : 3922 pages shared
> > Jan 30 22:47:00 : 495 pages swap cached
> > Jan 30 22:47:00 : 18 pages dirty
> > Jan 30 22:47:00 : 0 pages writeback
> > Jan 30 22:47:00 : 57515 pages mapped
> > Jan 30 22:47:00 : 2213 pages slab
> > Jan 30 22:47:00 : 162 pages pagetables
> > Jan 30 22:47:02 : snort2: page allocation failure. order:0, mode:0x20
> > Jan 30 22:47:02 : [__alloc_pages+936/976] __alloc_pages+0x3a8/0x3d0
> > Jan 30 22:47:02 : [kmem_getpages+44/132] kmem_getpages+0x2c/0x84
> > Jan 30 22:47:02 : [cache_grow+163/316] cache_grow+0xa3/0x13c
> > Jan 30 22:47:02 : [cache_alloc_refill+415/488]
> > cache_alloc_refill+0x19f/0x1e8
> > Jan 30 22:47:02 : [__kmalloc+115/136] __kmalloc+0x73/0x88
> > Jan 30 22:47:02 : [__alloc_skb+88/292] __alloc_skb+0x58/0x124
> > Jan 30 22:47:02 : [pg0+273725486/1069114368] e100_poll+0x302/0x6bc
> [e100]
> > Jan 30 22:47:02 : [net_rx_action+128/296] net_rx_action+0x80/0x128
> > Jan 30 22:47:02 : [gcc2_compiled.+141/256] __do_softirq+0x8d/0x100
> > Jan 30 22:47:02 : [do_softirq+47/52] do_softirq+0x2f/0x34
> > Jan 30 22:47:02 : [irq_exit+52/64] irq_exit+0x34/0x40
> > Jan 30 22:47:02 : [gcc2_compiled.+32/40] do_IRQ+0x20/0x28
> > Jan 30 22:47:02 : [common_interrupt+26/32] common_interrupt+0x1a/0x20
> > Jan 30 22:47:02 : Mem-info:
> > Jan 30 22:47:02 : DMA per-cpu:
> > Jan 30 22:47:02 : cpu 0 hot: low 2, high 6, batch 1 used:2
> > Jan 30 22:47:02 : cpu 0 cold: low 0, high 2, batch 1 used:1
> > Jan 30 22:47:02 : Normal per-cpu:
> > Jan 30 22:47:02 : cpu 0 hot: low 62, high 186, batch 31 used:92
> > Jan 30 22:47:02 : cpu 0 cold: low 0, high 62, batch 31 used:44
> > Jan 30 22:47:02 : HighMem per-cpu: empty
> > Jan 30 22:47:02 : Free pages: 1616kB (0kB HighMem)
> > Jan 30 22:47:02 : Active:26538 inactive:14460 dirty:0 writeback:1337
> > unstable:0 free:404 slab:20545 mapped:26431 pagetables:168
> > Jan 30 22:47:02 : DMA free:1004kB min:124kB low:152kB high:184kB
> > active:2768kB inactive:2032kB present:16384kB pages_scanned:0
> > all_unreclaimable? no
> > Jan 30 22:47:02 : lowmem_reserve[]: 0 239 239
> > Jan 30 22:47:02 : Normal free:612kB min:1916kB low:2392kB high:2872kB
> > active:103384kB inactive:55808kB present:245696kB pages_scanned:0
> > all_unreclaimable? no
> > Jan 30 22:47:02 : lowmem_reserve[]: 0 0 0
> > Jan 30 22:47:02 : HighMem free:0kB min:128kB low:160kB high:192kB
> > active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable?
> > no
> > Jan 30 22:47:02 : lowmem_reserve[]: 0 0 0
> > Jan 30 22:47:02 : DMA: 1*4kB 1*8kB 0*16kB 1*32kB 1*64kB 1*128kB
> > 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1004kB
> > Jan 30 22:47:02 : Normal: 1*4kB 0*8kB 0*16kB 1*32kB 1*64kB 0*128kB
> > 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 612kB
> > Jan 30 22:47:02 : HighMem: empty
> > Jan 30 22:47:02 : Swap cache: add 34195, delete 20265, find 291/345,
> race
> > 0+0
> > Jan 30 22:47:02 : Free swap = 1962140kB
> > Jan 30 22:47:02 : Total swap = 2097136kB
> > Jan 30 22:47:02 : Free swap: 1962140kB
> > Jan 30 22:47:02 : 65520 pages of RAM
> > Jan 30 22:47:02 : 0 pages of HIGHMEM
> > Jan 30 22:47:02 : 2608 reserved pages
> > Jan 30 22:47:02 : 3785 pages shared
> > Jan 30 22:47:02 : 13930 pages swap cached
> > Jan 30 22:47:02 : 0 pages dirty
> > Jan 30 22:47:02 : 1337 pages writeback
> > Jan 30 22:47:02 : 26431 pages mapped
> > Jan 30 22:47:02 : 20545 pages slab
> > Jan 30 22:47:02 : 168 pages pagetables
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD
> SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=k&kid\x103432&bid#0486&dat\x121642
> > _______________________________________________
> > E1000-devel mailing list
> > E1000-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/e1000-devel
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
^ permalink raw reply
* Re: Re: [GIT PULL] bcm43xx: Update B6PHY initialization
From: Michael Buesch @ 2006-02-01 13:55 UTC (permalink / raw)
To: Danny van Dyk
Cc: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA,
bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
In-Reply-To: <200602011051.00973.kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3763 bytes --]
On Wednesday 01 February 2006 10:51, Danny van Dyk wrote:
> John, please
>
> git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
>
> which will provide this changeset:
>
> Danny van Dyk:
> [bcm43xx] Sync bcm43xx_phy_initb6() with specs
Danny, _please_ make sure to apply patches to the softmac _and_ the dscape
branch. Otherwise patches will get lost.
It is very important to keep both branches in sync.
I know that this is annoying work, but we must stick with it, until
we have a usable 80211 stack in the kernel.
I also know that 99% of the people are not interrested in the dscape
branch, but it is important to keep it working. The only way to find
weaknesses in d80211 is to maintain drivers which use it.
Besides that, you can also request a pull from me. The git snapshots
are generated from my tree, so this is the fastest way to get your
changes into the snapshots. But that's entirely your decision.
> diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> index f5e7a6a..d90f207 100644
> --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> @@ -947,7 +947,7 @@ static void bcm43xx_phy_initb6(struct bc
> bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
> if ((bcm->current_core->radio->manufact == 0x17F) &&
> (bcm->current_core->radio->version == 0x2050) &&
> - (bcm->current_core->radio->revision == 2)) {
> + (bcm->current_core->radio->revision <= 2)) {
> bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
> bcm43xx_radio_write16(bcm, 0x005A, 0x0070);
> bcm43xx_radio_write16(bcm, 0x005B, 0x007B);
> @@ -984,10 +984,15 @@ static void bcm43xx_phy_initb6(struct bc
> bcm43xx_write16(bcm, 0x03E4, 0x0009);
> if (phy->type == BCM43xx_PHYTYPE_B) {
> bcm43xx_write16(bcm, 0x03E6, 0x8140);
> - bcm43xx_phy_write(bcm, 0x0016, 0x5410);
> - bcm43xx_phy_write(bcm, 0x0017, 0xA820);
> - bcm43xx_phy_write(bcm, 0x0007, 0x0062);
> - TODO();//TODO: calibrate stuff.
> + bcm43xx_phy_write(bcm, 0x0016, 0x0410);
> + bcm43xx_phy_write(bcm, 0x0017, 0x0820);
> + bcm43xx_phy_write(bcm, 0x0062, 0x0007);
> + (void) bcm43xx_radio_calibrationvalue(bcm);
> + bcm43xx_phy_lo_b_measure(bcm);
> + if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) {
> + bcm43xx_calc_nrssi_slope(bcm);
> + bcm43xx_calc_nrssi_threshold(bcm);
> + }
> bcm43xx_phy_init_pctl(bcm);
> } else
> bcm43xx_write16(bcm, 0x03E6, 0x0);
> diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
> b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
> index 5ce6ace..3901aa9 100644
> --- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
> @@ -1184,7 +1184,7 @@ int bcm43xx_radio_set_interference_mitig
> return 0;
> }
>
> -static u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
> +u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
> {
> u16 reg, index, ret;
>
> diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
> b/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
> index 89fe292..a5d2e10 100644
> --- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.h
> @@ -89,5 +89,6 @@ void bcm43xx_nrssi_hw_update(struct bcm4
> void bcm43xx_nrssi_mem_update(struct bcm43xx_private *bcm);
>
> void bcm43xx_radio_set_tx_iq(struct bcm43xx_private *bcm);
> +u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm);
>
> #endif /* BCM43xx_RADIO_H_ */
> --
> Danny van Dyk <kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> Gentoo/AMD64 Project, Gentoo Scientific Project
>
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC] Backward compatibility and WAN netdev configuration
From: Marco d'Itri @ 2006-02-01 14:49 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: netdev, lkml
In-Reply-To: <m3psm7tksr.fsf@defiant.localdomain>
On Feb 01, Krzysztof Halasa <khc@pm.waw.pl> wrote:
> a) Currently it consists of mid-layer WAN protocols single module (Cisco
> HDLC, FR etc.) + low-level hardware HDLC card driver (C101, N2, PCI200SYN
> etc.). I'm thinking about splitting the protocol module into separate
> modules - it would make them independent, users would be able to
> load, say, FR without PPP or X.25 and underlying syncppp, lapb etc.
> From the technical POV it would be superior to current code but it
> would require sysadmins to change modprobe.conf, add another modprobe
> or something like that. Not a real problem but the upgrade can't be
> automatic.
Why you cannot support autoloading the modules when a specific protocol
is needed?
--
ciao,
Marco
^ permalink raw reply
* Re: [RFC] Backward compatibility and WAN netdev configuration
From: Krzysztof Halasa @ 2006-02-01 18:33 UTC (permalink / raw)
To: Marco d'Itri; +Cc: netdev, lkml
In-Reply-To: <20060201144917.GA7644@wonderland.linux.it>
md@Linux.IT (Marco d'Itri) writes:
> Why you cannot support autoloading the modules when a specific protocol
> is needed?
I probably could but it would complicate things a bit - currently only
the protocol module knows about existence of its protocol.
I will look at it, though. Thanks.
--
Krzysztof Halasa
^ permalink raw reply
* Re: [RFC] Backward compatibility and WAN netdev configuration
From: Stephen Hemminger @ 2006-02-01 18:39 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Marco d'Itri, netdev, lkml
In-Reply-To: <m3r76n3p4k.fsf@defiant.localdomain>
On Wed, 01 Feb 2006 19:33:47 +0100
Krzysztof Halasa <khc@pm.waw.pl> wrote:
> md@Linux.IT (Marco d'Itri) writes:
>
> > Why you cannot support autoloading the modules when a specific protocol
> > is needed?
>
> I probably could but it would complicate things a bit - currently only
> the protocol module knows about existence of its protocol.
>
> I will look at it, though. Thanks.
The modern way is to not have any entries in modprobe.conf, and do all
the module loading via kernel module_aliases. Modprobe.conf is then
reserved for handling workarounds for special cases
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
^ permalink raw reply
* Re: Re: [GIT PULL] bcm43xx: Update B6PHY initialization
From: Danny van Dyk @ 2006-02-01 18:54 UTC (permalink / raw)
To: John Linville
Cc: Michael Buesch, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <200602011455.34307.mbuesch-KuiJ5kEpwI6ELgA04lAiVw@public.gmane.org>
John,
> On Wednesday 01 February 2006 10:51, Danny van Dyk wrote:
> > John, please
> >
> > git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
> >
> > which will provide this changeset:
> >
> > Danny van Dyk:
> > [bcm43xx] Sync bcm43xx_phy_initb6() with specs
>
> Danny, _please_ make sure to apply patches to the softmac _and_ the dscape
> branch. Otherwise patches will get lost.
> It is very important to keep both branches in sync.
I just added the very same patch to the dscape-all branch in my repo. Please
git pull rsync://pitr.amd64.dev.gentoo.org/kugelfang/wireless-2.6.git
I don't post the patch again, as it is really the same as the previously sent
patch
When applying it, I noticed that the dscape branch's bcm43xx is differently
named than the softmac branch's. Why ? :-)
Danny
--
Danny van Dyk <kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Gentoo/AMD64 Project, Gentoo Scientific Project
^ permalink raw reply
* Re: Re: [GIT PULL] bcm43xx: Update B6PHY initialization
From: Michael Buesch @ 2006-02-01 18:56 UTC (permalink / raw)
To: Danny van Dyk
Cc: John Linville, bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <200602011954.52325.kugelfang-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
On Wednesday 01 February 2006 19:54, you wrote:
> When applying it, I noticed that the dscape branch's bcm43xx is differently
> named than the softmac branch's. Why ? :-)
Both branches can co-exist in one tree (see branch "domesday")
--
Greetings Michael.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH 0/5] Infiniband: connection abstraction
From: Sean Hefty @ 2006-02-01 20:03 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: openib-general
Here's an updated version of these patches based on feedback. (The license
did not change and continues to match that of the other Infiniband code.)
Please consider for inclusion in 2.6.17.
The following set of patches defines a connection abstraction for Infiniband and
other RDMA devices, and serves several purposes:
* It implements a connection protocol over Infiniband based on IP addressing.
This greatly simplifies clients wishing to establish connections over
Infiniband.
* It defines a connection abstraction that works over multiple RDMA devices.
The submitted implementation targets Infiniband, but has been tested over other
RDMA devices as well.
* It handles RDMA device insertion and removal on behalf of its clients.
The changes have been broken into 5 separate patches. The basic purpose of each
patch is:
1. Provide common handling for marshalling data between userspace clients and
kernel mode Infiniband drivers.
2. Extend the Infiniband CM to include private data comparisons as part of its
connection request matching process.
3. Provide an address translation service that maps IP addresses to Infiniband
addresses (GIDs). This patch touches outside of the Infiniband core, so I'm
including the netdev mailing list.
4. Implement the kernel mode RDMA connection management agent.
5. Implement the userspace RDMA connection management agent kernel support
module.
Please copy the openib-general mailing list on any replies.
Thanks,
Sean
^ permalink raw reply
* [PATCH 1/5] Infiniband: connection abstraction
From: Sean Hefty @ 2006-02-01 20:07 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: openib-general
In-Reply-To: <ORSMSX401KZmcK8r6be00000097@orsmsx401.amr.corp.intel.com>
The following patch provides common handling for marshalling data between
Userspace clients and kernel mode Infiniband drivers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/drivers/infiniband/core/Makefile
linux-2.6.ib/drivers/infiniband/core/Makefile
--- linux-2.6.git/drivers/infiniband/core/Makefile 2006-01-16 10:25:27.000000000 -0800
+++ linux-2.6.ib/drivers/infiniband/core/Makefile 2006-01-16 15:34:15.000000000 -0800
@@ -16,4 +16,5 @@ ib_umad-y := user_mad.o
ib_ucm-y := ucm.o
-ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_mem.o
+ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_mem.o \
+ uverbs_marshall.o
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/drivers/infiniband/core/ucm.c
linux-2.6.ib/drivers/infiniband/core/ucm.c
--- linux-2.6.git/drivers/infiniband/core/ucm.c 2006-01-16 10:25:26.000000000 -0800
+++ linux-2.6.ib/drivers/infiniband/core/ucm.c 2006-01-16 15:34:15.000000000 -0800
@@ -30,7 +30,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: ucm.c 2594 2005-06-13 19:46:02Z libor $
+ * $Id: ucm.c 4311 2005-12-05 18:42:01Z sean.hefty $
*/
#include <linux/init.h>
#include <linux/fs.h>
@@ -48,6 +48,7 @@
#include <rdma/ib_cm.h>
#include <rdma/ib_user_cm.h>
+#include <rdma/ib_marshall.h>
MODULE_AUTHOR("Libor Michalek");
MODULE_DESCRIPTION("InfiniBand userspace Connection Manager access");
@@ -203,36 +204,6 @@ error:
return NULL;
}
-static void ib_ucm_event_path_get(struct ib_ucm_path_rec *upath,
- struct ib_sa_path_rec *kpath)
-{
- if (!kpath || !upath)
- return;
-
- memcpy(upath->dgid, kpath->dgid.raw, sizeof *upath->dgid);
- memcpy(upath->sgid, kpath->sgid.raw, sizeof *upath->sgid);
-
- upath->dlid = kpath->dlid;
- upath->slid = kpath->slid;
- upath->raw_traffic = kpath->raw_traffic;
- upath->flow_label = kpath->flow_label;
- upath->hop_limit = kpath->hop_limit;
- upath->traffic_class = kpath->traffic_class;
- upath->reversible = kpath->reversible;
- upath->numb_path = kpath->numb_path;
- upath->pkey = kpath->pkey;
- upath->sl = kpath->sl;
- upath->mtu_selector = kpath->mtu_selector;
- upath->mtu = kpath->mtu;
- upath->rate_selector = kpath->rate_selector;
- upath->rate = kpath->rate;
- upath->packet_life_time = kpath->packet_life_time;
- upath->preference = kpath->preference;
-
- upath->packet_life_time_selector =
- kpath->packet_life_time_selector;
-}
-
static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq,
struct ib_cm_req_event_param *kreq)
{
@@ -251,8 +222,10 @@ static void ib_ucm_event_req_get(struct
ureq->srq = kreq->srq;
ureq->port = kreq->port;
- ib_ucm_event_path_get(&ureq->primary_path, kreq->primary_path);
- ib_ucm_event_path_get(&ureq->alternate_path, kreq->alternate_path);
+ ib_copy_path_rec_to_user(&ureq->primary_path, kreq->primary_path);
+ if (kreq->alternate_path)
+ ib_copy_path_rec_to_user(&ureq->alternate_path,
+ kreq->alternate_path);
}
static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep,
@@ -322,8 +295,8 @@ static int ib_ucm_event_process(struct i
info = evt->param.rej_rcvd.ari;
break;
case IB_CM_LAP_RECEIVED:
- ib_ucm_event_path_get(&uvt->resp.u.lap_resp.path,
- evt->param.lap_rcvd.alternate_path);
+ ib_copy_path_rec_to_user(&uvt->resp.u.lap_resp.path,
+ evt->param.lap_rcvd.alternate_path);
uvt->data_len = IB_CM_LAP_PRIVATE_DATA_SIZE;
uvt->resp.present = IB_UCM_PRES_ALTERNATE;
break;
@@ -635,65 +608,11 @@ static ssize_t ib_ucm_attr_id(struct ib_
return result;
}
-static void ib_ucm_copy_ah_attr(struct ib_ucm_ah_attr *dest_attr,
- struct ib_ah_attr *src_attr)
-{
- memcpy(dest_attr->grh_dgid, src_attr->grh.dgid.raw,
- sizeof src_attr->grh.dgid);
- dest_attr->grh_flow_label = src_attr->grh.flow_label;
- dest_attr->grh_sgid_index = src_attr->grh.sgid_index;
- dest_attr->grh_hop_limit = src_attr->grh.hop_limit;
- dest_attr->grh_traffic_class = src_attr->grh.traffic_class;
-
- dest_attr->dlid = src_attr->dlid;
- dest_attr->sl = src_attr->sl;
- dest_attr->src_path_bits = src_attr->src_path_bits;
- dest_attr->static_rate = src_attr->static_rate;
- dest_attr->is_global = (src_attr->ah_flags & IB_AH_GRH);
- dest_attr->port_num = src_attr->port_num;
-}
-
-static void ib_ucm_copy_qp_attr(struct ib_ucm_init_qp_attr_resp *dest_attr,
- struct ib_qp_attr *src_attr)
-{
- dest_attr->cur_qp_state = src_attr->cur_qp_state;
- dest_attr->path_mtu = src_attr->path_mtu;
- dest_attr->path_mig_state = src_attr->path_mig_state;
- dest_attr->qkey = src_attr->qkey;
- dest_attr->rq_psn = src_attr->rq_psn;
- dest_attr->sq_psn = src_attr->sq_psn;
- dest_attr->dest_qp_num = src_attr->dest_qp_num;
- dest_attr->qp_access_flags = src_attr->qp_access_flags;
-
- dest_attr->max_send_wr = src_attr->cap.max_send_wr;
- dest_attr->max_recv_wr = src_attr->cap.max_recv_wr;
- dest_attr->max_send_sge = src_attr->cap.max_send_sge;
- dest_attr->max_recv_sge = src_attr->cap.max_recv_sge;
- dest_attr->max_inline_data = src_attr->cap.max_inline_data;
-
- ib_ucm_copy_ah_attr(&dest_attr->ah_attr, &src_attr->ah_attr);
- ib_ucm_copy_ah_attr(&dest_attr->alt_ah_attr, &src_attr->alt_ah_attr);
-
- dest_attr->pkey_index = src_attr->pkey_index;
- dest_attr->alt_pkey_index = src_attr->alt_pkey_index;
- dest_attr->en_sqd_async_notify = src_attr->en_sqd_async_notify;
- dest_attr->sq_draining = src_attr->sq_draining;
- dest_attr->max_rd_atomic = src_attr->max_rd_atomic;
- dest_attr->max_dest_rd_atomic = src_attr->max_dest_rd_atomic;
- dest_attr->min_rnr_timer = src_attr->min_rnr_timer;
- dest_attr->port_num = src_attr->port_num;
- dest_attr->timeout = src_attr->timeout;
- dest_attr->retry_cnt = src_attr->retry_cnt;
- dest_attr->rnr_retry = src_attr->rnr_retry;
- dest_attr->alt_port_num = src_attr->alt_port_num;
- dest_attr->alt_timeout = src_attr->alt_timeout;
-}
-
static ssize_t ib_ucm_init_qp_attr(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
{
- struct ib_ucm_init_qp_attr_resp resp;
+ struct ib_uverbs_qp_attr resp;
struct ib_ucm_init_qp_attr cmd;
struct ib_ucm_context *ctx;
struct ib_qp_attr qp_attr;
@@ -716,7 +635,7 @@ static ssize_t ib_ucm_init_qp_attr(struc
if (result)
goto out;
- ib_ucm_copy_qp_attr(&resp, &qp_attr);
+ ib_copy_qp_attr_to_user(&resp, &qp_attr);
if (copy_to_user((void __user *)(unsigned long)cmd.response,
&resp, sizeof(resp)))
@@ -791,7 +710,7 @@ static int ib_ucm_alloc_data(const void
static int ib_ucm_path_get(struct ib_sa_path_rec **path, u64 src)
{
- struct ib_ucm_path_rec ucm_path;
+ struct ib_user_path_rec upath;
struct ib_sa_path_rec *sa_path;
*path = NULL;
@@ -803,36 +722,14 @@ static int ib_ucm_path_get(struct ib_sa_
if (!sa_path)
return -ENOMEM;
- if (copy_from_user(&ucm_path, (void __user *)(unsigned long)src,
- sizeof(ucm_path))) {
+ if (copy_from_user(&upath, (void __user *)(unsigned long)src,
+ sizeof(upath))) {
kfree(sa_path);
return -EFAULT;
}
- memcpy(sa_path->dgid.raw, ucm_path.dgid, sizeof sa_path->dgid);
- memcpy(sa_path->sgid.raw, ucm_path.sgid, sizeof sa_path->sgid);
-
- sa_path->dlid = ucm_path.dlid;
- sa_path->slid = ucm_path.slid;
- sa_path->raw_traffic = ucm_path.raw_traffic;
- sa_path->flow_label = ucm_path.flow_label;
- sa_path->hop_limit = ucm_path.hop_limit;
- sa_path->traffic_class = ucm_path.traffic_class;
- sa_path->reversible = ucm_path.reversible;
- sa_path->numb_path = ucm_path.numb_path;
- sa_path->pkey = ucm_path.pkey;
- sa_path->sl = ucm_path.sl;
- sa_path->mtu_selector = ucm_path.mtu_selector;
- sa_path->mtu = ucm_path.mtu;
- sa_path->rate_selector = ucm_path.rate_selector;
- sa_path->rate = ucm_path.rate;
- sa_path->packet_life_time = ucm_path.packet_life_time;
- sa_path->preference = ucm_path.preference;
-
- sa_path->packet_life_time_selector =
- ucm_path.packet_life_time_selector;
-
+ ib_copy_path_rec_from_user(sa_path, &upath);
*path = sa_path;
return 0;
}
@@ -1243,8 +1140,10 @@ static unsigned int ib_ucm_poll(struct f
poll_wait(filp, &file->poll_wait, wait);
+ down(&file->mutex);
if (!list_empty(&file->events))
mask = POLLIN | POLLRDNORM;
+ up(&file->mutex);
return mask;
}
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/drivers/infiniband/core/uverbs_marshall.c
linux-2.6.ib/drivers/infiniband/core/uverbs_marshall.c
--- linux-2.6.git/drivers/infiniband/core/uverbs_marshall.c 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.ib/drivers/infiniband/core/uverbs_marshall.c 2006-01-16 15:34:15.000000000 -0800
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2005 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <rdma/ib_marshall.h>
+
+static void ib_copy_ah_attr_to_user(struct ib_uverbs_ah_attr *dst,
+ struct ib_ah_attr *src)
+{
+ memcpy(dst->grh.dgid, src->grh.dgid.raw, sizeof src->grh.dgid);
+ dst->grh.flow_label = src->grh.flow_label;
+ dst->grh.sgid_index = src->grh.sgid_index;
+ dst->grh.hop_limit = src->grh.hop_limit;
+ dst->grh.traffic_class = src->grh.traffic_class;
+ dst->dlid = src->dlid;
+ dst->sl = src->sl;
+ dst->src_path_bits = src->src_path_bits;
+ dst->static_rate = src->static_rate;
+ dst->is_global = src->ah_flags & IB_AH_GRH ? 1 : 0;
+ dst->port_num = src->port_num;
+}
+
+void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst,
+ struct ib_qp_attr *src)
+{
+ dst->cur_qp_state = src->cur_qp_state;
+ dst->path_mtu = src->path_mtu;
+ dst->path_mig_state = src->path_mig_state;
+ dst->qkey = src->qkey;
+ dst->rq_psn = src->rq_psn;
+ dst->sq_psn = src->sq_psn;
+ dst->dest_qp_num = src->dest_qp_num;
+ dst->qp_access_flags = src->qp_access_flags;
+
+ dst->max_send_wr = src->cap.max_send_wr;
+ dst->max_recv_wr = src->cap.max_recv_wr;
+ dst->max_send_sge = src->cap.max_send_sge;
+ dst->max_recv_sge = src->cap.max_recv_sge;
+ dst->max_inline_data = src->cap.max_inline_data;
+
+ ib_copy_ah_attr_to_user(&dst->ah_attr, &src->ah_attr);
+ ib_copy_ah_attr_to_user(&dst->alt_ah_attr, &src->alt_ah_attr);
+
+ dst->pkey_index = src->pkey_index;
+ dst->alt_pkey_index = src->alt_pkey_index;
+ dst->en_sqd_async_notify = src->en_sqd_async_notify;
+ dst->sq_draining = src->sq_draining;
+ dst->max_rd_atomic = src->max_rd_atomic;
+ dst->max_dest_rd_atomic = src->max_dest_rd_atomic;
+ dst->min_rnr_timer = src->min_rnr_timer;
+ dst->port_num = src->port_num;
+ dst->timeout = src->timeout;
+ dst->retry_cnt = src->retry_cnt;
+ dst->rnr_retry = src->rnr_retry;
+ dst->alt_port_num = src->alt_port_num;
+ dst->alt_timeout = src->alt_timeout;
+}
+EXPORT_SYMBOL(ib_copy_qp_attr_to_user);
+
+void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst,
+ struct ib_sa_path_rec *src)
+{
+ memcpy(dst->dgid, src->dgid.raw, sizeof src->dgid);
+ memcpy(dst->sgid, src->sgid.raw, sizeof src->sgid);
+
+ dst->dlid = src->dlid;
+ dst->slid = src->slid;
+ dst->raw_traffic = src->raw_traffic;
+ dst->flow_label = src->flow_label;
+ dst->hop_limit = src->hop_limit;
+ dst->traffic_class = src->traffic_class;
+ dst->reversible = src->reversible;
+ dst->numb_path = src->numb_path;
+ dst->pkey = src->pkey;
+ dst->sl = src->sl;
+ dst->mtu_selector = src->mtu_selector;
+ dst->mtu = src->mtu;
+ dst->rate_selector = src->rate_selector;
+ dst->rate = src->rate;
+ dst->packet_life_time = src->packet_life_time;
+ dst->preference = src->preference;
+ dst->packet_life_time_selector = src->packet_life_time_selector;
+}
+EXPORT_SYMBOL(ib_copy_path_rec_to_user);
+
+void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst,
+ struct ib_user_path_rec *src)
+{
+ memcpy(dst->dgid.raw, src->dgid, sizeof dst->dgid);
+ memcpy(dst->sgid.raw, src->sgid, sizeof dst->sgid);
+
+ dst->dlid = src->dlid;
+ dst->slid = src->slid;
+ dst->raw_traffic = src->raw_traffic;
+ dst->flow_label = src->flow_label;
+ dst->hop_limit = src->hop_limit;
+ dst->traffic_class = src->traffic_class;
+ dst->reversible = src->reversible;
+ dst->numb_path = src->numb_path;
+ dst->pkey = src->pkey;
+ dst->sl = src->sl;
+ dst->mtu_selector = src->mtu_selector;
+ dst->mtu = src->mtu;
+ dst->rate_selector = src->rate_selector;
+ dst->rate = src->rate;
+ dst->packet_life_time = src->packet_life_time;
+ dst->preference = src->preference;
+ dst->packet_life_time_selector = src->packet_life_time_selector;
+}
+EXPORT_SYMBOL(ib_copy_path_rec_from_user);
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/include/rdma/ib_marshall.h
linux-2.6.ib/include/rdma/ib_marshall.h
--- linux-2.6.git/include/rdma/ib_marshall.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.ib/include/rdma/ib_marshall.h 2006-01-16 15:34:15.000000000 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2005 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#if !defined(IB_USER_MARSHALL_H)
+#define IB_USER_MARSHALL_H
+
+#include <rdma/ib_verbs.h>
+#include <rdma/ib_sa.h>
+#include <rdma/ib_user_verbs.h>
+#include <rdma/ib_user_sa.h>
+
+void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst,
+ struct ib_qp_attr *src);
+
+void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst,
+ struct ib_sa_path_rec *src);
+
+void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst,
+ struct ib_user_path_rec *src);
+
+#endif /* IB_USER_MARSHALL_H */
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/include/rdma/ib_user_cm.h
linux-2.6.ib/include/rdma/ib_user_cm.h
--- linux-2.6.git/include/rdma/ib_user_cm.h 2006-01-16 10:26:47.000000000 -0800
+++ linux-2.6.ib/include/rdma/ib_user_cm.h 2006-01-16 15:34:15.000000000 -0800
@@ -30,13 +30,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: ib_user_cm.h 2576 2005-06-09 17:00:30Z libor $
+ * $Id: ib_user_cm.h 4019 2005-11-11 00:33:09Z sean.hefty $
*/
#ifndef IB_USER_CM_H
#define IB_USER_CM_H
-#include <linux/types.h>
+#include <rdma/ib_user_sa.h>
#define IB_USER_CM_ABI_VERSION 4
@@ -110,58 +110,6 @@ struct ib_ucm_init_qp_attr {
__u32 qp_state;
};
-struct ib_ucm_ah_attr {
- __u8 grh_dgid[16];
- __u32 grh_flow_label;
- __u16 dlid;
- __u16 reserved;
- __u8 grh_sgid_index;
- __u8 grh_hop_limit;
- __u8 grh_traffic_class;
- __u8 sl;
- __u8 src_path_bits;
- __u8 static_rate;
- __u8 is_global;
- __u8 port_num;
-};
-
-struct ib_ucm_init_qp_attr_resp {
- __u32 qp_attr_mask;
- __u32 qp_state;
- __u32 cur_qp_state;
- __u32 path_mtu;
- __u32 path_mig_state;
- __u32 qkey;
- __u32 rq_psn;
- __u32 sq_psn;
- __u32 dest_qp_num;
- __u32 qp_access_flags;
-
- struct ib_ucm_ah_attr ah_attr;
- struct ib_ucm_ah_attr alt_ah_attr;
-
- /* ib_qp_cap */
- __u32 max_send_wr;
- __u32 max_recv_wr;
- __u32 max_send_sge;
- __u32 max_recv_sge;
- __u32 max_inline_data;
-
- __u16 pkey_index;
- __u16 alt_pkey_index;
- __u8 en_sqd_async_notify;
- __u8 sq_draining;
- __u8 max_rd_atomic;
- __u8 max_dest_rd_atomic;
- __u8 min_rnr_timer;
- __u8 port_num;
- __u8 timeout;
- __u8 retry_cnt;
- __u8 rnr_retry;
- __u8 alt_port_num;
- __u8 alt_timeout;
-};
-
struct ib_ucm_listen {
__be64 service_id;
__be64 service_mask;
@@ -180,28 +128,6 @@ struct ib_ucm_private_data {
__u8 reserved[3];
};
-struct ib_ucm_path_rec {
- __u8 dgid[16];
- __u8 sgid[16];
- __be16 dlid;
- __be16 slid;
- __u32 raw_traffic;
- __be32 flow_label;
- __u32 reversible;
- __u32 mtu;
- __be16 pkey;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 numb_path;
- __u8 sl;
- __u8 mtu_selector;
- __u8 rate_selector;
- __u8 rate;
- __u8 packet_life_time_selector;
- __u8 packet_life_time;
- __u8 preference;
-};
-
struct ib_ucm_req {
__u32 id;
__u32 qpn;
@@ -304,8 +230,8 @@ struct ib_ucm_event_get {
};
struct ib_ucm_req_event_resp {
- struct ib_ucm_path_rec primary_path;
- struct ib_ucm_path_rec alternate_path;
+ struct ib_user_path_rec primary_path;
+ struct ib_user_path_rec alternate_path;
__be64 remote_ca_guid;
__u32 remote_qkey;
__u32 remote_qpn;
@@ -349,7 +275,7 @@ struct ib_ucm_mra_event_resp {
};
struct ib_ucm_lap_event_resp {
- struct ib_ucm_path_rec path;
+ struct ib_user_path_rec path;
};
struct ib_ucm_apr_event_resp {
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/include/rdma/ib_user_sa.h
linux-2.6.ib/include/rdma/ib_user_sa.h
--- linux-2.6.git/include/rdma/ib_user_sa.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.ib/include/rdma/ib_user_sa.h 2006-01-16 15:34:15.000000000 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef IB_USER_SA_H
+#define IB_USER_SA_H
+
+#include <linux/types.h>
+
+struct ib_user_path_rec {
+ __u8 dgid[16];
+ __u8 sgid[16];
+ __be16 dlid;
+ __be16 slid;
+ __u32 raw_traffic;
+ __be32 flow_label;
+ __u32 reversible;
+ __u32 mtu;
+ __be16 pkey;
+ __u8 hop_limit;
+ __u8 traffic_class;
+ __u8 numb_path;
+ __u8 sl;
+ __u8 mtu_selector;
+ __u8 rate_selector;
+ __u8 rate;
+ __u8 packet_life_time_selector;
+ __u8 packet_life_time;
+ __u8 preference;
+};
+
+#endif /* IB_USER_SA_H */
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/include/rdma/ib_user_verbs.h
linux-2.6.ib/include/rdma/ib_user_verbs.h
--- linux-2.6.git/include/rdma/ib_user_verbs.h 2006-01-16 10:26:47.000000000 -0800
+++ linux-2.6.ib/include/rdma/ib_user_verbs.h 2006-01-16 15:34:15.000000000 -0800
@@ -31,7 +31,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: ib_user_verbs.h 2708 2005-06-24 17:27:21Z roland $
+ * $Id: ib_user_verbs.h 4019 2005-11-11 00:33:09Z sean.hefty $
*/
#ifndef IB_USER_VERBS_H
@@ -311,6 +311,64 @@ struct ib_uverbs_destroy_cq_resp {
__u32 async_events_reported;
};
+struct ib_uverbs_global_route {
+ __u8 dgid[16];
+ __u32 flow_label;
+ __u8 sgid_index;
+ __u8 hop_limit;
+ __u8 traffic_class;
+ __u8 reserved;
+};
+
+struct ib_uverbs_ah_attr {
+ struct ib_uverbs_global_route grh;
+ __u16 dlid;
+ __u8 sl;
+ __u8 src_path_bits;
+ __u8 static_rate;
+ __u8 is_global;
+ __u8 port_num;
+ __u8 reserved;
+};
+
+struct ib_uverbs_qp_attr {
+ __u32 qp_attr_mask;
+ __u32 qp_state;
+ __u32 cur_qp_state;
+ __u32 path_mtu;
+ __u32 path_mig_state;
+ __u32 qkey;
+ __u32 rq_psn;
+ __u32 sq_psn;
+ __u32 dest_qp_num;
+ __u32 qp_access_flags;
+
+ struct ib_uverbs_ah_attr ah_attr;
+ struct ib_uverbs_ah_attr alt_ah_attr;
+
+ /* ib_qp_cap */
+ __u32 max_send_wr;
+ __u32 max_recv_wr;
+ __u32 max_send_sge;
+ __u32 max_recv_sge;
+ __u32 max_inline_data;
+
+ __u16 pkey_index;
+ __u16 alt_pkey_index;
+ __u8 en_sqd_async_notify;
+ __u8 sq_draining;
+ __u8 max_rd_atomic;
+ __u8 max_dest_rd_atomic;
+ __u8 min_rnr_timer;
+ __u8 port_num;
+ __u8 timeout;
+ __u8 retry_cnt;
+ __u8 rnr_retry;
+ __u8 alt_port_num;
+ __u8 alt_timeout;
+ __u8 reserved[5];
+};
+
struct ib_uverbs_create_qp {
__u64 response;
__u64 user_handle;
@@ -487,26 +545,6 @@ struct ib_uverbs_post_srq_recv_resp {
__u32 bad_wr;
};
-struct ib_uverbs_global_route {
- __u8 dgid[16];
- __u32 flow_label;
- __u8 sgid_index;
- __u8 hop_limit;
- __u8 traffic_class;
- __u8 reserved;
-};
-
-struct ib_uverbs_ah_attr {
- struct ib_uverbs_global_route grh;
- __u16 dlid;
- __u8 sl;
- __u8 src_path_bits;
- __u8 static_rate;
- __u8 is_global;
- __u8 port_num;
- __u8 reserved;
-};
-
struct ib_uverbs_create_ah {
__u64 response;
__u64 user_handle;
^ permalink raw reply
* [PATCH 2/5] Infiniband: connection abstraction
From: Sean Hefty @ 2006-02-01 20:10 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: openib-general
In-Reply-To: <ORSMSX401KZmcK8r6be00000097@orsmsx401.amr.corp.intel.com>
The following patch extends matching connection requests to listens in the
Infiniband CM to include private data.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/drivers/infiniband/core/cm.c
linux-2.6.ib/drivers/infiniband/core/cm.c
--- linux-2.6.git/drivers/infiniband/core/cm.c 2006-01-16 10:25:26.000000000 -0800
+++ linux-2.6.ib/drivers/infiniband/core/cm.c 2006-01-16 16:03:35.000000000 -0800
@@ -32,7 +32,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: cm.c 2821 2005-07-08 17:07:28Z sean.hefty $
+ * $Id: cm.c 4311 2005-12-05 18:42:01Z sean.hefty $
*/
#include <linux/dma-mapping.h>
#include <linux/err.h>
@@ -130,6 +130,7 @@ struct cm_id_private {
/* todo: use alternate port on send failure */
struct cm_av av;
struct cm_av alt_av;
+ struct ib_cm_compare_data *compare_data;
void *private_data;
__be64 tid;
@@ -355,6 +356,41 @@ static struct cm_id_private * cm_acquire
return cm_id_priv;
}
+static void cm_mask_copy(u8 *dst, u8 *src, u8 *mask)
+{
+ int i;
+
+ for (i = 0; i < IB_CM_COMPARE_SIZE / sizeof(unsigned long); i++)
+ ((unsigned long *) dst)[i] = ((unsigned long *) src)[i] &
+ ((unsigned long *) mask)[i];
+}
+
+static int cm_compare_data(struct ib_cm_compare_data *src_data,
+ struct ib_cm_compare_data *dst_data)
+{
+ u8 src[IB_CM_COMPARE_SIZE];
+ u8 dst[IB_CM_COMPARE_SIZE];
+
+ if (!src_data || !dst_data)
+ return 0;
+
+ cm_mask_copy(src, src_data->data, dst_data->mask);
+ cm_mask_copy(dst, dst_data->data, src_data->mask);
+ return memcmp(src, dst, IB_CM_COMPARE_SIZE);
+}
+
+static int cm_compare_private_data(u8 *private_data,
+ struct ib_cm_compare_data *dst_data)
+{
+ u8 src[IB_CM_COMPARE_SIZE];
+
+ if (!dst_data)
+ return 0;
+
+ cm_mask_copy(src, private_data, dst_data->mask);
+ return memcmp(src, dst_data->data, IB_CM_COMPARE_SIZE);
+}
+
static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv)
{
struct rb_node **link = &cm.listen_service_table.rb_node;
@@ -362,14 +397,18 @@ static struct cm_id_private * cm_insert_
struct cm_id_private *cur_cm_id_priv;
__be64 service_id = cm_id_priv->id.service_id;
__be64 service_mask = cm_id_priv->id.service_mask;
+ int data_cmp;
while (*link) {
parent = *link;
cur_cm_id_priv = rb_entry(parent, struct cm_id_private,
service_node);
+ data_cmp = cm_compare_data(cm_id_priv->compare_data,
+ cur_cm_id_priv->compare_data);
if ((cur_cm_id_priv->id.service_mask & service_id) ==
(service_mask & cur_cm_id_priv->id.service_id) &&
- (cm_id_priv->id.device == cur_cm_id_priv->id.device))
+ (cm_id_priv->id.device == cur_cm_id_priv->id.device) &&
+ !data_cmp)
return cur_cm_id_priv;
if (cm_id_priv->id.device < cur_cm_id_priv->id.device)
@@ -378,6 +417,10 @@ static struct cm_id_private * cm_insert_
link = &(*link)->rb_right;
else if (service_id < cur_cm_id_priv->id.service_id)
link = &(*link)->rb_left;
+ else if (service_id > cur_cm_id_priv->id.service_id)
+ link = &(*link)->rb_right;
+ else if (data_cmp < 0)
+ link = &(*link)->rb_left;
else
link = &(*link)->rb_right;
}
@@ -387,16 +430,20 @@ static struct cm_id_private * cm_insert_
}
static struct cm_id_private * cm_find_listen(struct ib_device *device,
- __be64 service_id)
+ __be64 service_id,
+ u8 *private_data)
{
struct rb_node *node = cm.listen_service_table.rb_node;
struct cm_id_private *cm_id_priv;
+ int data_cmp;
while (node) {
cm_id_priv = rb_entry(node, struct cm_id_private, service_node);
+ data_cmp = cm_compare_private_data(private_data,
+ cm_id_priv->compare_data);
if ((cm_id_priv->id.service_mask & service_id) ==
cm_id_priv->id.service_id &&
- (cm_id_priv->id.device == device))
+ (cm_id_priv->id.device == device) && !data_cmp)
return cm_id_priv;
if (device < cm_id_priv->id.device)
@@ -405,6 +452,10 @@ static struct cm_id_private * cm_find_li
node = node->rb_right;
else if (service_id < cm_id_priv->id.service_id)
node = node->rb_left;
+ else if (service_id > cm_id_priv->id.service_id)
+ node = node->rb_right;
+ else if (data_cmp < 0)
+ node = node->rb_left;
else
node = node->rb_right;
}
@@ -728,15 +779,14 @@ retest:
wait_event(cm_id_priv->wait, !atomic_read(&cm_id_priv->refcount));
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
cm_free_work(work);
- if (cm_id_priv->private_data && cm_id_priv->private_data_len)
- kfree(cm_id_priv->private_data);
+ kfree(cm_id_priv->compare_data);
+ kfree(cm_id_priv->private_data);
kfree(cm_id_priv);
}
EXPORT_SYMBOL(ib_destroy_cm_id);
-int ib_cm_listen(struct ib_cm_id *cm_id,
- __be64 service_id,
- __be64 service_mask)
+int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
+ struct ib_cm_compare_data *compare_data)
{
struct cm_id_private *cm_id_priv, *cur_cm_id_priv;
unsigned long flags;
@@ -750,7 +800,19 @@ int ib_cm_listen(struct ib_cm_id *cm_id,
return -EINVAL;
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
- BUG_ON(cm_id->state != IB_CM_IDLE);
+ if (cm_id->state != IB_CM_IDLE)
+ return -EINVAL;
+
+ if (compare_data) {
+ cm_id_priv->compare_data = kzalloc(sizeof *compare_data,
+ GFP_KERNEL);
+ if (!cm_id_priv->compare_data)
+ return -ENOMEM;
+ cm_mask_copy(cm_id_priv->compare_data->data,
+ compare_data->data, compare_data->mask);
+ memcpy(cm_id_priv->compare_data->mask, compare_data->mask,
+ IB_CM_COMPARE_SIZE);
+ }
cm_id->state = IB_CM_LISTEN;
@@ -767,6 +829,8 @@ int ib_cm_listen(struct ib_cm_id *cm_id,
if (cur_cm_id_priv) {
cm_id->state = IB_CM_IDLE;
+ kfree(cm_id_priv->compare_data);
+ cm_id_priv->compare_data = NULL;
ret = -EBUSY;
}
return ret;
@@ -1239,7 +1303,8 @@ static struct cm_id_private * cm_match_r
/* Find matching listen request. */
listen_cm_id_priv = cm_find_listen(cm_id_priv->id.device,
- req_msg->service_id);
+ req_msg->service_id,
+ req_msg->private_data);
if (!listen_cm_id_priv) {
spin_unlock_irqrestore(&cm.lock, flags);
cm_issue_rej(work->port, work->mad_recv_wc,
@@ -2646,7 +2711,8 @@ static int cm_sidr_req_handler(struct cm
goto out; /* Duplicate message. */
}
cur_cm_id_priv = cm_find_listen(cm_id->device,
- sidr_req_msg->service_id);
+ sidr_req_msg->service_id,
+ sidr_req_msg->private_data);
if (!cur_cm_id_priv) {
rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
spin_unlock_irqrestore(&cm.lock, flags);
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/drivers/infiniband/core/ucm.c
linux-2.6.ib/drivers/infiniband/core/ucm.c
--- linux-2.6.git/drivers/infiniband/core/ucm.c 2006-01-16 16:03:08.000000000 -0800
+++ linux-2.6.ib/drivers/infiniband/core/ucm.c 2006-01-16 16:03:35.000000000 -0800
@@ -646,6 +646,17 @@ out:
return result;
}
+static int ucm_validate_listen(__be64 service_id, __be64 service_mask)
+{
+ service_id &= service_mask;
+
+ if (((service_id & IB_CMA_SERVICE_ID_MASK) == IB_CMA_SERVICE_ID) ||
+ ((service_id & IB_SDP_SERVICE_ID_MASK) == IB_SDP_SERVICE_ID))
+ return -EINVAL;
+
+ return 0;
+}
+
static ssize_t ib_ucm_listen(struct ib_ucm_file *file,
const char __user *inbuf,
int in_len, int out_len)
@@ -661,7 +672,13 @@ static ssize_t ib_ucm_listen(struct ib_u
if (IS_ERR(ctx))
return PTR_ERR(ctx);
- result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask);
+ result = ucm_validate_listen(cmd.service_id, cmd.service_mask);
+ if (result)
+ goto out;
+
+ result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask,
+ NULL);
+out:
ib_ucm_ctx_put(ctx);
return result;
}
diff -uprN -X linux-2.6.git/Documentation/dontdiff
linux-2.6.git/include/rdma/ib_cm.h
linux-2.6.ib/include/rdma/ib_cm.h
--- linux-2.6.git/include/rdma/ib_cm.h 2006-01-16 10:26:47.000000000 -0800
+++ linux-2.6.ib/include/rdma/ib_cm.h 2006-01-16 16:03:35.000000000 -0800
@@ -32,7 +32,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: ib_cm.h 2730 2005-06-28 16:43:03Z sean.hefty $
+ * $Id: ib_cm.h 4311 2005-12-05 18:42:01Z sean.hefty $
*/
#if !defined(IB_CM_H)
#define IB_CM_H
@@ -102,7 +102,8 @@ enum ib_cm_data_size {
IB_CM_APR_INFO_LENGTH = 72,
IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216,
IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136,
- IB_CM_SIDR_REP_INFO_LENGTH = 72
+ IB_CM_SIDR_REP_INFO_LENGTH = 72,
+ IB_CM_COMPARE_SIZE = 64
};
struct ib_cm_id;
@@ -238,7 +239,6 @@ struct ib_cm_sidr_rep_event_param {
u32 qpn;
void *info;
u8 info_len;
-
};
struct ib_cm_event {
@@ -317,6 +317,15 @@ void ib_destroy_cm_id(struct ib_cm_id *c
#define IB_SERVICE_ID_AGN_MASK __constant_cpu_to_be64(0xFF00000000000000ULL)
#define IB_CM_ASSIGN_SERVICE_ID __constant_cpu_to_be64(0x0200000000000000ULL)
+#define IB_CMA_SERVICE_ID __constant_cpu_to_be64(0x0000000001000000ULL)
+#define IB_CMA_SERVICE_ID_MASK __constant_cpu_to_be64(0xFFFFFFFFFF000000ULL)
+#define IB_SDP_SERVICE_ID __constant_cpu_to_be64(0x0000000000010000ULL)
+#define IB_SDP_SERVICE_ID_MASK __constant_cpu_to_be64(0xFFFFFFFFFFFF0000ULL)
+
+struct ib_cm_compare_data {
+ u8 data[IB_CM_COMPARE_SIZE];
+ u8 mask[IB_CM_COMPARE_SIZE];
+};
/**
* ib_cm_listen - Initiates listening on the specified service ID for
@@ -330,10 +339,12 @@ void ib_destroy_cm_id(struct ib_cm_id *c
* range of service IDs. If set to 0, the service ID is matched
* exactly. This parameter is ignored if %service_id is set to
* IB_CM_ASSIGN_SERVICE_ID.
+ * @compare_data: This parameter is optional. It specifies data that must
+ * appear in the private data of a connection request for the specified
+ * listen request.
*/
-int ib_cm_listen(struct ib_cm_id *cm_id,
- __be64 service_id,
- __be64 service_mask);
+int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
+ struct ib_cm_compare_data *compare_data);
struct ib_cm_req_param {
struct ib_sa_path_rec *primary_path;
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox