anchao commented on code in PR #7616:
URL: https://github.com/apache/incubator-nuttx/pull/7616#discussion_r1027227780


##########
net/devif/devif_iobsend.c:
##########
@@ -53,24 +53,65 @@
  ****************************************************************************/
 
 void devif_iob_send(FAR struct net_driver_s *dev, FAR struct iob_s *iob,
-                    unsigned int len, unsigned int offset)
+                    unsigned int len, unsigned int offset,
+                    unsigned int skip)
 {
+  unsigned int copyin;
+  int ret;
+
   if (dev == NULL || len == 0 || len >= NETDEV_PKTSIZE(dev))
     {
-      nerr("devif_iob_send error, %p, send len: %u, pkt len: %u\n",
-                                          dev, len, NETDEV_PKTSIZE(dev));
+      nerr("%s error, %p, send len: %u, pkt len: %u\n",
+            __func__, dev, len, NETDEV_PKTSIZE(dev));
       return;
     }
 
-  /* Copy the data from the I/O buffer chain to the device buffer */
+  /* Append the send buffer after device buffer */
+
+  if (dev->d_iob != NULL)
+    {
+      /* Skip the l3/l4 offset before append */
+
+      netdev_iob_update(dev->d_iob, dev->d_iob->io_offset, skip);
+
+      dev->d_sndlen = len;
+
+      /* Clone the iob to target device buffer */
 
-  iob_copyout(dev->d_appdata, iob, len, offset);
-  dev->d_sndlen = len;
+      while (iob && len > 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

Reply via email to