zhhyu7 commented on code in PR #8811:
URL: https://github.com/apache/nuttx/pull/8811#discussion_r1136481062


##########
drivers/net/tun.c:
##########
@@ -986,6 +988,7 @@ static ssize_t tun_write(FAR struct file *filep, FAR const 
char *buffer,
         {
           net_lock();
           ret = netdev_iob_prepare(&priv->dev, false, 0);
+          priv->dev.d_buf = NULL;

Review Comment:
   > why this is needed?
   
   netdev_iob_prepare will set dev.d_buf = dev.d_iob->io_data, there will be 
problems the next devif_poll.
   dev.d_buf should be NULL when offload case. this operation simply reset the 
dev.d_buf to previous value.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to