From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Holtmann Subject: RE: [PATCH net-next-2.6 v6 08/12] net-caif: add CAIF socket implementation Date: Tue, 16 Mar 2010 23:03:01 -0700 Message-ID: <1268805781.2700.46.camel@localhost.localdomain> References: <1267445559-1911-1-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-2-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-3-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-4-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-5-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-6-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-7-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-8-git-send-email-sjur.brandeland@stericsson.com> <1267445559-1911-9-git-send-email-sjur.brandeland@stericsson.com> <1268690031.2700.9.camel@localhost.localdomain> <61D8D34BB13CFE408D154529C120E079033D51A2@eseldmw101.eemea.ericsson.se> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, Daniel Martensson , kaber@trash.net, stefano.babic@babic.homelinux.org, randy.dunlap@oracle.com To: Sjur =?ISO-8859-1?Q?Br=E6ndeland?= Return-path: Received: from senator.holtmann.net ([87.106.208.187]:40421 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831Ab0CQGDH (ORCPT ); Wed, 17 Mar 2010 02:03:07 -0400 In-Reply-To: <61D8D34BB13CFE408D154529C120E079033D51A2@eseldmw101.eemea.ericsson.se> Sender: netdev-owner@vger.kernel.org List-ID: Hi Sjur, > >> + * The sock->type specifies the socket type to use. The CAIF > >> socket is + * a packet stream in the sence that it is packet based. > >> + * CAIF trusts the reliability of the link, no resending is > >> implemented. + */ + if (sock->type != SOCK_SEQPACKET) > >> + return -ESOCKTNOSUPPORT; > > > > we came to an interesting detail here when testing with a STE modem. > > Why is this SEQPACKET and not a STREAM. > > The reason is that CAIF provides different services not just AT, > and some of them are really packet oriented such as Utility links and > Video. It would not be right to provide a stream based solution in this case. > > > Especially with the AT > > command channels it is kinda weird that you have an MTU. The AT > > specification doesn't really have any defined behavior when using a > > sequential packet transport. It is more a stream based socket. > > Yes I see your point. In order to limit the effort and simplify > caif_socket we ended up implementing only SEQPACKET. I think we need to split this. Use SEQPACKET for packet based services and have STREAM for AT command channel. So while this might cause internally some more code. It would take away the complexity from userspace to turn it into a stream. And that is what the userspace is expecting. Regards Marcel