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

Integrate KVS with device session tables #4952

Merged
merged 6 commits into from
Feb 23, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

Need to persist session and admin information on the device.

Summary of Changes

Added code to store relevant information for Admin and Peer Connection/PASE Session in KVS storage. The device will read KVS and recreate the tables at boot up. Tested the change on m5stack.

@todo
Copy link

todo bot commented Feb 21, 2021

The admin ID space allocation should be re-evaluated. With the current approach, the space could be

// TODO: The admin ID space allocation should be re-evaluated. With the current approach, the space could be
// exhausted while IDs are still available (e.g. if the admin IDs are allocated and freed over a period of time).
// Also, the current approach can make ID lookup slower as more IDs are allocated and freed.
for (AdminId id = 0; id < nextAvailableId; id++)
{
AdminPairingInfo * admin = adminPairings.AssignAdminId(id);
// Recreate the binding if one exists in persistent storage. Else skip to the next ID
if (admin->FetchFromKVS(gServerStorage) != CHIP_NO_ERROR)
{
adminPairings.ReleaseAdminId(id);
}


This comment was generated by todo based on a TODO comment in 48d1400 in #4952. cc @pan-apple.

@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from 2b58bdf

File Section File VM
chip-qpg6100-lock-example.out .text 1136 1136
chip-qpg6100-lock-example.out .bss 0 16
chip-qpg6100-lock-example.out .data -4 -4
chip-qpg6100-lock-example.out .heap 0 -16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lock-example.out and ./pull_artifact/chip-qpg6100-lock-example.out:

sections,vmsize,filesize
.debug_info,0,49987
.debug_line,0,8373
.debug_abbrev,0,6011
.debug_str,0,4261
.debug_loc,0,2868
.strtab,0,2151
.symtab,0,1408
.text,1136,1136
.debug_frame,0,860
.debug_aranges,0,312
.debug_ranges,0,216
[ELF Headers],0,32
.bss,16,0
.shstrtab,0,1
.data,-4,-4
.heap,-16,0
[Unmapped],0,-1168


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 2b58bdf

File Section File VM
chip-lighting.elf bss 0 2112
chip-lighting.elf text 2056 2056
chip-lighting.elf rodata 360 364
chip-lighting.elf shell_root_cmds_sections -8 -8
chip-lock.elf bss 0 2112
chip-lock.elf text 2056 2056
chip-lock.elf rodata 368 368
chip-lock.elf shell_root_cmds_sections -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,100955
.debug_line,0,12336
.debug_abbrev,0,9565
.debug_loc,0,8091
.debug_str,0,5473
.strtab,0,3043
bss,2112,0
text,2056,2056
.debug_ranges,0,1816
.symtab,0,1808
.debug_frame,0,948
rodata,364,360
.debug_aranges,0,328
.shstrtab,0,-3
shell_root_cmds_sections,-8,-8

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,100955
.debug_line,0,12336
.debug_abbrev,0,9565
.debug_loc,0,8099
.debug_str,0,5473
.strtab,0,3043
bss,2112,0
text,2056,2056
.debug_ranges,0,1816
.symtab,0,1808
.debug_frame,0,948
rodata,368,368
.debug_aranges,0,328
.shstrtab,0,-3
shell_root_cmds_sections,-8,-8


src/app/server/RendezvousServer.h Outdated Show resolved Hide resolved
src/app/server/RendezvousServer.cpp Outdated Show resolved Hide resolved
src/app/server/Server.cpp Outdated Show resolved Hide resolved
src/app/server/Server.cpp Outdated Show resolved Hide resolved
src/app/server/Server.cpp Outdated Show resolved Hide resolved
src/app/server/Server.cpp Outdated Show resolved Hide resolved
@pan-apple pan-apple requested a review from andy31415 February 22, 2021 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants