From: Tyszkowski Jakub <jakub.tyszkowski@tieto.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCHv2 01/16] android/tester: Expose gatt-tester's pdu definition to other testers
Date: Wed, 01 Oct 2014 10:20:12 +0200 [thread overview]
Message-ID: <542BB93C.7080208@tieto.com> (raw)
In-Reply-To: <CABBYNZKQRr8JCcq_Qgp8rrALiN1sHNNDv9ukvBsaMYsGOyM3Vw@mail.gmail.com>
Hi Luiz,
On 09/30/2014 02:10 PM, Luiz Augusto von Dentz wrote:
> Hi Jakub,
>
> On Tue, Sep 30, 2014 at 2:41 PM, Tyszkowski Jakub
> <jakub.tyszkowski@tieto.com> wrote:
>>>> +struct pdu {
>>>> + uint8_t *data;
>>>> + uint16_t size;
>>>
>>>
>>> The size should probably be size_t, or even better use struct iovec
>>> directly here since it is about the same.
>>
>>
>> I wouldn't go that far and use iovec's here.
>>
>> I actually had one patch on top of this set which replaces this struct with
>> iovec but in the end the only benefit was one struct definition less as
>> bthost API does not take iovecs:
>
> Im working on it already, internally bthost already uses iovec so it
> makes sense to expose it if we can benefit from it.
>
>> void bthost_send_cid(struct bthost *bthost, uint16_t handle,
>> uint16_t cid, const void *data, uint16_t len)
>>
>> And this function is also a reason for 'size' being uint16_t.
>>
>> BTW I think 'pdu.data' looks better than 'pdu.iov_base' and we shouldn't
>> make it look more complicated than it is without the real benefit.
>
> Well this is not exactly the point, it might look better but struct
> iovec is a standard interface so it only make sense to introduce
> another design if the standard does not attend our needs which does
> not seems to be the case here.
I'll resend this set with one more patch on top, which replaces pdu
struct with iovec and bthost_send_cid() with bthost_send_cid_v().
Regards,
Jakub
next prev parent reply other threads:[~2014-10-01 8:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 6:31 [PATCHv2 00/16] android/tester: Unifying the way PDU is handled Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 01/16] android/tester: Expose gatt-tester's pdu definition to other testers Jakub Tyszkowski
2014-09-30 10:08 ` Luiz Augusto von Dentz
2014-09-30 11:41 ` Tyszkowski Jakub
2014-09-30 12:10 ` Luiz Augusto von Dentz
2014-10-01 8:20 ` Tyszkowski Jakub [this message]
2014-09-26 6:31 ` [PATCHv2 02/16] android/tester: Make AVRCP tests use generic pdu struct Jakub Tyszkowski
2014-09-30 9:37 ` Szymon Janc
2014-09-26 6:31 ` [PATCHv2 03/16] android/tester: Make A2DP " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 04/16] android/tester: Make GATT " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 05/16] android/tester: Make HidHost " Jakub Tyszkowski
2014-09-30 9:40 ` Szymon Janc
2014-09-30 9:54 ` Luiz Augusto von Dentz
2014-09-30 10:00 ` Szymon Janc
2014-09-30 10:10 ` Luiz Augusto von Dentz
2014-09-30 12:01 ` Tyszkowski Jakub
2014-09-26 6:31 ` [PATCHv2 06/16] android/tester: Make PAN " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 07/16] android/tester: Make HDP " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 08/16] android/tester: Expose pdu_set structure so it can be reused Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 09/16] android/tester: Add generic hook to handle pdu exchange Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 10/16] android/tester: Make A2DP use pdu exchange mechanism Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 11/16] android/tester: Make AVRCP tests use generic " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 12/16] android/tester: Make GATT use generic cid_data Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 13/16] android/tester: Make HDP tests use generic PDU exchange mechanism Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 14/16] android/tester: Make HIDHost " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 15/16] android/tester: Make PAN " Jakub Tyszkowski
2014-09-26 6:31 ` [PATCHv2 16/16] android-tester: Use generic connect callback for simple cases Jakub Tyszkowski
2014-09-30 9:44 ` [PATCHv2 00/16] android/tester: Unifying the way PDU is handled Szymon Janc
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=542BB93C.7080208@tieto.com \
--to=jakub.tyszkowski@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.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.