Skip to content

Rework parsing of HCI events

Luiz Augusto von Dentz linux-bluetooth 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 1 replyIn review
  2. v115 patches 10 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15skbuff: introduce skb_pull_datainclude/linux/skbuff.h net/core/skbuff.c+25 -00 replies
2/15Bluetooth: HCI: Use skb_pull_data to parse BR/EDR eventsinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+217 -470 replies
3/15Bluetooth: HCI: Use skb_pull_data to parse Command Complete eventnet/bluetooth/hci_event.c+663 -2410 replies
4/15Bluetooth: HCI: Use skb_pull_data to parse Number of Complete Packets eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+12 -100 replies
5/15Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+19 -50 replies
6/15Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result with RSSI eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+33 -190 replies
7/15Bluetooth: HCI: Use skb_pull_data to parse Extended Inquiry Result eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+20 -50 replies
8/15Bluetooth: HCI: Use skb_pull_data to parse LE Metaeventsnet/bluetooth/hci_event.c+64 -110 replies
9/15Bluetooth: HCI: Use skb_pull_data to parse LE Advertising Report eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+30 -160 replies
10/15Bluetooth: HCI: Use skb_pull_data to parse LE Ext Advertising Report eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+36 -170 replies
11/15Bluetooth: HCI: Use skb_pull_data to parse LE Direct Advertising Report eventinclude/net/bluetooth/hci.h net/bluetooth/hci_event.c+25 -80 replies
12/15Bluetooth: hci_event: Use of a function table to handle HCI eventsnet/bluetooth/hci_event.c net/bluetooth/msft.c net/bluetooth/msft.h+392 -5160 replies
13/15Bluetooth: hci_event: Use of a function table to handle LE subeventsnet/bluetooth/hci_event.c+122 -1250 replies
14/15Bluetooth: hci_event: Use of a function table to handle Command Completenet/bluetooth/hci_event.c+752 -10960 replies
15/15Bluetooth: hci_event: Use of a function table to handle Command Statusnet/bluetooth/hci_event.c+59 -930 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/15A-b
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/15] Rework parsing of HCI events

From: Luiz Augusto von Dentz <[email protected]>

This reworks the parsing of HCI events using skb_pull_data to check event length, in addition to that it does introduce function tables to handle events, LE subevents, Command Complete and Command Status which simplify the callback by adding a common code that uses skb_pull_data when parsing such events.

v2: Fix declaration of hci_event_func.

Luiz Augusto von Dentz (15):
skbuff: introduce skb_pull_data
Bluetooth: HCI: Use skb_pull_data to parse BR/EDR events
Bluetooth: HCI: Use skb_pull_data to parse Command Complete event
Bluetooth: HCI: Use skb_pull_data to parse Number of Complete Packets
event
Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result event
Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result with RSSI
event
Bluetooth: HCI: Use skb_pull_data to parse Extended Inquiry Result
event
Bluetooth: HCI: Use skb_pull_data to parse LE Metaevents
Bluetooth: HCI: Use skb_pull_data to parse LE Advertising Report event
Bluetooth: HCI: Use skb_pull_data to parse LE Ext Advertising Report
event
Bluetooth: HCI: Use skb_pull_data to parse LE Direct Advertising
Report event
Bluetooth: hci_event: Use of a function table to handle HCI events
Bluetooth: hci_event: Use of a function table to handle LE subevents
Bluetooth: hci_event: Use of a function table to handle Command
Complete
Bluetooth: hci_event: Use of a function table to handle Command Status

 include/linux/skbuff.h      |    2 +
 include/net/bluetooth/hci.h |   59 +-
 net/bluetooth/hci_event.c   | 3031 +++++++++++++++++++----------------
 net/bluetooth/msft.c        |    2 +-
 net/bluetooth/msft.h        |    2 +-
 net/core/skbuff.c           |   23 +
 6 files changed, 1689 insertions(+), 1430 deletions(-)
Signature · 1 line
2.33.1