linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Suraj <suraj@Atheros.com>
Cc: Suraj Sumangala <Suraj.Sumangala@Atheros.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	Jothikumar Mothilal <Jothikumar.Mothilal@Atheros.com>
Subject: Re: [PATCH v2] frame reassembly implementation for data stream
Date: Wed, 02 Jun 2010 23:38:07 -0700	[thread overview]
Message-ID: <1275547087.2182.28.camel@localhost.localdomain> (raw)
In-Reply-To: <4C071A73.70407@Atheros.com>

Hi Suraj,

> > I don't like this implementation at all. The biggest problem is that you
> > are misusing __reassembly(hdev, HCI_ACLDATA_PKT) for getting your SKB. I
> > don't wanna intermix this. I am also missing checks for the packet
> > length matching or when packets are too big or the header size is not
> > matching up.
> >
> > So in theory both functions do exactly the same. Only minor exception is
> > that one knows the packet type up-front, the other has to read it from
> > the stream as a 1-byte header. I don't wanna maintain two functions that
> > do exactly the same.
> >
> > Creating an internal helper function that can maintain the current state
> > of the reassembly sounds a lot better. Then re-use that function and
> > ensure that the reassembly logic is inside the helper.
>
> I appreciate if you can take a closer look at the patch and compare it 
> with  hci_recv_fragment implementation.
> Eventhough it looks similar, there are major differences on the way data 
> is reassembled. It would not have worked if I had reused the same code 
> from  hci_recv_fragment().
> 
> Having a common reassembly helper could work. But I am not sure whether 
> that would be a better solution.

I did have a closer look at it already. I clearly see possibilities to
combine them into a more generic helper and not to maintain two
different functions that do exactly the same.

Regards

Marcel



  reply	other threads:[~2010-06-03  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02  8:24 [PATCH v2] frame reassembly implementation for data stream suraj
2010-06-02 15:02 ` Marcel Holtmann
2010-06-02 16:10   ` Suraj
2010-06-02 16:11   ` Gustavo F. Padovan
2010-06-02 16:20     ` Suraj
2010-06-02 16:44       ` Gustavo F. Padovan
2010-06-03  2:58   ` Suraj
2010-06-03  6:38     ` Marcel Holtmann [this message]
2010-06-03  7:07       ` Suraj
2010-06-07  4:17         ` Suraj

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=1275547087.2182.28.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=Jothikumar.Mothilal@Atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=Suraj.Sumangala@Atheros.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=suraj@Atheros.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 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).