* [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation
@ 2010-09-28 5:35 Kumar A Sanghvi
2010-09-28 6:30 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Kumar A Sanghvi @ 2010-09-28 5:35 UTC (permalink / raw)
To: remi.denis-courmont, davem, netdev
Cc: STEricsson_nomadik_linux, sudeep.divakaran, gulshan.karmani,
Kumar Sanghvi, Linus Walleij
From: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Updates the Phonet document with description related to Pipe controller
implementation
Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
---
Documentation/networking/phonet.txt | 53 +++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index cf76608..cccf5ff 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -182,6 +182,59 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
or zero if encapsulation is off.
+Phonet Pipe-controller Implementation
+-------------------------------------
+
+Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig
+option. It is useful when communicating with those Nokia Modems which do not
+implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
+U8500 platform.
+
+The implementation is based on the Data Connection Establishment Sequence
+depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
+document.
+
+It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
+between itself and a remote pipe-end point (e.g. modem).
+
+The implementation adds socket options at SOL_PNPIPE level:
+
+ PNPIPE_CREATE
+ It accepts an integer argument where-in
+ lower order 16 bits: pn_dev and pn_port pair for remote pep.
+ higher order 16 bits: 8 bit pipe-handle
+
+ It sends a PNS_PEP_CONNECT_REQ on sequenced socket itself. On getting
+ PNS_PEP_CONNECT_RESP, it sends PNS_PEP_CONNECT_REQ to remote pep. On
+ getting response from remote pep, it selects the best possible Flow
+ control mechanism supported by remote-pep (modem) and then it sends
+ PNS_PEP_CREATED_IND to the sequenced socket and to the remote pep.
+
+ It then updates the pipe state associated with the sequenced socket to
+ be PIPE_DISABLED.
+
+ PNPIPE_ENABLE
+ It follows the same sequence as above for enabling a pipe by sending
+ PNS_PEP_ENABLE_REQ initially and then sending PNS_PEP_ENABLED_IND after
+ getting responses from sequenced socket and remote-pep.
+ It will also update the pipe state associated with the sequenced socket
+ to PIPE_ENABLED.
+
+ PNPIPE_DESTROY
+ This will send out PNS_PEP_DISCONNECT_REQ on the sequenced socket and
+ the remote pep.
+ It will also update the pipe state associated with the sequenced socket
+ to PIPE_IDLE
+
+ PNPIPE_INQ
+ This getsocktopt allows the user-space running on the sequenced socket
+ to examine the pipe state associated with that socket ie. whether the
+ pipe is created (PIPE_DISABLED) or enabled (PIPE_ENABLED) or disabled
+ (PIPE_DISABLED) or no pipe exists (PIPE_IDLE).
+
+After a pipe has been created and enabled successfully, the Pipe data can be
+exchanged between the host-pep and remote-pep (modem).
+
Authors
-------
--
1.7.2.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 0/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems
@ 2010-09-24 12:23 Kumar A Sanghvi
2010-09-24 12:23 ` [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation Kumar A Sanghvi
0 siblings, 1 reply; 3+ messages in thread
From: Kumar A Sanghvi @ 2010-09-24 12:23 UTC (permalink / raw)
To: remi.denis-courmont, davem, netdev
Cc: STEricsson_nomadik_linux, sudeep.divakaran, gulshan.karmani,
Kumar Sanghvi
From: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
This patch implements the Pipe Controller functionality in Phonet stack to
support Nokia Modems like WG2.5 which do not have Pipe Controller in them.
Abbreviation:
APE: Application Processing Engine running Linux Kernel.
Modem is a separate entity attached to the APE.
With the current Phonet stack, to send Pipe data (example TCP/IP data over
GPRS), it is assumed that there is some type of Pipe Controller present either
in Modem or on APE user-space.
Many Nokia Modems implement the Pipe controller inside them.
HOwever, the Nokia Slim Modem WG2.5, the one in ST-Ericsson U8500 platform,
does not implement the Pipe Controller.
So, it is expected that APE running Linux implement the Pipe controller.
Now, PN_DEV_HOST (0x00) is normally the address of modem, so Phonet stack sends
out Pipe data by default on 0x00.
However, the Nokia Slim Modem WG2.5 expects that any data directed to it from
App processing engine should have dst_dev = 0x60 in Phonet header.
On APE side, Pipe controller can be implemented either in user-space or at
Phonet stack level.
1. Pipe controller at User-space level
---------------------------------------
There are 3 cases now:
Case 1: net_device carrying phonet traffic on APE has device address
= 0x6c and user-space specifies destination as 0x00.
---------------------------------------------------------------------
Nokia Slim modem WG2.5 simply gets reset for MCE related messages which
has dest_dev as something other than 0x60 in Phonet header.
Further, the modem does not process Pipe messages which has dest_dev as
something other than 0x60 in Phonet header, and simply echoes the
message back.
Case 2: net_device carrying phonet traffic on APE has device address
= 0x6c and user-space specifies destination as 0x60.
---------------------------------------------------------------------
Things work fine here.
The GPRS device gets created also and IP address is also obtained from
modem.
However, problem comes when its time for sending PIPE_DATA.
Phonet stack will by default send PIPE_DATA to destination with dst_dev
= 0x00 and dst_obj = 0x00 in pipe_skb_send. So, modem, as indicated in
case above, will not process the Pipe data message which has dest_dev
as something other than 0x60 in Phonet header, and simply echoes the
message back. So, the GPRS device user never gets a correct response.
Case 3: net_device carrying phonet traffic on APE has device address
= 0x00 and user-space specified destination as 0x60.
---------------------------------------------------------------------
Things work fine here also.
The GPRS device gets created also and IP address is also obtained from
modem.
However, again problem comes when its time for sending PIPE_DATA.
Since, Phonet stack will send PIPE_DATA to dest_dev = 0x00 and dest_obj
= 0x00, and since APE net-device also has address = 0x00, this message
will get looped-back.
So, some user-space app OR user-space Pipe handler has to take this
data, fill in correct dst_dev (0x60) and send it to modem.
As a result, the traffic essentially traverses two times via the Phonet
stack:
1st. via pipe_skb_send which will send data to 0x00 - which will
get looped back.
2nd. via user-space pipe handler which again sends this data to
modem via phonet stack.
Again, in the receive path, the return traffic will first go to pipe
handler in user-space and then it will go to gprs0 device.
2. Pipe Controller at Phonet stack
----------------------------------
Implementing Pipe controller at Phonet stack resolves the problem of GPRS data
traversing two times the Phonet stack in Case 3 above.
Further, the pipe-creation and related Pipe handling will be transparent to
user-space.
This patch implements the Pipe controller logic in Phonet stack.
The implementation is derived from 'Nokia Wireless Modem API -
WirelessModem_API_user_guide.pdf' document depicting the sequence for
establishing data connection.
The patch adds a Kconfig option to Phonet stack allowing users to
enable/disable Pipe controller functionality in Phonet stack.
Users can enable this option for Nokia Slim modems which do not have Pipe
controller in them.
The patch adds 4 setsockopt options at the Phonet stack level to enable
creation, enabling, disabling and destroying a pipe.
The patch also adds getsockopt options to query the state of pipe at any stage
ie. whether it is created or enabled.
The patch also implements negotiating the flow control and selects the best
flow control which is supported by modem and APE.
This patch has been tested on ST-Ericsson U8500 running Linux kernel and
works fine for GPRS data.
Kumar Sanghvi (2):
Phonet: Implement Pipe Controller to support Nokia Slim Modems
Documentation: Update Phonet doc for Pipe Controller implementation
Documentation/networking/phonet.txt | 53 ++++
include/linux/phonet.h | 5 +
include/net/phonet/pep.h | 21 ++
net/phonet/Kconfig | 11 +
net/phonet/pep.c | 447 ++++++++++++++++++++++++++++++++++-
5 files changed, 531 insertions(+), 6 deletions(-)
--
1.7.2.dirty
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation
2010-09-24 12:23 [PATCH 0/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems Kumar A Sanghvi
@ 2010-09-24 12:23 ` Kumar A Sanghvi
0 siblings, 0 replies; 3+ messages in thread
From: Kumar A Sanghvi @ 2010-09-24 12:23 UTC (permalink / raw)
To: remi.denis-courmont, davem, netdev
Cc: STEricsson_nomadik_linux, sudeep.divakaran, gulshan.karmani,
Kumar Sanghvi, Linus Walleij
From: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Updates the Phonet document with description related to Pipe controller
implementation
Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
---
Documentation/networking/phonet.txt | 53 +++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index cf76608..cccf5ff 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -182,6 +182,59 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
or zero if encapsulation is off.
+Phonet Pipe-controller Implementation
+-------------------------------------
+
+Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig
+option. It is useful when communicating with those Nokia Modems which do not
+implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
+U8500 platform.
+
+The implementation is based on the Data Connection Establishment Sequence
+depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
+document.
+
+It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
+between itself and a remote pipe-end point (e.g. modem).
+
+The implementation adds socket options at SOL_PNPIPE level:
+
+ PNPIPE_CREATE
+ It accepts an integer argument where-in
+ lower order 16 bits: pn_dev and pn_port pair for remote pep.
+ higher order 16 bits: 8 bit pipe-handle
+
+ It sends a PNS_PEP_CONNECT_REQ on sequenced socket itself. On getting
+ PNS_PEP_CONNECT_RESP, it sends PNS_PEP_CONNECT_REQ to remote pep. On
+ getting response from remote pep, it selects the best possible Flow
+ control mechanism supported by remote-pep (modem) and then it sends
+ PNS_PEP_CREATED_IND to the sequenced socket and to the remote pep.
+
+ It then updates the pipe state associated with the sequenced socket to
+ be PIPE_DISABLED.
+
+ PNPIPE_ENABLE
+ It follows the same sequence as above for enabling a pipe by sending
+ PNS_PEP_ENABLE_REQ initially and then sending PNS_PEP_ENABLED_IND after
+ getting responses from sequenced socket and remote-pep.
+ It will also update the pipe state associated with the sequenced socket
+ to PIPE_ENABLED.
+
+ PNPIPE_DESTROY
+ This will send out PNS_PEP_DISCONNECT_REQ on the sequenced socket and
+ the remote pep.
+ It will also update the pipe state associated with the sequenced socket
+ to PIPE_IDLE
+
+ PNPIPE_INQ
+ This getsocktopt allows the user-space running on the sequenced socket
+ to examine the pipe state associated with that socket ie. whether the
+ pipe is created (PIPE_DISABLED) or enabled (PIPE_ENABLED) or disabled
+ (PIPE_DISABLED) or no pipe exists (PIPE_IDLE).
+
+After a pipe has been created and enabled successfully, the Pipe data can be
+exchanged between the host-pep and remote-pep (modem).
+
Authors
-------
--
1.7.2.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-28 6:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 5:35 [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation Kumar A Sanghvi
2010-09-28 6:30 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-09-24 12:23 [PATCH 0/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems Kumar A Sanghvi
2010-09-24 12:23 ` [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation Kumar A Sanghvi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).