Skip to content
New issue

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

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

Already on GitHub? # to your account

Add AsyncFacilitator to enable an async, event-driven, non-polling me… #29364

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

nivi-apple
Copy link
Contributor

@nivi-apple nivi-apple commented Sep 21, 2023

…chanism for facilitating BDX transfers

  • Currently BDX transfers can only use the TransferFacilitator which polls the BDXTransferSession with a poll interval that adds unneccessary delays and is not the ideal approach to handle BDX transfers

  • Add support for an AsyncTrasferFacilitator that uses a non-polling, event-driven mechanism based on BDX messages received over the exchange context and gets the next output event from the transfer session to drive the BDX transfer

  • Add support for an AsyncResponder that uses the AsyncTrasferFacilitator and enables a provider delegate to handle BDX transfers

  • Modify the darwin OTA provider code to use the AsyncResponder

  • Add support for handling multiple OTA requests to the ota provider by creating an MTROTAImageTransferHandler object that handles a BDX transfer session independently from a singleton unsolicited BDX message handler that is created by the MTROTAProviderDelegateBridge.

  • Support only one BDX transfer session and return busy to any query images coming from other nodes for now to match the test expectations (to be removed once tests for multiple OTA are in place)

Copy link

github-actions bot commented Sep 24, 2024

PR #29364: Size comparison from b6a1304 to db59df6

Full report (22 builds for cc13x4_26x4, cc32xx, nrfconnect, nxp, qpg, stm32, tizen)
platform target config section b6a1304 db59df6 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829356 829356 0 0.0
RAM 123300 123300 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814392 814392 0 0.0
RAM 125172 125172 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 760396 760396 0 0.0
RAM 113664 113664 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 744632 744632 0 0.0
RAM 113856 113856 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 616162 616162 0 0.0
RAM 205396 205396 0 0.0
lock CC3235SF_LAUNCHXL FLASH 656218 656218 0 0.0
RAM 205548 205548 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913412 913412 0 0.0
RAM 142199 142199 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885020 885020 0 0.0
RAM 140338 140338 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846920 846920 0 0.0
RAM 141093 141093 0 0.0
nxp contact k32w0+release FLASH 581728 581728 0 0.0
RAM 70776 70776 0 0.0
k32w1+release FLASH 595640 595640 0 0.0
RAM 62992 62992 0 0.0
mcxw71+release FLASH 595392 595392 0 0.0
RAM 62992 62992 0 0.0
light k32w0+release FLASH 617780 617780 0 0.0
RAM 70248 70248 0 0.0
k32w1+release FLASH 681592 681592 0 0.0
RAM 48632 48632 0 0.0
mcxw71+release FLASH 681608 681608 0 0.0
RAM 48632 48632 0 0.0
lock k32w1+release FLASH 703912 703912 0 0.0
RAM 67132 67132 0 0.0
mcxw71+release FLASH 703936 703936 0 0.0
RAM 67132 67132 0 0.0
qpg lighting-app qpg6105+debug FLASH 659488 659488 0 0.0
RAM 105236 105236 0 0.0
lock-app qpg6105+debug FLASH 617444 617444 0 0.0
RAM 99704 99704 0 0.0
stm32 light STM32WB5MM-DK FLASH 481040 481040 0 0.0
RAM 144692 144692 0 0.0
tizen all-clusters-app arm unknown 4876 4876 0 0.0
FLASH 1722360 1722360 0 0.0
RAM 89076 89076 0 0.0
chip-tool-ubsan arm unknown 10316 10316 0 0.0
FLASH 17351778 17351778 0 0.0
RAM 7559896 7559896 0 0.0

return CHIP_NO_ERROR;
}
}
return CHIP_ERROR_INCORRECT_STATE;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Returning CHIP_ERROR_INCORRECT_STATE. I looked at the spec and there is Unexpected Message status code that should be sent for any BDX messages but we have not yet established a session yet. the unexpected message does map to CHIP_ERROR_INCORRECT_STATE so thats what I used here.

@pullapprove pullapprove bot requested a review from jtov-sfy September 24, 2024 17:10
Copy link

github-actions bot commented Sep 24, 2024

