[GitHub] [incubator-nuttx] GD32-MCU opened a new pull request, #7011: add chip GD32F450 of GD32MCU
GD32-MCU opened a new pull request, #7011: URL: https://github.com/apache/incubator-nuttx/pull/7011 ## Summary Add the chip GD32F450 of GD32MCU to Nuttx Modify arch/arm/Kconfig Add gd32f4 in arch/arm/src folder Modify boards/Kconfig Add gd32f4 in boards/arm folder ## Impact ## Testing GPIO,network and NXFFS filesystems have been tested -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GD32-MCU closed pull request #7011: add chip GD32F450 of GD32MCU
GD32-MCU closed pull request #7011: add chip GD32F450 of GD32MCU URL: https://github.com/apache/incubator-nuttx/pull/7011 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
svn commit: r56685 - /dev/incubator/nuttx/11.0.0-RC1/
Author: jerpelea Date: Tue Sep 6 07:19:05 2022 New Revision: 56685 Log: Staging apache-nuttx-11.0.0-RC1-incubating Added: dev/incubator/nuttx/11.0.0-RC1/ dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz (with props) dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.asc dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.sha512 dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz (with props) dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.asc dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.sha512 Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz == Binary file - no diff available. Propchange: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.asc == --- dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.asc (added) +++ dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.asc Tue Sep 6 07:19:05 2022 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEkgjS5LgA1m90mtTpQTenFpjF5NsFAmMW7qIACgkQQTenFpjF +5NssPQ/7BwZFlfe+mPFn+ijxr4BCk9hMtfmqSAhuL87Ab4jK5/HiWOnhc/3VFrb9 +OaPLMNFODWVW14DcRttzM3IJcfUh/C7j+6+AbTMCiy7pkl8N9kDuZv86kZk7Wc+e +CIRJsQ28x/umBoX7RJ9VBeUMmEuGptcWi5PLt3A8ao98+Nsab3izCpsvfKAsigZf +rUN/jEmGbAHKe35Xk3bZL7YMAXx2GW8SFOL1jr2YZMGCsYULoMaAilNqa1BtLXya +d2YBQD4KKQa/T32+a/a65IXrOiJDXgMt/DYuL5hlHJtd2moGpYGjiqPv8RQOK8Hb +lbfwkDY73a9tkPgnLOwjWemSrWJiBs335DkuaR148ZKpI2+AbgQhQMHH0znt2T2q +WMEfNuDKABTIdpjwsUg7151wLzuW0Y9oM3TpOtWq6KyMBPIrpr3M8RSx2rTARNwE +YPvAZNUEMOFIc6wgRJhSg1A6OreGYoCv0Gy5rH0DwK2yAMil7dn/WO1CPBYmbe5Q +8HpOVDaEmeVeIc2RsGe2guZMyBblVP03Ot3NcpOMycHTmH8ViCMwb0vyxULUGLJa +Hb/9hI2oW6qud17g8++OZeEYL18AU/nmP9Lf2IL07p2GpJAs9RbmcwAzUANshJ1P +1NBszOkjYs0wUGB+ZnopcOGJMDINVY4aWNvg2V6CSTnaqNVTW/M= +=/ldz +-END PGP SIGNATURE- Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.sha512 == --- dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.sha512 (added) +++ dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-11.0.0-incubating.tar.gz.sha512 Tue Sep 6 07:19:05 2022 @@ -0,0 +1 @@ +4b0e374ad9b6ba8aec4a1de368113f70b759a70d0b1e530f8bb7f3ada049f84c693244de42b4ed132eed8a4d1e95ef1bcd47989a7bf3ca0cd7fde8841f1ffe27 apache-nuttx-11.0.0-incubating.tar.gz Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz == Binary file - no diff available. Propchange: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz -- svn:mime-type = application/octet-stream Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.asc == --- dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.asc (added) +++ dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.asc Tue Sep 6 07:19:05 2022 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEkgjS5LgA1m90mtTpQTenFpjF5NsFAmMW7qIACgkQQTenFpjF +5NvmiQ/+N6EDYMjSydUoA1vnvIMEe38PAdeVQFyIrDyYMnNPUCM4b4IsCYjd51Ff +jtuf9CDz+X8fnOyYFdb5l6PLU5m89NZsqtlbr26TqTsgZh8kdSUjFoiFTF5JZMnM +l6lmc0ZAIkACoRu1REIYXSM+TvmnvrNNwLnwqfRMtRHzmB8pS81LScEfWwuIcArG +j435YBT3DjGezWCoUxjbtFFA8hCj2l6azGys/LHNwzZ3OPZNjREdYnXFaCt3e6YH +qUBU5ltLtEuINFxqAFczeR2smzuYZ7vNKGjE1cQmrTRMGIAZJXUNJgrDsVgrUVj4 +9jTA+nVSNIqpoHeDZmjFTqrWyEll5y1owATi9r6R7CxhmA/UBx3ZQTDvzSnpIVRj +fD/mheNF7OO27p3TS1pyq1gMzyr3IK8lEkNPf1gKUXyffVSbvnqZ45YadGUOlL4e +PUG0AzH7zr3K71hstnkxkeg5q76214w2CBAkmGHXBR4ZiIMZbVkWhgvxkGuwK43K +k4tDdOMc3Wy0wPp2sPig+GQY0vC0V/A8ODcFwb5o4deb/THkTLqDIR9PglbM/Y4t +z25f4LgViXSg//A05MRgNqUVeJtui2oSnLtVBVmkpjzxgjaNH/kb6ynqUU9k/7pG +WQ4wRf4eUXQq5BG5lDYaw9xtzcjmAsdjcKDr1vtKTebq3NSIpJk= +=yhgR +-END PGP SIGNATURE- Added: dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.sha512 == --- dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.sha512 (added) +++ dev/incubator/nuttx/11.0.0-RC1/apache-nuttx-apps-11.0.0-incubating.tar.gz.sha512 Tue Sep 6 07:19:05 2022 @@ -0,0 +1 @@ +a52d1a36823b7f8e70ed0072300cd83e001b39c8cb70f4e5e53eaddc290062ccad2af9e26eda507f28745d1b610694acae2515ecbc720536447993d3dec61edd apache-nuttx-ap
[GitHub] [incubator-nuttx] anchao opened a new pull request, #7012: net/mld/route: fix build warning
anchao opened a new pull request, #7012: URL: https://github.com/apache/incubator-nuttx/pull/7012 ## Summary net/mld/route: fix build warning ``` In file included from route/net_del_ramroute.c:30: route/net_del_ramroute.c: In function ‘net_match_ipv4’: route/net_del_ramroute.c:93:9: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] 93 | ninfo(" target=%08lx netmask=%08lx\n", | ^~~~ route/net_del_ramroute.c:93:23: note: format string is defined here 93 | ninfo(" target=%08lx netmask=%08lx\n", | ^ | | | long unsigned int | %08x mld/mld_timer.c: In function ‘mld_gendog_work’: mld/mld_timer.c:118:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 118 | ifindex = (int)arg; | ^ mld/mld_timer.c: In function ‘mld_v1dog_work’: mld/mld_timer.c:237:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 237 | ifindex = (int)arg; | ^ ``` Signed-off-by: chao an ## Impact N/A ## Testing enable CONFIG_NET_ROUTE/CONFIG_NET_MLD -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] anchao commented on a diff in pull request #1307: netutils/dhcpc:Make DHCP xid random
anchao commented on code in PR #1307: URL: https://github.com/apache/incubator-nuttx-apps/pull/1307#discussion_r963438859 ## netutils/dhcpc/dhcpc.c: ## @@ -145,7 +147,7 @@ struct dhcpc_state_s * Private Data / -static const uint8_t xid[4] = Review Comment: how about move the global array to corresponding function to save the rodata? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1237863138 @masayuki2009 spresense:wifi_smp should work with latest patchset now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] fjpanag commented on pull request #6956: net/tcp: use independent work to free the conn instance
fjpanag commented on PR #6956: URL: https://github.com/apache/incubator-nuttx/pull/6956#issuecomment-1237868322 @anchao This is exactly the tests I did, last week. According to these tests: * When the fall-back is used, the assertion does NOT fire. * When the assertion fires, the fall-back was NOT used. I starting re-testing it again, yesterday. I can confirm again point 1. I couldn't manage to cause the assertion to fail to confirm number 2, but I did so last week. I will continue testing this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] XinStellaris commented on a diff in pull request #1307: netutils/dhcpc:Make DHCP xid random
XinStellaris commented on code in PR #1307: URL: https://github.com/apache/incubator-nuttx-apps/pull/1307#discussion_r963481746 ## netutils/dhcpc/dhcpc.c: ## @@ -145,7 +147,7 @@ struct dhcpc_state_s * Private Data / -static const uint8_t xid[4] = Review Comment: Sure -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6949: usrsock:refine usrsock's architecture
masayuki2009 commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1237906478 > @masayuki2009 spresense:wifi_smp should work with latest patchset now. @ethanlcz Can you rebase this PR to the latest master? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7012: net/mld/route: fix build warning
xiaoxiang781216 merged PR #7012: URL: https://github.com/apache/incubator-nuttx/pull/7012 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: net/mld/route: fix build warning
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new 0978dcf88d net/mld/route: fix build warning 0978dcf88d is described below commit 0978dcf88d9f3ea63ddda6af90ef2a00c4b6898a Author: chao an AuthorDate: Tue Sep 6 16:29:42 2022 +0800 net/mld/route: fix build warning In file included from route/net_del_ramroute.c:30: route/net_del_ramroute.c: In function ‘net_match_ipv4’: route/net_del_ramroute.c:93:9: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] 93 | ninfo(" target=%08lx netmask=%08lx\n", | ^~~~ route/net_del_ramroute.c:93:23: note: format string is defined here 93 | ninfo(" target=%08lx netmask=%08lx\n", | ^ | | | long unsigned int | %08x mld/mld_timer.c: In function ‘mld_gendog_work’: mld/mld_timer.c:118:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 118 | ifindex = (int)arg; | ^ mld/mld_timer.c: In function ‘mld_v1dog_work’: mld/mld_timer.c:237:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 237 | ifindex = (int)arg; | ^ Signed-off-by: chao an --- net/mld/mld_timer.c | 4 ++-- net/route/net_del_ramroute.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mld/mld_timer.c b/net/mld/mld_timer.c index da8f830010..9b98165ffa 100644 --- a/net/mld/mld_timer.c +++ b/net/mld/mld_timer.c @@ -115,7 +115,7 @@ static void mld_gendog_work(FAR void *arg) * index. */ - ifindex = (int)arg; + ifindex = (intptr_t)arg; DEBUGASSERT(ifindex > 0); net_lock(); @@ -234,7 +234,7 @@ static void mld_v1dog_work(FAR void *arg) * index. */ - ifindex = (int)arg; + ifindex = (intptr_t)arg; DEBUGASSERT(ifindex > 0); net_lock(); diff --git a/net/route/net_del_ramroute.c b/net/route/net_del_ramroute.c index f50fcf882c..a6b334f879 100644 --- a/net/route/net_del_ramroute.c +++ b/net/route/net_del_ramroute.c @@ -90,7 +90,7 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg) net_ipv4_dumproute("Comparing", route); ninfo("With:\n"); - ninfo(" target=%08lx netmask=%08lx\n", + ninfo(" target=%08" PRIu32 " netmask=%08" PRIu32 "\n", HTONL(match->target), HTONL(match->netmask)); if (net_ipv4addr_maskcmp(route->target, match->target, match->netmask) &&
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1237988706 > ### 4 workflows awaiting approval it's done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6949: usrsock:refine usrsock's architecture
masayuki2009 commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238008606 @ethanlcz Please fix the style check. ``` Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/net/usrsock/usrsock_devif.c:575:1: error: Missing blank line after comment ``` Also, please fix the assertion when running usrsocktest with sim:usrsocktes ``` nsh> usrsocktest Starting unit-tests... Testing group "char_dev" => Group "char_dev": [OK] Testing group "no_daemon" => Group "no_daemon": [OK] Testing group "basic_daemon" => Group "basic_daemon": [OK] Testing group "basic_connect" => Group "basic_connect": [OK] Testing group "basic_connect_delay" => Group "basic_connect_delay": [OK] Testing group "no_block_connect" => Group "no_block_connect": [OK] Testing group "basic_send" => Group "basic_send": [OK] Testing group "no_block_send" => Group "no_block_send": [OK] Testing group "block_send" => Group "block_send": [OK] Testing group "no_block_recv" => Group "no_block_recv": [OK] Testing group "block_recv" => Group "block_recv": [OK] Testing group "remote_disconnect" => Group "remote_disconnect": [OK] Testing group "basic_setsockopt" => up_assert: Assertion failed at file:usrsock/usrsock_dev.c line: 577 task: usrsocktest ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1309: netutils/dhcp: fix build warning/break of dhcp6c
xiaoxiang781216 merged PR #1309: URL: https://github.com/apache/incubator-nuttx-apps/pull/1309 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx-apps] branch master updated: netutils/dhcp: fix build warning/break of dhcp6c
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new e031a8288 netutils/dhcp: fix build warning/break of dhcp6c e031a8288 is described below commit e031a8288293283da5082ea46c7bda5bee46552d Author: chao an AuthorDate: Tue Sep 6 12:22:46 2022 +0800 netutils/dhcp: fix build warning/break of dhcp6c dhcp6c.c:222:3: error: unknown type name ‘pthread_t’ 222 | pthread_t thread; | ^ dhcp6c.c: In function ‘dhcp6c_get_result’: dhcp6c.c:415:7: warning: implicit declaration of function ‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration] 415 | netlib_prefix2ipv6netmask(presult->pl, &presult->netmask); | ^ dhcp6c.c: In function ‘dhcp6c_parse_ia’: dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable] 1046 | FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle; | ^~~ dhcp6c.c: In function ‘dhcp6c_precise_open’: dhcp6c.c:1702:3: warning: missing braces around initializer [-Wmissing-braces] 1702 | { | ^ .. 1706 | {0}, | - | {{0}} dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this function); did you mean ‘SO_BINDTODEVICE’? 1796 | setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname, | ^~~~ | SO_BINDTODEVICE dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for each function it appears in dhcp6c.c: In function ‘dhcp6c_request_async’: dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration] 1886 | ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c); | ^~ | timer_create Signed-off-by: chao an --- netutils/dhcp6c/dhcp6c.c | 20 +--- netutils/dhcpd/dhcpd.c | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/netutils/dhcp6c/dhcp6c.c b/netutils/dhcp6c/dhcp6c.c index cbfe56042..c52ab1b89 100644 --- a/netutils/dhcp6c/dhcp6c.c +++ b/netutils/dhcp6c/dhcp6c.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ #include #include +#include "netutils/netlib.h" #include "netutils/dhcp6c.h" / @@ -1043,7 +1045,6 @@ static int dhcp6c_commit_advert(FAR void *handle, uint32_t elapsed) static time_t dhcp6c_parse_ia(FAR void *handle, FAR void *opt, FAR void *end) { - FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle; uint32_t timeout = UINT32_MAX; uint16_t otype; uint16_t olen; @@ -1686,6 +1687,7 @@ static FAR void *dhcp6c_precise_open(FAR const char *ifname, uint16_t opt[], int cnt) { FAR struct dhcp6c_state_s *pdhcp6c; + struct sockaddr_in6 client_addr; struct ifreq ifr; size_t client_id_len; int val = 1; @@ -1698,15 +1700,6 @@ static FAR void *dhcp6c_precise_open(FAR const char *ifname, htons(DHCPV6_OPT_SIP_SERVER_D) }; - struct sockaddr_in6 client_addr = - { -AF_INET6, -htons(DHCPV6_CLIENT_PORT), -0, -{0}, -0 - }; - pdhcp6c = malloc(sizeof(struct dhcp6c_state_s)); if (pdhcp6c == NULL) { @@ -1793,8 +1786,13 @@ static FAR void *dhcp6c_precise_open(FAR const char *ifname, setsockopt(pdhcp6c->sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val)); setsockopt(pdhcp6c->sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); - setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname, + setsockopt(pdhcp6c->sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); + + memset(&client_addr, 0, sizeof(client_addr)); + client_addr.sin6_family = AF_INET6; + client_addr.sin6_port = htons(DHCPV6_CLIENT_PORT); + if (bind(pdhcp6c->sockfd, (struct sockaddr *)&client_addr, sizeof(client_addr)) != 0) { diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c index d5eb45569..667e8290f 100644 --- a/netutils/dhcpd/dhcpd.c +++ b/netutils/dhcpd/dhcpd.c @@ -874,7 +874,7 @@ static inline int dhcpd_socket(FAR const char *interface) if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, interface, strlen(interface)) < 0) { - ninfo("ERROR: setsockopt UDP_BINDTODEVICE failed: %d\n", errno); + ninfo("ERROR: setsockopt SO_BINDTODEVICE failed: %d\n", errno); close(sockfd); return ERROR; }
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1307: netutils/dhcpc:Make DHCP xid random
xiaoxiang781216 merged PR #1307: URL: https://github.com/apache/incubator-nuttx-apps/pull/1307 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx-apps] branch master updated: netutils/dhcpc:Make DHCP xid random
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new 37b77a78f netutils/dhcpc:Make DHCP xid random 37b77a78f is described below commit 37b77a78fafa3de94bc47e55b2f22ad21a522d3b Author: 田昕 AuthorDate: Mon Sep 5 22:18:20 2022 +0800 netutils/dhcpc:Make DHCP xid random Signed-off-by: 田昕 --- netutils/dhcpc/dhcpc.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index 5502f897c..207448ecd 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -131,6 +132,7 @@ struct dhcpc_state_s { FAR const char*interface; intsockfd; + uint8_txid[4]; struct in_addr ipaddr; struct in_addr serverid; struct dhcp_msgpacket; @@ -145,11 +147,6 @@ struct dhcpc_state_s * Private Data / -static const uint8_t xid[4] = -{ - 0xad, 0xde, 0x12, 0x23 -}; - static const uint8_t magic_cookie[4] = { 99, 130, 83, 99 @@ -234,7 +231,7 @@ static int dhcpc_sendmsg(FAR struct dhcpc_state_s *pdhcpc, pdhcpc->packet.op= DHCP_REQUEST; pdhcpc->packet.htype = DHCP_HTYPE_ETHERNET; pdhcpc->packet.hlen = pdhcpc->maclen; - memcpy(pdhcpc->packet.xid, xid, 4); + memcpy(pdhcpc->packet.xid, pdhcpc->xid, 4); memcpy(pdhcpc->packet.chaddr, pdhcpc->macaddr, pdhcpc->maclen); memset(&pdhcpc->packet.chaddr[pdhcpc->maclen], 0, 16 - pdhcpc->maclen); memcpy(pdhcpc->packet.options, magic_cookie, sizeof(magic_cookie)); @@ -435,7 +432,7 @@ static uint8_t dhcpc_parsemsg(FAR struct dhcpc_state_s *pdhcpc, int buflen, FAR struct dhcpc_state *presult) { if (buflen >= 44 && pdhcpc->packet.op == DHCP_REPLY && - memcmp(pdhcpc->packet.xid, xid, sizeof(xid)) == 0 && + memcmp(pdhcpc->packet.xid, pdhcpc->xid, 4) == 0 && memcmp(pdhcpc->packet.chaddr, pdhcpc->macaddr, pdhcpc->maclen) == 0) { @@ -506,6 +503,10 @@ FAR void *dhcpc_open(FAR const char *interface, FAR const void *macaddr, struct sockaddr_in addr; struct timeval tv; int ret; + const uint8_t default_xid[4] = + { +0xad, 0xde, 0x12, 0x23 + }; ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", ((uint8_t *)macaddr)[0], ((uint8_t *)macaddr)[1], @@ -517,6 +518,21 @@ FAR void *dhcpc_open(FAR const char *interface, FAR const void *macaddr, pdhcpc = malloc(sizeof(struct dhcpc_state_s) + maclen - 1); if (pdhcpc) { + /* RFC2131: A DHCP client MUST choose 'xid's in such a + * way as to minimize the chance of using an 'xid' identical to one + * used by another client. + */ + + ret = getrandom(pdhcpc->xid, 4, 0); + if (ret != 4) +{ + ret = getrandom(pdhcpc->xid, 4, GRND_RANDOM); + if (ret != 4) +{ + memcpy(pdhcpc->xid, default_xid, 4); +} +} + /* Initialize the allocated structure */ memset(pdhcpc, 0, sizeof(struct dhcpc_state_s)); @@ -665,6 +681,13 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) int retries; int state; + /* RFC2131: For example, a client may choose a different, + * random initial 'xid' each time the client is rebooted, and + * subsequently use sequential 'xid's until the next reboot. + */ + + pdhcpc->xid[3]++; + /* Save the currently assigned IP address (should be INADDR_ANY) */ oldaddr.s_addr = 0;
[GitHub] [incubator-nuttx] eenurkka opened a new pull request, #7013: risc-v/mpfs: usb: provide more endpoints
eenurkka opened a new pull request, #7013: URL: https://github.com/apache/incubator-nuttx/pull/7013 The underlying hardware supports 9 endpoints: - EP0 - 4x IN EPs - 4x OUT EPs Currently the driver assumes every EP number is unique. This limits the amount of EPs to 1 + 4 = 5. Utilize the EPs in such a manner that all may be used. Also fix a few error handling related bugs. Update the composite driver to match the current situation as well. Signed-off-by: Eero Nurkkala ## Summary More EPs may be used, useful for composite drivers. Also fix a few error-skenario bugs. ## Impact MPFS Polarfire ## Testing USB mass storage and CDCACM -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] anchao commented on a diff in pull request #1308: nshlib/netcmd: add sanity check for netdev
anchao commented on code in PR #1308: URL: https://github.com/apache/incubator-nuttx-apps/pull/1308#discussion_r963626929 ## nshlib/nsh_netcmds.c: ## @@ -392,7 +393,7 @@ static int nsh_foreach_netdev(nsh_netdev_callback_t callback, */ if (entry->d_type == DTYPE_FILE && - strcmp(entry->d_name, "stat") != 0) + netlib_getmacaddr(entry->d_name, mac) >= 0) Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238069005 @masayuki2009 I fixed the patch check error. I tried to run usrsocktest and got the same failure result like belows with or without this patch. But I didn't reproduce the assert (usrsock/usrsock_dev.c line: 577) you found after several tries. I suggest let's fix the failure later with other patches since the failure seems has nothing to do with the current patch. How do you think? NuttShell (NSH) NuttX-10.4.0 nsh> usrsocktest Starting unit-tests... Testing group "char_dev" => Group "char_dev": [OK] Testing group "no_daemon" => Group "no_daemon": [OK] Testing group "basic_daemon" => Group "basic_daemon": [OK] Testing group "basic_connect" => Group "basic_connect": [OK] Testing group "basic_connect_delay" => Group "basic_connect_delay": [OK] Testing group "no_block_connect" => Group "no_block_connect": [OK] Testing group "basic_send" => Group "basic_send": [OK] Testing group "no_block_send" => Group "no_block_send": [OK] Testing group "block_send" => Group "block_send": [OK] Testing group "no_block_recv" => Group "no_block_recv": [OK] Testing group "block_recv" => Group "block_recv": [OK] Testing group "remote_disconnect" => [TEST ASSERT FAILED!] In function "receive": line 497: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed. got value: -1 should be: 0 Group "remote_disconnect": [FAILED] Testing group "basic_setsockopt" => [TEST ASSERT FAILED!] In function "basic_setsockopt_open": line 89: Assertion `(ssize_t)((usrsocktest_daemon_start(dconf))) == (ssize_t)((OK))' failed. got value: -120 should be: 0 Group "basic_setsockopt": [FAILED] Testing group "basic_getsockopt" => [TEST ASSERT FAILED!] In function "basic_getsockopt_open": line 89: Assertion `(ssize_t)((usrsocktest_daemon_start(dconf))) == (ssize_t)((OK))' failed. got value: -120 should be: 0 Group "basic_getsockopt": [FAILED] Testing group "basic_getsockname" => [TEST ASSERT FAILED!] In function "basic_getsockname_open": line 94: Assertion `(ssize_t)((usrsocktest_daemon_start(dconf))) == (ssize_t)((OK))' failed. got value: -120 should be: 0 Group "basic_getsockname": [FAILED] Testing group "wake_with_signal" => [TEST ASSERT FAILED!] In function "do_wake_test": line 516: Assertion `(ssize_t)((usrsocktest_daemon_start(&usrsocktest_daemon_config))) == (ssize_t)((OK))' failed. got value: -120 should be: 0 Group "wake_with_signal": [FAILED] Testing group "multithread" => [TEST ASSERT FAILED!] In function "usrsocktest_test_multithread_open_close": line 209: Assertion `(ssize_t)((usrsocktest_daemon_start(&usrsocktest_daemon_config))) == (ssize_t)((OK))' failed. got value: -120 should be: 0 Group "multithread": [FAILED] Unit-test groups done... OK:11, FAILED:6, TOTAL:17 -- number of checks made: 1945 HEAP BEFORE TESTS: total used freelargest Mem: 67108368 283088 66825280 66825216 HEAP AFTER TESTS: total used freelargest Mem: 67108368 420816 66687552 66687488 nsh> quit nsh: quit: command not found nsh> [1]3100589 killed sudo ./nuttx -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238070932 basic_setsockopt test follows after remote_disconnect, since remote_disconnect fails, so I didn't reproduce the assert you met. Let me disable remote_disconnect and try again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238075360 basic_setsockopt test passed after remote_disconnect disabled. Still other failure exist. NuttShell (NSH) NuttX-10.4.0 nsh> usrsocketst nsh: usrsocketst: command not found nsh> usrsocktest Starting unit-tests... Testing group "char_dev" => Group "char_dev": [OK] Testing group "no_daemon" => Group "no_daemon": [OK] Testing group "basic_daemon" => Group "basic_daemon": [OK] Testing group "basic_connect" => Group "basic_connect": [OK] Testing group "basic_connect_delay" => Group "basic_connect_delay": [OK] Testing group "no_block_connect" => Group "no_block_connect": [OK] Testing group "basic_send" => Group "basic_send": [OK] Testing group "no_block_send" => Group "no_block_send": [OK] Testing group "block_send" => Group "block_send": [OK] Testing group "no_block_recv" => Group "no_block_recv": [OK] Testing group "block_recv" => Group "block_recv": [OK] Testing group "basic_setsockopt" => Group "basic_setsockopt": [OK] Testing group "basic_getsockopt" => Group "basic_getsockopt": [OK] Testing group "basic_getsockname" => Group "basic_getsockname": [OK] Testing group "wake_with_signal" => [TEST ASSERT FAILED!] In function "do_usrsock_blocking_connect_thread": line 238: Assertion `(ssize_t)((*__errno())) == (ssize_t)((test_abort ? 113 : 4))' failed. got value: 115 should be: 113 [TEST ASSERT FAILED!] In function "do_usrsock_blocking_connect_thread": line 238: Assertion `(ssize_t)((*__errno())) == (ssize_t)((test_abort ? 113 : 4))' failed. got value: 115 should be: 113 [TEST ASSERT FAILED!] In function "do_usrsock_blocking_connect_thread": line 238: Assertion `(ssize_t)((*__errno())) == (ssize_t)((test_abort ? 113 : 4))' failed. got value: 115 should be: 113 [TEST ASSERT FAILED!] In function "do_wake_test": line 600: Assertion `(bool)((usrsocktest_test_failed)) == (bool)(false)' failed. got value: 1 should be: 0 Group "wake_with_signal": [FAILED] Testing group "multithread" => Group "multithread": [OK] Unit-test groups done... OK:15, FAILED:1, TOTAL:16 -- number of checks made: 2381 HEAP BEFORE TESTS: total used freelargest Mem: 67108368 283088 66825280 66825216 HEAP AFTER TESTS: total used freelargest Mem: 67108368 623408 66484960 66483360 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao opened a new pull request, #7014: net/netdev: correct return value of SIOCGIFFLAGS
anchao opened a new pull request, #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014 ## Summary net/netdev: correct return value of SIOCGIFFLAGS Signed-off-by: chao an ## Impact N/A ## Testing netlib_getifstatus() -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] greg5678 commented on issue #6938: Nuttx not installing correctly on the Particle Photon.
greg5678 commented on issue #6938: URL: https://github.com/apache/incubator-nuttx/issues/6938#issuecomment-1238099922 Any idea what might be the issue? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] GUIDINGLI opened a new pull request, #1310: ostest: fix sighand_test report error
GUIDINGLI opened a new pull request, #1310: URL: https://github.com/apache/incubator-nuttx-apps/pull/1310 ## Summary ostest: fix sighand_test report error sighand_test: ERROR waiter task did not exit reason: sleep will be interrupt by signal Signed-off-by: ligd ## Impact ostest ## Testing sim:smp -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS
anchao commented on PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#issuecomment-1238138609 > LGTM, but now this makes me wonder: Almost all of the other cases are returning `-EINVAL` rather than `-ENODEV` when `dev` is NULL. Is that correct? @hartmannathan This is incorrect, I will prepare a new PR to fix this issue -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #7015: sim: fix signal crash in SMP mode
GUIDINGLI opened a new pull request, #7015: URL: https://github.com/apache/incubator-nuttx/pull/7015 ## Summary sim: fix signal crash in SMP mode reproduce: sim:smp ostest reason: shouldn't do sim_sigdeliver() in irq handler Signed-off-by: ligd ## Impact sim smp ## Testing sim:smp -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #7015: sim: fix signal crash in SMP mode
GUIDINGLI commented on PR #7015: URL: https://github.com/apache/incubator-nuttx/pull/7015#issuecomment-1238143418 @masayuki2009 Could you help to review this ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] zyfeier commented on a diff in pull request #6987: nuttx/sched: semaphore and mqueue task list optimize
zyfeier commented on code in PR #6987: URL: https://github.com/apache/incubator-nuttx/pull/6987#discussion_r963705703 ## sched/Kconfig: ## @@ -1826,3 +1826,10 @@ config SCHED_BACKTRACE using the information automatically generated by the compiler or architecture specific approach when ARCH_HAVE_BACKTRACE is selected + +config TASK_LIST_OPTIMIZE + bool "Enable task list optimize" + default n + ---help--- + Set to enable task lists optimize. Review Comment: I add more information for this feature, plz check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao opened a new pull request, #7016: net/netdev/ioctl: correct the argument length of ioctl MII/PHY
anchao opened a new pull request, #7016: URL: https://github.com/apache/incubator-nuttx/pull/7016 ## Summary net/netdev/ioctl: correct the argument length of ioctl MII/PHY Signed-off-by: chao an ## Impact N/A ## Testing -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] zyfeier commented on a diff in pull request #6987: nuttx/sched: semaphore and mqueue task list optimize
zyfeier commented on code in PR #6987: URL: https://github.com/apache/incubator-nuttx/pull/6987#discussion_r963716384 ## sched/semaphore/sem_post.c: ## @@ -139,38 +139,32 @@ int nxsem_post(FAR sem_t *sem) * that we want. */ +#ifndef CONFIG_TASK_LIST_OPTIMIZE for (stcb = (FAR struct tcb_s *)g_waitingforsemaphore.head; (stcb && stcb->waitsem != sem); stcb = stcb->flink); +#else + /* When enable task list optimize, remove TCB in semaphore waiting + * list before set waitsem to null. + */ - if (stcb != NULL) -{ - /* The task will be the new holder of the semaphore when - * it is awakened. - */ - - nxsem_add_holder_tcb(stcb, sem); + stcb = (FAR struct tcb_s *)dq_remfirst(SEM_WAIT_TLIST(sem)); +#endif + DEBUGASSERT(stcb != NULL); - /* Stop the watchdog timer */ + nxsem_add_holder_tcb(stcb, sem); - wd_cancel(&stcb->waitdog); + /* Stop the watchdog timer */ - /* It is, let the task take the semaphore */ + wd_cancel(&stcb->waitdog); - stcb->waitsem = NULL; + /* It is, let the task take the semaphore */ - /* Restart the waiting task. */ + stcb->waitsem = NULL; - up_unblock_task(stcb); -} -#if 0 /* REVISIT: This can fire on IOB throttle semaphore */ - else -{ - /* This should not happen. */ + /* Restart the waiting task. */ - DEBUGPANIC(); -} -#endif Review Comment: Yes, this is not a modification for this feature, i'll change back. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #6833: SMP: fix crash when switch to new task which is still running
GUIDINGLI commented on PR #6833: URL: https://github.com/apache/incubator-nuttx/pull/6833#issuecomment-1238169380 This should be test base on: https://github.com/apache/incubator-nuttx/pull/7015 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #6833: SMP: fix crash when switch to new task which is still running
GUIDINGLI commented on PR #6833: URL: https://github.com/apache/incubator-nuttx/pull/6833#issuecomment-1238170478 @masayuki2009 please help to review -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] slorquet opened a new pull request, #7017: Stm32h7 kconfig
slorquet opened a new pull request, #7017: URL: https://github.com/apache/incubator-nuttx/pull/7017 ## Summary * stm32h7 Kconfig menu imbrication was broken, preventing spi peripheral selection * stm32h7 spi does not need to depend on EXPERIMENTAL ## Impact * none ## Testing * tested in my own working copy, I can now select SPI peripherals, it was impossible to do before that fix. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #7018: wqueue: change single queue to double queue to improve speed
GUIDINGLI opened a new pull request, #7018: URL: https://github.com/apache/incubator-nuttx/pull/7018 ## Summary wqueue: change single queue to double queue to improve speed wqueue: fix work_qcancel() judge error caused by the union in struct work_s in struct work_s: union { struct { struct sq_entry_s sq; /* Implements a single linked list */ clock_t qtime;/* Time work queued */ } s; struct wdog_s timer;/* Delay expiry timer */ } while we use WDOG_ISACTIVE(&work->timer) to decide use sq or timer, that is error, wd_cancel() maybe modify this area, sq_rem() also can modify this area. So we can't use the WDOG_ISACTIVE(&work->timer) to take as the judgement, when there is a union. Fix: remove the union ## Impact wqueue ## Testing vela -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #7019: sched: fix corner case wd_cancel assert crash
GUIDINGLI opened a new pull request, #7019: URL: https://github.com/apache/incubator-nuttx/pull/7019 ## Summary sched: fix corner case wd_cancel assert crash There one ways can caused this: mq_timedreceive TIMER IRQ do wd_timer -> wd_func1 mq_send -> wd_func2 nxmq_rcvtimeout -> crash Resolve: Stop the watchdog when mq_send Signed-off-by: ligd This is amend of: https://github.com/apache/incubator-nuttx/pull/5540 ## Impact mq signal ## Testing VELA -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao opened a new pull request, #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao opened a new pull request, #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020 ## Summary net/netdev: simplify handling of netdev ifr ioctl() 1. call netdev_ifr_dev() only once 2. unify error code of ENODEV Signed-off-by: chao an ## Impact N/A ## Testing netdev_ifr_ioctl -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao commented on PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#issuecomment-1238245302 @hartmannathan https://github.com/apache/incubator-nuttx/pull/7014#pullrequestreview-1097567649 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao merged pull request #6978: net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl
anchao merged PR #6978: URL: https://github.com/apache/incubator-nuttx/pull/6978 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl
This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new e0bb281e7a net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl e0bb281e7a is described below commit e0bb281e7afbc17ce5bf142b1760540ce41c004c Author: Xiang Xiao AuthorDate: Wed Aug 31 02:18:33 2022 +0800 net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl Signed-off-by: Xiang Xiao --- include/nuttx/net/net.h | 21 +++-- include/nuttx/net/netdev.h | 17 - net/icmp/icmp.h | 4 +--- net/icmp/icmp_ioctl.c | 4 +--- net/icmpv6/icmpv6.h | 4 +--- net/icmpv6/icmpv6_ioctl.c | 4 +--- net/inet/inet_sockif.c | 12 +--- net/local/local_sockif.c| 8 +++- net/netdev/netdev_ioctl.c | 10 +- net/rpmsg/rpmsg_sockif.c| 24 ++-- net/tcp/tcp.h | 4 +--- net/tcp/tcp_ioctl.c | 3 +-- net/udp/udp.h | 4 +--- net/udp/udp_ioctl.c | 4 +--- net/usrsock/usrsock.h | 4 +--- net/usrsock/usrsock_ioctl.c | 18 -- 16 files changed, 55 insertions(+), 90 deletions(-) diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index 4f0bc45c18..47dde9ebf3 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -196,8 +196,8 @@ struct sock_intf_s CODE ssize_t(*si_recvmsg)(FAR struct socket *psock, FAR struct msghdr *msg, int flags); CODE int(*si_close)(FAR struct socket *psock); - CODE int(*si_ioctl)(FAR struct socket *psock, int cmd, -FAR void *arg, size_t arglen); + CODE int(*si_ioctl)(FAR struct socket *psock, +int cmd, unsigned long arg); CODE int(*si_socketpair)(FAR struct socket *psocks[2]); #ifdef CONFIG_NET_SENDFILE CODE ssize_t(*si_sendfile)(FAR struct socket *psock, @@ -314,6 +314,23 @@ extern "C" void net_initialize(void); +/ + * Name: net_ioctl_arglen + * + * Description: + * Calculate the ioctl argument buffer length. + * + * Input Parameters: + * + * cmd The ioctl command + * + * Returned Value: + * The argument buffer length, or error code. + * + / + +ssize_t net_ioctl_arglen(int cmd); + / * Critical section management. * diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index 98b57edf97..5b10a13a5b 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -621,23 +621,6 @@ int netdev_ifdown(FAR struct net_driver_s *dev); int netdev_carrier_on(FAR struct net_driver_s *dev); int netdev_carrier_off(FAR struct net_driver_s *dev); -/ - * Name: net_ioctl_arglen - * - * Description: - * Calculate the ioctl argument buffer length. - * - * Input Parameters: - * - * cmd The ioctl command - * - * Returned Value: - * The argument buffer length, or error code. - * - / - -ssize_t net_ioctl_arglen(int cmd); - / * Name: net_chksum * diff --git a/net/icmp/icmp.h b/net/icmp/icmp.h index 6015804abb..4580334ea7 100644 --- a/net/icmp/icmp.h +++ b/net/icmp/icmp.h @@ -390,13 +390,11 @@ void icmp_reply(FAR struct net_driver_s *dev, int type, int code); * conn The ICMP connection of interest * cmd The ioctl command * arg The argument of the ioctl cmd - * arglen The length of 'arg' * / #ifdef CONFIG_NET_ICMP_SOCKET -int icmp_ioctl(FAR struct socket *psock, - int cmd, FAR void *arg, size_t arglen); +int icmp_ioctl(FAR struct socket *psock, int cmd, unsigned long arg); #endif #undef EXTERN diff --git a/net/icmp/icmp_ioctl.c b/net/icmp/icmp_ioctl.c index dba9be4256..7c38638d63 100644 --- a/net/icmp/icmp_ioctl.c +++ b/net/icmp/icmp_ioctl.c @@ -51,12 +51,10 @@ * conn The ICMP connection of interest * cmd The ioctl command * arg The argument of the ioctl cmd - * arglen The length of 'arg' * / -int icmp_ioctl(FAR struct socket *psock, - int cmd, FAR void *arg, size_t arglen) +int icmp_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) { FAR struct icmp_conn_s *conn = psock->s_conn; int ret = OK; diff --git a/net/icmp
[incubator-nuttx-apps] branch master updated: nshlib/netcmd: add sanity check for netdev
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new e6e466113 nshlib/netcmd: add sanity check for netdev e6e466113 is described below commit e6e46611315eefc220c4db851b7ccb10cc8e7aaf Author: chao an AuthorDate: Mon Sep 5 22:25:19 2022 +0800 nshlib/netcmd: add sanity check for netdev Signed-off-by: chao an --- nshlib/nsh_netcmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index d9e0754c9..8443d4ff7 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -368,6 +368,7 @@ static int nsh_foreach_netdev(nsh_netdev_callback_t callback, FAR char *cmd) { FAR struct dirent *entry; + uint8_t flags; FAR DIR *dir; int ret = OK; @@ -392,7 +393,7 @@ static int nsh_foreach_netdev(nsh_netdev_callback_t callback, */ if (entry->d_type == DTYPE_FILE && - strcmp(entry->d_name, "stat") != 0) + netlib_getifstatus(entry->d_name, &flags) >= 0) { /* Performt he callback. It returns any non-zero value, then * terminate the search.
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1308: nshlib/netcmd: add sanity check for netdev
xiaoxiang781216 merged PR #1308: URL: https://github.com/apache/incubator-nuttx-apps/pull/1308 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7013: risc-v/mpfs: usb: provide more endpoints
xiaoxiang781216 merged PR #7013: URL: https://github.com/apache/incubator-nuttx/pull/7013 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated (e0bb281e7a -> 4df8b16060)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git from e0bb281e7a net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl add 4df8b16060 risc-v/mpfs: usb: provide more endpoints No new revisions were added by this update. Summary of changes: arch/risc-v/src/mpfs/hardware/mpfs_usb.h | 2 +- arch/risc-v/src/mpfs/mpfs_usb.c| 119 - boards/risc-v/mpfs/common/src/mpfs_composite.c | 4 +- 3 files changed, 101 insertions(+), 24 deletions(-)
[GitHub] [incubator-nuttx] anchao merged pull request #6976: fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path
anchao merged PR #6976: URL: https://github.com/apache/incubator-nuttx/pull/6976 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path
This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new 9726be616a fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path 9726be616a is described below commit 9726be616a599add796cb8225996e12385542a94 Author: Xiang Xiao AuthorDate: Tue Aug 30 13:46:46 2022 +0800 fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path Signed-off-by: Xiang Xiao --- drivers/serial/pty.c | 9 +--- fs/vfs/fs_ioctl.c | 55 +++ net/netdev/netdev_ioctl.c | 4 +--- 3 files changed, 29 insertions(+), 39 deletions(-) diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index 63edccfb75..1634be6063 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -757,16 +757,9 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case FIONBIO: { ret = file_ioctl(&dev->pd_src, cmd, arg); - if (ret >= 0 || ret == -ENOTTY) -{ - ret = file_ioctl(&dev->pd_sink, cmd, arg); -} - - /* Let the default handler set O_NONBLOCK flags for us. */ - if (ret >= 0) { - ret = -ENOTTY; + ret = file_ioctl(&dev->pd_sink, cmd, arg); } } break; diff --git a/fs/vfs/fs_ioctl.c b/fs/vfs/fs_ioctl.c index 0d2baa16d2..7bb83f2675 100644 --- a/fs/vfs/fs_ioctl.c +++ b/fs/vfs/fs_ioctl.c @@ -67,45 +67,43 @@ int file_vioctl(FAR struct file *filep, int req, va_list ap) ret = inode->u.i_ops->ioctl(filep, req, arg); } - /* Check for File system IOCTL commands that can be implemented via - * fcntl() - */ - - if (ret != -ENOTTY) -{ - return ret; -} - switch (req) { case FIONBIO: -{ - FAR int *nonblock = (FAR int *)(uintptr_t)arg; - if (nonblock && *nonblock) -{ - filep->f_oflags |= O_NONBLOCK; -} - else -{ - filep->f_oflags &= ~O_NONBLOCK; -} - - ret = OK; -} +if (ret == OK || ret == -ENOTTY) + { +FAR int *nonblock = (FAR int *)(uintptr_t)arg; +if (nonblock && *nonblock) + { +filep->f_oflags |= O_NONBLOCK; + } +else + { +filep->f_oflags &= ~O_NONBLOCK; + } + +ret = OK; + } break; case FIOCLEX: -filep->f_oflags |= O_CLOEXEC; -ret = OK; +if (ret == OK || ret == -ENOTTY) + { +filep->f_oflags |= O_CLOEXEC; +ret = OK; + } break; case FIONCLEX: -filep->f_oflags &= ~O_CLOEXEC; -ret = OK; +if (ret == OK || ret == -ENOTTY) + { +filep->f_oflags &= ~O_CLOEXEC; +ret = OK; + } break; case FIOC_FILEPATH: -if (!INODE_IS_MOUNTPT(inode)) +if (ret == -ENOTTY && !INODE_IS_MOUNTPT(inode)) { ret = inode_getpath(inode, (FAR char *)(uintptr_t)arg); } @@ -113,7 +111,8 @@ int file_vioctl(FAR struct file *filep, int req, va_list ap) #ifndef CONFIG_DISABLE_MOUNTPOINT case BIOC_BLKSSZGET: -if (inode->u.i_ops != NULL && inode->u.i_ops->ioctl != NULL) +if (ret == -ENOTTY && inode->u.i_ops != NULL && +inode->u.i_ops->ioctl != NULL) { struct geometry geo; ret = inode->u.i_ops->ioctl(filep, BIOC_GEOMETRY, diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index d7642a13bd..39b7e02cb7 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -1516,7 +1516,7 @@ static int netdev_rt_ioctl(FAR struct socket *psock, int cmd, static int netdev_file_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) { - int ret; + int ret = OK; switch (cmd) { @@ -1545,8 +1545,6 @@ static int netdev_file_ioctl(FAR struct socket *psock, int cmd, { conn->s_flags &= ~_SF_NONBLOCK; } - - ret = -ENOTTY; /* let file_vioctl update f_oflags */ } else {
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1310: ostest: fix sighand_test report error
xiaoxiang781216 merged PR #1310: URL: https://github.com/apache/incubator-nuttx-apps/pull/1310 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx-apps] branch master updated: ostest: fix sighand_test report error
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new 048b79955 ostest: fix sighand_test report error 048b79955 is described below commit 048b79955e0e2978c4fe8d1d03fb7f90ef9febcd Author: ligd AuthorDate: Tue Sep 6 21:00:08 2022 +0800 ostest: fix sighand_test report error sighand_test: ERROR waiter task did not exit reason: sleep will be interrupt by signal Signed-off-by: ligd --- testing/ostest/sighand.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/ostest/sighand.c b/testing/ostest/sighand.c index 890ba7dc2..e4a79cd71 100644 --- a/testing/ostest/sighand.c +++ b/testing/ostest/sighand.c @@ -346,7 +346,11 @@ void sighand_test(void) /* Wait a bit */ FFLUSH(); - sleep(2); + status = sleep(2); + while (status) +{ + status = sleep(status); +} /* Then check the result */
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
xiaoxiang781216 commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964006952 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; Review Comment: let's set ret = OK at line 642 and remove this line ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpdev != NULL) { - ioctl_get_ipv4addr(&req->ifr_dstaddr, dev->d_draddr); + strlcpy(req->ifr_name, tmpdev->d_ifname, IFNAMSIZ); ret = OK; Review Comment: remove ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpd
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT
xiaoxiang781216 commented on code in PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#discussion_r964017175 ## net/netdev/netdev_ioctl.c: ## @@ -992,6 +996,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, #endif { nerr("Unsupported link layer\n"); + ret = -ENOSYS; Review Comment: ditto ## net/netdev/netdev_ioctl.c: ## @@ -947,6 +950,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, #endif { nerr("Unsupported link layer\n"); + ret = -ENOSYS; Review Comment: why change the error code to -ENOSYS? ENOSYS mean OS doesn't support the functionality yet, it isn't good to indicate that netdev hasn't hardware address. ## net/netdev/netdev_ioctl.c: ## @@ -905,9 +905,12 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, if (dev) { req->ifr_flags = dev->d_flags; + ret = OK; +} + else +{ + ret = -ENODEV; Review Comment: let's set ret = -ENODEV at line 640 and remove other places which set ret to -ENODEV -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #7011: add chip GD32F450 of GD32MCU
acassis commented on PR #7011: URL: https://github.com/apache/incubator-nuttx/pull/7011#issuecomment-1238507972 Hi @GD32-MCU please check out board config files, they seems outdated. Please run for each board and config: ``` $ ./tools/refresh.sh --silent yourboard:yourconfig ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] curuvar opened a new pull request, #7021: Fix race condition in RaspberryPi Pico W WiFi and add "telnet" config
curuvar opened a new pull request, #7021: URL: https://github.com/apache/incubator-nuttx/pull/7021 ## Summary Added code to resolve a race condition when writing data to the Pico W's WiFi chip. Also added a "telnet" configuration that demonstrates basic networking. ## Impact No impact to other software. ## Testing Built and run on RaspberryPi Pico W. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7016: net/netdev/ioctl: correct the argument length of ioctl MII/PHY
xiaoxiang781216 merged PR #7016: URL: https://github.com/apache/incubator-nuttx/pull/7016 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated (9726be616a -> 54dba40f87)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git from 9726be616a fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path add 54dba40f87 net/netdev/ioctl: correct the argument length of ioctl MII/PHY No new revisions were added by this update. Summary of changes: net/netdev/netdev_ioctl.c | 20 1 file changed, 12 insertions(+), 8 deletions(-)
[GitHub] [incubator-nuttx] curuvar opened a new issue, #7022: Build / Linux (arm-05) uses old pico-sdk.
curuvar opened a new issue, #7022: URL: https://github.com/apache/incubator-nuttx/issues/7022 There is a new version of pico-sdk that contains firmware needed to use the WiFi chip on the RaspberryPi Pico W. No test build that uses the Pico W's WiFi can succeed until this library is updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan opened a new pull request, #7023: boards/arm/tiva: Add tm4c129e-launchpad
hartmannathan opened a new pull request, #7023: URL: https://github.com/apache/incubator-nuttx/pull/7023 ## Summary Adds board support for the Texas Instruments EK-TM4C129EXL "TM4C Crypto Connected LaunchPad" in the new subdirectory boards/arm/tiva/tm4c129e-launchpad. This board support is based heavily on tm4c1294-launchpad. Provides nsh, ipv6, and ostest configurations. Updates the documentation files Documentation/introduction/detailed_support.rst, Documentation/introduction/supported_platforms.rst, and boards/README.txt. ## Impact New board support. ## Testing Builds and runs on board. Runs ostest successfully. nxstyle -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan commented on a diff in pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT
hartmannathan commented on code in PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#discussion_r964245960 ## net/netdev/netdev_ioctl.c: ## @@ -947,6 +950,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, #endif { nerr("Unsupported link layer\n"); + ret = -ENOSYS; Review Comment: Then should probably be `-ENODEV`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
hartmannathan commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964248968 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ Review Comment: Maybe change comment to: `/* Execute commands that do not need ifr_name or lifr_name */` or something like that? ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpdev != NULL) { - ioctl_get_ipv4addr(&req->ifr_dstaddr, dev->d_draddr); + strlcpy(req->ifr_name, tmpdev->d_ifname, IFNAMSIZ); ret = OK; } + else +{ + ret = -ENODEV; +} } break; #endif - -#ifdef CONFIG_NET_IPv4 - case SIOCSIFDSTADDR: /* Set P-to-P address */ + default: { - dev = netdev_ifr_dev(req); - if (dev) + arglen = net_ioctl_arglen(cmd); + + if (arglen == sizeof(struct ifreq) || + arglen == sizeof(struct lifreq)) { - ioctl_set_ipv4addr(&dev->d_draddr, &req->ifr_dstaddr); - ret = OK; + dev = netdev_ifr_dev(req); + ret = (dev == NULL) ? -ENODEV : OK; +} + else +{ + ret = -ENOTTY; } } break; -#endif +} + if (dev == NULL) +{ + return ret; +} + + /* Execute the command with ifr_name or lifr_name */ Review Comment: If changing comment mentioned above, then I suggest to change this one also, for consistency, for example: `/* Execute commands that need ifr_name or lifr_name */` ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -
[GitHub] [incubator-nuttx] hartmannathan commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
hartmannathan commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964255066 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); Review Comment: Hmm... compiler is complaining tmpdev is unused? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
hartmannathan commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964255606 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); Review Comment: Maybe should declare `tmpdev` inside the block where it is used? This will also avoid future mistakes of wrongfully using `tmpdev` instead of `dev` in other places. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan merged pull request #7017: Stm32h7 kconfig
hartmannathan merged PR #7017: URL: https://github.com/apache/incubator-nuttx/pull/7017 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] 02/02: stm32h7: SPI is no more experimental
This is an automated email from the ASF dual-hosted git repository. hartmannathan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit 179d64d99919dd77b1ae43087d82361344e00126 Author: Sebastien Lorquet AuthorDate: Tue Sep 6 15:39:49 2022 +0200 stm32h7: SPI is no more experimental --- arch/arm/src/stm32h7/Kconfig | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/src/stm32h7/Kconfig b/arch/arm/src/stm32h7/Kconfig index 8854ab0cb8..d22b2f92e0 100644 --- a/arch/arm/src/stm32h7/Kconfig +++ b/arch/arm/src/stm32h7/Kconfig @@ -655,42 +655,39 @@ menu "STM32H7 SPI Selection" config STM32H7_SPI1 bool "SPI1" default n - depends on EXPERIMENTAL select SPI select STM32H7_SPI config STM32H7_SPI2 bool "SPI2" default n - depends on EXPERIMENTAL select SPI select STM32H7_SPI config STM32H7_SPI3 bool "SPI3" default n - depends on EXPERIMENTAL select SPI select STM32H7_SPI config STM32H7_SPI4 bool "SPI4" default n - depends on STM32H7_HAVE_SPI4 && EXPERIMENTAL + depends on STM32H7_HAVE_SPI4 select SPI select STM32H7_SPI config STM32H7_SPI5 bool "SPI5" default n - depends on STM32H7_HAVE_SPI5 && EXPERIMENTAL + depends on STM32H7_HAVE_SPI5 select SPI select STM32H7_SPI config STM32H7_SPI6 bool "SPI6" default n - depends on STM32H7_HAVE_SPI6 && EXPERIMENTAL + depends on STM32H7_HAVE_SPI6 select SPI select STM32H7_SPI
[incubator-nuttx] 01/02: update conditionals to select stm32h7 spi peripherals
This is an automated email from the ASF dual-hosted git repository. hartmannathan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit 3e16b6c9f168bb26d708dfaef420f61b246facf2 Author: Sebastien Lorquet AuthorDate: Tue Sep 6 15:38:41 2022 +0200 update conditionals to select stm32h7 spi peripherals --- arch/arm/src/stm32h7/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32h7/Kconfig b/arch/arm/src/stm32h7/Kconfig index 1e1aa4b98d..8854ab0cb8 100644 --- a/arch/arm/src/stm32h7/Kconfig +++ b/arch/arm/src/stm32h7/Kconfig @@ -694,12 +694,12 @@ config STM32H7_SPI6 select SPI select STM32H7_SPI +endmenu # STM32H7 SPI Selection + config STM32H7_SYSCFG bool "SYSCFG" default y -endmenu # STM32H7 SPI Selection - menu "STM32H7 Timer Selection" config STM32H7_TIM1
[incubator-nuttx] branch master updated (54dba40f87 -> 179d64d999)
This is an automated email from the ASF dual-hosted git repository. hartmannathan pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git from 54dba40f87 net/netdev/ioctl: correct the argument length of ioctl MII/PHY new 3e16b6c9f1 update conditionals to select stm32h7 spi peripherals new 179d64d999 stm32h7: SPI is no more experimental The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: arch/arm/src/stm32h7/Kconfig | 13 + 1 file changed, 5 insertions(+), 8 deletions(-)
[incubator-nuttx-website] branch asf-site updated: Publishing web: 6758fc5efbbf5ed16c807ccdfb012d94d1db201a docs: 179d64d99919dd77b1ae43087d82361344e00126
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-website.git The following commit(s) were added to refs/heads/asf-site by this push: new f4a14db Publishing web: 6758fc5efbbf5ed16c807ccdfb012d94d1db201a docs: 179d64d99919dd77b1ae43087d82361344e00126 f4a14db is described below commit f4a14dbaedfded478da204126c308e66226d42ff Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Sep 7 00:13:36 2022 + Publishing web: 6758fc5efbbf5ed16c807ccdfb012d94d1db201a docs: 179d64d99919dd77b1ae43087d82361344e00126 --- content/docs/10.0.0/index.html | 2 +- content/docs/10.0.1/index.html | 2 +- content/docs/10.1.0/index.html | 2 +- content/docs/10.2.0/index.html | 2 +- content/docs/10.3.0/index.html | 2 +- .../boards/adafruit-feather-rp2040/index.rst.txt| 6 ++ .../arm/rp2040/boards/adafruit-kb2040/index.rst.txt | 6 ++ .../boards/adafruit-qt-py-rp2040/index.rst.txt | 6 ++ .../rp2040/boards/pimoroni-tiny2040/index.rst.txt | 6 ++ .../rp2040/boards/raspberrypi-pico-w/index.rst.txt | 9 - .../rp2040/boards/raspberrypi-pico/index.rst.txt| 6 ++ content/docs/latest/index.html | 2 +- content/docs/latest/objects.inv | Bin 37146 -> 37224 bytes .../boards/adafruit-feather-rp2040/index.html | 7 ++- .../arm/rp2040/boards/adafruit-kb2040/index.html| 7 ++- .../rp2040/boards/adafruit-qt-py-rp2040/index.html | 7 ++- .../arm/rp2040/boards/pimoroni-tiny2040/index.html | 11 --- .../arm/rp2040/boards/raspberrypi-pico-w/index.html | 18 -- .../arm/rp2040/boards/raspberrypi-pico/index.html | 11 --- content/docs/latest/platforms/arm/rp2040/index.html | 4 ++-- content/docs/latest/platforms/index.html| 2 +- content/docs/latest/searchindex.js | 2 +- content/feed.xml| 4 ++-- 23 files changed, 96 insertions(+), 28 deletions(-) diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html index 26c8062..dc54ca0 100644 --- a/content/docs/10.0.0/index.html +++ b/content/docs/10.0.0/index.html @@ -207,7 +207,7 @@ by following these NuttX Documentation¶ NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are Posix and ANSI standards. Additional standard APIs from Unix and other common RTOS’s (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()). -Last Updated: 06 September 22 at 00:12 +Last Updated: 07 September 22 at 00:11 Table of Contents diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html index d71b52b..8202075 100644 --- a/content/docs/10.0.1/index.html +++ b/content/docs/10.0.1/index.html @@ -217,7 +217,7 @@ by following these NuttX Documentation¶ NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are Posix and ANSI standards. Additional standard APIs from Unix and other common RTOS’s (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()). -Last Updated: 06 September 22 at 00:12 +Last Updated: 07 September 22 at 00:11 Table of Contents diff --git a/content/docs/10.1.0/index.html b/content/docs/10.1.0/index.html index ea430ca..32301a5 100644 --- a/content/docs/10.1.0/index.html +++ b/content/docs/10.1.0/index.html @@ -217,7 +217,7 @@ by following these NuttX Documentation¶ NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOS’s (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()). -Last Updated: 06 September 22 at 00:12 +Last Updated: 07 September 22 at 00:11 Table of Contents diff --git a/content/docs/10.2.0/index.html b/content/docs/10.2.0/index.html index 7727629..679a02e 100644 --- a/content/docs/10.2.0/index.html +++ b/content/docs/10.2.0/index.html @@ -218,7 +218,7 @@ by following these NuttX Do
[GitHub] [incubator-nuttx] masayuki2009 merged pull request #7015: sim: fix signal crash in SMP mode
masayuki2009 merged PR #7015: URL: https://github.com/apache/incubator-nuttx/pull/7015 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: sim: fix signal crash in SMP mode
This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new 94cf99f310 sim: fix signal crash in SMP mode 94cf99f310 is described below commit 94cf99f310409f8c86681a0ee7177f2bbfeaa24a Author: ligd AuthorDate: Tue Sep 6 21:05:53 2022 +0800 sim: fix signal crash in SMP mode reproduce: sim:smp ostest reason: shouldn't do sim_sigdeliver() in irq handler Signed-off-by: ligd --- arch/sim/src/sim/up_interruptcontext.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/sim/src/sim/up_interruptcontext.c b/arch/sim/src/sim/up_interruptcontext.c index 78a8d3134d..630941fdb8 100644 --- a/arch/sim/src/sim/up_interruptcontext.c +++ b/arch/sim/src/sim/up_interruptcontext.c @@ -89,10 +89,6 @@ void *up_doirq(int irq, void *context) CURRENT_REGS = NULL; #ifdef CONFIG_SMP - /* Handle signal */ - - sim_sigdeliver(); - /* Then switch contexts */ longjmp(regs, 1);
[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request, #7024: drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c
masayuki2009 opened a new pull request, #7024: URL: https://github.com/apache/incubator-nuttx/pull/7024 ## Summary - I noticed that the latest ifconfig command shows nothing - Finally, I found that gs2200m.c needs to handle SIOCGIFFLAGS - This commit fixes this issue ## Impact - gs2200m only ## Testing - Tested with spresense:wifi - NOTE: gs2200m_main.c will be updated later -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] masayuki2009 opened a new pull request, #1311: wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
masayuki2009 opened a new pull request, #1311: URL: https://github.com/apache/incubator-nuttx-apps/pull/1311 ## Summary - I noticed that the latest ifconfig command shows nothing - Finally, I found that gs2200m_main.c needs to handle SIOCGIFFLAGS - This commit fixes this issue ## Impact - gs2200m only ## Testing - Tested with spresense:wifi - NOTE: gs2200m driver needs to be updated as well -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #7024: drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c
masayuki2009 commented on PR #7024: URL: https://github.com/apache/incubator-nuttx/pull/7024#issuecomment-1238803746 See https://github.com/apache/incubator-nuttx-apps/pull/1311 as well -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] nealef opened a new pull request, #7025: Add check in roundx() functions for infinite or NaN cases
nealef opened a new pull request, #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025 ## Summary The round() functions do not return the correct value for infinite or NaN values. For example, round(NaN) returns 0 instead of NaN. ## Impact Incorrect results for these two conditions. Resolves #6767 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] ethanlcz commented on pull request #6949: usrsock:refine usrsock's architecture
ethanlcz commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238838032 @xiaoxiang781216 @masayuki2009 I forgot to upgrade latest nuttx app and got the failure yesterday. Now it passed usrsocktest with latest nuttx kernel and app. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #7022: Build / Linux (arm-05) uses old pico-sdk.
xiaoxiang781216 commented on issue #7022: URL: https://github.com/apache/incubator-nuttx/issues/7022#issuecomment-1238842269 can you update the download script to point the lasts release? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT
anchao commented on code in PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#discussion_r964329303 ## net/netdev/netdev_ioctl.c: ## @@ -905,9 +905,12 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, if (dev) { req->ifr_flags = dev->d_flags; + ret = OK; +} + else +{ + ret = -ENODEV; Review Comment: Done ## net/netdev/netdev_ioctl.c: ## @@ -992,6 +996,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, #endif { nerr("Unsupported link layer\n"); + ret = -ENOSYS; Review Comment: Done ## net/netdev/netdev_ioctl.c: ## @@ -947,6 +950,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, #endif { nerr("Unsupported link layer\n"); + ret = -ENOSYS; Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7025: Add check in roundx() functions for infinite or NaN cases
xiaoxiang781216 commented on code in PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#discussion_r964329608 ## libs/libc/math/lib_roundl.c: ## @@ -34,6 +34,9 @@ #ifdef CONFIG_HAVE_LONG_DOUBLE long double roundl(long double x) { + if (isinf(x) || isnan(x)) Review Comment: do we need call isinfl/isnanf version? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7025: Add check in roundx() functions for infinite or NaN cases
xiaoxiang781216 commented on PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#issuecomment-1238843703 @nealef please fix the warning here: https://github.com/apache/incubator-nuttx/runs/8219913869?check_suite_focus=true -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] nealef commented on a diff in pull request #7025: Add check in roundx() functions for infinite or NaN cases
nealef commented on code in PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#discussion_r964331468 ## libs/libc/math/lib_roundl.c: ## @@ -34,6 +34,9 @@ #ifdef CONFIG_HAVE_LONG_DOUBLE long double roundl(long double x) { + if (isinf(x) || isnan(x)) Review Comment: There doesn't appear to be one and I am not sure it is required. `isinf()` and `isnan()` are defined in `math.h`: ``` #define INFINITY(1.0/0.0) #define NAN (0.0/0.0) : : #define isnan(x)((x) != (x)) #define isinf(x)(((x) == INFINITY) || ((x) == -INFINITY)) #define isfinite(x) (!(isinf(x) || isnan(x))) ``` It would appear using the same definition as `double` is fine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] nealef commented on pull request #7025: Add check in roundx() functions for infinite or NaN cases
nealef commented on PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#issuecomment-1238846009 I am unsure what the alignment issue is. Is it spaces v tabs? Do I need to set my tabs to a nuttx standard setting? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7025: Add check in roundx() functions for infinite or NaN cases
xiaoxiang781216 commented on code in PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#discussion_r964332497 ## libs/libc/math/lib_roundl.c: ## @@ -34,6 +34,9 @@ #ifdef CONFIG_HAVE_LONG_DOUBLE long double roundl(long double x) { + if (isinf(x) || isnan(x)) Review Comment: should we add a new one like other libc: https://man7.org/linux/man-pages/man3/finite.3.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6983: compiler.h: Rename inline_function to always_inline_function
xiaoxiang781216 commented on PR #6983: URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1238846972 @pkarashchenko could you merge it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7009: udp: add IPVx_PKTINFO related support
xiaoxiang781216 merged PR #7009: URL: https://github.com/apache/incubator-nuttx/pull/7009 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: udp: add IPVx_PKTINFO related support
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new 9bff29d7e7 udp: add IPVx_PKTINFO related support 9bff29d7e7 is described below commit 9bff29d7e7af930edf8771d4f3a5c7c579dd39c6 Author: zhanghongyu AuthorDate: Wed Aug 24 14:55:56 2022 +0800 udp: add IPVx_PKTINFO related support Signed-off-by: zhanghongyu --- include/netinet/in.h | 2 + net/inet/inet_sockif.c | 12 +- net/inet/ipv4_setsockopt.c | 28 + net/inet/ipv6_setsockopt.c | 30 + net/tcp/tcp.h | 10 +- net/tcp/tcp_recvfrom.c | 14 +-- net/udp/udp.h | 11 +- net/udp/udp_callback.c | 25 - net/udp/udp_recvfrom.c | 268 - 9 files changed, 269 insertions(+), 131 deletions(-) diff --git a/include/netinet/in.h b/include/netinet/in.h index 59af8f807d..f3531031b2 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -127,6 +127,8 @@ * to IPv6 communications only */ #define IPV6_PKTINFO (__SO_PROTOCOL + 8) /* Get some information about * the incoming packet */ +#define IPV6_RECVPKTINFO (__SO_PROTOCOL + 9) /* It functions just same as +* IPV6_PKTINFO for now */ /* Values used with SIOCSIFMCFILTER and SIOCGIFMCFILTER ioctl's */ diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index d63cd40873..3823cf488e 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -1569,17 +1569,13 @@ static ssize_t inet_sendfile(FAR struct socket *psock, static ssize_t inet_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, int flags) { - FAR void *buf = msg->msg_iov->iov_base; - size_t len = msg->msg_iov->iov_len; - FAR struct sockaddr *from = msg->msg_name; - FAR socklen_t *fromlen = &msg->msg_namelen; ssize_t ret; /* If a 'from' address has been provided, verify that it is large * enough to hold this address family. */ - if (from) + if (msg->msg_name) { socklen_t minlen; @@ -1608,7 +1604,7 @@ static ssize_t inet_recvmsg(FAR struct socket *psock, return -EINVAL; } - if (*fromlen < minlen) + if (msg->msg_namelen < minlen) { return -EINVAL; } @@ -1624,7 +1620,7 @@ static ssize_t inet_recvmsg(FAR struct socket *psock, case SOCK_STREAM: { #ifdef NET_TCP_HAVE_STACK -ret = psock_tcp_recvfrom(psock, buf, len, flags, from, fromlen); +ret = psock_tcp_recvfrom(psock, msg, flags); #else ret = -ENOSYS; #endif @@ -1636,7 +1632,7 @@ static ssize_t inet_recvmsg(FAR struct socket *psock, case SOCK_DGRAM: { #ifdef NET_UDP_HAVE_STACK -ret = psock_udp_recvfrom(psock, buf, len, flags, from, fromlen); +ret = psock_udp_recvfrom(psock, msg, flags); #else ret = -ENOSYS; #endif diff --git a/net/inet/ipv4_setsockopt.c b/net/inet/ipv4_setsockopt.c index de2f21fd86..9a24727a4d 100644 --- a/net/inet/ipv4_setsockopt.c +++ b/net/inet/ipv4_setsockopt.c @@ -203,6 +203,34 @@ int ipv4_setsockopt(FAR struct socket *psock, int option, } break; + case IP_PKTINFO: +{ + FAR struct udp_conn_s *conn; + int enable; + + if (psock->s_type != SOCK_DGRAM || + value == NULL || value_len == 0) +{ + ret = -EINVAL; + break; +} + + enable = (value_len >= sizeof(int)) ? +*(FAR int *)value : (int)*(FAR unsigned char *)value; + conn = (FAR struct udp_conn_s *)psock->s_conn; + if (enable) +{ + conn->flags |= _UDP_FLAG_PKTINFO; +} + else +{ + conn->flags &= ~_UDP_FLAG_PKTINFO; +} + + ret = OK; +} +break; + /* The following IPv4 socket options are defined, but not implemented */ case IP_MULTICAST_IF: /* Set local device for a multicast diff --git a/net/inet/ipv6_setsockopt.c b/net/inet/ipv6_setsockopt.c index 11e0cd53ef..17bbdb695d 100644 --- a/net/inet/ipv6_setsockopt.c +++ b/net/inet/ipv6_setsockopt.c @@ -34,6 +34,7 @@ #include "mld/mld.h" #include "inet/inet.h" +#include "udp/udp.h" #ifdef CONFIG_NET_IPv6 @@ -110,6 +111,35 @@ int ipv6_setsockopt(FAR struct socket *psock, int option, } break; + case IPV6_PKTINFO: + case IPV6_RECVPKTINFO: +{ + FAR struct udp_conn_s *conn; + int enable; + + if (psock->s_type != SOCK_DGRAM || + value == NULL || value_len == 0) +{ + ret = -EIN
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7019: sched: fix corner case wd_cancel assert crash
xiaoxiang781216 merged PR #7019: URL: https://github.com/apache/incubator-nuttx/pull/7019 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated (9bff29d7e7 -> 3b04450808)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git from 9bff29d7e7 udp: add IPVx_PKTINFO related support add 3b04450808 sched: fix corner case wd_cancel assert crash No new revisions were added by this update. Summary of changes: sched/mqueue/mq_rcvinternal.c | 5 + sched/mqueue/mq_sndinternal.c | 5 + sched/signal/sig_dispatch.c | 12 3 files changed, 22 insertions(+)
[GitHub] [incubator-nuttx] anchao commented on pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT
anchao commented on PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#issuecomment-1238851483 Close this PR let us track https://github.com/apache/incubator-nuttx/pull/7020 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao closed pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT
anchao closed pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT URL: https://github.com/apache/incubator-nuttx/pull/7014 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964336747 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ Review Comment: Thank you, done! ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpdev != NULL) { - ioctl_get_ipv4addr(&req->ifr_dstaddr, dev->d_draddr); + strlcpy(req->ifr_name, tmpdev->d_ifname, IFNAMSIZ); ret = OK; } + else +{ + ret = -ENODEV; +} } break; #endif - -#ifdef CONFIG_NET_IPv4 - case SIOCSIFDSTADDR: /* Set P-to-P address */ + default: { - dev = netdev_ifr_dev(req); - if (dev) + arglen = net_ioctl_arglen(cmd); + + if (arglen == sizeof(struct ifreq) || + arglen == sizeof(struct lifreq)) { - ioctl_set_ipv4addr(&dev->d_draddr, &req->ifr_dstaddr); - ret = OK; + dev = netdev_ifr_dev(req); + ret = (dev == NULL) ? -ENODEV : OK; +} + else +{ + ret = -ENOTTY; } } break; -#endif +} + if (dev == NULL) +{ + return ret; +} + + /* Execute the command with ifr_name or lifr_name */ Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964337633 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpdev != NULL) { - ioctl_get_ipv4addr(&req->ifr_dstaddr, dev->d_draddr); + strlcpy(req->ifr_name, tmpdev->d_ifname, IFNAMSIZ); ret = OK; } + else +{ + ret = -ENODEV; +} } break; #endif - -#ifdef CONFIG_NET_IPv4 - case SIOCSIFDSTADDR: /* Set P-to-P address */ + default: { - dev = netdev_ifr_dev(req); - if (dev) + arglen = net_ioctl_arglen(cmd); + + if (arglen == sizeof(struct ifreq) || Review Comment: I will split the part "struct ifreq" commands out of net_ioctl_arglen() to ensure the consistency of parameter -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964337755 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); + if (tmpdev != NULL) { - ioctl_get_ipv4addr(&req->ifr_dstaddr, dev->d_draddr); + strlcpy(req->ifr_name, tmpdev->d_ifname, IFNAMSIZ); ret = OK; Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
anchao commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964337848 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; +} +break; + #ifdef CONFIG_NET_IPv4 - case SIOCGIFADDR: /* Get IP address */ + case SIOCGIFCONF: /* Return an interface list (IPv4) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_get_ipv4addr(&req->ifr_addr, dev->d_ipaddr); - ret = OK; -} + ret = netdev_ipv4_ifconf((FAR struct ifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCSIFADDR: /* Set IP address */ +#ifdef CONFIG_NET_IPv6 + case SIOCGLIFCONF: /* Return an interface list (IPv6) */ { - dev = netdev_ifr_dev(req); - if (dev) -{ - ioctl_set_ipv4addr(&dev->d_ipaddr, &req->ifr_addr); - ret = OK; -} + ret = netdev_ipv6_ifconf((FAR struct lifconf *)req); } break; #endif -#ifdef CONFIG_NET_IPv4 - case SIOCGIFDSTADDR: /* Get P-to-P address */ +#ifdef CONFIG_NETDEV_IFINDEX + case SIOCGIFNAME: /* Get interface name */ { - dev = netdev_ifr_dev(req); - if (dev) + tmpdev = netdev_findbyindex(req->ifr_ifindex); Review Comment: Done ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +636,204 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + FAR struct net_driver_s *tmpdev; + ssize_t arglen; + int ret; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute the command without ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ + req->ifr_count = netdev_count(); + ret = OK; Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] nealef commented on a diff in pull request #7025: Add check in roundx() functions for infinite or NaN cases
nealef commented on code in PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#discussion_r964342540 ## libs/libc/math/lib_roundl.c: ## @@ -34,6 +34,9 @@ #ifdef CONFIG_HAVE_LONG_DOUBLE long double roundl(long double x) { + if (isinf(x) || isnan(x)) Review Comment: I'm not sure it's needed unlike float, where infinity/nan are not just truncated versions of the double value, they have different values: long double - infinity: 0x7fff - nan: 0x7fff8000 double - infinity: 0x7fff - nan: 0x7fff8000 float - infinity: 0x7f80 - nan: 0x7fc0 If you are using `gcc` you can use `__builtin_infl()`, `__builtin_inf()`, `__builtin_inff()`, `__builtin_nanl("")`, `__builtin_nan("")`, and `__builtin_nanf("")`. However, reusing `INFINITY` and `NAN` for long doubles is fine from a value perspective. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7026: Clean up psock_udp_recvfrom related code
xiaoxiang781216 opened a new pull request, #7026: URL: https://github.com/apache/incubator-nuttx/pull/7026 ## Summary follow up https://github.com/apache/incubator-nuttx/pull/7009: - udp: Don't accumulate the receive length in psock_udp_recvfrom - udp: Remove the unnessary check of addr size in udp_readahead ## Impact Minor, code refactor only ## Testing Pass CI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7024: drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c
xiaoxiang781216 merged PR #7024: URL: https://github.com/apache/incubator-nuttx/pull/7024 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx] branch master updated: drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new 22a5cc0973 drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c 22a5cc0973 is described below commit 22a5cc097399d864fec369e2b9c5a56e3bd30d41 Author: Masayuki Ishikawa AuthorDate: Wed Sep 7 10:02:50 2022 +0900 drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c Summary: - I noticed that the latest ifconfig command shows nothing - Finally, I found that gs2200m.c needs to handle SIOCGIFFLAGS - This commit fixes this issue Impact: - gs2200m only Testing: - Tested with spresense:wifi - NOTE: gs2200m_main.c will be updated later Signed-off-by: Masayuki Ishikawa --- drivers/wireless/gs2200m.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index 9e9739ec3b..9e650a86f4 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -2896,6 +2896,11 @@ static int gs2200m_ioctl_ifreq(FAR struct gs2200m_dev_s *dev, switch (msg->cmd) { + case SIOCGIFFLAGS: +getreq = true; +msg->ifr.ifr_flags = dev->net_dev.d_flags; +break; + case SIOCGIFHWADDR: getreq = true; memcpy(&msg->ifr.ifr_hwaddr.sa_data,
[GitHub] [incubator-nuttx] hartmannathan commented on pull request #7025: Add check in roundx() functions for infinite or NaN cases
hartmannathan commented on PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#issuecomment-1238862373 > I am unsure what the alignment issue is. Is it spaces v tabs? Do I need to set my tabs to a nuttx standard setting? I just looked at it and I can't see anything wrong with the alignment. All source files in NuttX use spaces, not tabs, and the indentation level is two spaces. Which is exactly what's in this patch. And looking at nxstyle.c, I don't see why it should complain here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1311: wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
xiaoxiang781216 merged PR #1311: URL: https://github.com/apache/incubator-nuttx-apps/pull/1311 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[incubator-nuttx-apps] branch master updated: wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new 383709158 wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c 383709158 is described below commit 3837091582e10e8117f858f0f2666a183827 Author: Masayuki Ishikawa AuthorDate: Wed Sep 7 10:14:55 2022 +0900 wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c Summary: - I noticed that the latest ifconfig command shows nothing - Finally, I found that gs2200m_main.c needs to handle SIOCGIFFLAGS - This commit fixes this issue Impact: - gs2200m only Testing: - Tested with spresense:wifi - NOTE: gs2200m driver needs to be updated as well Signed-off-by: Masayuki Ishikawa --- wireless/gs2200m/gs2200m_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wireless/gs2200m/gs2200m_main.c b/wireless/gs2200m/gs2200m_main.c index b53cf97af..fa1002740 100644 --- a/wireless/gs2200m/gs2200m_main.c +++ b/wireless/gs2200m/gs2200m_main.c @@ -1568,6 +1568,7 @@ static int ioctl_request(int fd, FAR struct gs2200m_s *priv, switch (req->cmd) { case SIOCGIFADDR: + case SIOCGIFFLAGS: case SIOCGIFHWADDR: case SIOCGIWNWID: case SIOCGIWFREQ:
[GitHub] [incubator-nuttx] hartmannathan commented on pull request #7025: Add check in roundx() functions for infinite or NaN cases
hartmannathan commented on PR #7025: URL: https://github.com/apache/incubator-nuttx/pull/7025#issuecomment-1238866327 OK I have a workaround: ``` if (isinf(x) || isnan(x)) { return (x); } ``` nxstyle doesn't complain when this is written in a block. Just add the curly braces to all three instances of this check; indent the curly braces 2 more than the `if` and then indent the return 2 more than that, and the nxstyle errors should go away. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7020: net/netdev: simplify handling of netdev ifr ioctl()
xiaoxiang781216 commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964349288 ## net/netdev/netdev_ioctl.c: ## @@ -636,235 +700,201 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + int ret = OK; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute commands that do not need ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ +{ Review Comment: let's remove all unnecessary {} -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6949: usrsock:refine usrsock's architecture
masayuki2009 commented on PR #6949: URL: https://github.com/apache/incubator-nuttx/pull/6949#issuecomment-1238869569 @ethanlcz Please test this PR with `CONFIG_DEBUG_ASSERTIONS=y` ``` nsh> usrsocktest Starting unit-tests... Testing group "char_dev" => Group "char_dev": [OK] Testing group "no_daemon" => Group "no_daemon": [OK] Testing group "basic_daemon" => Group "basic_daemon": [OK] Testing group "basic_connect" => Group "basic_connect": [OK] Testing group "basic_connect_delay" => Group "basic_connect_delay": [OK] Testing group "no_block_connect" => Group "no_block_connect": [OK] Testing group "basic_send" => Group "basic_send": [OK] Testing group "no_block_send" => Group "no_block_send": [OK] Testing group "block_send" => Group "block_send": [OK] Testing group "no_block_recv" => Group "no_block_recv": [OK] Testing group "block_recv" => Group "block_recv": [OK] Testing group "remote_disconnect" => Group "remote_disconnect": [OK] Testing group "basic_setsockopt" => up_assert: Assertion failed at file:usrsock/usrsock_dev.c line: 577 task: usrsocktest ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org