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

[Linux] Implement Ethernet network driver #17802

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

erjiaqing
Copy link
Contributor

Problem

Fixes #17535

Change overview

Implemented a EthernetDriver for Linux

Testing

In [1]: devCtrl.CommissionIP(b"127.0.0.1", 20202021, 123123)
Established CASE with Device
Commissioning complete
Out[1]: True

In [2]: await devCtrl.ReadAttribute(nodeid=123123, attributes=[(0, Clusters.NetworkCommissioning)])
Out[2]: 
{
│   0: {
│   │   <class 'chip.clusters.Objects.NetworkCommissioning'>: {
│   │   │   <class 'chip.clusters.Attribute.DataVersion'>: 352360043,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.MaxNetworks'>: 1,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.Networks'>: [
│   │   │   │   NetworkInfo(
│   │   │   │   │   networkID=b'eno1',
│   │   │   │   │   connected=True
│   │   │   │   )
│   │   │   ],
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.ScanMaxTimeSeconds'>: 0,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.ConnectMaxTimeSeconds'>: 0,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.InterfaceEnabled'>: True,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.LastNetworkingStatus'>: Null,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.LastNetworkID'>: Null,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.LastConnectErrorValue'>: Null,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.FeatureMap'>: 4,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.ClusterRevision'>: 1,
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.GeneratedCommandList'>: [],
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.AcceptedCommandList'>: [],
│   │   │   <class 'chip.clusters.Objects.NetworkCommissioning.Attributes.AttributeList'>: [
│   │   │   │   0,
│   │   │   │   1,
│   │   │   │   2,
│   │   │   │   3,
│   │   │   │   4,
│   │   │   │   5,
│   │   │   │   6,
│   │   │   │   7,
│   │   │   │   65528,
│   │   │   │   65529,
│   │   │   │   65531,
│   │   │   │   65532,
│   │   │   │   65533
│   │   │   ]
│   │   }
│   }
}

@github-actions
Copy link

github-actions bot commented Apr 27, 2022

PR #17802: Size comparison from a5059b0 to cfbcd38

Increases above 0.2%:

