All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Mat Martineau <mathewm@codeaurora.org>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi,
	pkrystad@codeaurora.org
Subject: Re: [PATCH 2/4] Bluetooth: Add a structure to carry ERTM data in skb control blocks
Date: Sat, 24 Mar 2012 11:34:53 -0700	[thread overview]
Message-ID: <1332614093.1870.70.camel@aeonflux> (raw)
In-Reply-To: <1332547018-19468-3-git-send-email-mathewm@codeaurora.org>

Hi Mat,

> Every field from ERTM control headers is now carried in the control
> block so it only has to be parsed or generated once, and can be
> efficiently accessed throughout the ERTM code.
> 
> Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
> ---
>  include/net/bluetooth/bluetooth.h |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 262ebd1..f2c8bdf 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -215,6 +215,18 @@ void bt_accept_unlink(struct sock *sk);
>  struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
>  
>  /* Skb helpers */
> +struct l2cap_ctrl {
> +	unsigned int	sframe	: 1,
> +			poll	: 1,
> +			final	: 1,
> +			fcs	: 1,
> +			sar	: 2,
> +			super	: 2;
> +	__u16		reqseq;
> +	__u16		txseq;
> +	__u8		retries;
> +};
> +
>  struct bt_skb_cb {
>  	__u8 pkt_type;
>  	__u8 incoming;
> @@ -223,6 +235,7 @@ struct bt_skb_cb {
>  	__u8 retries;
>  	__u8 sar;
>  	__u8 force_active;
> +	struct l2cap_ctrl control;
>  };
>  #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
>  

would it make sense in the future to split this into bt_skb_cb and
bt_skb_l2cap_cb? However that can be done later.

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



  reply	other threads:[~2012-03-24 18:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 23:56 [PATCH 0/4] ERTM state machine changes, part 1 Mat Martineau
2012-03-23 23:56 ` [PATCH 1/4] Bluetooth: Add definitions and struct members for new ERTM state machine Mat Martineau
2012-03-24 18:30   ` Marcel Holtmann
2012-03-23 23:56 ` [PATCH 2/4] Bluetooth: Add a structure to carry ERTM data in skb control blocks Mat Martineau
2012-03-24 18:34   ` Marcel Holtmann [this message]
2012-03-23 23:56 ` [PATCH 3/4] Bluetooth: Add the l2cap_seq_list structure for tracking frames Mat Martineau
2012-03-24 18:43   ` Marcel Holtmann
2012-03-27 17:54     ` Mat Martineau
2012-03-23 23:56 ` [PATCH 4/4] Bluetooth: Functions parsing or generating ERTM control fields Mat Martineau
2012-03-24 18:48   ` Marcel Holtmann
2012-03-25 16:34   ` Gustavo Padovan
2012-03-27 17:57     ` Mat Martineau
2012-03-26 15:20   ` Andrei Emeltchenko
2012-03-27 17:59     ` Mat Martineau

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=1332614093.1870.70.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mathewm@codeaurora.org \
    --cc=padovan@profusion.mobi \
    --cc=pkrystad@codeaurora.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.