You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/08 07:09:20 UTC
[GitHub] [nuttx] pstys opened a new pull request, #7821: Add mtu set and interface name set in ioctl
pstys opened a new pull request, #7821:
URL: https://github.com/apache/nuttx/pull/7821
follow LinuxOS:linux-5.10.152\include\uapi\linux\sockios.h
add SIOCSIFMTU and SIOCSIFNAME
## Summary
## Impact
## 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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] pstys commented on a diff in pull request #7821: Add mtu set and interface name set in ioctl
Posted by GitBox <gi...@apache.org>.
pstys commented on code in PR #7821:
URL: https://github.com/apache/nuttx/pull/7821#discussion_r1043123728
##########
net/netdev/netdev_ioctl.c:
##########
@@ -860,6 +877,15 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
case SIOCGIFMTU: /* Get MTU size */
req->ifr_mtu = NETDEV_PKTSIZE(dev);
break;
+ case SIOCSIFMTU: /* Set MTU size */
+ {
+ dev = netdev_ifr_dev(req);
+ if (dev)
+ {
+ NETDEV_PKTSIZE(dev) = req->ifr_mtu;
+ }
+ }
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] pkarashchenko merged pull request #7821: Add mtu set and interface name set in ioctl
Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7821:
URL: https://github.com/apache/nuttx/pull/7821
--
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] pkarashchenko commented on a diff in pull request #7821: Add mtu set and interface name set in ioctl
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7821:
URL: https://github.com/apache/nuttx/pull/7821#discussion_r1043075011
##########
net/netdev/netdev_ioctl.c:
##########
@@ -860,6 +877,15 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
case SIOCGIFMTU: /* Get MTU size */
req->ifr_mtu = NETDEV_PKTSIZE(dev);
break;
+ case SIOCSIFMTU: /* Set MTU size */
+ {
+ dev = netdev_ifr_dev(req);
+ if (dev)
+ {
+ NETDEV_PKTSIZE(dev) = req->ifr_mtu;
+ }
+ }
Review Comment:
```suggestion
dev = netdev_ifr_dev(req);
if (dev != NULL)
{
NETDEV_PKTSIZE(dev) = req->ifr_mtu;
}
```
--
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