PR #29364: Size comparison from b6a1304 to d344a19

Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section b6a1304 d344a19 change % change
bl602 lighting-app bl602 FLASH 1280488 1280488 0 0.0
RAM 95848 95848 0 0.0
bl602+mfd FLASH 1294354 1294354 0 0.0
RAM 95992 95992 0 0.0
bl602+rpc FLASH 1320438 1320438 0 0.0
RAM 104272 104272 0 0.0
bl702 lighting-app bl702 FLASH 944328 944328 0 0.0
RAM 15145 15145 0 0.0
bl702+mfd FLASH 946728 946728 0 0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039892 1039892 0 0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646790 646790 0 0.0
RAM 25233 25233 0 0.0
bl706-wifi FLASH 894604 894604 0 0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960988 960988 0 0.0
RAM 16804 16804 0 0.0
bl702l+mfd FLASH 963610 963610 0 0.0
RAM 16964 16964 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829356 829356 0 0.0
RAM 123300 123300 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814392 814392 0 0.0
RAM 125172 125172 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 760396 760396 0 0.0
RAM 113664 113664 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 744632 744632 0 0.0
RAM 113856 113856 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 616162 616162 0 0.0
RAM 205396 205396 0 0.0
lock CC3235SF_LAUNCHXL FLASH 656218 656218 0 0.0
RAM 205548 205548 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677725 677725 0 0.0
RAM 78516 78516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697569 697569 0 0.0
RAM 81148 81148 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697569 697569 0 0.0
RAM 81148 81148 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654513 654513 0 0.0
RAM 73584 73584 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613789 613789 0 0.0
RAM 71468 71468 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633425 633425 0 0.0
RAM 74020 74020 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633425 633425 0 0.0
RAM 74020 74020 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633085 633085 0 0.0
RAM 74516 74516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652793 652793 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652793 652793 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608429 608429 0 0.0
RAM 68604 68604 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628289 628289 0 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628289 628289 0 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 933292 933292 0 0.0
RAM 135884 135884 0 0.0
lock-app BRD2605a FLASH 740840 740832 -8 -0.0
RAM 231220 231220 0 0.0
BRD4338a FLASH 741488 741480 -8 -0.0
RAM 231252 231252 0 0.0
window-app BRD4187C FLASH 1016376 1016368 -8 -0.0
RAM 127804 127804 0 0.0
esp32 all-clusters-app c3devkit DRAM 94080 94080 0 0.0
FLASH 1537598 1537598 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115032 115032 0 0.0
FLASH 1548050 1548050 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2764623 2764623 0 0.0
RAM 129424 129424 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6068112 6068112 0 0.0
RAM 507392 507392 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5401442 5401442 0 0.0
RAM 241136 241136 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4735064 4735064 0 0.0
RAM 218304 218304 0 0.0
chip-tool debug unknown 5960 5960 0 0.0
FLASH 12546958 12546958 0 0.0
RAM 555122 555122 0 0.0
chip-tool-ipv6only arm64 unknown 20456 20456 0 0.0
FLASH 11204704 11204704 0 0.0
RAM 605368 605368 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 10908791 10908791 0 0.0
RAM 554266 554266 0 0.0
fabric-bridge-app debug unknown 4640 4640 0 0.0
FLASH 4561676 4561676 0 0.0
RAM 204888 204888 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5676033 5676033 0 0.0
RAM 228552 228552 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4785166 4785166 0 0.0
RAM 204376 204376 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4417388 4417388 0 0.0
RAM 198112 198112 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4556168 4556168 0 0.0
RAM 202680 202680 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3095405 3095405 0 0.0
RAM 159184 159184 0 0.0
thermostat-no-ble arm64 unknown 9432 9432 0 0.0
FLASH 4306728 4306728 0 0.0
RAM 242808 242808 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6013397 6013397 0 0.0
RAM 580928 580928 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10740221 10740221 0 0.0
RAM 643008 643008 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913412 913412 0 0.0
RAM 142199 142199 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885020 885020 0 0.0
RAM 140338 140338 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846920 846920 0 0.0
RAM 141093 141093 0 0.0
nxp contact k32w0+release FLASH 581728 581728 0 0.0
RAM 70776 70776 0 0.0
k32w1+release FLASH 595640 595640 0 0.0
RAM 62992 62992 0 0.0
mcxw71+release FLASH 595392 595392 0 0.0
RAM 62992 62992 0 0.0
light k32w0+release FLASH 617780 617780 0 0.0
RAM 70248 70248 0 0.0
k32w1+release FLASH 681592 681592 0 0.0
RAM 48632 48632 0 0.0
mcxw71+release FLASH 681608 681608 0 0.0
RAM 48632 48632 0 0.0
lock k32w1+release FLASH 703912 703912 0 0.0
RAM 67132 67132 0 0.0
mcxw71+release FLASH 703936 703936 0 0.0
RAM 67132 67132 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1645348 1645348 0 0.0
RAM 210888 210888 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1551332 1551332 0 0.0
RAM 207688 207688 0 0.0
light cy8ckit_062s2_43012 FLASH 1467148 1467148 0 0.0
RAM 200696 200696 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463892 1463892 0 0.0
RAM 225048 225048 0 0.0
qpg lighting-app qpg6105+debug FLASH 659488 659488 0 0.0
RAM 105236 105236 0 0.0
lock-app qpg6105+debug FLASH 617444 617444 0 0.0
RAM 99704 99704 0 0.0
stm32 light STM32WB5MM-DK FLASH 481040 481040 0 0.0
RAM 144692 144692 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620046 620046 0 0.0
RAM 50988 50988 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687280 687280 0 0.0
RAM 148328 148328 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 780214 780214 0 0.0
RAM 110780 110780 0 0.0
bridge-app tlsr9258a FLASH 681050 681050 0 0.0
RAM 91644 91644 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 619808 619808 0 0.0
RAM 50940 50940 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707750 707750 0 0.0
RAM 74280 74280 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 624772 624772 0 0.0
RAM 144316 144316 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 810424 810424 0 0.0
RAM 99448 99448 0 0.0
lock-app-dfu tlsr9528a FLASH 655654 655654 0 0.0
RAM 67000 67000 0 0.0
ota-requestor-app tlsr9258a FLASH 697026 697026 0 0.0
RAM 91236 91236 0 0.0
pump-app-usb tlsr9518adk80d FLASH 633432 633432 0 0.0
RAM 55816 55816 0 0.0
pump-controller-app tlsr9518adk80d FLASH 610622 610622 0 0.0
RAM 53060 53060 0 0.0
shell tlsr9518adk80d FLASH 467336 467336 0 0.0
RAM 68668 68668 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 626938 626938 0 0.0
RAM 52660 52660 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652758 652758 0 0.0
RAM 56608 56608 0 0.0
thermostat tlsr9518adk80d FLASH 637352 637352 0 0.0
RAM 53452 53452 0 0.0
window-covering tlsr9118bdk40d FLASH 523538 523538 0 0.0
RAM 97284 97284 0 0.0
tizen all-clusters-app arm unknown 4876 4876 0 0.0
FLASH 1722360 1722360 0 0.0
RAM 89076 89076 0 0.0
chip-tool-ubsan arm unknown 10316 10316 0 0.0
FLASH 17351778 17351778 0 0.0
RAM 7559896 7559896 0 0.0

