You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "michi-jung (via GitHub)" <gi...@apache.org> on 2023/01/25 17:44:54 UTC

[GitHub] [nuttx] michi-jung opened a new pull request, #8239: Remove use of IPv[4|6]BUF macro from net/slip

michi-jung opened a new pull request, #8239:
URL: https://github.com/apache/nuttx/pull/8239

   ## Summary
   
   The latest version of netdev.h's IPv4BUF and IPv6BUF work only for net device drivers that use IOBs.  The SLIP net device driver is still a legacy one, using the netdev's d_buf pointer.  Thus, those macros can not be used until slip.c has been modernized.
   
   Also silence compiler warnings about potentially truncated snprintf output.
   
   ## Impact
   
   Makes SLIP work again.
   
   ## Testing
   
   Tested with my custom STM32U5 based board.


-- 
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 a diff in pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8239:
URL: https://github.com/apache/nuttx/pull/8239#discussion_r1088603677


##########
drivers/net/slip.c:
##########
@@ -109,6 +109,11 @@
 
 #define SLIP_WDDELAY   (1*1000000)
 
+/* This is a helper pointer for accessing the contents of the ip header */
+
+#define IPv4HDR        ((FAR struct ipv4_hdr_s *)priv->dev.d_buf)

Review Comment:
   @wengzhe already prepare a patch to convert tun.c using iob offload, he will do the same thing for slip.c too. Since we are in Spring Festival holiday, the patch will be provided early next week.



-- 
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 a diff in pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8239:
URL: https://github.com/apache/nuttx/pull/8239#discussion_r1090233019


##########
drivers/net/slip.c:
##########
@@ -109,6 +109,11 @@
 
 #define SLIP_WDDELAY   (1*1000000)
 
+/* This is a helper pointer for accessing the contents of the ip header */
+
+#define IPv4HDR        ((FAR struct ipv4_hdr_s *)priv->dev.d_buf)

Review Comment:
   @michi-jung could you try whether this patch fix your issue: https://github.com/apache/nuttx/pull/8344?



-- 
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 #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8239:
URL: https://github.com/apache/nuttx/pull/8239#discussion_r1087185294


##########
drivers/net/slip.c:
##########
@@ -109,6 +109,11 @@
 
 #define SLIP_WDDELAY   (1*1000000)
 
+/* This is a helper pointer for accessing the contents of the ip header */
+
+#define IPv4HDR        ((FAR struct ipv4_hdr_s *)priv->dev.d_buf)

Review Comment:
   Maybe similar change is need in `tun.c`. @anchao could you please take a look?



-- 
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] acassis commented on a diff in pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8239:
URL: https://github.com/apache/nuttx/pull/8239#discussion_r1088411503


##########
drivers/net/slip.c:
##########
@@ -109,6 +109,11 @@
 
 #define SLIP_WDDELAY   (1*1000000)
 
+/* This is a helper pointer for accessing the contents of the ip header */
+
+#define IPv4HDR        ((FAR struct ipv4_hdr_s *)priv->dev.d_buf)

Review Comment:
   @pkarashchenko @xiaoxiang781216 maybe PPPD is not working because it uses a TUN interface, what do you think?



-- 
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 a diff in pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8239:
URL: https://github.com/apache/nuttx/pull/8239#discussion_r1087381093


##########
drivers/net/slip.c:
##########
@@ -109,6 +109,11 @@
 
 #define SLIP_WDDELAY   (1*1000000)
 
+/* This is a helper pointer for accessing the contents of the ip header */
+
+#define IPv4HDR        ((FAR struct ipv4_hdr_s *)priv->dev.d_buf)

Review Comment:
   @wengzhe let's switch slip.c to iob like tun.c too.



-- 
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 #8239: Remove use of IPv[4|6]BUF macro from net/slip

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

   let use #8344 and close this pr.


-- 
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 closed pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 closed pull request #8239: Remove use of IPv[4|6]BUF macro from net/slip
URL: https://github.com/apache/nuttx/pull/8239


-- 
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