anchao commented on code in PR #7616: URL: https://github.com/apache/nuttx/pull/7616#discussion_r1037507896
########## include/nuttx/net/netdev.h: ########## @@ -802,4 +936,88 @@ void net_incr32(FAR uint8_t *op32, uint16_t op16); int netdev_lladdrsize(FAR struct net_driver_s *dev); +/**************************************************************************** + * Name: netdev_iob_prepare + * + * Description: + * Prepare data buffer for a given NIC + * The iob offset will be updated to l2 gruard size by default: + * ---------------------------------------------------------------- + * | iob entry | + * ---------------------------------------------------------------| + * |<--- CONFIG_NET_LL_GUARDSIZE -->|<--- io_len/io_pktlen(0) --->| + * ---------------------------------------------------------------| + * + * Assumptions: + * The caller has locked the network. + * + * Returned Value: + * A non-zero copy is returned on success. + * + ****************************************************************************/ + +int netdev_iob_prepare(FAR struct net_driver_s *dev, bool throttled, Review Comment: Prepare is more suitable, sometimes we just initialize the device iob via this api -- 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