src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
nivi-apple and others added 2 commits September 30, 2024 15:35
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@nivi-apple nivi-apple requested a review from a team as a code owner October 8, 2024 18:24
Copy link

github-actions bot commented Oct 8, 2024

PR #29364: Size comparison from 4a21a8d to 4eb2b86

Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 4a21a8d 4eb2b86 change % change
bl602 lighting-app bl602 FLASH 1280626 1280626 0 0.0
RAM 95808 95808 0 0.0
bl602+mfd FLASH 1308674 1308674 0 0.0
RAM 95464 95464 0 0.0
bl602+rpc FLASH 1335302 1335302 0 0.0
RAM 103784 103784 0 0.0
bl702 lighting-app bl702 FLASH 945052 945052 0 0.0
RAM 15105 15105 0 0.0
bl702+mfd FLASH 957506 957506 0 0.0
RAM 14769 14769 0 0.0
bl702+rpc FLASH 1051210 1051210 0 0.0
RAM 23661 23661 0 0.0
bl706-eth FLASH 658184 658184 0 0.0
RAM 24745 24745 0 0.0
bl706-wifi FLASH 824980 824980 0 0.0
RAM 13965 13965 0 0.0
bl702l lighting-app bl702l FLASH 961988 961988 0 0.0
RAM 16804 16804 0 0.0
bl702l+mfd FLASH 974750 974750 0 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829348 829348 0 0.0
RAM 123292 123292 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814672 814672 0 0.0
RAM 125172 125172 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761236 761236 0 0.0
RAM 113664 113664 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 745464 745464 0 0.0
RAM 113856 113856 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 616978 616978 0 0.0
RAM 205396 205396 0 0.0
lock CC3235SF_LAUNCHXL FLASH 657074 657074 0 0.0
RAM 205548 205548 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678317 678317 0 0.0
RAM 78508 78508 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698169 698169 0 0.0
RAM 81140 81140 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698169 698169 0 0.0
RAM 81140 81140 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655097 655097 0 0.0
RAM 73576 73576 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614653 614653 0 0.0
RAM 71468 71468 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634289 634289 0 0.0
RAM 74020 74020 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634289 634289 0 0.0
RAM 74020 74020 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633965 633965 0 0.0
RAM 74516 74516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 653681 653681 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 653681 653681 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609269 609269 0 0.0
RAM 68604 68604 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629129 629129 0 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629129 629129 0 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 933860 933860 0 0.0
RAM 135876 135876 0 0.0
lock-app BRD2605a FLASH 740264 740256 -8 -0.0
RAM 230248 230248 0 0.0
BRD4338a FLASH 740912 740904 -8 -0.0
RAM 230280 230280 0 0.0
window-app BRD4187C FLASH 1017264 1017264 0 0.0
RAM 127812 127812 0 0.0
esp32 all-clusters-app c3devkit DRAM 94088 94088 0 0.0
FLASH 1538452 1538452 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115032 115032 0 0.0
FLASH 1548914 1548914 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2780123 2780123 0 0.0
RAM 129488 129488 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6084120 6084120 0 0.0
RAM 512416 512416 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5417370 5417370 0 0.0
RAM 241200 241200 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4750844 4750844 0 0.0
RAM 218384 218384 0 0.0
chip-tool debug unknown 5960 5960 0 0.0
FLASH 12673638 12673638 0 0.0
RAM 563410 563410 0 0.0
chip-tool-ipv6only arm64 unknown 20736 20736 0 0.0
FLASH 11307376 11307376 0 0.0
RAM 613728 613728 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 11019607 11019607 0 0.0
RAM 563066 563066 0 0.0
fabric-bridge-app debug unknown 4632 4632 0 0.0
FLASH 4574040 4574040 0 0.0
RAM 205048 205048 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5691425 5691425 0 0.0
RAM 228488 228488 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4800406 4800406 0 0.0
RAM 204472 204472 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4429830 4429830 0 0.0
RAM 198192 198192 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4568644 4568644 0 0.0
RAM 202760 202760 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3110173 3110173 0 0.0
RAM 159280 159280 0 0.0
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4318432 4318432 0 0.0
RAM 242888 242888 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6028309 6028309 0 0.0
RAM 585952 585952 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10870877 10870877 0 0.0
RAM 651888 651888 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 914252 914252 0 0.0
RAM 142199 142199 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885056 885056 0 0.0
RAM 140338 140338 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847668 847668 0 0.0
RAM 141101 141101 0 0.0
nxp contact k32w0+release FLASH 582008 582008 0 0.0
RAM 70792 70792 0 0.0
k32w1+release FLASH 596712 596712 0 0.0
RAM 63016 63016 0 0.0
mcxw71+release FLASH 596472 596472 0 0.0
RAM 63016 63016 0 0.0
light k32w0+release FLASH 618572 618572 0 0.0
RAM 70256 70256 0 0.0
k32w1+release FLASH 682712 682712 0 0.0
RAM 48648 48648 0 0.0
mcxw71+release FLASH 682712 682712 0 0.0
RAM 48648 48648 0 0.0
lock k32w1+release FLASH 705056 705056 0 0.0
RAM 67156 67156 0 0.0
mcxw71+release FLASH 705064 705064 0 0.0
RAM 67156 67156 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646148 1646148 0 0.0
RAM 210888 210888 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552212 1552212 0 0.0
RAM 207688 207688 0 0.0
light cy8ckit_062s2_43012 FLASH 1467684 1467684 0 0.0
RAM 200688 200688 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464756 1464756 0 0.0
RAM 225048 225048 0 0.0
qpg lighting-app qpg6105+debug FLASH 660344 660344 0 0.0
RAM 105236 105236 0 0.0
lock-app qpg6105+debug FLASH 618356 618356 0 0.0
RAM 99704 99704 0 0.0
stm32 light STM32WB5MM-DK FLASH 481640 481640 0 0.0
RAM 144684 144684 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620746 620746 0 0.0
RAM 50488 50488 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687944 687944 0 0.0
RAM 148328 148328 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 780936 780936 0 0.0
RAM 110280 110280 0 0.0
bridge-app tlsr9258a FLASH 680842 680842 0 0.0
RAM 91144 91144 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620510 620510 0 0.0
RAM 50440 50440 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708452 708452 0 0.0
RAM 73780 73780 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625448 625448 0 0.0
RAM 144308 144308 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811208 811208 0 0.0
RAM 98940 98940 0 0.0
lock-app-dfu tlsr9528a FLASH 656416 656416 0 0.0
RAM 66500 66500 0 0.0
ota-requestor-app tlsr9258a FLASH 696820 696820 0 0.0
RAM 90736 90736 0 0.0
pump-app-usb tlsr9518adk80d FLASH 634144 634144 0 0.0
RAM 55316 55316 0 0.0
pump-controller-app tlsr9518adk80d FLASH 611334 611334 0 0.0
RAM 52560 52560 0 0.0
shell tlsr9518adk80d FLASH 467872 467872 0 0.0
RAM 68168 68168 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 627660 627660 0 0.0
RAM 52160 52160 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653466 653466 0 0.0
RAM 56108 56108 0 0.0
thermostat tlsr9518adk80d FLASH 638066 638066 0 0.0
RAM 52952 52952 0 0.0
window-covering tlsr9118bdk40d FLASH 524204 524204 0 0.0
RAM 97284 97284 0 0.0
tizen all-clusters-app arm unknown 4904 4904 0 0.0
FLASH 1725936 1725936 0 0.0
RAM 89084 89084 0 0.0
chip-tool-ubsan arm unknown 10456 10456 0 0.0
FLASH 17544794 17544794 0 0.0
RAM 7642532 7642532 0 0.0

