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


##########
arch/sim/src/sim/up_netdriver.c:
##########
@@ -402,22 +436,21 @@ int netdriver_init(void)
                   netdriver_txdone_interrupt,
                   netdriver_rxready_interrupt);
 
-      /* Update the buffer size */
-
-      pktsize = dev->d_pktsize ? dev->d_pktsize :
-                (MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE);
-
       /* Allocate packet buffer */
 
-      pktbuf = kmm_malloc(pktsize);
-      if (pktbuf == NULL)
+#ifdef SIM_NETDEV_IOB_OFFLOAD
+      dev->d_buf     = NULL;
+#else
+      dev->d_buf = kmm_malloc(dev->d_pktsize ?

Review Comment:
   Done



##########
arch/sim/src/sim/up_netdriver.c:
##########
@@ -402,22 +436,21 @@ int netdriver_init(void)
                   netdriver_txdone_interrupt,
                   netdriver_rxready_interrupt);
 
-      /* Update the buffer size */
-
-      pktsize = dev->d_pktsize ? dev->d_pktsize :
-                (MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE);
-
       /* Allocate packet buffer */
 
-      pktbuf = kmm_malloc(pktsize);
-      if (pktbuf == NULL)
+#ifdef SIM_NETDEV_IOB_OFFLOAD
+      dev->d_buf     = NULL;

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