You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "wangchen61698 (via GitHub)" <gi...@apache.org> on 2023/04/27 02:32:32 UTC

[GitHub] [nuttx] wangchen61698 opened a new pull request, #9116: net/procfs: Support to show MTU in netdev statistics

wangchen61698 opened a new pull request, #9116:
URL: https://github.com/apache/nuttx/pull/9116

   ## Summary
   Support to show MTU in netdev statistics
   ## Impact
   N/A
   ## Testing
   Usage:
   ifconfig (interfacename)
   example:
   ifconfig eth0
   eth0	Link encap:Ethernet HWaddr 42:d3:59:ad:5a:2f at RUNNING mtu 1500
   	inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
   	inet6 addr: fe80::40d3:59ff:fead:5a2f/64
   	inet6 DRaddr: ::/64
   


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] masayuki2009 commented on pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 commented on PR #9116:
URL: https://github.com/apache/nuttx/pull/9116#issuecomment-1526889555

   @wangchen61698 
   I noticed that the gs2200m driver with usrsock can not obtain MTU info from the Wi-Fi chip.
   So I think that showing MTU info should be selectable.
   


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #9116:
URL: https://github.com/apache/nuttx/pull/9116


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] wengzhe commented on pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "wengzhe (via GitHub)" <gi...@apache.org>.
wengzhe commented on PR #9116:
URL: https://github.com/apache/nuttx/pull/9116#issuecomment-1527081319

   > @wangchen61698 I noticed that the gs2200m driver with usrsock can not obtain MTU info from the Wi-Fi chip. So I think that showing MTU info should be selectable.
   
   @masayuki2009 Hi, it seems that the gs2200m driver doesn't do the step `obtain MTU info from the Wi-Fi chip` and change `dev->d_pktsize`, so `dev->d_pktsize` would be default value (`CONFIG_NET_ETH_PKTSIZE`). But I don't have the device so if there is a mistake please point out to me, thanks :-)
   
   I mean, the net stack will default think its MTU is `CONFIG_NET_ETH_PKTSIZE - ETH_HDRLEN` and cannot send packet longer than this value, so it will be the 'actual' MTU that takes effect for packet send.
   
   Overall, I suggest to set the value of `CONFIG_NET_ETH_PKTSIZE` to correct value (MTU + L2 header len), which is the main effect of this config (Refer to its description below, `To get an MTU of 1500, for example, you would need packet buffer of size 1514`). And the MTU info in `ifconfig` would faithfully show the value that takes effect.
   https://github.com/apache/nuttx/blob/c87da0d11521653f1f38c3340dd542bd53e36016/net/Kconfig#L58-L80


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] masayuki2009 commented on pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 commented on PR #9116:
URL: https://github.com/apache/nuttx/pull/9116#issuecomment-1526963363

   >what' value will show in ifconfig?
   
   ```
   nsh> ifconfig
   wlan0	Link encap:Ethernet HWaddr 3c:95:09:00:89:96 at UP mtu 576
   	inet addr:192.168.10.22 DRaddr:192.168.10.1 Mask:255.255.255.0
   ```
   
   Perhaps, the value was calculated from 
   
   ```
   #
   # Driver buffer configuration
   #
   CONFIG_NET_ETH_PKTSIZE=590
   CONFIG_NET_GUARDSIZE=2
   CONFIG_NET_LL_GUARDSIZE=14
   CONFIG_NET_RECV_BUFSIZE=0
   ```
   
   


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9116:
URL: https://github.com/apache/nuttx/pull/9116#issuecomment-1526959942

   what' value will show in ifconfig.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9116: net/procfs: Support to show MTU in netdev statistics

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9116:
URL: https://github.com/apache/nuttx/pull/9116#issuecomment-1527074096

   > @wangchen61698 I noticed that the gs2200m driver with usrsock can not obtain MTU info from the Wi-Fi chip. So I think that showing MTU info should be selectable.
   
   WiFi has the standard MTU definition, why not return the value in gs2200m driver directly if the chip can't return mtd info directly?


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org