Copy link

github-actions bot commented Oct 8, 2024

PR #29364: Size comparison from 4a21a8d to afb50a5

Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 4a21a8d afb50a5 change % change
bl602 lighting-app bl602 FLASH 1280626 1280626 0 0.0
RAM 95808 95808 0 0.0
bl602+mfd FLASH 1308674 1308674 0 0.0
RAM 95464 95464 0 0.0
bl602+rpc FLASH 1335302 1335302 0 0.0
RAM 103784 103784 0 0.0
bl702 lighting-app bl702 FLASH 945052 945052 0 0.0
RAM 15105 15105 0 0.0
bl702+mfd FLASH 957506 957506 0 0.0
RAM 14769 14769 0 0.0
bl702+rpc FLASH 1051210 1051210 0 0.0
RAM 23661 23661 0 0.0
bl706-eth FLASH 658184 658184 0 0.0
RAM 24745 24745 0 0.0
bl706-wifi FLASH 824980 824980 0 0.0
RAM 13965 13965 0 0.0
bl702l lighting-app bl702l FLASH 961988 961988 0 0.0
RAM 16804 16804 0 0.0
bl702l+mfd FLASH 974750 974750 0 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829348 829348 0 0.0
RAM 123292 123292 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814672 814672 0 0.0
RAM 125172 125172 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761236 761236 0 0.0
RAM 113664 113664 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 745464 745464 0 0.0
RAM 113856 113856 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 616978 616978 0 0.0
RAM 205396 205396 0 0.0
lock CC3235SF_LAUNCHXL FLASH 657074 657074 0 0.0
RAM 205548 205548 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678317 678317 0 0.0
RAM 78508 78508 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698169 698169 0 0.0
RAM 81140 81140 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698169 698169 0 0.0
RAM 81140 81140 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655097 655097 0 0.0
RAM 73576 73576 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614653 614653 0 0.0
RAM 71468 71468 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634289 634289 0 0.0
RAM 74020 74020 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634289 634289 0 0.0
RAM 74020 74020 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633965 633965 0 0.0
RAM 74516 74516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 653681 653681 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 653681 653681 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609269 609269 0 0.0
RAM 68604 68604 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629129 629129 0 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629129 629129 0 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 933860 933860 0 0.0
RAM 135876 135876 0 0.0
lock-app BRD2605a FLASH 740264 740256 -8 -0.0
RAM 230248 230248 0 0.0
BRD4338a FLASH 740912 740904 -8 -0.0
RAM 230280 230280 0 0.0
window-app BRD4187C FLASH 1017264 1017264 0 0.0
RAM 127812 127812 0 0.0
esp32 all-clusters-app c3devkit DRAM 94088 94088 0 0.0
FLASH 1538452 1538452 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115032 115032 0 0.0
FLASH 1548914 1548914 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2780123 2780123 0 0.0
RAM 129488 129488 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6084120 6084120 0 0.0
RAM 512416 512416 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5417370 5417370 0 0.0
RAM 241200 241200 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4750844 4750844 0 0.0
RAM 218384 218384 0 0.0
chip-tool debug unknown 5960 5960 0 0.0
FLASH 12673638 12673638 0 0.0
RAM 563410 563410 0 0.0
chip-tool-ipv6only arm64 unknown 20736 20736 0 0.0
FLASH 11307376 11307376 0 0.0
RAM 613728 613728 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 11019607 11019607 0 0.0
RAM 563066 563066 0 0.0
fabric-bridge-app debug unknown 4632 4632 0 0.0
FLASH 4574040 4574040 0 0.0
RAM 205048 205048 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5691425 5691425 0 0.0
RAM 228488 228488 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4800406 4800406 0 0.0
RAM 204472 204472 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4429830 4429830 0 0.0
RAM 198192 198192 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4568644 4568644 0 0.0
RAM 202760 202760 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3110173 3110173 0 0.0
RAM 159280 159280 0 0.0
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4318432 4318432 0 0.0
RAM 242888 242888 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6028309 6028309 0 0.0
RAM 585952 585952 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10870877 10870877 0 0.0
RAM 651888 651888 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 914252 914252 0 0.0
RAM 142199 142199 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885056 885056 0 0.0
RAM 140338 140338 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847668 847668 0 0.0
RAM 141101 141101 0 0.0
nxp contact k32w0+release FLASH 582008 582008 0 0.0
RAM 70792 70792 0 0.0
k32w1+release FLASH 596712 596712 0 0.0
RAM 63016 63016 0 0.0
mcxw71+release FLASH 596472 596472 0 0.0
RAM 63016 63016 0 0.0
light k32w0+release FLASH 618572 618572 0 0.0
RAM 70256 70256 0 0.0
k32w1+release FLASH 682712 682712 0 0.0
RAM 48648 48648 0 0.0
mcxw71+release FLASH 682712 682712 0 0.0
RAM 48648 48648 0 0.0
lock k32w1+release FLASH 705056 705056 0 0.0
RAM 67156 67156 0 0.0
mcxw71+release FLASH 705064 705064 0 0.0
RAM 67156 67156 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646148 1646148 0 0.0
RAM 210888 210888 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552212 1552212 0 0.0
RAM 207688 207688 0 0.0
light cy8ckit_062s2_43012 FLASH 1467684 1467684 0 0.0
RAM 200688 200688 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464756 1464756 0 0.0
RAM 225048 225048 0 0.0
qpg lighting-app qpg6105+debug FLASH 660344 660344 0 0.0
RAM 105236 105236 0 0.0
lock-app qpg6105+debug FLASH 618356 618356 0 0.0
RAM 99704 99704 0 0.0
stm32 light STM32WB5MM-DK FLASH 481640 481640 0 0.0
RAM 144684 144684 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620746 620746 0 0.0
RAM 50488 50488 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687944 687944 0 0.0
RAM 148328 148328 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 780936 780936 0 0.0
RAM 110280 110280 0 0.0
bridge-app tlsr9258a FLASH 680842 680842 0 0.0
RAM 91144 91144 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620510 620510 0 0.0
RAM 50440 50440 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708452 708452 0 0.0
RAM 73780 73780 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625448 625448 0 0.0
RAM 144308 144308 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811208 811208 0 0.0
RAM 98940 98940 0 0.0
lock-app-dfu tlsr9528a FLASH 656416 656416 0 0.0
RAM 66500 66500 0 0.0
ota-requestor-app tlsr9258a FLASH 696820 696820 0 0.0
RAM 90736 90736 0 0.0
pump-app-usb tlsr9518adk80d FLASH 634144 634144 0 0.0
RAM 55316 55316 0 0.0
pump-controller-app tlsr9518adk80d FLASH 611334 611334 0 0.0
RAM 52560 52560 0 0.0
shell tlsr9518adk80d FLASH 467872 467872 0 0.0
RAM 68168 68168 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 627660 627660 0 0.0
RAM 52160 52160 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653466 653466 0 0.0
RAM 56108 56108 0 0.0
thermostat tlsr9518adk80d FLASH 638066 638066 0 0.0
RAM 52952 52952 0 0.0
window-covering tlsr9118bdk40d FLASH 524204 524204 0 0.0
RAM 97284 97284 0 0.0
tizen all-clusters-app arm unknown 4904 4904 0 0.0
FLASH 1725936 1725936 0 0.0
RAM 89084 89084 0 0.0
chip-tool-ubsan arm unknown 10456 10456 0 0.0
FLASH 17544794 17544794 0 0.0
RAM 7642532 7642532 0 0.0

