KKopyscinski commented on a change in pull request #872:
URL: https://github.com/apache/mynewt-nimble/pull/872#discussion_r508273889



##########
File path: porting/nimble/include/os/os_mbuf.h
##########
@@ -413,6 +413,21 @@ struct os_mbuf *os_mbuf_off(const struct os_mbuf *om, int 
off,
  */
 int os_mbuf_copydata(const struct os_mbuf *m, int off, int len, void *dst);
 
+/**
+ * @brief Calculates the length of an mbuf chain.
+ *
+ * Calculates the length of an mbuf chain.  If the mbuf contains a packet
+ * header, you should use `OS_MBUF_PKTLEN()` as a more efficient alternative to
+ * this function.
+ *
+ * @param om                    The mbuf to measure.
+ *
+ * @return                      The length, in bytes, of the provided mbuf
+ *                                  chain.
+ */
+uint16_t os_mbuf_len(const struct os_mbuf *om);
+/**

Review comment:
       Ok, I remember now: I was indeed copying fragments indicated by diff - 
to prevent conflict between types, for example `ble_npl_event` and `os_eventq`. 
So yes, this is caused by copying fragments.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to