platform target config section a5059b0 cfbcd38 change % change
linux all-clusters-app debug .init_array 992 1000 8 0.8
Increases (1 build for linux)
platform target config section a5059b0 cfbcd38 change % change
linux all-clusters-app debug (read only) 2735369 2736153 784 0.0
(read/write) 172808 172880 72 0.0
.data.rel.ro 81576 81640 64 0.1
.init_array 992 1000 8 0.8
.text 2326882 2327522 640 0.0
Full report (32 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a5059b0 cfbcd38 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 688327 688327 0 0.0
(read/write) 163712 163712 0 0.0
.bss 75020 75020 0 0.0
.data 3396 3396 0 0.0
.rodata 101583 101583 0 0.0
.text 586264 586264 0 0.0
lock-ftd LP_CC2652R7 (read only) 689047 689047 0 0.0
(read/write) 154304 154304 0 0.0
.bss 73388 73388 0 0.0
.data 3220 3220 0 0.0
.rodata 103247 103247 0 0.0
.text 585316 585316 0 0.0
lock-mtd LP_CC2652R7 (read only) 637791 637791 0 0.0
(read/write) 146188 146188 0 0.0
.bss 69108 69108 0 0.0
.data 3220 3220 0 0.0
.rodata 103127 103127 0 0.0
.text 534172 534172 0 0.0
pump-app LP_CC2652R7 (read only) 661891 661891 0 0.0
(read/write) 182660 182660 0 0.0
.bss 73564 73564 0 0.0
.data 3252 3252 0 0.0
.rodata 80443 80443 0 0.0
.text 580968 580968 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654787 654787 0 0.0
(read/write) 189556 189556 0 0.0
.bss 73612 73612 0 0.0
.data 3216 3216 0 0.0
.rodata 83467 83467 0 0.0
.text 570840 570840 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 626890 626890 0 0.0
.app_xip_area 529768 529768 0 0.0
.bss 79780 79780 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 621434 621434 0 0.0
.app_xip_area 525784 525784 0 0.0
.bss 78340 78340 0 0.0
.data 656 656 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 574262 574262 0 0.0
.app_xip_area 468968 468968 0 0.0
.bss 87688 87688 0 0.0
.data 568 568 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 907908 907908 0 0.0
(read/write) 134908 134908 0 0.0
.bss 132864 132864 0 0.0
.data 2044 2044 0 0.0
.text 907900 907900 0 0.0
BRD4161A+rpc (read only) 942308 942308 0 0.0
(read/write) 151592 151592 0 0.0
.bss 149344 149344 0 0.0
.data 2248 2248 0 0.0
.text 942300 942300 0 0.0
window-app BRD4161A (read only) 845276 845276 0 0.0
(read/write) 132996 132996 0 0.0
.bss 131040 131040 0 0.0
.data 1956 1956 0 0.0
.text 845268 845268 0 0.0
esp32 all-clusters-app c3devkit (read only) 999528 999528 0 0.0
(read/write) 1473690 1473690 0 0.0
.dram0.bss 68176 68176 0 0.0
.dram0.data 14428 14428 0 0.0
.flash.rodata 206640 206640 0 0.0
.flash.text 999528 999528 0 0.0
.iram0.text 62020 62020 0 0.0
m5stack (read only) 1053803 1053803 0 0.0
(read/write) 475688 475688 0 0.0
.dram0.bss 73696 73696 0 0.0
.dram0.data 34168 34168 0 0.0
.flash.rodata 235988 235988 0 0.0
.flash.text 1048419 1048419 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 688824 688824 0 0.0
.bss 81112 81112 0 0.0
.data 2000 2000 0 0.0
.text 599912 599912 0 0.0
lock k32w061+release (read/write) 729684 729684 0 0.0
.bss 81520 81520 0 0.0
.data 1960 1960 0 0.0
.text 640404 640404 0 0.0
linux all-clusters-app debug (read only) 2735369 2736153 784 0.0
(read/write) 172808 172880 72 0.0
.bss 83168 83168 0 0.0
.data 1984 1984 0 0.0
.data.rel.ro 81576 81640 64 0.1
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 992 1000 8 0.8
.rodata 233861 233861 0 0.0
.text 2326882 2327522 640 0.0
bridge-app debug+rpc (read only) 1891369 1891369 0 0.0
(read/write) 120240 120240 0 0.0
.bss 71168 71168 0 0.0
.data 3424 3424 0 0.0
.data.rel.ro 40328 40328 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 159601 159601 0 0.0
.text 1609202 1609202 0 0.0
chip-tool debug (read only) 8360565 8360565 0 0.0
(read/write) 472624 472624 0 0.0
.bss 22592 22592 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 442648 442648 0 0.0
.dynamic 624 624 0 0.0
.got 4952 4952 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 453013 453013 0 0.0
.text 6825989 6825989 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 8222460 8222460 0 0.0
(read/write) 537745 537745 0 0.0
.bss 40897 40897 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 477752 477752 0 0.0
.dynamic 560 560 0 0.0
.got 14080 14080 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 419452 419452 0 0.0
.text 6589060 6589060 0 0.0
lighting-app debug+rpc (read only) 2326841 2326841 0 0.0
(read/write) 151192 151192 0 0.0
.bss 73216 73216 0 0.0
.data 1984 1984 0 0.0
.data.rel.ro 70248 70248 0 0.0
.dynamic 608 608 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 183729 183729 0 0.0
.text 1976690 1976690 0 0.0
lock-app debug (read only) 2207225 2207225 0 0.0
(read/write) 145576 145576 0 0.0
.bss 71808 71808 0 0.0
.data 1504 1504 0 0.0
.data.rel.ro 66600 66600 0 0.0
.dynamic 592 592 0 0.0
.got 4312 4312 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 192225 192225 0 0.0
.text 1855218 1855218 0 0.0
ota-provider-app debug (read only) 2059929 2059929 0 0.0
(read/write) 138824 138824 0 0.0
.bss 71232 71232 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 60152 60152 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 174235 174235 0 0.0
.text 1728402 1728402 0 0.0
ota-requestor-app debug (read only) 2091145 2091145 0 0.0
(read/write) 141600 141600 0 0.0
.bss 71872 71872 0 0.0
.data 1928 1928 0 0.0
.data.rel.ro 62184 62184 0 0.0
.dynamic 592 592 0 0.0
.got 4320 4320 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 170556 170556 0 0.0
.text 1761810 1761810 0 0.0
shell debug (read only) 2561217 2561217 0 0.0
(read/write) 196776 196776 0 0.0
.bss 113768 113768 0 0.0
.data 1360 1360 0 0.0
.data.rel.ro 75912 75912 0 0.0
.dynamic 592 592 0 0.0
.got 4184 4184 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 215634 215634 0 0.0
.text 2183890 2183890 0 0.0
thermostat-no-ble arm64 (read only) 2368540 2368540 0 0.0
(read/write) 174337 174337 0 0.0
.bss 86097 86097 0 0.0
.data 1488 1488 0 0.0
.data.rel.ro 78984 78984 0 0.0
.dynamic 560 560 0 0.0
.got 4744 4744 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 145532 145532 0 0.0
.text 1993984 1993984 0 0.0
tv-app debug (read only) 2845361 2845361 0 0.0
(read/write) 276472 276472 0 0.0
.bss 189112 189112 0 0.0
.data 4640 4640 0 0.0
.data.rel.ro 76488 76488 0 0.0
.dynamic 592 592 0 0.0
.got 4696 4696 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 216043 216043 0 0.0
.text 2447074 2447074 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2411772 2411772 0 0.0
.bss 205660 205660 0 0.0
.data 5848 5848 0 0.0
.text 1374372 1374372 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1179487 1179487 0 0.0
bss 141784 141784 0 0.0
rodata 150272 150272 0 0.0
text 808800 808800 0 0.0
p6 all-clusters-app default (read/write) 2527216 2527216 0 0.0
.bss 139040 139040 0 0.0
.data 2784 2784 0 0.0
.text 1485480 1485480 0 0.0
light-app default (read/write) 2418960 2418960 0 0.0
.bss 132520 132520 0 0.0
.data 2584 2584 0 0.0
.text 1377224 1377224 0 0.0
lock-app default (read/write) 2423136 2423136 0 0.0
.bss 132320 132320 0 0.0
.data 2544 2544 0 0.0
.text 1381400 1381400 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 808144 808144 0 0.0
bss 75216 75216 0 0.0
noinit 40416 40416 0 0.0
text 571886 571886 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

Looks reasonable if it does not confuse on-network commissioning.

@bzbarsky-apple bzbarsky-apple merged commit 1f862e3 into project-chip:master Apr 27, 2022
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.

[SQA] TC-DM-4.3 TH fails to read the Networks & InterfaceEnabled attributes from the DUT
3 participants