src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
src/protocols/bdx/AsyncTransferFacilitator.h Outdated Show resolved Hide resolved
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@nivi-apple nivi-apple force-pushed the add_support_for_async_bdx_transfer branch from 27e25d2 to 01f12ac Compare October 22, 2024 16:47
assertChipStackLockedByCurrentThread();

// TODO: #36181 - Store the imageTransferHandler in a set of MTROTAImageTransferHandler objects.
mOTAImageTransferHandler = static_cast<MTROTAImageTransferHandler *>(imageTransferHandler);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bzbarsky-apple should i re-assign this here or just verify that it matches. if it doesn't clean up everything by calling destroyself?

Copy link

github-actions bot commented Oct 24, 2024

PR #29364: Size comparison from 1febc9b to 4029261

Full report (3 builds for cc32xx, stm32)
platform target config section 1febc9b 4029261 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 627474 627474 0 0.0
RAM 206132 206132 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667458 667458 0 0.0
RAM 206284 206284 0 0.0
stm32 light STM32WB5MM-DK FLASH 481928 481928 0 0.0
RAM 144844 144844 0 0.0

@nivi-apple nivi-apple force-pushed the add_support_for_async_bdx_transfer branch from c5a62a6 to d3713d7 Compare October 24, 2024 17:55
Copy link

