Advertisement
Guest User

mbuf.9 patch

a guest
Jan 28th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Index: mbuf.9
  2. ===================================================================
  3. --- mbuf.9 (revision 260701)
  4. +++ mbuf.9 (working copy)
  5. @@ -72,8 +72,10 @@
  6. .Ft struct mbuf *
  7. .Fn m_get "int how" "int type"
  8. .Ft struct mbuf *
  9. -.Fn m_getm "struct mbuf *orig" "int len" "int how" "int type"
  10. +.Fn m_getm "struct mbuf *orig" "int len" "int how" "short type"
  11. .Ft struct mbuf *
  12. +.Fn m_getm2 "struct mbuf *m" "int len" "int how" "short type" "int flags"
  13. +.Ft struct mbuf *
  14. .Fn m_getcl "int how" "short type" "int flags"
  15. .Ft struct mbuf *
  16. .Fn m_getclr "int how" "int type"
  17. @@ -136,6 +138,8 @@
  18. .Ft struct mbuf *
  19. .Fn m_defrag "struct mbuf *m0" "int how"
  20. .Ft struct mbuf *
  21. +.Fn m_collapse "struct mbuf *m0" "int how" "int maxfrags"
  22. +.Ft struct mbuf *
  23. .Fn m_unshare "struct mbuf *m0" "int how"
  24. .\"
  25. .Sh DESCRIPTION
  26. @@ -574,6 +578,14 @@
  27. and
  28. .Vt mbuf cluster
  29. allocation.
  30. +.It Fn m_getm2 m len how type flags
  31. +A version of
  32. +.Fn m_getm
  33. +that allows specific
  34. +.Fa flags
  35. +to be set, e.g. when
  36. +.Vt M_PKTHDR
  37. +is not desired.
  38. .It Fn m_gethdr how type
  39. A function version of
  40. .Fn MGETHDR
  41. @@ -973,8 +985,19 @@
  42. depending on the caller's preference.
  43. .Pp
  44. This function is especially useful in network drivers, where
  45. -certain long mbuf chains must be shortened before being added
  46. -to TX descriptor lists.
  47. +certain long
  48. +.Vt mbuf chains
  49. +must be shortened before being added to TX descriptor lists.
  50. +.It Fn m_collapse m0 how maxfrags
  51. +Collapse an mbuf chain, returning at most
  52. +.Fa maxfrags
  53. +separate
  54. +.Vt mbufs+clusters .
  55. +If this is not possible
  56. +.Dv NULL
  57. +is returned and the original
  58. +.Vt mbuf chain
  59. +is left in its present (potentially modified) state.
  60. .It Fn m_unshare m0 how
  61. Create a version of the specified mbuf chain whose
  62. contents can be safely modified without affecting other users.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement