diff options
author | Avik Sil <aviksil@linux.vnet.ibm.com> | 2013-10-04 11:32:22 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-10-04 12:01:21 +0530 |
commit | b30e4a4f8aaaa6b9dd12bbab3ec908e0d3cc3851 (patch) | |
tree | 5ce889ad311195b5810b00cc9dcc07cc29e325aa /board-qemu/slof | |
parent | ab29e16279f52602870c56b00149524a2114bb1f (diff) | |
download | SLOF-b30e4a4f8aaaa6b9dd12bbab3ec908e0d3cc3851.zip SLOF-b30e4a4f8aaaa6b9dd12bbab3ec908e0d3cc3851.tar.gz SLOF-b30e4a4f8aaaa6b9dd12bbab3ec908e0d3cc3851.tar.bz2 |
Allow more than one client to open net devices simultaneously
When multiple clients are active simultaneously, they might open network
devices that is already opened by other clients. This results in failure
to transfer packets since obp-tftp package is not instantiated on each open.
This patch resolves it by instantiating obp-tftp on each open.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'board-qemu/slof')
-rw-r--r-- | board-qemu/slof/e1k.fs | 6 | ||||
-rw-r--r-- | board-qemu/slof/vio-veth.fs | 4 | ||||
-rw-r--r-- | board-qemu/slof/virtio-net.fs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/board-qemu/slof/e1k.fs b/board-qemu/slof/e1k.fs index 7b8e8e6..1f2b192 100644 --- a/board-qemu/slof/e1k.fs +++ b/board-qemu/slof/e1k.fs @@ -22,7 +22,6 @@ INSTANCE VARIABLE obp-tftp-package : open ( -- okay? ) open-count 0= IF open IF - my-args s" obp-tftp" $open-package obp-tftp-package ! e1k-open dup not IF ." e1k-open failed" EXIT THEN drop TO e1k-priv true @@ -32,19 +31,20 @@ INSTANCE VARIABLE obp-tftp-package ELSE true THEN + my-args s" obp-tftp" $open-package obp-tftp-package ! open-count 1 + to open-count ; : close ( -- ) - open-count 0> IF + open-count 0> IF open-count 1 - dup to open-count 0= IF - s" close" obp-tftp-package @ $call-method e1k-priv e1k-close close THEN THEN + s" close" obp-tftp-package @ $call-method ; : read ( buf len -- actual ) diff --git a/board-qemu/slof/vio-veth.fs b/board-qemu/slof/vio-veth.fs index f6d1684..6a03e6c 100644 --- a/board-qemu/slof/vio-veth.fs +++ b/board-qemu/slof/vio-veth.fs @@ -21,7 +21,6 @@ INSTANCE VARIABLE obp-tftp-package : open ( -- okay? ) open-count 0= IF my-unit 1 rtas-set-tce-bypass - my-args s" obp-tftp" $open-package obp-tftp-package ! s" local-mac-address" get-node get-property not s" reg" get-node get-property not 3 pick and IF >r nip r> @@ -29,6 +28,7 @@ INSTANCE VARIABLE obp-tftp-package drop TO veth-priv THEN THEN + my-args s" obp-tftp" $open-package obp-tftp-package ! open-count 1 + to open-count true ; @@ -37,11 +37,11 @@ INSTANCE VARIABLE obp-tftp-package open-count 0> IF open-count 1 - dup to open-count 0= IF - s" close" obp-tftp-package @ $call-method veth-priv libveth-close my-unit 0 rtas-set-tce-bypass THEN THEN + s" close" obp-tftp-package @ $call-method ; : read ( buf len -- actual ) diff --git a/board-qemu/slof/virtio-net.fs b/board-qemu/slof/virtio-net.fs index 80ed15c..cdaae58 100644 --- a/board-qemu/slof/virtio-net.fs +++ b/board-qemu/slof/virtio-net.fs @@ -25,7 +25,6 @@ virtiodev virtio-setup-vd open-count 0= IF open IF \ my-unit 1 rtas-set-tce-bypass - my-args s" obp-tftp" $open-package obp-tftp-package ! s" local-mac-address" get-node get-property not IF virtiodev virtio-net-open dup not IF ." virtio-net-open failed" EXIT THEN drop TO virtio-net-priv @@ -37,6 +36,7 @@ virtiodev virtio-setup-vd ELSE true THEN + my-args s" obp-tftp" $open-package obp-tftp-package ! open-count 1 + to open-count ; @@ -45,12 +45,12 @@ virtiodev virtio-setup-vd open-count 0> IF open-count 1 - dup to open-count 0= IF - s" close" obp-tftp-package @ $call-method virtio-net-priv virtio-net-close \ my-unit 0 rtas-set-tce-bypass close THEN THEN + s" close" obp-tftp-package @ $call-method ; : read ( buf len -- actual ) |