github-actions bot commented Oct 24, 2024

PR #29364: Size comparison from 1febc9b to d3713d7

Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 1febc9b d3713d7 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350106 1350106 0 0.0
RAM 104120 104120 0 0.0
bl702 lighting-app bl702+eth FLASH 647856 647856 0 0.0
RAM 25233 25233 0 0.0
bl702+wifi FLASH 825164 825164 0 0.0
RAM 13965 13965 0 0.0
bl706+mfd+rpc+littlefs FLASH 1054154 1054154 0 0.0
RAM 23821 23821 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 974938 974938 0 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 836676 836676 0 0.0
RAM 123676 123676 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 821960 821960 0 0.0
RAM 125556 125556 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 768540 768540 0 0.0
RAM 114048 114048 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 752792 752792 0 0.0
RAM 114240 114240 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 627474 627474 0 0.0
RAM 206132 206132 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667458 667458 0 0.0
RAM 206284 206284 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678629 678629 0 0.0
RAM 78692 78692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698481 698481 0 0.0
RAM 81324 81324 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698481 698481 0 0.0
RAM 81324 81324 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655409 655409 0 0.0
RAM 73760 73760 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615053 615053 0 0.0
RAM 71644 71644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634681 634681 0 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634681 634681 0 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 634309 634309 0 0.0
RAM 74692 74692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654025 654025 0 0.0
RAM 77244 77244 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654025 654025 0 0.0
RAM 77244 77244 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609677 609677 0 0.0
RAM 68780 68780 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629537 629537 0 0.0
RAM 71412 71412 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629537 629537 0 0.0
RAM 71412 71412 0 0.0
efr32 lock-app BRD4187C FLASH 925644 925644 0 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 742216 742216 0 0.0
RAM 232580 232580 0 0.0
window-app BRD4187C FLASH 1018568 1018568 0 0.0
RAM 128264 128264 0 0.0
esp32 all-clusters-app c3devkit DRAM 95256 95256 0 0.0
FLASH 1540020 1540020 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 116192 116192 0 0.0
FLASH 1550198 1550198 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2756449 2756449 0 0.0
RAM 129520 129520 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6070484 6070484 0 0.0
RAM 523840 523840 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5399664 5399664 0 0.0
RAM 242416 242416 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4724356 4724356 0 0.0
RAM 218384 218384 0 0.0
chip-tool debug unknown 5960 5960 0 0.0
FLASH 13077098 13077098 0 0.0
RAM 584402 584402 0 0.0
chip-tool-ipv6only arm64 unknown 21408 21408 0 0.0
FLASH 11183368 11183368 0 0.0
RAM 635344 635344 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 11331527 11331527 0 0.0
RAM 584890 584890 0 0.0
fabric-bridge-app debug unknown 4632 4632 0 0.0
FLASH 4550650 4550650 0 0.0
RAM 205336 205336 0 0.0
fabric-sync debug unknown 4816 4816 0 0.0
FLASH 5264565 5264565 0 0.0
RAM 465416 465416 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5668673 5668673 0 0.0
RAM 228488 228488 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4774012 4774012 0 0.0
RAM 204472 204472 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4401670 4401670 0 0.0
RAM 198192 198192 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4541276 4541276 0 0.0
RAM 202760 202760 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3095213 3095213 0 0.0
RAM 160368 160368 0 0.0
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4140832 4140832 0 0.0
RAM 242896 242896 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6007621 6007621 0 0.0
RAM 596256 596256 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 11281933 11281933 0 0.0
RAM 694536 694536 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915564 915564 0 0.0
RAM 143357 143357 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886032 886032 0 0.0
RAM 141496 141496 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848972 848972 0 0.0
RAM 142265 142265 0 0.0
nxp contact k32w0+release FLASH 582408 582408 0 0.0
RAM 71092 71092 0 0.0
mcxw71+release FLASH 596896 596896 0 0.0
RAM 63184 63184 0 0.0
light k32w0+release FLASH 619044 619044 0 0.0
RAM 70556 70556 0 0.0
k32w1+release FLASH 683144 683144 0 0.0
RAM 48816 48816 0 0.0
lock mcxw71+release FLASH 746704 746704 0 0.0
RAM 67340 67340 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647652 1647652 0 0.0
RAM 212408 212408 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553724 1553724 0 0.0
RAM 209208 209208 0 0.0
light cy8ckit_062s2_43012 FLASH 1468004 1468004 0 0.0
RAM 201200 201200 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464964 1464964 0 0.0
RAM 225560 225560 0 0.0
qpg lighting-app qpg6105+debug FLASH 660552 660552 0 0.0
RAM 105420 105420 0 0.0
lock-app qpg6105+debug FLASH 618636 618636 0 0.0
RAM 99880 99880 0 0.0
stm32 light STM32WB5MM-DK FLASH 481928 481928 0 0.0
RAM 144844 144844 0 0.0
telink bridge-app tlsr9258a FLASH 681136 681136 0 0.0
RAM 91304 91304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620782 620782 0 0.0
RAM 50600 50600 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708764 708764 0 0.0
RAM 73940 73940 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625738 625738 0 0.0
RAM 144468 144468 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811748 811748 0 0.0
RAM 99100 99100 0 0.0
tizen all-clusters-app arm unknown 4912 4912 0 0.0
FLASH 1729988 1729988 0 0.0
RAM 90108 90108 0 0.0
chip-tool-ubsan arm unknown 10792 10792 0 0.0
FLASH 18237774 18237774 0 0.0
RAM 7945372 7945372 0 0.0

