Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: controller: Make ULL/LLL split the default #15781

Merged
merged 3 commits into from Jul 22, 2019

Conversation

cvinayak
Copy link
Contributor

@cvinayak cvinayak commented May 1, 2019

Make the Upper and Lower Link Layer split architecture
implementation of the controller as the default when
building Zephyr Bluetooth Low Energy controller support
in applications.

Noticeable missing feature (porting) in comparison to old
architecture implementation is, Advanced scheduling of
connection events.

The missing features will subsequently be submitted
upstream.

Signed-off-by: Vinayak Kariappa Chettimada vich@nordicsemi.no

Fixes #12681
Depends on #16691

@cvinayak cvinayak added area: Bluetooth Enhancement Changes/Updates/Additions to existing features Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 1, 2019
@zephyrbot
Copy link
Collaborator

zephyrbot commented May 1, 2019

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@cvinayak cvinayak force-pushed the github_ull_lll_default branch 2 times, most recently from 72c2acb to b60e1e5 Compare May 1, 2019 13:26
@cvinayak cvinayak added TSC Topics that need TSC discussion and removed Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 2, 2019
@@ -175,7 +175,10 @@ int ll_init(struct k_sem *sem_rx)
return -ENOMEM;
}

#if defined(CONFIG_BT_CTLR_FILTER)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible to use IS_ENABLED() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this change commit from #15780 just to get CI tests to work (as I added new conf files to testcases.yaml). I will remove the commit when #15780 gets merged first.

I kept the #15780 with the commit seperate in order to have backport label on that commit.

@aescolar aescolar added Blocked Blocked by another PR or issue and removed TSC Topics that need TSC discussion labels May 2, 2019
Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/bluetooth/bsim_bt/bsim_test_app/prj.conf
was meant to test the legacy controller,
and
https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/bluetooth/bsim_bt/bsim_test_app/prj_split.conf
the split one.
When changing the default, if we want to continue testing the legacy one,
we would need to be set the 1st one to compile with BT_LL_SW.
(And whenever we are not interested in testing the legacy one anymore, we could just remove it)

Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will block this until we have confirmation that controller-based privacy is not a blocker for anyone, because this is a substantial feature that we are taking away from users.

@cvinayak
Copy link
Contributor Author

cvinayak commented May 3, 2019

@aescolar addressed the bsim test conf file in #15849

@aescolar @carlescufi moved commits out into new PR #15849, that are independent from switching the default controller implementation.

@aescolar aescolar dismissed their stale review May 3, 2019 10:36

addressed

@tedd-an
Copy link
Collaborator

tedd-an commented May 4, 2019

I have run PTS with #15849 + #15781 and here is the summary:

Summary:
The test result was same as the previous result which ran without this PRs and didn't find any other failure.
pts_report.xlsx

Some details about the result: The first run was based on the tip of the day + PRs and some GATT TCs failed and it seemed not related to this PR. After rebasing the baseline to the tip used on Wednesday test(and this PR), those failed tests were passed again. I will look into it separately.

@sixoctets
Copy link

@tedd-an Thank you for running the tests. Please upload the .config file of the zephyr build here (just to confirm it built the new link layer with CONFIG_BT_LL_SW_SPLIT=y).

@tedd-an
Copy link
Collaborator

tedd-an commented May 6, 2019

attached .config.
_config.txt

#
# BLE Controller support
#
CONFIG_BT_LL_SW_SPLIT=y
# CONFIG_BT_LL_SW is not set
CONFIG_BT_LLL_VENDOR_NORDIC=y

@vkchettimada
Copy link
Contributor

Thank you

Copy link
Contributor

@joerchan joerchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also a couple of bugfixes for the legacy controller, that should be ported to the new controller.

subsys/bluetooth/controller/Kconfig Outdated Show resolved Hide resolved
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Jun 11, 2019
@aescolar aescolar dismissed carlescufi’s stale review June 17, 2019 09:03

Privacy for platforms with HW support added in the split controller in #16037

