From: Marcel Holtmann <marcel@holtmann.org>
To: sjur.brandeland@stericsson.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
daniel.martensson@stericsson.com, kaber@trash.net,
stefano.babic@babic.homelinux.org, randy.dunlap@oracle.com
Subject: Re: [PATCH net-next-2.6 v4 02/12] net-caif: add CAIF socket and configuration headers
Date: Sat, 27 Feb 2010 00:15:15 +0100 [thread overview]
Message-ID: <1267226115.18491.71.camel@violet> (raw)
In-Reply-To: <1267222417-2764-3-git-send-email-sjur.brandeland@stericsson.com>
Hi Sjur,
I think most issues have been resolved and this should be ready for
merging, but I am bit worried about the userspace API. Can we start a
bit smaller and extend it later? Especially the socket options worry me
a bit.
Dave, personally I would prefer if we can merge this without these
socket options. Since I am really missing the need for it.
> +/**
> + * enum caif_socket_opts - CAIF option values for getsockopt and setsockopt.
> + *
> + * @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are
> + * available. Either a high bandwidth
> + * link can be selected (CAIF_LINK_HIGH_BANDW) or
> + * or a low latency link (CAIF_LINK_LOW_LATENCY).
> + * This option is of type u_int32_t.
> + * Alternatively SO_BINDTODEVICE can be used.
> + *
> + * @CAIFSO_REQ_PARAM: Used to set the request parameters for a
> + * utility channel. (struct caif_param). This
> + * option must be set before connecting.
> + *
> + * @CAIFSO_RSP_PARAM: Gets the request parameters for a utility
> + * channel. (struct caif_param). This option
> + * is valid after a successful connect.
These two more look like a combination of setsockopt/getsockopt instead
of two socket options. Maybe it is leftover from a ioctl interface, but
socket options work differently.
Also the caif_param struct seems pointless. Socket options contain a
length parameter anyway. So why bother with a struct that is just a data
field and a length field.
> + * @CAIFSO_CHANNEL_ID: Gets the channel id on a CAIF Channel.
> + * This option is valid after a successful connect.
> + * ( u_int32_t)
Where is this used and what is it used for? Is this something that
shouldn't be better part of the sockaddr structure. Then you can use
getpeername for it?
> + * @CAIFSO_NEXT_PAKCET_LEN: Gets the size of next received packet.
> + * Value is 0 if no packet is available.
> + * This option is valid after a successful connect.
> + * ( u_int32_t)
Typo. And why do we need this?
> + * @CAIFSO_MAX_PAKCET_LEN: Gets the maximum packet size for this
> + * connection. ( u_int32_t)
Isn't this more like SO_RCVBUF or SO_SNDBUF.
Regards
Marcel
next prev parent reply other threads:[~2010-02-26 23:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 22:13 [PATCH net-next-2.6 v4 00/12] net-caif: introducing CAIF protocol stack sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 01/12] net-caif: add CAIF protocol definitions sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 02/12] net-caif: add CAIF socket and configuration headers sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 03/12] net-caif: add CAIF core protocol stack header files sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 04/12] net-caif: add CAIF Link layer device " sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 05/12] net-caif: add CAIF core protocol stack sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 06/12] net-caif: add CAIF generic caif support functions sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 07/12] net-caif: add CAIF device registration functionality sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 08/12] net-caif: add CAIF socket implementation sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 09/12] net-caif: add CAIF netdevice sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 10/12] net-caif: add CAIF Kconfig and Makefiles sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 11/12] net-caif: add CAIF documentation sjur.brandeland
2010-02-26 22:13 ` [PATCH net-next-2.6 v4 12/12] net-caif-driver: add CAIF serial driver (ldisc) sjur.brandeland
2010-02-26 23:17 ` [PATCH net-next-2.6 v4 03/12] net-caif: add CAIF core protocol stack header files Marcel Holtmann
2010-02-26 23:15 ` Marcel Holtmann [this message]
2010-02-27 10:36 ` SV: [PATCH net-next-2.6 v4 02/12] net-caif: add CAIF socket and configuration headers Sjur Brændeland
2010-02-27 22:58 ` Marcel Holtmann
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=1267226115.18491.71.camel@violet \
--to=marcel@holtmann.org \
--cc=daniel.martensson@stericsson.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sjur.brandeland@stericsson.com \
--cc=stefano.babic@babic.homelinux.org \
/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.