@mergify mergify bot added the conflict label Nov 1, 2024
/**
* An abstract class with methods for receiving and sending BDX messages on an ExchangeContext. It interacts with the Transfer
* Session state machine to process the received messages and send any outgoing messages.
* Note: If the relevant fabric shuts down, it is the responsibility of the subclass that implements the HandleTransferSessionOutput
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Note: If the relevant fabric shuts down, it is the responsibility of the subclass that implements the HandleTransferSessionOutput
* Note: If the relevant fabric shuts down, it is the responsibility of the subclass that implements HandleTransferSessionOutput

* An abstract class with methods for receiving and sending BDX messages on an ExchangeContext. It interacts with the Transfer
* Session state machine to process the received messages and send any outgoing messages.
* Note: If the relevant fabric shuts down, it is the responsibility of the subclass that implements the HandleTransferSessionOutput
* to destroy this object and its subclasses.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* to destroy this object and its subclasses.
* to destroy itself (and hence this object).

CHIP_ERROR Init(System::Layer * layer, Messaging::ExchangeContext * exchangeCtx, System::Clock::Timeout timeout);

// If subclasses override this method and they call the superclass's OnMessageReceived, the superclass
// may destroy the subclass's object.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// may destroy the subclass's object.
// may destroy the subclass's object before OnMessageReceived returns.

System::PacketBufferHandle && payload) override;

// If subclasses override this method and they call the superclass's OnResponseTimeout, the superclass
// may destroy the subclass's object.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// may destroy the subclass's object.
// may destroy the subclass's object before OnResponseTimeout returns.

virtual void HandleTransferSessionOutput(TransferSession::OutputEvent & event) = 0;

/**
* This method should be implemented to destroy the object subclassing AsyncTransferFacilitator.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* This method should be implemented to destroy the object subclassing AsyncTransferFacilitator.
* This method should be implemented to destroy the object subclassing AsyncTransferFacilitator.
*
* This is a hook that is expected to be called by AsyncTransferFacilitator and allows subclasses
* to select an allocation strategy of their choice.

Comment on lines +91 to +92
// If we send out a status report across the exchange, schedule a call to DestroySelf() at a little bit later time
// since we want the message to be sent before we clean up.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If we send out a status report across the exchange, schedule a call to DestroySelf() at a little bit later time
// since we want the message to be sent before we clean up.
// If we send out a status report across the exchange, that means there was an error.
// We've sent our report about that error and can now abort the transfer. Our peer
// will respond to the status report by tearing down their side.

Comment on lines +95 to +96
DestroySelf();
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also do:

Suggested change
DestroySelf();
return;
mDestroySelf = true;
break;

and similar in the case above, just to have fewer places/ways in which this object can be destroyed....

// the end of the transfer.
if (!msgTypeData.HasMessageType(Protocols::SecureChannel::MsgType::StatusReport))
{
sendFlags.Set(Messaging::SendMessageFlags::kExpectResponse);
Copy link
Contributor

Choose a reason for hiding this comment

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

Followup: instead of having logic in the caller that has to match this logic in terms of which types of messages expect responses, we should have either sendFlags or just the boolean of whether we set kExpectResponse be an outparam of this method. But please don't make that change in this PR; do it separately.

Comment on lines +184 to +185
// If it's a message indicating either the end of the transfer or a timeout reported by the transfer session
// or an error occured, we need to call DestroySelf().
Copy link
Contributor

Choose a reason for hiding this comment

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

So I think what really needs to be documented here is why we need to call ProcessOutputEvents() at all in this case, instead of just destroying ourselves directly. If that's important, please make sure it's written down why it's important so someone doesn't accidentally break things later.

Comment on lines +192 to +193
// Set the mDestroySelf flag to true so that when ProcessOutputEvents finishes processing all pending events, it
// will call DestroySelf() to clean up.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment would be wholly unnecessary if the flag were named clearly; see naming suggestion.

Comment on lines +25 to +33
* This class inherits from the AsyncResponder class and handles the BDX messages for a BDX transfer session.
* It overrides the HandleTransferSessionOutput virtual method and provides an implementation for it to handle
* the OutputEvents that are generated by the BDX transfer session state machine.
*
* An MTROTAImageTransferHandler will be associated with a specific BDX transfer session.
*
* The lifecycle of this class is managed by the AsyncFacilitator class which calls the virtual DestroySelf method
* that is implemented by this class to clean up and destroy itself and the AsyncFacilitator instances.
* Note: An object of this class can't be used after DestroySelf has been called.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* This class inherits from the AsyncResponder class and handles the BDX messages for a BDX transfer session.
* It overrides the HandleTransferSessionOutput virtual method and provides an implementation for it to handle
* the OutputEvents that are generated by the BDX transfer session state machine.
*
* An MTROTAImageTransferHandler will be associated with a specific BDX transfer session.
*
* The lifecycle of this class is managed by the AsyncFacilitator class which calls the virtual DestroySelf method
* that is implemented by this class to clean up and destroy itself and the AsyncFacilitator instances.
* Note: An object of this class can't be used after DestroySelf has been called.
* This class handles the BDX events for a BDX transfer session.
*
* This object may be destroyed directly, when not processing some call it made, to interrupt the BDX
* transfer. Specifically, this has to be done if the fabric it's associated with is shut down. This
* method of interrupting the BDX transfer will not notify the peer that we are interrupting and it will
* keep waiting until it times out.
*
* If not otherwise destroyed, this object will destroy itself when the transfer completes.

// The node id of the node with which the BDX session is established.
chip::Optional<chip::NodeId> mNodeId;

// The OTA provider delegate used by the controller.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The OTA provider delegate used by the controller.
// The OTA provider delegate that is responding to the BDX transfer request.

id<MTROTAProviderDelegate> mDelegate = nil;
chip::System::Layer * mSystemLayer = nil;

// The OTA provider delegate queue used by the controller.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The OTA provider delegate queue used by the controller.
// The queue mDelegate must be called on.


constexpr bdx::TransferRole kBdxRole = bdx::TransferRole::kSender;

@interface MTROTAImageTransferHandlerWrapper : NSObject
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@interface MTROTAImageTransferHandlerWrapper : NSObject
// An ARC-managed object that lets us do weak references to a MTROTAImageTransferHandler
// (which is a C++ object).
@interface MTROTAImageTransferHandlerWrapper : NSObject


@interface MTROTAImageTransferHandlerWrapper : NSObject
- (instancetype)initWithMTROTAImageTransferHandler:(MTROTAImageTransferHandler *)otaImageTransferHandler;
@property (nonatomic, nullable, readwrite, assign) MTROTAImageTransferHandler * otaImageTransferHandler;
Copy link
Contributor

Choose a reason for hiding this comment

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

So why is nonatomic OK here? Presumably because this property is only read/written on the Matter thread, right?

But then that should be documented. And as a followup (not part of this PR), we should have the property getter/setter assert that.

void OnExchangeCreationFailed(chip::Messaging::ExchangeDelegate * _Nonnull delegate) override;

// TODO: #36181 - Have a set of MTROTAImageTransferHandler objects.
MTROTAImageTransferHandler * mOTAImageTransferHandler = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
MTROTAImageTransferHandler * mOTAImageTransferHandler = nullptr;
MTROTAImageTransferHandler * _Nullable mOTAImageTransferHandler = nullptr;

since the header is ASSUME_NONNULL and this thing is very much not "nonnull".

Comment on lines +54 to +55
mOTAImageTransferHandler->DestroySelf();
delete mOTAImageTransferHandler;
Copy link
Contributor

Choose a reason for hiding this comment

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

This ... this is a double-delete. With some allocators, this will crash. Please do not do that. Just do the delete, take out the DestroySelf call, DestroySelf should not be public API as mentioned elsewhere.

What does need to happen and what this code is not doing: mOTAImageTransferHandler = nullptr;

// Since the OTA provider delegate only supports one BDX transfer at a time, calling ShutDown is fine for now.
// TODO: #36181 - This class needs to keep a list of all MTROTAImageTransferHandlers mapped to the fabric index and only
// delete the MTROTAImageTransferHandler objects with a fabric index matching the MTRDeviceController's fabric index.
Shutdown();
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this possibly fine? After this we will stop listening for BDX messages entirely, no? Was this actually tested with multiple controllers? Please add to the unit tests to exercise this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah the BDX listener should not be shut down. Yeah i need to add tests with multiple controllers

VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE);

if (GetNumberOfDelegates() >= 1) {
return CHIP_ERROR_BUSY;
Copy link
Contributor

Choose a reason for hiding this comment

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

So... this is not responding with a BUSY status on the exchange or anything. It's going to just drop everything on the floor. Is this actually the behavior we want? And if it is, why do we have the higher-level "busy" handling above that sends nice cluster response commands? This seems pretty broken to me....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm let me figure out how to pipe the busy correctly. the tests pass where we test busy so either the tests don't test the right thing or something is sending the right response but cleaning up the class which it shouldn't.

auto * otaTransferHandler = static_cast<MTROTAImageTransferHandler *>(delegate);
VerifyOrReturn(otaTransferHandler != nullptr);

otaTransferHandler->DestroySelf();
Copy link
Contributor

Choose a reason for hiding this comment

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

Just delete.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants