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


##########
arch/sim/src/sim/up_netdriver.c:
##########
@@ -107,6 +120,10 @@ static void netdriver_reply(struct net_driver_s *dev)
 
   if (dev->d_len > 0)
     {
+#ifdef SIM_NETDEV_IOB_OFFLOAD
+      dev->d_buf = (void *)ETHBUF;

Review Comment:
   I added a new definition: LLBUF(Link Layer Buffer):
   
   ```
   /* There are some helper pointers for accessing the contents of the Link 
layer
    * headers
    */
   
   #define LLBUF ((FAR void *)(dev->d_iob ? \
                  &dev->d_iob->io_data[CONFIG_NET_LL_GRUARDSIZE - \
                                       NET_LL_HDRLEN(dev)] : dev->d_buf))
   
   /* Ethernet headers */
   
   #define ETHBUF ((FAR struct eth_hdr_s *)LLBUF)
   ```
   



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