@cvinayak cvinayak added this to the v2.0.0 milestone Jul 12, 2019
@aescolar aescolar removed the Blocked Blocked by another PR or issue label Jul 16, 2019
@aescolar aescolar requested a review from joerchan July 16, 2019 09:24
@@ -110,7 +110,7 @@ BLE-enabled builds that can be produced from the Zephyr project codebase:
* :option:`CONFIG_BT_HCI` ``=y``
* :option:`CONFIG_BT_HCI_RAW` ``=y``
* :option:`CONFIG_BT_CTLR` ``=y``
* :option:`CONFIG_BT_LL_SW` ``=y`` (if using the open source Link Layer)
* :option:`CONFIG_BT_LL_SW_LEGACY` ``=y`` (if using the open source Link Layer)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this to use BT_LL_SW_SPLIT

@@ -131,7 +131,7 @@ BLE-enabled builds that can be produced from the Zephyr project codebase:
* :option:`CONFIG_BT` ``=y``
* :option:`CONFIG_BT_HCI` ``=y``
* :option:`CONFIG_BT_CTLR` ``=y``
* :option:`CONFIG_BT_LL_SW` ``=y`` (if using the open source Link Layer)
* :option:`CONFIG_BT_LL_SW_LEGACY` ``=y`` (if using the open source Link Layer)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this to use BT_LL_SW_SPLIT

@@ -13,7 +13,7 @@ config COUNTER_NRF_RTC
config COUNTER_TIMER0
bool "Enable Counter on TIMER0"
depends on HAS_HW_NRF_TIMER0
depends on !BT_LL_SW
depends on !BT_LL_SW_LEGACY
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add BT_LL_SW_SPLIT

@@ -44,7 +44,7 @@ config COUNTER_TIMER4
config COUNTER_RTC0
bool "Enable Counter on RTC0"
depends on HAS_HW_NRF_RTC0
depends on !BT_LL_SW
depends on !BT_LL_SW_LEGACY
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add BT_LL_SW_SPLIT

Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc changes LGTM, other than your own comment touse BT_LL_SW_SPLIT

@@ -16,26 +16,27 @@ if BT_CTLR

choice BT_LL_CHOICE
prompt "Bluetooth Link Layer Selection"
default BT_LL_SW
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BT_LL_SW_SPLIT being the first item in the choice block, it is the de facto default

Rename the controller Kconfig option BT_LL_SW to
BT_LL_SW_LEGACY in preparation towards switch to new Link
Layer implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use legacy LL until RAM utilization is optimized in the new
LL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Make the Upper and Lower Link Layer split architecture
implementation of the controller as the default when
building Zephyr Bluetooth Low Energy controller support
in applications.

Noticeable missing feature (porting) in comparison to old
architecture implementation is, Advanced scheduling of
connection events.

The missing features will subsequently be submitted
upstream.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
help
Select the Bluetooth Link Layer to compile.

config BT_LL_SW_LEGACY
config BT_LL_SW_SPLIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to rename this to BT_LL_SW, that's what we agreed with @joerchan right? no more "split" in the name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the same BT_LL_SW will make users’ config file be valid after switching to new LL but without them noticing the change. Users should know the change in design. I will keep the _SPLIT until legacy is deleted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really not the case if they are just using CONFIG_BT on a Nordic board, right? BT_LL_SW_SPLIT will be automatically enabled without them noticing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those who dont use explicit BT_LL_SW dont care if the macro is called BT_LL_SW_SPLIT or anything. We get them to use the new LL. Those who did use (for any reason) BT_LL_SW will now know that it is deprecated and take an informed decision to use BT_LL_SW_SPLIT.

@carlescufi carlescufi merged commit 6cf26b8 into zephyrproject-rtos:master Jul 22, 2019
@cvinayak cvinayak deleted the github_ull_lll_default branch March 1, 2021 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth area: Counter area: Documentation area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLE Split Link Layer
10 participants