All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: Kumar SANGHVI <kumar.sanghvi@stericsson.com>
Cc: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
	"Sudeep DIVAKARAN" <sudeep.divakaran@stericsson.com>,
	"Gulshan KARMANI" <gulshan.karmani@stericsson.com>,
	"Linus WALLEIJ" <linus.walleij@stericsson.com>
Subject: Re: [PATCH v2 1/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems
Date: Fri, 1 Oct 2010 11:42:44 +0300	[thread overview]
Message-ID: <201010011142.45767.remi@remlab.net> (raw)
In-Reply-To: <20100930071952.GA21859@bnru01.bnr.st.com>

   Hello,

On Thursday 30 September 2010, Kumar SANGHVI wrote:
> Hi Rémi Denis-Courmont,
> 
> On Wed, Sep 29, 2010 at 20:21:17 +0200, Rémi Denis-Courmont wrote:
> > It seems to me that you really want to implement the connect() socket
> > call, so that one of the two endpoints will stand up for the missing
> > controller.
> 
> Yes, implementing connect() socket call would be nice.
> 
> > That's
> > still much cleaner than CREATE and DESTROY ioctl()'s.
> 
> I have not introduced any new ioctl()'s as part of Pipe controller
> implementation.

Sure. What you did is basically worse than ioctl()'s. You've implemented them 
as socket options. Socket options are meant to configure parameters with 
setsockopt and read paramters with getsockopt. They are not meant for 'doing' 
things - that's what ioctl()'s are for.

> The PIPE_CREATE/PIPE_DESTROY/PIPE_ENABLE/PIPE_DISABLE are all provided
> as socket options.
> So, user-space can call setsockopt for creating/enabling or
> disabling/destroying pipe.

That makes absolutely no sense if you consider how setsockopt and getsockopt 
are supposed to work.

> Regarding implementing connect() socket call, few queries:
> 1. It should carry out all the same steps which I am currently doing as
> part of PIPE_CREATE socket option, right?
> 2. Currently, as part of Pipe controller implementation, user-space
>    follows below sequence:-
> 	socket()
> 	bind()
> 	listen()
> 	setsockopt(PIPE_CREATE)
> 	accept()'
> 
>    In the phonet stack pipe controller logic, we wait for PEP_CONNECT_RESP
>    from host-pep (GPRS socket or video telephony socket is a host-pep.
>    pep_reply sends out the PEP_CONNECT_RESP) and remote-pep (modem),
>    negotiate the best flow-control to be used, and then send
>    PIPE_CREATED_IND, with selected flow-control to both pipe end-points.

connect() should replace listen(), PIPE_CREATE and accept().

-- 
Rémi Denis-Courmont
http://www.remlab.net/

  reply	other threads:[~2010-10-01  8:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27  5:07 [PATCH v2 1/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems Kumar A Sanghvi
2010-09-28  4:50 ` David Miller
2010-09-28  5:31   ` Kumar SANGHVI
2010-09-28 22:25 ` Rémi Denis-Courmont
2010-09-29  6:32   ` Kumar SANGHVI
2010-09-29 18:21     ` Rémi Denis-Courmont
2010-09-30  7:19       ` Kumar SANGHVI
2010-10-01  8:42         ` Rémi Denis-Courmont [this message]
2010-10-01  8:55           ` Kumar SANGHVI
2010-10-01  9:20             ` Rémi Denis-Courmont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201010011142.45767.remi@remlab.net \
    --to=remi@remlab.net \
    --cc=STEricsson_nomadik_linux@list.st.com \
    --cc=gulshan.karmani@stericsson.com \
    --cc=kumar.sanghvi@stericsson.com \
    --cc=linus.walleij@stericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=remi.denis-courmont@nokia.com \
    --cc=sudeep.divakaran@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.