anchao commented on code in PR #7616: URL: https://github.com/apache/incubator-nuttx/pull/7616#discussion_r1027227936
########## net/devif/devif_poll.c: ########## @@ -639,15 +698,44 @@ static inline int devif_poll_tcp_connections(FAR struct net_driver_s *dev, * field is set to a value larger than zero. The device driver should then * send out the packet. * + * This is the iob buffer version of devif_input(), + * this function will support send/receive iob vectors directly between + * the driver and l3/l4 stack to avoid unnecessary memory copies, + * especially on hardware that supports Scatter/gather, which can + * greatly improve performance + * this function will uses d_iob as packets input which used by some + * NICs such as celluler net driver. + * + * If NIC hardware support Scatter/gather transfer + * + * tcp_poll()/udp_poll()/pkt_poll()/...(l3/l4) + * / \ + * / \ + * devif_poll_[l3|l4]_connections() devif_iob_send() (nocopy:udp/icmp/...) + * / \ (copy:tcp) + * / \ + * devif_iob_poll("NIC"_txpoll) callback() // "NIC"_txpoll + * + * * Assumptions: * This function is called from the MAC device driver with the network * locked. * ****************************************************************************/ -int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback) +int devif_iob_poll(FAR struct net_driver_s *dev, + devif_poll_callback_t callback) { - int bstop = false; + int bstop; Review Comment: Just follow the current style, I think it can be changed uniformly in the next 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org